On Di, 07 Mär 2017, Christian Brabandt wrote:
> I believe this comes from the newly generated opt_test.vim script.
> Setting verbosefile=xxx will make Vim write out that file.
> Please apply the attached patch
Here is an updated patch. Changes to the previous version:
1) it fixes a stupid syntax error (missing apostrophe in previous
version)
2) moves the logic to delete the verbosefile after that option has been
reset
3) indents the various if/endif combinations
4) gets rid of the if exists("+option")|endif variations.
Best,
Christian
--
Daher ist das schönste Zeichen der Originalität, wenn man einen
empfangenen Gedanken dergestalt fruchtbar zu entwickeln weiß, dass
niemand leicht, wie viel in ihm verborgen liege, gefunden hätte.
-- Goethe, Maximen und Reflektionen, Nr. 208
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
commit 470c5a41d16eeb2f942fe916c5699e7d1b377845
Author: Christian Brabandt <[email protected]>
Date: Tue Mar 7 13:33:43 2017 +0100
remove spurious file xxx from seting verbosefile
diff --git a/src/gen_opt_test.vim b/src/gen_opt_test.vim
index 677aa74e3..418dcc050 100644
--- a/src/gen_opt_test.vim
+++ b/src/gen_opt_test.vim
@@ -172,16 +172,23 @@ while 1
endfor
" setting an option can only fail when it's implemented.
- call add(script, "if exists('+" . name . "')")
- for val in a[1]
- call add(script, "call assert_fails('set " . name . "=" . val . "')")
- call add(script, "call assert_fails('set " . shortname . "=" . val . "')")
- endfor
- call add(script, "endif")
+ if !empty(a[1])
+ call add(script, "if exists('+" . name . "')")
+ for val in a[1]
+ call add(script, "\tcall assert_fails('set " . name . "=" . val . "')")
+ call add(script, "\tcall assert_fails('set " . shortname . "=" . val . "')")
+ endfor
+ call add(script, "endif")
+ endif
endif
call add(script, 'set ' . name . '&')
call add(script, 'set ' . shortname . '&')
+ if name is# 'verbosefile' && !empty(val)
+ call add(script, "if filereadable('". val. "')")
+ call add(script, "\tcall delete('". val. "')")
+ call add(script, "endif")
+ endif
endif
endwhile