mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-09 21:57:37 +02:00
Don't screw up UTF-8 combined characters.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* $Id: screen-write.c,v 1.28 2009-01-19 17:15:19 nicm Exp $ */
|
||||
/* $Id: screen-write.c,v 1.29 2009-01-26 20:57:44 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -520,6 +520,10 @@ screen_write_cell(struct screen_write_ctx *ctx, const struct grid_cell *gc)
|
||||
else
|
||||
width = 1;
|
||||
|
||||
/* Discard zero-width characters. */
|
||||
if (width == 0)
|
||||
return;
|
||||
|
||||
/* If the character is wider than the screen, don't print it. */
|
||||
if (width > screen_size_x(s)) {
|
||||
memcpy(&tc, gc, sizeof tc);
|
||||
|
Reference in New Issue
Block a user