aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-11-08 09:48:48 +0100
committerGitHub <noreply@github.com>2022-11-08 09:48:48 +0100
commitfae754073289566051433fae74ec65783f9e7a6a (patch)
tree27fa3555e5a8a016dce55cc39f20599e32cf7046 /src/nvim/window.c
parentd187c00faf4feb76bdc544b87bea71f217d05957 (diff)
parent731cdde28ea8d48cc23ba2752a08c261c87eee92 (diff)
downloadrneovim-fae754073289566051433fae74ec65783f9e7a6a.tar.gz
rneovim-fae754073289566051433fae74ec65783f9e7a6a.tar.bz2
rneovim-fae754073289566051433fae74ec65783f9e7a6a.zip
Merge pull request #20821 from dundargoc/refactor/clang-tidy
refactor: fix clang-tidy warnings
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 1cde433b0a..3649e6bc16 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -271,9 +271,8 @@ newwindow:
for (wp = firstwin; --Prenum > 0;) {
if (wp->w_next == NULL) {
break;
- } else {
- wp = wp->w_next;
}
+ wp = wp->w_next;
}
} else {
if (nchar == 'W') { // go to previous window
@@ -873,9 +872,8 @@ int win_fdccol_count(win_T *wp)
const int fdccol = fdc[4] == ':' ? fdc[5] - '0' : 1;
int needed_fdccols = getDeepestNesting(wp);
return MIN(fdccol, needed_fdccols);
- } else {
- return fdc[0] - '0';
}
+ return fdc[0] - '0';
}
void ui_ext_win_position(win_T *wp, bool validate)
@@ -4870,12 +4868,11 @@ win_T *buf_jump_open_win(buf_T *buf)
if (curwin->w_buffer == buf) {
win_enter(curwin, false);
return curwin;
- } else {
- FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
- if (wp->w_buffer == buf) {
- win_enter(wp, false);
- return wp;
- }
+ }
+ FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
+ if (wp->w_buffer == buf) {
+ win_enter(wp, false);
+ return wp;
}
}
@@ -6646,12 +6643,11 @@ static bool resize_frame_for_winbar(frame_T *fr)
if (fp == NULL || fp == fr) {
emsg(_(e_noroom));
return false;
- } else {
- frame_new_height(fp, fp->fr_height - 1, false, false);
- win_new_height(wp, wp->w_height + 1);
- frame_fix_height(wp);
- (void)win_comp_pos();
}
+ frame_new_height(fp, fp->fr_height - 1, false, false);
+ win_new_height(wp, wp->w_height + 1);
+ frame_fix_height(wp);
+ (void)win_comp_pos();
return true;
}