X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=src%2Fwindows.c;h=64e610847a270313b21990660a3cec081ef4e95f;hb=45b98ea91cf2075e33dc2bfd302a701a959feb36;hp=64251aec7e4389b90e28c260be82247573a528e0;hpb=6b2ad52fe945a3c9cacea6cbdfc7fbf6d783ccaf;p=plomrogue diff --git a/src/windows.c b/src/windows.c index 64251ae..64e6108 100644 --- a/src/windows.c +++ b/src/windows.c @@ -81,8 +81,8 @@ static uint8_t refit_pad(struct WinMeta * wmeta) /* Only resize the pad if the rightmost window column has changed. */ if (getmaxx(wmeta->padframe.curses_win) != lastwincol) { - if (lastwincol + 2 > UINT16_MAX) /* Abort if pad would grow beyond */ - { /* yx_uint16 confines. */ + if (lastwincol + 2 > UINT16_MAX) + { return 2; } return (ERR == wresize(wmeta->padframe.curses_win, @@ -517,7 +517,7 @@ extern void cycle_active_win(struct WinMeta * wmeta, char dir) { if (0 != wmeta->active) { - if ('n' == dir) + if ('f' == dir) { if (wmeta->active->_next != 0) { @@ -547,8 +547,7 @@ extern void cycle_active_win(struct WinMeta * wmeta, char dir) extern uint8_t shift_active_win(struct WinMeta * wmeta, char dir) { if ( 0 == wmeta->active /* No shifting with < 2 */ - || wmeta->_chain_start == wmeta->_chain_end /* windows visible or */ - || (dir != 'f' && dir != 'b')) /* wrong direction char. */ + || wmeta->_chain_start == wmeta->_chain_end) /* windows visible. */ { return 0; }