weeding: remove a workaround for versions of ncurses before 5.9

(Yes, the test is for 6.0, but the bug was actually fixed in 5.9,
as far as I remember -- I just wasn't sure and didn't want to bother
building different versions of ncurses myself.)
This commit is contained in:
Benno Schulenberg 2020-11-15 10:21:51 +01:00
parent 7d35f71c87
commit b7539ea985
2 changed files with 0 additions and 23 deletions

View File

@ -85,10 +85,6 @@
#include <curses.h>
#endif /* CURSES_H */
#if defined(NCURSES_VERSION_MAJOR) && (NCURSES_VERSION_MAJOR < 6)
#define USING_OLD_NCURSES yes
#endif
#ifdef ENABLE_NLS
/* Native language support. */
#ifdef HAVE_LIBINTL_H

View File

@ -51,10 +51,6 @@ static bool linger_after_escape = FALSE;
/* Whether to give ncurses some time to get the next code. */
static int statusblank = 0;
/* The number of keystrokes left before we blank the status bar. */
#ifdef USING_OLD_NCURSES
static bool seen_wide = FALSE;
/* Whether we've seen a multicolumn character in the current line. */
#endif
static bool has_more = FALSE;
/* Whether the current line has more text after the displayed part. */
static bool is_shorter = TRUE;
@ -1720,9 +1716,6 @@ char *display_string(const char *buf, size_t column, size_t span,
size_t beyond = column + span;
/* The column number just beyond the last shown character. */
#ifdef USING_OLD_NCURSES
seen_wide = FALSE;
#endif
buf += start_index;
/* Allocate enough space for converting the relevant part of the line. */
@ -1855,11 +1848,6 @@ char *display_string(const char *buf, size_t column, size_t span,
/* If the codepoint is unassigned, assume a width of one. */
column += (charwidth < 0 ? 1 : charwidth);
#ifdef USING_OLD_NCURSES
if (charwidth > 1)
seen_wide = TRUE;
#endif
#endif /* ENABLE_UTF8 */
}
@ -2342,13 +2330,6 @@ void draw_row(int row, const char *converted, linestruct *line, size_t from_col)
if (thebar)
mvwaddch(edit, row, COLS - 1, bardata[row]);
#endif
#ifdef USING_OLD_NCURSES
/* Tell ncurses to really redraw the line without trying to optimize
* for what it thinks is already there, because it gets it wrong in
* the case of a wide character in column zero. See bug #31743. */
if (seen_wide)
wredrawln(edit, row, 1);
#endif
#ifdef ENABLE_COLOR
/* If there are color rules (and coloring is turned on), apply them. */