mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 15:58:17 +00:00
refactor: change pre-decrement/increment to post (#19799)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
@@ -1245,8 +1245,8 @@ static void command_line_scan(mparm_T *parmp)
|
||||
} else if (argv[0][0] == '-') {
|
||||
// "-S" followed by another option: use default session file.
|
||||
a = SESSION_FILE;
|
||||
++argc;
|
||||
--argv;
|
||||
argc++;
|
||||
argv--;
|
||||
} else {
|
||||
a = argv[0];
|
||||
}
|
||||
@@ -1616,9 +1616,9 @@ static void create_windows(mparm_T *parmp)
|
||||
// Watch out for autocommands that delete a window.
|
||||
//
|
||||
// Don't execute Win/Buf Enter/Leave autocommands here
|
||||
++autocmd_no_enter;
|
||||
++autocmd_no_leave;
|
||||
dorewind = TRUE;
|
||||
autocmd_no_enter++;
|
||||
autocmd_no_leave++;
|
||||
dorewind = true;
|
||||
while (done++ < 1000) {
|
||||
if (dorewind) {
|
||||
if (parmp->window_layout == WIN_TABS) {
|
||||
@@ -1680,8 +1680,8 @@ static void create_windows(mparm_T *parmp)
|
||||
curwin = firstwin;
|
||||
}
|
||||
curbuf = curwin->w_buffer;
|
||||
--autocmd_no_enter;
|
||||
--autocmd_no_leave;
|
||||
autocmd_no_enter--;
|
||||
autocmd_no_leave--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1698,8 +1698,8 @@ static void edit_buffers(mparm_T *parmp, char_u *cwd)
|
||||
/*
|
||||
* Don't execute Win/Buf Enter/Leave autocommands here
|
||||
*/
|
||||
++autocmd_no_enter;
|
||||
++autocmd_no_leave;
|
||||
autocmd_no_enter++;
|
||||
autocmd_no_leave++;
|
||||
|
||||
// When w_arg_idx is -1 remove the window (see create_windows()).
|
||||
if (curwin->w_arg_idx == -1) {
|
||||
@@ -1785,7 +1785,7 @@ static void edit_buffers(mparm_T *parmp, char_u *cwd)
|
||||
if (parmp->window_layout == WIN_TABS) {
|
||||
goto_tabpage(1);
|
||||
}
|
||||
--autocmd_no_enter;
|
||||
autocmd_no_enter--;
|
||||
|
||||
// make the first window the current window
|
||||
win = firstwin;
|
||||
@@ -1799,7 +1799,7 @@ static void edit_buffers(mparm_T *parmp, char_u *cwd)
|
||||
}
|
||||
win_enter(win, false);
|
||||
|
||||
--autocmd_no_leave;
|
||||
autocmd_no_leave--;
|
||||
TIME_MSG("editing files in windows");
|
||||
if (parmp->window_count > 1 && parmp->window_layout != WIN_TABS) {
|
||||
win_equal(curwin, false, 'b'); // adjust heights
|
||||
|
Reference in New Issue
Block a user