From a673b749a5816392652785457dd1cf3603368628 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sun, 8 Feb 2026 12:33:16 -0800 Subject: chore: Use actors --- .../ui/widget/EditorHighlightTextAreaBridge.java | 50 +++++++++++----------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'core/src/main/java/com/kotcrab/vis') 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(); + } } -- cgit v1.3