Last active
June 21, 2016 08:46
-
-
Save rcmdnk/5e72a6fd14bf106f9d410ea68adf0644 to your computer and use it in GitHub Desktop.
copied from https://gist.github.com/raw/626040/be6a04f0e64c56185ba5850415ac59dad4cd62a0/screen-utf8-nfd.patch
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
diff --git a/src/ansi.c b/src/ansi.c | |
index fa53775..4a21f84 100644 | |
--- a/src/ansi.c | |
+++ b/src/ansi.c | |
@@ -725,6 +725,10 @@ register int len; | |
LPutChar(&curr->w_layer, &omc, ox, oy); | |
LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); | |
} | |
+ if (curr->w_mbcs) | |
+ { | |
+ curr->w_rend.mbcs = curr->w_mbcs = 0; | |
+ } | |
break; | |
} | |
font = curr->w_rend.font; | |
diff --git a/src/display.c b/src/display.c | |
index 5fa11cb..2081e7e 100644 | |
--- a/src/display.c | |
+++ b/src/display.c | |
@@ -604,7 +604,7 @@ int c; | |
D_x += D_AM ? 1 : -1; | |
D_mbcs = 0; | |
} | |
- else if (utf8_isdouble(c)) | |
+ else if (utf8_isdouble(c) || (c >= 0xd800 && c < 0xe000)) | |
{ | |
D_mbcs = c; | |
D_x++; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment