vim-patch:8.1.0289: cursor moves to wrong column after quickfix jump

Problem:    Cursor moves to wrong column after quickfix jump.
Solution:   Set the curswant flag. (Andy Massimino, closes vim/vim#3331)
2dfcef4c08
This commit is contained in:
Jan Edmund Lazo 2019-09-14 12:30:31 -04:00
parent 8c88d98df9
commit 27fd4f31fd
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15
2 changed files with 10 additions and 0 deletions

View File

@ -2299,6 +2299,7 @@ static void qf_jump_goto_line(linenr_T qf_lnum, int qf_col, char_u qf_viscol,
}
}
}
curwin->w_set_curswant = true;
check_cursor();
} else {
beginline(BL_WHITE | BL_FIX);

View File

@ -3566,3 +3566,12 @@ func Test_view_result_split()
call Xview_result_split_tests('c')
call Xview_result_split_tests('l')
endfunc
" Test that :cc sets curswant
func Test_curswant()
helpgrep quickfix
normal! llll
1cc
call assert_equal(getcurpos()[4], virtcol('.'))
cclose | helpclose
endfunc