Skip to content

Instantly share code, notes, and snippets.

@rcmdnk
Last active June 21, 2016 08:46
Show Gist options
  • Save rcmdnk/5e72a6fd14bf106f9d410ea68adf0644 to your computer and use it in GitHub Desktop.
Save rcmdnk/5e72a6fd14bf106f9d410ea68adf0644 to your computer and use it in GitHub Desktop.
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