diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2023-08-25 21:20:50 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2023-08-25 22:48:31 +0200 |
commit | 34521e61c1f0c44bc9018d5a7a861baf6888d5fc (patch) | |
tree | 3b9e87a3a728cb7a92726a1a7c3c10afe75723b5 /xW | |
parent | c22dd67fc16ad4070fdeec264f7538764ba7a19e (diff) | |
download | xK-34521e61c1f0c44bc9018d5a7a861baf6888d5fc.tar.gz xK-34521e61c1f0c44bc9018d5a7a861baf6888d5fc.tar.xz xK-34521e61c1f0c44bc9018d5a7a861baf6888d5fc.zip |
xP/xW: fix buffer rename handling
Maintaining string pointers to the current/last buffer
means that renames invalidate them.
Diffstat (limited to 'xW')
-rw-r--r-- | xW/xW.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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: |