mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #4563 from KillTheMule/vim-patch-1259
vim-patch: 7.4.1259
This commit is contained in:
commit
104181ea03
@ -423,7 +423,7 @@ static int included_patches[] = {
|
|||||||
// 1262 NA
|
// 1262 NA
|
||||||
// 1261 NA
|
// 1261 NA
|
||||||
// 1260 NA
|
// 1260 NA
|
||||||
// 1259,
|
1259,
|
||||||
// 1258 NA
|
// 1258 NA
|
||||||
// 1257 NA
|
// 1257 NA
|
||||||
// 1256 NA
|
// 1256 NA
|
||||||
@ -811,7 +811,7 @@ static int included_patches[] = {
|
|||||||
// 874 NA
|
// 874 NA
|
||||||
// 873 NA
|
// 873 NA
|
||||||
// 872 NA
|
// 872 NA
|
||||||
// 871,
|
871,
|
||||||
870,
|
870,
|
||||||
// 869 NA
|
// 869 NA
|
||||||
868,
|
868,
|
||||||
|
@ -708,6 +708,25 @@ describe('Ctrl-A/Ctrl-X on visual selections', function()
|
|||||||
call assert_equal(["20"], getline(1, '$'))
|
call assert_equal(["20"], getline(1, '$'))
|
||||||
call assert_equal([0, 1, 2, 0], getpos('.'))
|
call assert_equal([0, 1, 2, 0], getpos('.'))
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
" Test what patch 7.3.414 fixed. Ctrl-A on "000" drops the leading zeros.
|
||||||
|
func Test_normal_increment_01()
|
||||||
|
call setline(1, "000")
|
||||||
|
exec "norm! gg0\<C-A>"
|
||||||
|
call assert_equal("001", getline(1))
|
||||||
|
|
||||||
|
call setline(1, "000")
|
||||||
|
exec "norm! gg$\<C-A>"
|
||||||
|
call assert_equal("001", getline(1))
|
||||||
|
|
||||||
|
call setline(1, "001")
|
||||||
|
exec "norm! gg0\<C-A>"
|
||||||
|
call assert_equal("002", getline(1))
|
||||||
|
|
||||||
|
call setline(1, "001")
|
||||||
|
exec "norm! gg$\<C-A>"
|
||||||
|
call assert_equal("002", getline(1))
|
||||||
|
endfunc
|
||||||
]=])
|
]=])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -720,4 +739,10 @@ describe('Ctrl-A/Ctrl-X on visual selections', function()
|
|||||||
eq({}, nvim.get_vvar('errors'))
|
eq({}, nvim.get_vvar('errors'))
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it('does not drop leading zeroes', function()
|
||||||
|
execute('set nrformats&vi') -- &vi makes Vim compatible
|
||||||
|
call('Test_normal_increment_01')
|
||||||
|
eq({}, nvim.get_vvar('errors'))
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user