From 3dddc11603b1bd66b5586b47795716e87921a096 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 5 Feb 2021 12:29:18 +0000 Subject: Send Unicode directional isolate characters around horizontal pane borders if the terminal support UTF-8 and an extension terminfo(5) capability "Bidi" is present. On terminals with BiDi support (ie, VTE) this seems to be enough to display right-to-left text acceptably enough to be usable (with some caveats about the mouse position). Requested by and with help from Mahmoud Elagdar in GitHub issue 2425. --- grid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'grid.c') diff --git a/grid.c b/grid.c index cce304c9..7744587a 100644 --- a/grid.c +++ b/grid.c @@ -1045,14 +1045,14 @@ grid_duplicate_lines(struct grid *dst, u_int dy, struct grid *src, u_int sy, srcl->cellsize * sizeof *dstl->celldata); } else dstl->celldata = NULL; - if (srcl->extdsize != 0) { dstl->extdsize = srcl->extdsize; dstl->extddata = xreallocarray(NULL, dstl->extdsize, sizeof *dstl->extddata); memcpy(dstl->extddata, srcl->extddata, dstl->extdsize * sizeof *dstl->extddata); - } + } else + dstl->extddata = NULL; sy++; dy++; -- cgit