tweaks: delete some fragments of code that have become irrelevant

Since the previous commit, USE_SLANG can only be defined when NANO_TINY
is also defined.  This means that code that is present only in non-tiny
versions does not need to cater for Slang.
master
Benno Schulenberg 2020-01-03 12:00:06 +01:00
parent 2867f1bbde
commit 1be0285832
2 changed files with 1 additions and 21 deletions

View File

@ -1308,7 +1308,7 @@ void regenerate_screen(void)
/* We could check whether COLS or LINES changed, and return otherwise,
* but it seems curses does not always update these global variables. */
#if defined(USE_SLANG) || defined(REDEFINING_MACROS_OK)
#ifdef REDEFINING_MACROS_OK
COLS = win.ws_col;
LINES = win.ws_row;
#endif
@ -1317,19 +1317,10 @@ void regenerate_screen(void)
/* Ensure that firstcolumn is the starting column of its chunk. */
ensure_firstcolumn_is_aligned();
#ifdef USE_SLANG
/* Slang curses emulation brain damage, part 1: If we just do what
* curses does here, it'll only work properly if the resize made the
* window smaller. Do what mutt does: Leave and immediately reenter
* Slang screen management mode. */
SLsmg_reset_smg();
SLsmg_init_smg();
#else
/* Do the equivalent of what Minimum Profit does: leave and immediately
* reenter curses mode. */
endwin();
doupdate();
#endif
/* Put the terminal in the desired state again, recreate the subwindows
* with their (new) sizes, and redraw the contents of these windows. */

View File

@ -173,9 +173,6 @@ void run_macro(void)
* in the keystroke buffer. */
void read_keys_from(WINDOW *win)
{
#if defined(USE_SLANG) && !defined(NANO_TINY)
bool skip_others = FALSE;
#endif
int input = ERR;
size_t errcount = 0;
@ -196,11 +193,7 @@ void read_keys_from(WINDOW *win)
#ifndef NANO_TINY
if (the_window_resized) {
regenerate_screen();
#ifdef USE_SLANG
skip_others = TRUE;
#else
input = KEY_WINCH;
#endif
}
#endif
if (input == ERR && !waiting_mode) {
@ -227,10 +220,6 @@ void read_keys_from(WINDOW *win)
/* If we got a SIGWINCH, get out as the win argument is no longer valid. */
if (input == KEY_WINCH)
return;
#ifdef USE_SLANG
if (skip_others)
return;
#endif
#endif
/* Read in the remaining characters using non-blocking input. */