Smart tab completion: replace till next separator

This commit is contained in:
bigguy345 committed 2026-01-04 02:39:27 +02:00
1 parent 02ce0912c7
commit ff7fbd411d
2 files changed
+44 -1

No files matched your search

@@ -489,6 +489,16 @@ public class GuiScriptTextArea extends GuiNpcTextField {
scrollToCursor();
}
@Override
public void replaceTextRange(String text, int startPosition, int endPosition) {
// Replace text from startPosition to endPosition
String before = GuiScriptTextArea.this.text.substring(0, startPosition);
String after = GuiScriptTextArea.this.text.substring(endPosition);
setText(before + text + after);
selection.reset(startPosition + text.length());
scrollToCursor();
}
@Override
public int getCursorPosition() {
return selection.getCursorPosition();