mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 9.0.1545: text not scrolled when cursor moved with "g0" and "h"
Problem: Text not scrolled when cursor moved with "g0" and "h". Solution: Adjust w_skipcol when needed. (Luuk van Baal, closes #12387)
This commit is contained in:
committed by
Bram Moolenaar
parent
378447fc18
commit
8667a5678f
@@ -2734,6 +2734,7 @@ oneleft(void)
|
||||
}
|
||||
|
||||
curwin->w_set_curswant = TRUE;
|
||||
adjust_skipcol();
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
@@ -5762,6 +5762,7 @@ nv_g_home_m_cmd(cmdarg_T *cap)
|
||||
curwin->w_valid &= ~VALID_WCOL;
|
||||
}
|
||||
curwin->w_set_curswant = TRUE;
|
||||
adjust_skipcol();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -419,6 +419,18 @@ func Test_smoothscroll_cursor_position()
|
||||
exe "normal \<C-Y>"
|
||||
call s:check_col_calc(1, 3, 41)
|
||||
|
||||
" Test "g0/g<Home>"
|
||||
exe "normal gg\<C-E>"
|
||||
norm $gkg0
|
||||
call s:check_col_calc(1, 2, 21)
|
||||
|
||||
" Test moving the cursor behind the <<< display with 'virtualedit'
|
||||
set virtualedit=all
|
||||
exe "normal \<C-E>"
|
||||
norm 3lgkh
|
||||
call s:check_col_calc(3, 2, 23)
|
||||
set virtualedit&
|
||||
|
||||
normal gg3l
|
||||
exe "normal \<C-E>"
|
||||
|
||||
|
@@ -695,6 +695,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1545,
|
||||
/**/
|
||||
1544,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user