Created
July 5, 2014 15:50
-
-
Save tokida/997cf6b608d93ccbefef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** tmux-1.9a.orig/utf8.c 2014-02-23 05:48:37.000000000 +0900 | |
--- tmux-1.9a/utf8.c 2014-07-06 00:43:50.000000000 +0900 | |
*************** | |
*** 22,27 **** | |
--- 22,32 ---- | |
#include "tmux.h" | |
+ | |
+ #define _XOPEN_SOURCE | |
+ #include <locale.h> | |
+ #include <wchar.h> | |
+ | |
struct utf8_width_entry { | |
u_int first; | |
u_int last; | |
*************** | |
*** 339,345 **** | |
struct utf8_width_entry *item; | |
u_int value; | |
! value = utf8_combine(utf8data); | |
item = utf8_width_root; | |
while (item != NULL) { | |
--- 344,360 ---- | |
struct utf8_width_entry *item; | |
u_int value; | |
! static int inited = 0; | |
! | |
! value = utf8_combine(utf8data); | |
! /* | |
! if (!inited) { | |
! setlocale(LC_CTYPE, ""); | |
! inited = 1; | |
! } | |
! return wcwidth(value); | |
! */ | |
! return (value <= 0x7f) ? 1 : 2; | |
item = utf8_width_root; | |
while (item != NULL) { | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
iTerm2を用いていて「Treat ambiguous-width characters as double width」をONにしているとtmuxがズレていく問題の修正。
参考:http://ta.ps.st/d/1350718711.html