Preserve '[ and '] marks, and &modified, during realtime diff.

See #242.
This commit is contained in:
Andy Stewart
2015-04-01 10:28:01 +02:00
parent 07d7c9d478
commit e098491906
5 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
modified: 1
modified: 1

View File

@@ -0,0 +1,4 @@
'[ mark: 0,6,1,0
'] mark: 0,6,2,0
'[ mark: 0,6,1,0
'] mark: 0,6,2,0

View File

@@ -0,0 +1,8 @@
source helper.vim
call Setup()
normal 5Go*
call Dump("modified: ".getbufvar('', '&modified'), 'keepModified')
doautocmd CursorHold
call Dump("modified: ".getbufvar('', '&modified'), 'keepModified')

10
test/testKeepOpMarks.vim Normal file
View File

@@ -0,0 +1,10 @@
source helper.vim
call Setup()
normal 5Go*
call Dump("'[ mark: ".join(getpos("'["), ','), 'keepOpMarks')
call Dump("'] mark: ".join(getpos("']"), ','), 'keepOpMarks')
doautocmd CursorHold
call Dump("'[ mark: ".join(getpos("'["), ','), 'keepOpMarks')
call Dump("'] mark: ".join(getpos("']"), ','), 'keepOpMarks')