Skip to content

Commit

Permalink
patch 9.1.0679: Rename from w_closing to w_locked is incomplete
Browse files Browse the repository at this point in the history
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: vim#15504

Signed-off-by: zeertzjq <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
  • Loading branch information
zeertzjq authored and chrisbra committed Aug 16, 2024
1 parent 6908db4 commit bc11f6d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/ex_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -2838,7 +2838,7 @@ do_ecmd(
int did_decrement;
buf_T *was_curbuf = curbuf;

// Set the w_closing flag to avoid that autocommands close the
// Set the w_locked flag to avoid that autocommands close the
// window. And set b_locked for the same reason.
the_curwin->w_locked = TRUE;
++buf->b_locked;
Expand Down
3 changes: 1 addition & 2 deletions src/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -3785,8 +3785,7 @@ struct window_S
synblock_T *w_s; // for :ownsyntax
#endif

int w_locked; // window is being closed, don't let
// autocommands close it too.
int w_locked; // don't let autocommands close the window

frame_T *w_frame; // frame containing this window

Expand Down
8 changes: 4 additions & 4 deletions src/terminal.c
Original file line number Diff line number Diff line change
Expand Up @@ -3647,7 +3647,7 @@ term_after_channel_closed(term_T *term)
if (term->tl_finish == TL_FINISH_CLOSE)
{
aco_save_T aco;
int do_set_w_closing = term->tl_buffer->b_nwindows == 0;
int do_set_w_locked = term->tl_buffer->b_nwindows == 0;
#ifdef FEAT_PROP_POPUP
win_T *pwin = NULL;

Expand Down Expand Up @@ -3678,11 +3678,11 @@ term_after_channel_closed(term_T *term)
{
// Avoid closing the window if we temporarily use it.
if (is_aucmd_win(curwin))
do_set_w_closing = TRUE;
if (do_set_w_closing)
do_set_w_locked = TRUE;
if (do_set_w_locked)
curwin->w_locked = TRUE;
do_bufdel(DOBUF_WIPE, (char_u *)"", 1, fnum, fnum, FALSE);
if (do_set_w_closing)
if (do_set_w_locked)
curwin->w_locked = FALSE;
aucmd_restbuf(&aco);
}
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
679,
/**/
678,
/**/
Expand Down

0 comments on commit bc11f6d

Please sign in to comment.