1
0
forked from aniani/vim

patch 8.1.0671: cursor in the wrong column after auto-formatting

Problem:    Cursor in the wrong column after auto-formatting.
Solution:   Check for deleting more spaces than adding. (closes #3748)
This commit is contained in:
Bram Moolenaar
2018-12-31 23:58:24 +01:00
parent 3d631cb0b3
commit e1e714ef0d
6 changed files with 31 additions and 6 deletions

View File

@@ -450,5 +450,16 @@ func Test_format_undo()
\ ], getline(1, '$'))
unmap gg
set tw&
enew!
endfunc
func Test_format_list_auto()
new
call setline(1, ['1. abc', '2. def', '3. ghi'])
set fo=tan ai bs=2
call feedkeys("3G0lli\<BS>\<BS>x\<Esc>", 'tx')
call assert_equal('2. defx ghi', getline(2))
bwipe!
set fo& ai& bs&
endfunc