From: David Lawrence Ramsey Date: Mon, 27 Dec 2004 23:35:25 +0000 (+0000) Subject: properly increment start_col when the line begins with a character that X-Git-Tag: v1.3.6~198 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=a9b9913c6bd44d8ef97c1b975128cb492aab25c7;p=nano.git properly increment start_col when the line begins with a character that takes up two columns git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2204 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/src/winio.c b/src/winio.c index a61e660c..dabf213d 100644 --- a/src/winio.c +++ b/src/winio.c @@ -1902,6 +1902,8 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool converted[index++] = ctrl_wide_buf[i]; free(ctrl_wide_buf); + + start_col++; start_index += wide_buf_len; } } else if (wcwidth(wide_buf) > 1) { @@ -1914,6 +1916,8 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool converted[1] = ' '; index = 2; } + + start_col++; start_index += wide_buf_len; } }