Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Do not set 'bexpr' for unrelated buffers. #9

Merged
merged 1 commit into from

2 participants

Ingo Karkat chrisbra
Ingo Karkat

Users may have defined their own 'bexpr', and may want to keep that in all other buffers. Use :setlocal instead of :set to set the global-local option only for the on-disk and recovered buffers.

Ingo Karkat inkarkat Do not set 'bexpr' for unrelated buffers.
Users may have defined their own 'bexpr', and may want to keep that in all other buffers. Use :setlocal instead of :set to set the global-local option only for the on-disk and recovered buffers.
2f5734e
chrisbra
Owner

thanks!

chrisbra chrisbra merged commit 03a04d9 into from
Ingo Karkat inkarkat deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 12, 2012
  1. Ingo Karkat

    Do not set 'bexpr' for unrelated buffers.

    inkarkat authored
    Users may have defined their own 'bexpr', and may want to keep that in all other buffers. Use :setlocal instead of :set to set the global-local option only for the on-disk and recovered buffers.
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 5 deletions.
  1. +10 −5 autoload/recover.vim
15 autoload/recover.vim
View
@@ -116,6 +116,10 @@ fu! recover#DiffRecoveredFile() "{{{1
diffthis
let b:mod='recovered version'
let l:filetype = &ft
+ if has("balloon_eval")
+ set ballooneval
+ setl bexpr=recover#BalloonExprRecover()
+ endif
" saved version
let curspr = &spr
set nospr
@@ -132,13 +136,14 @@ fu! recover#DiffRecoveredFile() "{{{1
setl noswapfile buftype=nowrite bufhidden=delete nobuflisted
let b:mod='unmodified version on-disk'
let swapbufnr=bufnr('')
+ if has("balloon_eval")
+ set ballooneval
+ setl bexpr=recover#BalloonExprRecover()
+ endif
noa wincmd l
let b:swapbufnr = swapbufnr
command! -buffer RecoverPluginFinish :FinishRecovery
command! -buffer FinishRecovery :call recover#RecoverFinish()
- if has("balloon_eval")
- set ballooneval bexpr=recover#BalloonExprRecover()
- endif
setl modified
endfu
@@ -267,8 +272,8 @@ fu! recover#DiffRecoveredFileOld() "{{{2
call feedkeys(":command! -buffer FinishRecovery :call recover#RecoverFinish()\n", 't')
call feedkeys(":0\n", 't')
if has("balloon_eval")
- "call feedkeys(':if has("balloon_eval")|:set ballooneval|set bexpr=recover#BalloonExprRecover()|endif'."\n", 't')
- call feedkeys(":set ballooneval|set bexpr=recover#BalloonExprRecover()\n", 't')
+ "call feedkeys(':if has("balloon_eval")|:set ballooneval|setl bexpr=recover#BalloonExprRecover()|endif'."\n", 't')
+ call feedkeys(":set ballooneval|setl bexpr=recover#BalloonExprRecover()\n", 't')
endif
"call feedkeys(":redraw!\n", 't')
call feedkeys(":for i in range(".histnr.", histnr('cmd'), 1)|:call histdel('cmd',i)|:endfor\n",'t')
Something went wrong with that request. Please try again.