diff options
author | Bram Moolenaar <Bram@vim.org> | 2009-09-11 14:48:27 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2009-09-11 14:48:27 +0000 |
commit | 86c800a1b39603ba612a4a4f6e76c64c3d022789 (patch) | |
tree | 14672b8568b67466c38574ae1f635fab68604e6c /src/ui.c | |
parent | 5e69de4421cc356f57fc19d243e03b05c970e135 (diff) | |
download | vim-86c800a1b39603ba612a4a4f6e76c64c3d022789.zip |
updated for version 7.2-258
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -3055,18 +3055,17 @@ vcol2col(wp, lnum, vcol) int vcol; { /* try to advance to the specified column */ - int col = 0; int count = 0; char_u *ptr; + char_u *start; - ptr = ml_get_buf(wp->w_buffer, lnum, FALSE); + start = ptr = ml_get_buf(wp->w_buffer, lnum, FALSE); while (count <= vcol && *ptr != NUL) { - ++col; count += win_lbr_chartabsize(wp, ptr, count, NULL); mb_ptr_adv(ptr); } - return col; + return (int)(ptr - start); } #endif |