aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXThe <101992755+SirXThe@users.noreply.github.com>2023-02-28 17:59:24 +0100
committerGitHub <noreply@github.com>2023-02-28 11:59:24 -0500
commitd8a71de94f7fcbd237aafad3a6ef65ddc8712276 (patch)
tree88760048792a3d14cf3b617324dfd9cc30f82f03 /src
parent38af8a31a642fa3112ceb7651dd673e1de58851e (diff)
downloadChatting-d8a71de94f7fcbd237aafad3a6ef65ddc8712276.tar.gz
Chatting-d8a71de94f7fcbd237aafad3a6ef65ddc8712276.tar.bz2
Chatting-d8a71de94f7fcbd237aafad3a6ef65ddc8712276.zip
fix: resolve message copying not working properly in search mode (#23)
Diffstat (limited to 'src')
-rw-r--r--src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java b/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java
index 5503e35..97b00a7 100644
--- a/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java
+++ b/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java
@@ -4,6 +4,7 @@ import cc.polyfrost.oneconfig.config.core.OneColor;
import cc.polyfrost.oneconfig.libs.universal.UMouse;
import cc.polyfrost.oneconfig.utils.Notifications;
import cc.woverflow.chatting.Chatting;
+import cc.woverflow.chatting.chat.ChatSearchingManager;
import cc.woverflow.chatting.config.ChattingConfig;
import cc.woverflow.chatting.gui.components.CleanButton;
import cc.woverflow.chatting.hook.GuiNewChatHook;
@@ -227,7 +228,8 @@ public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook {
int i1 = k / this.mc.fontRendererObj.FONT_HEIGHT + this.scrollPos;
if (i1 >= 0 && i1 < this.drawnChatLines.size()) {
- return this.drawnChatLines.get(i1);
+ List<ChatLine> m = ChatSearchingManager.filterMessages(ChatSearchingManager.INSTANCE.getLastSearch(), this.drawnChatLines);
+ return m != null ? m.get(i1) : null;
}
}