Skip to content

Commit d1063d2

Browse files
40thievesmarijnh
authored andcommitted
[show-hint addon] Fix bug where hint at start of line didn't close on backspace
If cursor started at the beginning of a line and show hint was triggered, adding then deleting a character would not close the hint correctly.
1 parent 16b495e commit d1063d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addon/hint/show-hint.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
var pos = this.cm.getCursor(), line = this.cm.getLine(pos.line);
9999
if (pos.line != this.startPos.line || line.length - pos.ch != this.startLen - this.startPos.ch ||
100100
pos.ch < this.startPos.ch || this.cm.somethingSelected() ||
101-
(pos.ch && this.options.closeCharacters.test(line.charAt(pos.ch - 1)))) {
101+
(!pos.ch || this.options.closeCharacters.test(line.charAt(pos.ch - 1)))) {
102102
this.close();
103103
} else {
104104
var self = this;

0 commit comments

Comments
 (0)