Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

Merged
merged 1 commit into from over 1 year ago

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 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 August 13, 2012
chrisbra chrisbra closed this August 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Aug 12, 2012
Ingo Karkat 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
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 10 additions and 5 deletions. Show diff stats Hide diff stats

  1. 15  autoload/recover.vim
15  autoload/recover.vim
@@ -116,6 +116,10 @@ fu! recover#DiffRecoveredFile() "{{{1
116 116
     diffthis
117 117
     let b:mod='recovered version'
118 118
     let l:filetype = &ft
  119
+    if has("balloon_eval")
  120
+	set ballooneval
  121
+	setl bexpr=recover#BalloonExprRecover()
  122
+    endif
119 123
     " saved version
120 124
     let curspr = &spr
121 125
     set nospr
@@ -132,13 +136,14 @@ fu! recover#DiffRecoveredFile() "{{{1
132 136
     setl noswapfile buftype=nowrite bufhidden=delete nobuflisted
133 137
     let b:mod='unmodified version on-disk'
134 138
     let swapbufnr=bufnr('')
  139
+    if has("balloon_eval")
  140
+	set ballooneval
  141
+	setl bexpr=recover#BalloonExprRecover()
  142
+    endif
135 143
     noa wincmd l
136 144
     let b:swapbufnr = swapbufnr
137 145
     command! -buffer RecoverPluginFinish :FinishRecovery
138 146
     command! -buffer FinishRecovery :call recover#RecoverFinish()
139  
-    if has("balloon_eval")
140  
-	set ballooneval bexpr=recover#BalloonExprRecover()
141  
-    endif
142 147
     setl modified
143 148
 endfu
144 149
 
@@ -267,8 +272,8 @@ fu! recover#DiffRecoveredFileOld() "{{{2
267 272
 	call feedkeys(":command! -buffer FinishRecovery :call recover#RecoverFinish()\n", 't')
268 273
 	call feedkeys(":0\n", 't')
269 274
 	if has("balloon_eval")
270  
-	"call feedkeys(':if has("balloon_eval")|:set ballooneval|set bexpr=recover#BalloonExprRecover()|endif'."\n", 't')
271  
-	    call feedkeys(":set ballooneval|set bexpr=recover#BalloonExprRecover()\n", 't')
  275
+	"call feedkeys(':if has("balloon_eval")|:set ballooneval|setl bexpr=recover#BalloonExprRecover()|endif'."\n", 't')
  276
+	    call feedkeys(":set ballooneval|setl bexpr=recover#BalloonExprRecover()\n", 't')
272 277
 	endif
273 278
 	"call feedkeys(":redraw!\n", 't')
274 279
 	call feedkeys(":for i in range(".histnr.", histnr('cmd'), 1)|:call histdel('cmd',i)|:endfor\n",'t')
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.