Skip to content

Instantly share code, notes, and snippets.

@utahta utahta/memo-tmux-2.4.md
Last active May 17, 2017

Embed
What would you like to do?
patches for tmux 2.4

tmux-2.4 で日本語の様子がおかしい問題の対策 for mac

https://github.com/tmux/tmux/issues/873   https://github.com/tmux/tmux/commit/55cd4c7bc756509f241788f7f73676676ef538f6

Apply patch

$ brew edit tmux

and add below

def patches
  [
    "https://gist.githubusercontent.com/utahta/6f14dc33ec0700f3f2f224e0ce84c772/raw/fd87552e02f75013d65783493247315ca1754e8e/tmux-2.4-input.patch",
    "https://gist.githubusercontent.com/utahta/6f14dc33ec0700f3f2f224e0ce84c772/raw/fd87552e02f75013d65783493247315ca1754e8e/tmux-2.4-screen-write.patch",
  ]
end

Reinstall tmux

$ tmux kill-server
$ brew uninstall tmux
$ brew install tmux -s
diff --git a/input.c b/input.c
index 0b667390..a33d0747 100644
--- a/input.c
+++ b/input.c
@@ -2011,7 +2011,7 @@ input_utf8_close(struct input_ctx *ictx)
(int)ud->size, ud->data, ud->width);
utf8_copy(&ictx->cell.cell.data, ud);
- screen_write_cell(&ictx->ctx, &ictx->cell.cell);
+ screen_write_collect_add(&ictx->ctx, &ictx->cell.cell);
return (0);
}
diff --git a/screen-write.c b/screen-write.c
index 1af3b32f..41f1c23c 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -1113,7 +1113,7 @@ screen_write_collect_add(struct screen_write_ctx *ctx,
*/
collect = 1;
- if (gc->data.width != 1)
+ if (gc->data.width != 1 || gc->data.size != 1)
collect = 0;
else if (gc->attr & GRID_ATTR_CHARSET)
collect = 0;
@bigwheel

This comment has been minimized.

Copy link

bigwheel commented May 17, 2017

同じ現象でここ数週間悩んでいました。非常に助かります!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.