diff options
author | isXander <xandersmith2008@gmail.com> | 2022-12-10 11:17:09 +0000 |
---|---|---|
committer | isXander <xandersmith2008@gmail.com> | 2022-12-10 11:17:09 +0000 |
commit | 2f5ddeb7f8e0832f2d1da4524d37b0301e477627 (patch) | |
tree | 6e3bcafa2a8144afe0022975359ff4b448bd16ce /src/client | |
parent | 3e03edff9633de35068cbb0e11c111a70585a74d (diff) | |
download | YetAnotherConfigLib-2f5ddeb7f8e0832f2d1da4524d37b0301e477627.tar.gz YetAnotherConfigLib-2f5ddeb7f8e0832f2d1da4524d37b0301e477627.tar.bz2 YetAnotherConfigLib-2f5ddeb7f8e0832f2d1da4524d37b0301e477627.zip |
delete backspace
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/java/dev/isxander/yacl/gui/controllers/string/StringControllerElement.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/java/dev/isxander/yacl/gui/controllers/string/StringControllerElement.java b/src/client/java/dev/isxander/yacl/gui/controllers/string/StringControllerElement.java index b2a324e..d2c752b 100644 --- a/src/client/java/dev/isxander/yacl/gui/controllers/string/StringControllerElement.java +++ b/src/client/java/dev/isxander/yacl/gui/controllers/string/StringControllerElement.java @@ -257,7 +257,9 @@ public class StringControllerElement extends ControllerWidget<IStringController< } protected void doDelete() { - if (caretPos < inputField.length()) { + if (selectionLength != 0) { + write(""); + } else if (caretPos < inputField.length()) { modifyInput(builder -> builder.deleteCharAt(caretPos)); } } |