robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
f907614088
master
1local t =require ( 'test.testutil' ) 2local n =require ( 'test.functional.testnvim' )() 3 4local describe , it , before_each =t . describe , t . it , t . before_each 5local clear =n . clear 6local command =n . command 7local eq =t . eq 8local pcall_err =t . pcall_err 9 10describe ( 'gf' , function () 11before_each ( clear ) 12 13it ( 'is not allowed when buffer is locked' , function () 14command ( 'au OptionSet diff norm! gf' ) 15command ( [[call setline(1, ['Xfile1', 'line2', 'line3', 'line4'])]] ) 16eq ( 17'OptionSet Autocommands for "diff": Vim(normal):E788: Not allowed to edit another buffer now' , 18pcall_err ( command , 'diffthis' ) 19) 20end ) 21end )