aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 00baa23306..bae7c2e7dc 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -168,10 +168,11 @@ newwindow:
break;
}
}
- if (wp == NULL)
+ if (wp == NULL) {
EMSG(_("E441: There is no preview window"));
- else
+ } else {
win_goto(wp);
+ }
break;
/* close all but current window */
@@ -3366,10 +3367,10 @@ void tabpage_move(int nr)
tp_dst = tp;
- /* Remove the current tab page from the list of tab pages. */
- if (curtab == first_tabpage)
+ // Remove the current tab page from the list of tab pages.
+ if (curtab == first_tabpage) {
first_tabpage = curtab->tp_next;
- else {
+ } else {
tp = NULL;
FOR_ALL_TABS(tp2) {
if (tp2->tp_next == curtab) {
@@ -3377,8 +3378,9 @@ void tabpage_move(int nr)
break;
}
}
- if (tp == NULL) /* "cannot happen" */
+ if (tp == NULL) { // "cannot happen"
return;
+ }
tp->tp_next = curtab->tp_next;
}