summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/tty/vt/vt.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 5d53feeb5d2bf..e3d35c4f92045 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -2953,8 +2953,15 @@ static int vc_con_write_normal(struct vc_data *vc, int tc, int c,
* double-width.
*/
} else {
- /* Otherwise zero-width code points are ignored */
- goto out;
+ /* try recomposition */
+ prev_c = ucs_recompose(prev_c, c);
+ if (prev_c != 0) {
+ vc_con_rewind(vc);
+ c = prev_c;
+ } else {
+ /* Otherwise zero-width code points are ignored */
+ goto out;
+ }
}
}
}