refactor: reduce scope of locals as per the style guide (#22206)

This commit is contained in:
dundargoc
2023-02-11 10:24:46 +01:00
committed by GitHub
parent c9b0fe1f41
commit c8c930ea78
21 changed files with 240 additions and 397 deletions

View File

@@ -358,14 +358,13 @@ newwindow:
msg(_(m_onlyone));
} else {
tabpage_T *oldtab = curtab;
tabpage_T *newtab;
// First create a new tab with the window, then go back to
// the old tab and close the window there.
win_T *wp = curwin;
if (win_new_tabpage((int)Prenum, NULL) == OK
&& valid_tabpage(oldtab)) {
newtab = curtab;
tabpage_T *newtab = curtab;
goto_tabpage_tp(oldtab, true, true);
if (curwin == wp) {
win_close(curwin, false, false);