Send current size when in band resize events requested even if mode is already on

This commit is contained in:
Kovid Goyal 2024-07-18 20:40:05 +05:30
parent 8d1eb75f9c
commit a4cdc1cdf3
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 5 deletions

View file

@ -1154,10 +1154,8 @@ set_mode_from_const(Screen *self, unsigned int mode, bool val) {
}
break;
case INBAND_RESIZE_NOTIFICATION:
if (val != self->modes.mINBAND_RESIZE_NOTIFICATION) {
self->modes.mINBAND_RESIZE_NOTIFICATION = val;
if (val) CALLBACK("notify_child_of_resize", NULL);
}
self->modes.mINBAND_RESIZE_NOTIFICATION = val;
if (val) CALLBACK("notify_child_of_resize", NULL);
break;
default:
private = mode >= 1 << 5;

View file

@ -309,9 +309,11 @@ def test_resize(self):
parse_bytes(s, b'\x1b[?2048$p') # ]
self.ae(c.wtcbuf, b'\x1b[?2048;2$y') # ]
c.clear()
parse_bytes(s, b'\x1b[?2048h\x1b[?2048$p') # ]
parse_bytes(s, b'\x1b[?2048h\x1b[?2048$p') # ]]
self.ae(c.wtcbuf, b'\x1b[?2048;1$y') # ]
self.ae(c.num_of_resize_events, 1)
parse_bytes(s, b'\x1b[?2048h') # ]
self.ae(c.num_of_resize_events, 2)
def test_cursor_after_resize(self):