xA/xM/xW: refresh renamed buffers correctly
Rendering takes the current buffer into account, so change its value before using it, not afterwards. The order happened to not matter on at least Windows, because we just queue a message.
This commit is contained in:
parent
a62ed5bbac
commit
05a41b2629
2
xA/xA.go
2
xA/xA.go
|
@ -921,11 +921,11 @@ func relayProcessMessage(m *RelayEventMessage) {
|
||||||
|
|
||||||
b.bufferName = data.New
|
b.bufferName = data.New
|
||||||
|
|
||||||
refreshBufferList()
|
|
||||||
if data.BufferName == bufferCurrent {
|
if data.BufferName == bufferCurrent {
|
||||||
bufferCurrent = data.New
|
bufferCurrent = data.New
|
||||||
refreshStatus()
|
refreshStatus()
|
||||||
}
|
}
|
||||||
|
refreshBufferList()
|
||||||
if data.BufferName == bufferLast {
|
if data.BufferName == bufferLast {
|
||||||
bufferLast = data.New
|
bufferLast = data.New
|
||||||
}
|
}
|
||||||
|
|
|
@ -842,11 +842,11 @@ relayRPC.onEvent = { message in
|
||||||
|
|
||||||
b.bufferName = data.new
|
b.bufferName = data.new
|
||||||
|
|
||||||
refreshBufferList()
|
|
||||||
if b.bufferName == relayBufferCurrent {
|
if b.bufferName == relayBufferCurrent {
|
||||||
relayBufferCurrent = data.new
|
relayBufferCurrent = data.new
|
||||||
refreshStatus()
|
refreshStatus()
|
||||||
}
|
}
|
||||||
|
refreshBufferList()
|
||||||
if b.bufferName == relayBufferLast {
|
if b.bufferName == relayBufferLast {
|
||||||
relayBufferLast = data.new
|
relayBufferLast = data.new
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* xW.cpp: Win32 frontend for xC
|
* xW.cpp: Win32 frontend for xC
|
||||||
*
|
*
|
||||||
* Copyright (c) 2023, Přemysl Eric Janouch <p@janouch.name>
|
* Copyright (c) 2023 - 2024, Přemysl Eric Janouch <p@janouch.name>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted.
|
* purpose with or without fee is hereby granted.
|
||||||
|
@ -914,11 +914,11 @@ relay_process_message(const Relay::EventMessage &m)
|
||||||
|
|
||||||
b->buffer_name = data.new_;
|
b->buffer_name = data.new_;
|
||||||
|
|
||||||
refresh_buffer_list();
|
|
||||||
if (data.buffer_name == g.buffer_current) {
|
if (data.buffer_name == g.buffer_current) {
|
||||||
g.buffer_current = data.new_;
|
g.buffer_current = data.new_;
|
||||||
refresh_status();
|
refresh_status();
|
||||||
}
|
}
|
||||||
|
refresh_buffer_list();
|
||||||
if (data.buffer_name == g.buffer_last)
|
if (data.buffer_name == g.buffer_last)
|
||||||
g.buffer_last = data.new_;
|
g.buffer_last = data.new_;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue