fix: prevent widget decoration beyond document end for vim keybindings

This commit is contained in:
Davis Chan 2025-06-12 23:28:32 +08:00
parent 047ee2e7f3
commit 124ce3f526

View file

@ -57,7 +57,7 @@ class CopyInlineCodeViewPlugin implements PluginValue {
node.from,
node.to
);
if (shouldExclude(codeText, filters)) {
if (shouldExclude(codeText, filters) || node.to + 1 > view.state.doc.length) {
return;
}
builder.add(