diff options
| author | Bram Moolenaar <Bram@vim.org> | 2019-01-31 14:27:04 +0100 |
|---|---|---|
| committer | Bram Moolenaar <Bram@vim.org> | 2019-01-31 14:27:04 +0100 |
| commit | c45eb770a5988734ff2c572e5e2ce307158c33c8 (patch) | |
| tree | 59f8558a427adce223171b44a09d385e57d3f93a /src/quickfix.c | |
| parent | ce655743ba5c56c00769e57e6a6608c0088211ab (diff) | |
| download | vim-git-8.1.0859.tar.gz | |
patch 8.1.0859: "%v" in 'errorformat' does handle multi-byte charactersv8.1.0859
Problem: "%v" in 'errorformat' does handle multi-byte characters.
Solution: Handle multi-byte characters. (Yegappan Lakshmanan, closes #3700)
Diffstat (limited to 'src/quickfix.c')
| -rw-r--r-- | src/quickfix.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/src/quickfix.c b/src/quickfix.c index e292819f2..3bfa027d6 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -3047,9 +3047,6 @@ qf_jump_goto_line( char_u *qf_pattern) { linenr_T i; - char_u *line; - colnr_T screen_col; - colnr_T char_col; if (qf_pattern == NULL) { @@ -3063,29 +3060,11 @@ qf_jump_goto_line( } if (qf_col > 0) { - curwin->w_cursor.col = qf_col - 1; curwin->w_cursor.coladd = 0; if (qf_viscol == TRUE) - { - // Check each character from the beginning of the error - // line up to the error column. For each tab character - // found, reduce the error column value by the length of - // a tab character. - line = ml_get_curline(); - screen_col = 0; - for (char_col = 0; char_col < curwin->w_cursor.col; ++char_col) - { - if (*line == NUL) - break; - if (*line++ == '\t') - { - curwin->w_cursor.col -= 7 - (screen_col % 8); - screen_col += 8 - (screen_col % 8); - } - else - ++screen_col; - } - } + coladvance(qf_col - 1); + else + curwin->w_cursor.col = qf_col - 1; curwin->w_set_curswant = TRUE; check_cursor(); } |
