From 34521e61c1f0c44bc9018d5a7a861baf6888d5fc Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Fri, 25 Aug 2023 21:20:50 +0200 Subject: xP/xW: fix buffer rename handling Maintaining string pointers to the current/last buffer means that renames invalidate them. --- xW/xW.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'xW') diff --git a/xW/xW.cpp b/xW/xW.cpp index 6984892..980f825 100644 --- a/xW/xW.cpp +++ b/xW/xW.cpp @@ -914,11 +914,15 @@ relay_process_message(const Relay::EventMessage &m) if (!b) break; - b->buffer_name = data.buffer_name; + b->buffer_name = data.new_; refresh_buffer_list(); - if (b->buffer_name == g.buffer_current) + if (data.buffer_name == g.buffer_current) { + g.buffer_current = data.new_; refresh_status(); + } + if (data.buffer_name == g.buffer_last) + g.buffer_last = data.new_; break; } case Relay::Event::BUFFER_REMOVE: -- cgit v1.2.3-70-g09d2