Skip to content

Commit 412df08

Browse files
committed
Update codeit-autocomplete.js
1 parent 4bbfdbe commit 412df08

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/plugins/codeit-autocomplete.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,8 @@ acp.utils.getCaretPos = (cursor, query) => {
705705
let container = range.startContainer;
706706
let offset = range.startOffset - query.length;
707707

708-
// if offset is negative, go back a node
708+
// if offset is negative (start of query is in previous node),
709+
// go to previous node
709710
if (offset < 0) {
710711

711712
container = container.previousSibling;

0 commit comments

Comments
 (0)