mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 15:27:29 +00:00
Fixed double click word highlight not accounting for numbers/single letters
This commit is contained in:
1 parent
1ab26a9e84
commit
19e5213f3c
2 files changed
+4
-6
No files matched your search
@@ -5,8 +5,8 @@ import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.util.ChatAllowedCharacters;
|
||||
import noppes.npcs.NoppesStringUtils;
|
||||
import noppes.npcs.client.ClientProxy;
|
||||
|
||||
import noppes.npcs.client.gui.util.script.JavaTextContainer;
|
||||
import noppes.npcs.client.gui.util.script.JavaTextContainer.LineData;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
@@ -15,9 +15,6 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
import noppes.npcs.client.gui.util.script.JavaTextContainer.LineData;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import static net.minecraft.client.gui.GuiScreen.isCtrlKeyDown;
|
||||
|
||||
public class GuiScriptTextArea extends GuiNpcTextField {
|
||||
@@ -1471,7 +1468,7 @@ public class GuiScriptTextArea extends GuiNpcTextField {
|
||||
this.doubleClicked = true;
|
||||
Matcher m = this.container.regexWord.matcher(this.text);
|
||||
while (m.find()) {
|
||||
if (this.cursorPosition > m.start() && this.cursorPosition < m.end()) {
|
||||
if (this.cursorPosition >= m.start() && this.cursorPosition <= m.end()) {
|
||||
this.startSelection = m.start();
|
||||
this.endSelection = m.end();
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user