Skip to content

Commit bc11f6d

Browse files
zeertzjqchrisbra
authored andcommitted
patch 9.1.0679: Rename from w_closing to w_locked is incomplete
Problem: Rename from w_closing to w_locked is incomplete (after 9.1.0678). Solution: Rename remaining occurrences of w_closing to w_locked and update comments (zeertzjq). closes: #15504 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 6908db4 commit bc11f6d

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

src/ex_cmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2838,7 +2838,7 @@ do_ecmd(
28382838
int did_decrement;
28392839
buf_T *was_curbuf = curbuf;
28402840

2841-
// Set the w_closing flag to avoid that autocommands close the
2841+
// Set the w_locked flag to avoid that autocommands close the
28422842
// window. And set b_locked for the same reason.
28432843
the_curwin->w_locked = TRUE;
28442844
++buf->b_locked;

src/structs.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3785,8 +3785,7 @@ struct window_S
37853785
synblock_T *w_s; // for :ownsyntax
37863786
#endif
37873787

3788-
int w_locked; // window is being closed, don't let
3789-
// autocommands close it too.
3788+
int w_locked; // don't let autocommands close the window
37903789

37913790
frame_T *w_frame; // frame containing this window
37923791

src/terminal.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3647,7 +3647,7 @@ term_after_channel_closed(term_T *term)
36473647
if (term->tl_finish == TL_FINISH_CLOSE)
36483648
{
36493649
aco_save_T aco;
3650-
int do_set_w_closing = term->tl_buffer->b_nwindows == 0;
3650+
int do_set_w_locked = term->tl_buffer->b_nwindows == 0;
36513651
#ifdef FEAT_PROP_POPUP
36523652
win_T *pwin = NULL;
36533653

@@ -3678,11 +3678,11 @@ term_after_channel_closed(term_T *term)
36783678
{
36793679
// Avoid closing the window if we temporarily use it.
36803680
if (is_aucmd_win(curwin))
3681-
do_set_w_closing = TRUE;
3682-
if (do_set_w_closing)
3681+
do_set_w_locked = TRUE;
3682+
if (do_set_w_locked)
36833683
curwin->w_locked = TRUE;
36843684
do_bufdel(DOBUF_WIPE, (char_u *)"", 1, fnum, fnum, FALSE);
3685-
if (do_set_w_closing)
3685+
if (do_set_w_locked)
36863686
curwin->w_locked = FALSE;
36873687
aucmd_restbuf(&aco);
36883688
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static char *(features[]) =
704704

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
679,
707709
/**/
708710
678,
709711
/**/

0 commit comments

Comments
 (0)