mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 8.1.0754: preferred column is lost when setting 'cursorcolumn'
Problem: Preferred column is lost when setting 'cursorcolumn'. Solution: Change option flag to P_RWINONLY. (Takayuki Kurosawa, closes #3806)
This commit is contained in:
@@ -989,7 +989,7 @@ static struct vimoption options[] =
|
|||||||
{"cursorbind", "crb", P_BOOL|P_VI_DEF,
|
{"cursorbind", "crb", P_BOOL|P_VI_DEF,
|
||||||
(char_u *)VAR_WIN, PV_CRBIND,
|
(char_u *)VAR_WIN, PV_CRBIND,
|
||||||
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
|
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
|
||||||
{"cursorcolumn", "cuc", P_BOOL|P_VI_DEF|P_RWIN,
|
{"cursorcolumn", "cuc", P_BOOL|P_VI_DEF|P_RWINONLY,
|
||||||
#ifdef FEAT_SYN_HL
|
#ifdef FEAT_SYN_HL
|
||||||
(char_u *)VAR_WIN, PV_CUC,
|
(char_u *)VAR_WIN, PV_CUC,
|
||||||
#else
|
#else
|
||||||
|
@@ -46,3 +46,23 @@ func Test_curswant_with_autocommand()
|
|||||||
quit!
|
quit!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
" Tests for behavior of curswant with cursorcolumn/line
|
||||||
|
func Test_curswant_with_cursorcolumn()
|
||||||
|
new
|
||||||
|
call setline(1, ['01234567', ''])
|
||||||
|
exe "normal! ggf6j"
|
||||||
|
call assert_equal(6, winsaveview().curswant)
|
||||||
|
set cursorcolumn
|
||||||
|
call assert_equal(6, winsaveview().curswant)
|
||||||
|
quit!
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func Test_curswant_with_cursorline()
|
||||||
|
new
|
||||||
|
call setline(1, ['01234567', ''])
|
||||||
|
exe "normal! ggf6j"
|
||||||
|
call assert_equal(6, winsaveview().curswant)
|
||||||
|
set cursorline
|
||||||
|
call assert_equal(6, winsaveview().curswant)
|
||||||
|
quit!
|
||||||
|
endfunc
|
||||||
|
@@ -795,6 +795,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
754,
|
||||||
/**/
|
/**/
|
||||||
753,
|
753,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user