Skip to content

Instantly share code, notes, and snippets.

@hsbt
Created October 18, 2010 13:52
Show Gist options
  • Save hsbt/632245 to your computer and use it in GitHub Desktop.
Save hsbt/632245 to your computer and use it in GitHub Desktop.
diff -ur screen-4.0.3.org/ansi.c screen-4.0.3/ansi.c
--- screen-4.0.3.org/ansi.c 2003-12-05 22:57:05.000000000 +0900
+++ screen-4.0.3/ansi.c 2010-10-18 22:49:55.000000000 +0900
@@ -716,6 +716,10 @@
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 -ur screen-4.0.3.org/display.c screen-4.0.3/display.c
--- screen-4.0.3.org/display.c 2003-12-05 22:45:41.000000000 +0900
+++ screen-4.0.3/display.c 2010-10-18 22:48:42.000000000 +0900
@@ -889,7 +889,7 @@
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