comparison plugin/lawrencium.vim @ 134:0e005903aae4

Use `diff` folding method for `Hgrecord`.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 19 Apr 2016 21:24:08 -0700
parents add9f0ed0b49
children 90f8d4bf4fa7
comparison
equal deleted inserted replaced
133:add9f0ed0b49 134:0e005903aae4
2207 2207
2208 " Start diffing on the current file, enable some commands. 2208 " Start diffing on the current file, enable some commands.
2209 call l:orig_buf.DefineCommand('Hgrecordabort', ':call s:HgRecord_Abort()') 2209 call l:orig_buf.DefineCommand('Hgrecordabort', ':call s:HgRecord_Abort()')
2210 call l:orig_buf.DefineCommand('Hgrecordcommit', ':call s:HgRecord_Execute()') 2210 call l:orig_buf.DefineCommand('Hgrecordcommit', ':call s:HgRecord_Execute()')
2211 call s:HgDiff_DiffThis(l:diff_id) 2211 call s:HgDiff_DiffThis(l:diff_id)
2212 setlocal foldmethod=marker 2212 setlocal foldmethod=diff
2213 2213
2214 " Split the window and open the parent revision in the right or bottom 2214 " Split the window and open the parent revision in the right or bottom
2215 " window. Keep the current buffer in the left or top window... we're going 2215 " window. Keep the current buffer in the left or top window... we're going
2216 " to 'move' those changes into the parent revision. 2216 " to 'move' those changes into the parent revision.
2217 let l:cmd = 'keepalt rightbelow split ' 2217 let l:cmd = 'keepalt rightbelow split '
2243 call l:rec_buf.DefineCommand('Hgrecordabort', ':call s:HgRecord_Abort()') 2243 call l:rec_buf.DefineCommand('Hgrecordabort', ':call s:HgRecord_Abort()')
2244 call s:DefineMainCommands() 2244 call s:DefineMainCommands()
2245 2245
2246 " Make it the other part of the diff. 2246 " Make it the other part of the diff.
2247 call s:HgDiff_DiffThis(l:diff_id) 2247 call s:HgDiff_DiffThis(l:diff_id)
2248 setlocal foldmethod=marker 2248 setlocal foldmethod=diff
2249 call l:rec_buf.SetVar('&filetype', l:orig_buf.GetVar('&filetype')) 2249 call l:rec_buf.SetVar('&filetype', l:orig_buf.GetVar('&filetype'))
2250 2250
2251 if g:lawrencium_record_start_in_working_buffer 2251 if g:lawrencium_record_start_in_working_buffer
2252 wincmd p 2252 wincmd p
2253 endif 2253 endif