win: invalidate reg_ignore properly when destroying window
reg_ignore_valid marks the validity of the reg_ignore of the windows BENEATH the current window. That is, set `w->reg_ignore_valid = false` doesn't invalidate `w->reg_ignore`. When destroying window `w`, we need to invalidate all reg_ignore beneath `w`. So it is not enough to just set `w->next->reg_ignore_valid = false`, we also need to invalidate `w->next->reg_ignore`. Yes, this variable name is confusing. Will be changed in the future. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
@ -1438,8 +1438,7 @@ static void finish_destroy_win(session_t *ps, win **_w) {
|
||||
// be true, and there is no need to invalid w->next->reg_ignore
|
||||
// when w is destroyed.
|
||||
if (w->next) {
|
||||
// should be `= w->reg_ignore_valid && w->next->reg_ignore_valid`,
|
||||
// but keep it this way until we think about reg_ignore.
|
||||
rc_region_unref(&w->next->reg_ignore);
|
||||
w->next->reg_ignore_valid = false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user