Skip to content

Commit 3962829

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/plugins/codeit-autocomplete.js

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

708-
// if offset is negative (start of query is in previous node),
708+
// while offset is negative (start of query is in previous node),
709709
// go to previous node
710-
if (offset < 0) {
710+
while (offset < 0) {
711711

712712
container = container.previousSibling;
713713
offset = offset + container.textContent.length;

0 commit comments

Comments
 (0)