aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-01 06:05:29 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-08-01 06:18:52 +0800
commitc9ca90229b9b46782cad83502caaccaa7520dc0d (patch)
tree57f907f8587266cf46fe7979aacaab7a9d917641 /src/nvim/window.c
parent68ec497d52bc8e93e12c74099ee9826b9469c3be (diff)
downloadrneovim-c9ca90229b9b46782cad83502caaccaa7520dc0d.tar.gz
rneovim-c9ca90229b9b46782cad83502caaccaa7520dc0d.tar.bz2
rneovim-c9ca90229b9b46782cad83502caaccaa7520dc0d.zip
vim-patch:9.0.0124: code has more indent than needed
Problem: Code has more indent than needed. Solution: Use continue and return statements. (closes vim/vim#10824) https://github.com/vim/vim/commit/101d57b34b72f4fbc7df1b6edfd64c64a6be14fc
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index ff147e22df..e820be626c 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -2150,12 +2150,11 @@ static void win_equal_rec(win_T *next_curwin, bool current, frame_T *topfr, int
} else {
next_curwin_size = -1;
FOR_ALL_FRAMES(fr, topfr->fr_child) {
- // If 'winfixwidth' set keep the window width if
- // possible.
- // Watch out for this window being the next_curwin.
if (!frame_fixed_width(fr)) {
continue;
}
+ // If 'winfixwidth' set keep the window width if possible.
+ // Watch out for this window being the next_curwin.
n = frame_minwidth(fr, NOWIN);
new_size = fr->fr_width;
if (frame_has_win(fr, next_curwin)) {
@@ -2281,12 +2280,11 @@ static void win_equal_rec(win_T *next_curwin, bool current, frame_T *topfr, int
} else {
next_curwin_size = -1;
FOR_ALL_FRAMES(fr, topfr->fr_child) {
- // If 'winfixheight' set keep the window height if
- // possible.
- // Watch out for this window being the next_curwin.
if (!frame_fixed_height(fr)) {
continue;
}
+ // If 'winfixheight' set keep the window height if possible.
+ // Watch out for this window being the next_curwin.
n = frame_minheight(fr, NOWIN);
new_size = fr->fr_height;
if (frame_has_win(fr, next_curwin)) {
@@ -3898,9 +3896,7 @@ void close_others(int message, int forceit)
continue;
}
}
- win_close(wp,
- !buf_hide(wp->w_buffer) && !bufIsChanged(wp->w_buffer),
- false);
+ win_close(wp, !buf_hide(wp->w_buffer) && !bufIsChanged(wp->w_buffer), false);
}
if (message && !ONE_WINDOW) {
@@ -5555,6 +5551,7 @@ static void frame_setheight(frame_T *curfrp, int height)
}
if (curfrp->fr_parent == NULL) {
+ // topframe: can only change the command line
if (height > ROWS_AVAIL) {
// If height is greater than the available space, try to create space for
// the frame by reducing 'cmdheight' if possible, while making sure