mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 9.0.1244: cursor displayed in wrong position when leaving Insert mode
Problem: Cursor briefly displayed in a wrong position when pressing Esc in Insert mode after autoindent was used. Solution: Do not adjust the cursor position for assumed deleted white space if text is following. (closes #11877)
This commit is contained in:
parent
01d4efe2e8
commit
0f843ef091
@ -3328,15 +3328,15 @@ vgetorpeek(int advance)
|
|||||||
{
|
{
|
||||||
if (curwin->w_wcol > 0)
|
if (curwin->w_wcol > 0)
|
||||||
{
|
{
|
||||||
if (did_ai)
|
// After auto-indenting and no text is following,
|
||||||
|
// we are expecting to truncate the trailing
|
||||||
|
// white-space, so find the last non-white
|
||||||
|
// character -- webb
|
||||||
|
if (did_ai && *skipwhite(ml_get_curline()
|
||||||
|
+ curwin->w_cursor.col) == NUL)
|
||||||
{
|
{
|
||||||
chartabsize_T cts;
|
chartabsize_T cts;
|
||||||
|
|
||||||
/*
|
|
||||||
* We are expecting to truncate the trailing
|
|
||||||
* white-space, so find the last non-white
|
|
||||||
* character -- webb
|
|
||||||
*/
|
|
||||||
curwin->w_wcol = 0;
|
curwin->w_wcol = 0;
|
||||||
ptr = ml_get_curline();
|
ptr = ml_get_curline();
|
||||||
init_chartabsize_arg(&cts, curwin,
|
init_chartabsize_arg(&cts, curwin,
|
||||||
|
@ -695,6 +695,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 */
|
||||||
|
/**/
|
||||||
|
1244,
|
||||||
/**/
|
/**/
|
||||||
1243,
|
1243,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user