]> granicus.if.org Git - vim/commitdiff
patch 8.1.0289: cursor moves to wrong column after quickfix jump v8.1.0289
authorBram Moolenaar <Bram@vim.org>
Wed, 15 Aug 2018 20:29:51 +0000 (22:29 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 15 Aug 2018 20:29:51 +0000 (22:29 +0200)
Problem:    Cursor moves to wrong column after quickfix jump.
Solution:   Set the curswant flag. (Andy Massimino, closes #3331)

src/quickfix.c
src/testdir/test_quickfix.vim
src/version.c

index 8cfec6c7044df4b6fccf2437ace3613e661e3120..78df7081f8a13879d1b6e338dbed474a998c0909 100644 (file)
@@ -3010,6 +3010,7 @@ qf_jump_goto_line(
                        ++screen_col;
                }
            }
+           curwin->w_set_curswant = TRUE;
            check_cursor();
        }
        else
index ce19e74d3f0cceb33b57d0f6c7b4ac1f50a4dc97..8a175a185d14e072071bf726faf458c36bed137d 100644 (file)
@@ -3546,3 +3546,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
index 82b7022069287b2d1e7fa5c3f9a2c82a90e06985..66e79d88c15d22227a456bdb18ba63d37e84b8b9 100644 (file)
@@ -794,6 +794,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    289,
 /**/
     288,
 /**/