nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 0c87a4ba41ec83e504f7b9bf3b052f76242f64ba
parent 39705c60df9f90447c440e8a8124bd478e679670
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Thu, 26 Nov 2020 14:25:16 +0100

build: include a workaround for VTE only when using an older libvte

Checking for the actual version of libvte is too complicated, so
assume that libvte is 0.58 or newer (where the problem is fixed)
when ncurses is 6.2 or newer.

Diffstat:
Msrc/winio.c | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -37,6 +37,11 @@ #define BRANDING PACKAGE_STRING #endif +/* When having an older ncurses, then most likely libvte is older too. */ +#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH < 20200212) +#define USING_OLDER_LIBVTE yes +#endif + static int *key_buffer = NULL; /* A buffer for the keystrokes that haven't been handled yet. */ static size_t key_buffer_len = 0; @@ -2601,6 +2606,7 @@ void draw_row(int row, const char *converted, linestruct *line, size_t from_col) if (*(converted + target_x) != '\0') { charlen = collect_char(converted + target_x, striped_char); target_column = wideness(converted, target_x); +#ifdef USING_OLDER_LIBVTE } else if (target_column + 1 == editwincols) { /* Defeat a VTE bug -- see https://sv.gnu.org/bugs/?55896. */ #ifdef ENABLE_UTF8 @@ -2611,6 +2617,7 @@ void draw_row(int row, const char *converted, linestruct *line, size_t from_col) } else #endif striped_char[0] = '.'; +#endif } else striped_char[0] = ' ';