Merge pull request #1848 from Hinidu/vim-7.4.492

vim-patch:7.4.492
This commit is contained in:
Justin M. Keyes 2015-01-19 17:30:39 -05:00
commit 8d93bc1a4e
3 changed files with 17 additions and 4 deletions

View File

@ -5751,8 +5751,12 @@ stop_insert (
}
if (curwin->w_cursor.lnum != tpos.lnum)
curwin->w_cursor = tpos;
else if (cc != NUL)
++curwin->w_cursor.col; /* put cursor back on the NUL */
else {
tpos.col++;
if (cc != NUL && gchar_pos(&tpos) == NUL) {
++curwin->w_cursor.col; // put cursor back on the NUL
}
}
/* <C-S-Right> may have started Visual mode, adjust the position for
* deleted characters. */

View File

@ -253,7 +253,7 @@ static int included_patches[] = {
//495 NA
494,
493,
//492,
492,
491,
490,
489,

View File

@ -46,6 +46,12 @@ describe('BufEnter with modelines', function()
-- Include Xxx in the current file
feed('G:r Xxx<CR>')
-- Vim issue #57 do not move cursor on <c-o> when autoindent is set
execute('set fo+=r')
feed('G')
feed('o# abcdef<Esc>2hi<CR><c-o>d0<Esc>')
feed('o# abcdef<Esc>2hi<c-o>d0<Esc>')
expect([[
startstart
start of test file Xxx
@ -63,7 +69,10 @@ describe('BufEnter with modelines', function()
this is a test
this is a test
this should be in column 1
end of test file Xxx]])
end of test file Xxx
# abc
def
def]])
end)
teardown(function()