From e59dbf3eeede483cfabdc384137106d3e4dbb7f3 Mon Sep 17 00:00:00 2001 From: Valdemar Erk Date: Mon, 16 Dec 2024 10:17:47 +0100 Subject: [PATCH] fix: Don't mark current channel as read when clicking on it This would cause the channel to be marked as read if you held down your mouse button for a bit too long. --- src/app.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.zig b/src/app.zig index 444390c..2250046 100644 --- a/src/app.zig +++ b/src/app.zig @@ -1558,7 +1558,7 @@ pub const App = struct { .height = .{ .limit = 1 }, }); if (channel_win.hasMouse(self.state.mouse)) |mouse| { - if (mouse.type == .press and mouse.button == .left) { + if (mouse.type == .press and mouse.button == .left and self.state.buffers.selected_idx != row) { // When leaving a channel we mark it as read, so we make sure that's done // before we change to the new channel. self.markSelectedChannelRead(); -- 2.51.2