]> git.wh0rd.org Git - nano.git/commitdiff
properly increment start_col when the line begins with a character that
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Mon, 27 Dec 2004 23:35:25 +0000 (23:35 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Mon, 27 Dec 2004 23:35:25 +0000 (23:35 +0000)
takes up two columns

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2204 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

src/winio.c

index a61e660ce6080ce0d871b8474d9acf0b04933b0e..dabf213dc0f8344f9342bf5315642c7c6aaf8445 100644 (file)
@@ -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;
        }
     }