comparison autoload/lawrencium/diff.vim @ 141:4d5f4233b04e

Only set `v:errmsg` for real errors, not exceptions.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 07 Dec 2016 21:33:18 -0800
parents 065625e1bb31
children 5e72afea669c
comparison
equal deleted inserted replaced
140:652a6f5df0f3 141:4d5f4233b04e
125 function! s:HgDiff_DiffThis(diff_id) abort 125 function! s:HgDiff_DiffThis(diff_id) abort
126 " Store some commands to run when we exit diff mode. 126 " Store some commands to run when we exit diff mode.
127 " It's needed because `diffoff` reverts those settings to their default 127 " It's needed because `diffoff` reverts those settings to their default
128 " values, instead of their previous ones. 128 " values, instead of their previous ones.
129 if &diff 129 if &diff
130 call lawrencium#throw("Calling diffthis too late on a buffer!") 130 call lawrencium#throwerr("Calling diffthis too late on a buffer!")
131 return 131 return
132 endif 132 endif
133 call lawrencium#trace('Enabling diff mode on ' . bufname('%')) 133 call lawrencium#trace('Enabling diff mode on ' . bufname('%'))
134 let w:lawrencium_diffoff = {} 134 let w:lawrencium_diffoff = {}
135 let w:lawrencium_diffoff['&diff'] = 0 135 let w:lawrencium_diffoff['&diff'] = 0