Skip to content

Commit 3d159b5

Browse files
committed
fix: check cursor position instead of line ending for keepHints
1 parent 5375e7c commit 3d159b5

File tree

1 file changed

+4
-2
lines changed
  • src/extensions/default/CSSCodeHints

1 file changed

+4
-2
lines changed

src/extensions/default/CSSCodeHints/main.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -687,9 +687,11 @@ define(function (require, exports, module) {
687687
this.editor.setCursorPos(newCursor);
688688
}
689689

690-
// If the current line ends with a semicolon, the CSS property is fully specified,
690+
// If the cursor is just after a semicolon that means that,
691+
// the CSS property is fully specified,
691692
// so we don't need to continue showing hints for its value.
692-
if(this.editor.getLine(start.line).trim().endsWith(';')) {
693+
const cursorPos = this.editor.getCursorPos();
694+
if(this.editor.getCharacterAtPosition({line: cursorPos.line, ch: cursorPos.ch - 1}) === ';') {
693695
keepHints = false;
694696
}
695697

0 commit comments

Comments
 (0)