diff options
| author | Elizabeth Hunt <me@liz.coffee> | 2026-02-08 12:33:16 -0800 |
|---|---|---|
| committer | Elizabeth Hunt <me@liz.coffee> | 2026-02-08 13:04:51 -0800 |
| commit | a673b749a5816392652785457dd1cf3603368628 (patch) | |
| tree | 2f9fce694996264e7135c2533c1afc1cca026cb6 /core/src/main/java/com/kotcrab/vis | |
| parent | a483f04c16e6b56df24527f6a640e79c86928238 (diff) | |
| download | the-abstraction-engine-java-a673b749a5816392652785457dd1cf3603368628.tar.gz the-abstraction-engine-java-a673b749a5816392652785457dd1cf3603368628.zip | |
chore: Use actors
Diffstat (limited to 'core/src/main/java/com/kotcrab/vis')
| -rw-r--r-- | core/src/main/java/com/kotcrab/vis/ui/widget/EditorHighlightTextAreaBridge.java | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/core/src/main/java/com/kotcrab/vis/ui/widget/EditorHighlightTextAreaBridge.java b/core/src/main/java/com/kotcrab/vis/ui/widget/EditorHighlightTextAreaBridge.java index a14c6a7..81cb1d3 100644 --- a/core/src/main/java/com/kotcrab/vis/ui/widget/EditorHighlightTextAreaBridge.java +++ b/core/src/main/java/com/kotcrab/vis/ui/widget/EditorHighlightTextAreaBridge.java @@ -1,33 +1,33 @@ package com.kotcrab.vis.ui.widget; public class EditorHighlightTextAreaBridge extends HighlightTextArea { - public EditorHighlightTextAreaBridge(final String text, final VisTextFieldStyle style) { - super(text, style); - } + public EditorHighlightTextAreaBridge(final String text, final VisTextFieldStyle style) { + super(text, style); + } - public void editorSyncCursorState() { - updateCurrentLine(); - showCursor(); - } + public void editorSyncCursorState() { + updateCurrentLine(); + showCursor(); + } - public void editorSetSelectionEndpoints(final int selectionStart, final int cursorPosition) { - final int clampedSelectionStart = Math.max(0, Math.min(selectionStart, getText().length())); - final int clampedCursorPosition = Math.max(0, Math.min(cursorPosition, getText().length())); - if (clampedSelectionStart == clampedCursorPosition) { - clearSelection(); - cursor = clampedCursorPosition; - editorSyncCursorState(); - return; - } + public void editorSetSelectionEndpoints(final int selectionStart, final int cursorPosition) { + final int clampedSelectionStart = Math.max(0, Math.min(selectionStart, getText().length())); + final int clampedCursorPosition = Math.max(0, Math.min(cursorPosition, getText().length())); + if (clampedSelectionStart == clampedCursorPosition) { + clearSelection(); + cursor = clampedCursorPosition; + editorSyncCursorState(); + return; + } - hasSelection = true; - this.selectionStart = clampedSelectionStart; - cursor = clampedCursorPosition; - editorSyncCursorState(); - } + hasSelection = true; + this.selectionStart = clampedSelectionStart; + cursor = clampedCursorPosition; + editorSyncCursorState(); + } - public void editorSetCursorKeepingSelection(final int cursorPosition) { - cursor = Math.max(0, Math.min(cursorPosition, getText().length())); - editorSyncCursorState(); - } + public void editorSetCursorKeepingSelection(final int cursorPosition) { + cursor = Math.max(0, Math.min(cursorPosition, getText().length())); + editorSyncCursorState(); + } } |
