aboutsummaryrefslogtreecommitdiff
path: root/grid.c
diff options
context:
space:
mode:
authornicm <nicm>2021-02-05 12:29:18 +0000
committernicm <nicm>2021-02-05 12:29:18 +0000
commit3dddc11603b1bd66b5586b47795716e87921a096 (patch)
tree52a11e2f6c59655ccdb575ffd5ed4ab72d9b97fd /grid.c
parentbe471c328ea0ae04026e4ff32fda7b7f11c74255 (diff)
downloadrtmux-3dddc11603b1bd66b5586b47795716e87921a096.tar.gz
rtmux-3dddc11603b1bd66b5586b47795716e87921a096.tar.bz2
rtmux-3dddc11603b1bd66b5586b47795716e87921a096.zip
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.
Diffstat (limited to 'grid.c')
-rw-r--r--grid.c4
1 files changed, 2 insertions, 2 deletions
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++;