fix: skip the autocompletion debounce when the document shrank past the captured position (#28824)
This commit is contained in:
1 file changed
+1
@@ -86,6 +86,7 @@ export const AIAutocompletion = Extension.create({
|
|||||||
|
|
||||||
const newState = view.state;
|
const newState = view.state;
|
||||||
const newSelection = newState.selection;
|
const newSelection = newState.selection;
|
||||||
|
if (currentPos >= newState.doc.content.size) return false;
|
||||||
const newNode = newState.doc.nodeAt(currentPos);
|
const newNode = newState.doc.nodeAt(currentPos);
|
||||||
|
|
||||||
// Check if the node still exists and is still a paragraph
|
// Check if the node still exists and is still a paragraph
|
||||||
|
|||||||
Reference in new issue
Block a user