diff --git a/client/modules/IDE/components/Editor/index.jsx b/client/modules/IDE/components/Editor/index.jsx index 404741591a..168edb7779 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'; + element.style.color = 'white'; + element.style.padding = '5px 10px'; + element.style.fontSize = '14px'; + } + } + ], + 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