diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-04-23 11:12:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-23 11:12:27 +0200 |
commit | d572ffa0618078820ec3869ea180d57affb22fec (patch) | |
tree | 64f32d4531f53bdd18da8d4a386f8af5d6cf3a44 /src | |
parent | 4a712fcc7bc9d52c792dbb3dcf6df895301a0612 (diff) | |
parent | 4672d0ca19e14e9af7c258cf3cf37b36655686da (diff) | |
download | profani-tty-d572ffa0618078820ec3869ea180d57affb22fec.tar.gz |
Merge pull request #1324 from profanity-im/ui-fix
Fix condition in wins_show_subwin()
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/window.c | 3 | ||||
-rw-r--r-- | src/ui/window_list.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/window.c b/src/ui/window.c index 39e6500d..2ebf7a31 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -748,6 +748,9 @@ win_refresh_with_subwin(ProfWin *window) subwin_cols = win_occpuants_cols(); } else if (window->type == WIN_CONSOLE) { subwin_cols = win_roster_cols(); + } else { + // Other window types don't support subwindows, we shouldn't be here + return; } pnoutrefresh(layout->base.win, layout->base.y_pos, 0, row_start, 0, row_end, (cols-subwin_cols)-1); diff --git a/src/ui/window_list.c b/src/ui/window_list.c index 0c139cb7..b1c01c41 100644 --- a/src/ui/window_list.c +++ b/src/ui/window_list.c @@ -743,8 +743,7 @@ wins_show_subwin(ProfWin *window) win_show_subwin(window); // only mucwin and console have occupants/roster subwin - if (window->type != WIN_MUC || - window->type != WIN_CONSOLE) { + if (window->type != WIN_MUC && window->type != WIN_CONSOLE) { return; } |