From d610196e7c6b716e9ac4b047c84c084eb9d26d96 Mon Sep 17 00:00:00 2001 From: Harshit-7373 Date: Mon, 17 Mar 2025 23:40:36 +0530 Subject: [PATCH 1/2] Enhanced AutoComplete Hinter #3078 --- .../modules/IDE/components/Editor/index.jsx | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/client/modules/IDE/components/Editor/index.jsx b/client/modules/IDE/components/Editor/index.jsx index 404741591a..d4ad8f1fee 100644 --- a/client/modules/IDE/components/Editor/index.jsx +++ b/client/modules/IDE/components/Editor/index.jsx @@ -454,10 +454,30 @@ class Editor extends React.Component { .search(token.string) .filter((h) => h.item.text[0] === token.string[0]); + if (hints.length === 0) { + return { + list: [ + { + text: 'No results found', + render: (element) => { + element.textContent = 'No results found'; + element.style.backgroundColor = 'grey'; // White background + element.style.color = 'white'; // Black text + element.style.padding = '5px 10px'; // Add padding + element.style.fontSize = '14px'; // Adjust font size + } + } + ], + from: CodeMirror.Pos(c.line, token.start), + to: CodeMirror.Pos(c.line, c.ch), + selectedHint: 0 + }; + } return { list: hints, from: CodeMirror.Pos(c.line, token.start), - to: CodeMirror.Pos(c.line, c.ch) + to: CodeMirror.Pos(c.line, c.ch), + selectedHint: 0 }; }, hintOptions From 470d77904cca867847da8cc1bb975fe9a360e6c8 Mon Sep 17 00:00:00 2001 From: Harshit-7373 Date: Thu, 20 Mar 2025 14:43:40 +0530 Subject: [PATCH 2/2] Removed Self Explanatory Comments --- client/modules/IDE/components/Editor/index.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/modules/IDE/components/Editor/index.jsx b/client/modules/IDE/components/Editor/index.jsx index d4ad8f1fee..168edb7779 100644 --- a/client/modules/IDE/components/Editor/index.jsx +++ b/client/modules/IDE/components/Editor/index.jsx @@ -461,10 +461,10 @@ class Editor extends React.Component { text: 'No results found', render: (element) => { element.textContent = 'No results found'; - element.style.backgroundColor = 'grey'; // White background - element.style.color = 'white'; // Black text - element.style.padding = '5px 10px'; // Add padding - element.style.fontSize = '14px'; // Adjust font size + element.style.backgroundColor = 'grey'; + element.style.color = 'white'; + element.style.padding = '5px 10px'; + element.style.fontSize = '14px'; } } ],