diff runtime/doc/eval.txt @ 11587:439835c4b7aa v8.0.0676

patch 8.0.0676: crash when closing quickfix window in autocmd commit https://github.com/vim/vim/commit/182a17b1e80b92826204d967808df0d30eb2ef27 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 25 20:57:18 2017 +0200 patch 8.0.0676: crash when closing quickfix window in autocmd Problem: Crash when closing the quickfix window in a FileType autocommand that triggers when the quickfix window is opened. Solution: Save the new value before triggering the OptionSet autocommand. Add the "starting" flag to test_override() to make the text work.
author Christian Brabandt <cb@256bit.org>
date Sun, 25 Jun 2017 21:00:03 +0200
parents 52e3a77c097b
children 6f11697fb92c
line wrap: on
line diff
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt*	For Vim version 8.0.  Last change: 2017 Jun 24
+*eval.txt*	For Vim version 8.0.  Last change: 2017 Jun 25
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -7942,8 +7942,19 @@ test_override({name}, {val})				*test_ov
 		name	     effect when {val} is non-zero ~
 		redraw       disable the redrawing() function
 		char_avail   disable the char_avail() function
+		starting     reset the "starting" variable, see below
 		ALL	     clear all overrides ({val} is not used)
 
+		"starting" is to be used when a test should behave like
+		startup was done.  Since the tests are run by sourcing a
+		script the "starting" variable is non-zero. This is usually a
+		good thing (tests run faster), but sometimes changes behavior
+		in a way that the test doesn't work properly.
+		When using: >
+			call test_override('starting', 1)
+< 		The value of "starting" is saved.  It is restored by: >
+			call test_override('starting', 0)
+
 test_settime({expr})					*test_settime()*
 		Set the time Vim uses internally.  Currently only used for
 		timestamps in the history, as they are used in viminfo, and