diff options
author | Shirasaka <tk.shirasaka@gmail.com> | 2020-12-06 02:25:38 +0900 |
---|---|---|
committer | Shirasaka <tk.shirasaka@gmail.com> | 2020-12-06 02:25:38 +0900 |
commit | de0ecf3e031573d543857e92b42fc37bfaaa17a0 (patch) | |
tree | a57411003fecefdc467585dc8d9cad942901d246 | |
parent | bb6229449d87defca4523c11d82bff8cbcad27ca (diff) | |
download | rneovim-de0ecf3e031573d543857e92b42fc37bfaaa17a0.tar.gz rneovim-de0ecf3e031573d543857e92b42fc37bfaaa17a0.tar.bz2 rneovim-de0ecf3e031573d543857e92b42fc37bfaaa17a0.zip |
Fixed lint error
-rw-r--r-- | src/nvim/window.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index c415050391..9eb16e67ec 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -3793,28 +3793,29 @@ int win_new_tabpage(int after, char_u *filename) newtp = alloc_tabpage(); - /* Remember the current windows in this Tab page. */ - if (leave_tabpage(curbuf, TRUE) == FAIL) { + // Remember the current windows in this Tab page. + if (leave_tabpage(curbuf, true) == FAIL) { xfree(newtp); return FAIL; } - newtp->tp_localdir = old_curtab->tp_localdir ? vim_strsave(old_curtab->tp_localdir) : NULL; + newtp->tp_localdir = old_curtab->tp_localdir + ? vim_strsave(old_curtab->tp_localdir) : NULL; curtab = newtp; - /* Create a new empty window. */ + // Create a new empty window. if (win_alloc_firstwin(old_curtab->tp_curwin) == OK) { - /* Make the new Tab page the new topframe. */ + // Make the new Tab page the new topframe. if (after == 1) { - /* New tab page becomes the first one. */ + // New tab page becomes the first one. newtp->tp_next = first_tabpage; first_tabpage = newtp; } else { tabpage_T *tp = old_curtab; if (after > 0) { - /* Put new tab page before tab page "after". */ + // Put new tab page before tab page "after". n = 2; for (tp = first_tabpage; tp->tp_next != NULL && n < after; tp = tp->tp_next) @@ -3828,7 +3829,7 @@ int win_new_tabpage(int after, char_u *filename) win_comp_scroll(curwin); newtp->tp_topframe = topframe; - last_status(FALSE); + last_status(false); redraw_all_later(NOT_VALID); @@ -3844,8 +3845,8 @@ int win_new_tabpage(int after, char_u *filename) return OK; } - /* Failed, get back the previous Tab page */ - enter_tabpage(curtab, curbuf, TRUE, TRUE); + // Failed, get back the previous Tab page + enter_tabpage(curtab, curbuf, true, true); return FAIL; } |