fix(tui): make single-line paste atomic to avoid @ autocomplete lag

closes #1812
This commit is contained in:
Mario Zechner 2026-03-04 18:25:37 +01:00
parent 49749407fa
commit 689e7b4ac2
3 changed files with 23 additions and 4 deletions

View file

@ -1029,10 +1029,8 @@ export class Editor implements Component, Focusable {
}
if (pastedLines.length === 1) {
// Single line - insert character by character to trigger autocomplete
for (const char of filteredText) {
this.insertCharacter(char, true);
}
// Single line - insert atomically (do not trigger autocomplete during paste)
this.insertTextAtCursorInternal(filteredText);
return;
}