From cb51942669cef089b46cd2b6cdbd62405000c0e7 Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 8 Jan 2023 21:00:01 +0000 Subject: Quotes are now required in select-layout example. --- tmux.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmux.1 b/tmux.1 index c84d9e87..6a0bfe52 100644 --- a/tmux.1 +++ b/tmux.1 @@ -1971,7 +1971,7 @@ For example: $ tmux list-windows 0: ksh [159x48] layout: bb62,159x48,0,0{79x48,0,0,79x48,80,0} -$ tmux select-layout bb62,159x48,0,0{79x48,0,0,79x48,80,0} +$ tmux select-layout 'bb62,159x48,0,0{79x48,0,0,79x48,80,0}' .Ed .Pp .Nm -- cgit From 7ced0a03d2ff51274d5fa5fb6eeaa6f4aac9f2f4 Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 8 Jan 2023 22:15:30 +0000 Subject: Restore code to handle wcwidth failure so that unknown codepoints still do the most likely right thing. GitHub issue 3427, patch based on an diff from Jesse Luehrs in GitHub issue 3003. --- utf8.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/utf8.c b/utf8.c index 03918cd2..3c6f88ff 100644 --- a/utf8.c +++ b/utf8.c @@ -226,9 +226,16 @@ utf8_width(struct utf8_data *ud, int *width) case 0: return (UTF8_ERROR); } + log_debug("UTF-8 %.*s is %08X", (int)ud->size, ud->data, (u_int)wc); *width = wcwidth(wc); - log_debug("UTF-8 %.*s %#x, wcwidth() %d", (int)ud->size, ud->data, - (u_int)wc, *width); + log_debug("wcwidth(%08X) returned %d", (u_int)wc, *width); + if (*width < 0) { + /* + * C1 control characters are nonprintable, so they are always + * zero width. + */ + *width = (wc >= 0x80 && wc <= 0x9f) ? 0 : 1; + } if (*width >= 0 && *width <= 0xff) return (UTF8_DONE); return (UTF8_ERROR); -- cgit From 7c0789d2d2721b70e04fe6a589f644797d2b5e1f Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 8 Jan 2023 22:17:04 +0000 Subject: Have client return 1 if process is interrupted to an input pane. --- window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/window.c b/window.c index 4929383e..0fd71c74 100644 --- a/window.c +++ b/window.c @@ -1535,8 +1535,10 @@ window_pane_input_callback(struct client *c, __unused const char *path, wp = window_pane_find_by_id(cdata->wp); if (cdata->file != NULL && (wp == NULL || c->flags & CLIENT_DEAD)) { - if (wp == NULL) + if (wp == NULL) { + c->retval = 1; c->flags |= CLIENT_EXIT; + } file_cancel(cdata->file); } else if (cdata->file == NULL || closed || error != 0) { cmdq_continue(cdata->item); -- cgit