Update runtime files
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index e004010..b6e5023 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -301,6 +301,7 @@
 |FileChangedShellPost|	After handling a file changed since editing started
 |FileChangedRO|		before making the first change to a read-only file
 
+|DiffUpdated|		after diffs have been updated
 |DirChanged|		after the working directory has changed
 
 |ShellCmdPost|		after executing a shell command
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt
index 3b2dd32..0d2b0db 100644
--- a/runtime/doc/cmdline.txt
+++ b/runtime/doc/cmdline.txt
@@ -534,8 +534,46 @@
 to add comments.  Example: >
 	:set ai		"set 'autoindent' option
 It is not possible to add a comment to a shell command ":!cmd" or to the
-":map" command and a few others, because they see the '"' as part of their
-argument.  This is mentioned where the command is explained.
+":map" command and a few others (mainly commands that expect expressions)
+that see the '"' as part of their argument:
+
+    :argdo
+    :autocmd
+    :bufdo
+    :cexpr (and the like)
+    :call
+    :cdo (and the like)
+    :command
+    :cscope (and the like)
+    :debug
+    :display
+    :echo (and the like)
+    :elseif
+    :execute
+    :folddoopen
+    :folddoclosed
+    :for
+    :grep (and the like)
+    :help (and the like)
+    :if
+    :let
+    :make
+    :map (and the like including :abbrev commands)
+    :menu (and the like)
+    :mkspell
+    :normal
+    :ownsyntax
+    :popup
+    :promptfind (and the like)
+    :registers
+    :return
+    :sort
+    :syntax
+    :tabdo
+    :tearoff
+    :vimgrep (and the like)
+    :while
+    :windo
 
 							*:bar* *:\bar*
 '|' can be used to separate commands, so you can give multiple commands in one
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index fda3bd0..d51da60 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2038,7 +2038,8 @@
 				Number	assert file contents is equal
 assert_exception({error} [, {msg}])
 				Number	assert {error} is in v:exception
-assert_fails({cmd} [, {error}])	Number	assert {cmd} fails
+assert_fails({cmd} [, {error} [, {msg}]])
+				Number	assert {cmd} fails
 assert_false({actual} [, {msg}])
 				Number	assert {actual} is false
 assert_inrange({lower}, {upper}, {actual} [, {msg}])
@@ -2461,7 +2462,7 @@
 term_setrestore({buf}, {command}) none	set command to restore terminal
 term_setsize({buf}, {rows}, {cols})
 				none	set the size of a terminal
-term_start({cmd}, {options})	Job	open a terminal window and run a job
+term_start({cmd}, {options})	Number	open a terminal window and run a job
 term_wait({buf} [, {time}])	Number  wait for screen to be updated
 test_alloc_fail({id}, {countdown}, {repeat})
 				none	make memory allocation fail
@@ -2475,8 +2476,8 @@
 test_null_list()		List	null value for testing
 test_null_partial()		Funcref	null value for testing
 test_null_string()		String	null value for testing
-test_option_not_set({name})    none	reset flag indicating option was set
-test_override({expr}, {val})    none	test with Vim internal overrides
+test_option_not_set({name})	none	reset flag indicating option was set
+test_override({expr}, {val})	none	test with Vim internal overrides
 test_scrollbar({which}, {value}, {dragging})
 				none	scroll in the GUI for testing
 test_settime({expr})		none	set current time for testing
@@ -2671,7 +2672,7 @@
 			  call assert_exception('E492:')
 			endtry
 
-assert_fails({cmd} [, {error}])					*assert_fails()*
+assert_fails({cmd} [, {error} [, {msg}]])			*assert_fails()*
 		Run {cmd} and add an error message to |v:errors| if it does
 		NOT produce an error.  Also see |assert-return|.
 		When {error} is given it must match in |v:errmsg|.
diff --git a/runtime/doc/gui_x11.txt b/runtime/doc/gui_x11.txt
index a95b9fd..76e2ac2 100644
--- a/runtime/doc/gui_x11.txt
+++ b/runtime/doc/gui_x11.txt
@@ -496,7 +496,7 @@
 in mind always when you try improving a theme.
 
 
-Example 3.  border color
+Example 3.  border color ~
 
 To eliminate borders when maximized: >
 
diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt
index 239de9d..20e6c16 100644
--- a/runtime/doc/help.txt
+++ b/runtime/doc/help.txt
@@ -225,4 +225,4 @@
 'compatible'.
 
 ------------------------------------------------------------------------------
- vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:noet:ft=help:norl:
+ vim:tw=78:isk=!-~,^*,^\|,^\":ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt
index b1f44b7..a8d59e3 100644
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -941,6 +941,11 @@
 Indent for a continuation line: >
 	let g:pyindent_continue = '&sw * 2'
 
+The method uses searchpair() to look back for unclosed parenthesis.  This can
+sometimes be slow, thus it timeouts after 150 msec.  If you notice the
+indenting isn't correct, you can set a larger timeout in msec: >
+	let g:pyindent_searchpair_timeout = 500
+
 
 R								*ft-r-indent*
 
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 6a34b77..0db2d46 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -3895,8 +3895,8 @@
 	screen.
 
 						*'guioptions'* *'go'*
-'guioptions' 'go'	string	(default "egmrLtT"   (MS-Windows, "t" is
-						   removed in |defaults.vim|),
+'guioptions' 'go'	string	(default "egmrLtT"   (MS-Windows,
+					   "t" is removed in |defaults.vim|),
 					 "aegimrLtT" (GTK, Motif and Athena),
 					 )
 			global
diff --git a/runtime/doc/os_390.txt b/runtime/doc/os_390.txt
index ab88cc6..7b6ebd4 100644
--- a/runtime/doc/os_390.txt
+++ b/runtime/doc/os_390.txt
@@ -83,10 +83,10 @@
   ctags out there, that does it right, but we can't be sure.  So this seems to
   be a permanent restriction.
 
-- The cscope interface (|cscope|) doesn't work for the version of cscope
-  that we use on our mainframe.  We have a copy of version 15.0b12, and it
-  causes Vim to hang when using the "cscope add" command.  I'm guessing that
-  the binary format of the cscope database isn't quite what Vim is expecting.
+- The cscope interface (|cscope|) doesn't work for the version of cscope that
+  we use on our mainframe.  We have a copy of version 15.0b12, and it causes
+  Vim to hang when using the "cscope add" command.  I'm guessing that the
+  binary format of the cscope database isn't quite what Vim is expecting.
   I've tried to port the current version of cscope (15.3) to z/OS, without
   much success.  If anyone is interested in trying, drop me a line if you
   make any progress.
@@ -131,4 +131,4 @@
 
 
 ------------------------------------------------------------------------------
- vim:tw=78:fo=tcq2:ts=8:noet:ft=help:norl:
+ vim:tw=78:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/os_win32.txt b/runtime/doc/os_win32.txt
index 9a5f748..c8417e0 100644
--- a/runtime/doc/os_win32.txt
+++ b/runtime/doc/os_win32.txt
@@ -303,4 +303,4 @@
    'runtimepath'.  For example ~/vimfiles/bitmaps/vim.ico.
 
 
- vim:tw=78:fo=tcq2:ts=8:noet:ft=help:norl:
+ vim:tw=78:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 6a36b13..ea1e00a 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -38,17 +38,8 @@
 							*known-bugs*
 -------------------- Known bugs and current work -----------------------
 
-Test_scrollbars() fails with X11-Athena GUI or X11-Motif GUI
-(Dominique, #3451)
-
-Flashing highlighting with 'rnu' and folding.
-(Vitaly Yashin, 2018 Sep 26, #3484)
-
-Still a cursorline problem. (Justin Keyes, #3488)
-
-Crash with recursive use of getcmdline() from Timer.  save_ccline isn't used
-then.  Turn it around: When getcmdline() is called it checks if it is a
-recursive call, and saves the cmdline then. (#3493)
+Using freed memory in quickfix. (Dominique Pelle, Yegappan is looking into a
+fix).
 
 'incsearch' with :s: (#3321)
 - :s/foo  using CTRL-G moves to another line, should not happen, or use the
@@ -59,8 +50,6 @@
   isn't one?
   Then :%s?foo should take the first match above the cursor line.
 
-Don't set diffexpr when generating _vimrc for MS-Windows.
-
 Prompt buffer:
 - Add a command line history.
 - delay next prompt until plugin gives OK?
@@ -75,6 +64,7 @@
 Terminal emulator window:
 - GUI: When using ":set go+=!" a system() call causes the hit-enter prompt.
   (#3327)
+- GUI: hang until key typed. (#3530)
 - When the job in the terminal doesn't use mouse events, let the scroll wheel
   scroll the scrollback, like a terminal does at the shell prompt. #2490
   And use modeless selection.  #2962
@@ -105,6 +95,9 @@
 Key mapping times out when using a timer in Gvim. (Michael Henry, 2018 Sep 9,
 #3417)
 
+Patch to check for directory access in term_start(). (Jason Franklin, 2018 Oct
+15)
+
 Does not build with MinGW out of the box:
 - _stat64 is not defined, need to use "struct stat" in vim.h
 - WINVER conflict, should use 0x0600 by default?
@@ -115,33 +108,55 @@
 Errors found with random data:
     heap-buffer-overflow in alist_add (#2472)
 
+Win32 key codes are messy.  Mike Williams tried to fix that, but now old
+mappings no longer work.  Create a new terminal for the better solution?
+
 Improve fallback for menu translations, to avoid having to create lots of
 files that source the actual file.  E.g. menu_da_de -> menu_da
 Include part of #3242?
 
+When a terminal exit_cb closes the window, a following typed key is lost, if
+it's in a mapping. (2018 Oct 6, #2302, #3522)
+
 Completion mixes results from the current buffer with tags and other files.
 Happens when typing CTRL-N while still search for results.  E.g., type "b_" in
 terminal.c and then CTRL-N twice.
 Should do current file first and not split it up when more results are found.
 (Also #1890)
 
+C syntax: {} inside () causes following {} to be highlighted as error.
+(Michalis Giannakidis, 2006 Jun 1)
+
 More warnings from static analysis:
 https://lgtm.com/projects/g/vim/vim/alerts/?mode=list
 
+Quickfix accessing free memory. (Dominique, 2018 Oct 13, #3538)
+Yegappan will look into it.
+
+Patch for this: (Aron Widforss, 2018 Oct 13, #3539)
+    missing a test.
+7   Make 'scrolloff' a global-local option, so that it can be different in the
+    quickfix window, for example. (Gary Holloway)
+    Also do 'sidescrolloff'.
+
 Pasting foo} causes Vim to behave weird. (John Little, 2018 Jun 17)
 Related to bracketed paste.  I cannot reproduce it.
 
 ":mksession" cannot handle a very long 'runtimepath'. (Timothy Madden, 21 Sep
-2018, #3466)
+2018, #3466)  Christian is working on a patch.
 
 Patch in pull request #2967: Allow white space in sign text. (Ben Jackson)
 Test fails in AppVeyor.
 
-Job_info() returns command without backslashes. (Daniel Hahler, 2018 Sep 3,
-#3404)
-
 Patch to simplify nsis installer. (Ken Takata, 2018 Sep 24, was #3479)
-Now included in #3501, using MUI2.
+Now included in #3501, using MUI2.  Use the zip file to get the binary files:
+https://github.com/vim/vim/files/2475621/nsis-icons.zip
+Still being worked on.
+
+ml_get error: (Israel Chauca Fuentes, 2018 Oct 17, #3550).
+
+Patch to convert temp file name. (Yasuhiro Matsumoto, #3520)
+Not ready to include yet.
 
 Removing flags from 'cpoptions' breaks the Winbar buttons in termdebug.
 (Dominique Pelle, 2018 Jul 16)
@@ -156,24 +171,11 @@
 Add function to make use of internal diff, working on two lists and returning
 unified diff (list of lines).
 
-Memory leak in test_assert:
-==19127==    by 0x2640D7: alloc (misc2.c:874)
-==19127==    by 0x2646D6: vim_strsave (misc2.c:1315)
-==19127==    by 0x1B68D2: f_getcwd (evalfunc.c:4950)
-And:
-==19127==    by 0x2640D7: alloc (misc2.c:874)
-==19127==    by 0x1A9477: set_var (eval.c:7601)
-==19127==    by 0x19F96F: set_var_lval (eval.c:2233)
-==19127==    by 0x19EA3A: ex_let_one (eval.c:1810)
-==19127==    by 0x19D737: ex_let_vars (eval.c:1294)
-==19127==    by 0x19D6B4: ex_let (eval.c:1259)
+Patch to implement 'diffref' option. (#3535)
+  Easier to use a 'diffmaster' option, is the extra complexity needed?
+
 Memory leaks in test_channel? (or is it because of fork())
 Using uninitialized value in test_crypt.
-Memory leaks in test_escaped_glob
-==20651==    by 0x2640D7: alloc (misc2.c:874)
-==20651==    by 0x2646D6: vim_strsave (misc2.c:1315)
-==20651==    by 0x3741EA: get_function_args (userfunc.c:131)
-==20651==    by 0x378779: ex_function (userfunc.c:2036)
 Memory leak in test_terminal:
 ==23530==    by 0x2640D7: alloc (misc2.c:874)
 ==23530==    by 0x2646D6: vim_strsave (misc2.c:1315)
@@ -198,6 +200,9 @@
 
 Patch to support menus in terminal: ":tlmenu". (Yee Cheng Chin, #3439)
 
+:pedit resets the 'buflisted' option unexpectedly. (Wang Shidong, 2018 Oct 12,
+#3536)
+
 home_replace() uses $HOME instead of "homedir". (Cesar Martins, 2018 Aug 9)
 
 When the status line uses term_gettitle(), it does not get updated when the
@@ -233,6 +238,9 @@
 When the last line wraps, selecting with the mouse below that line only
 includes the first screen line. (2018 Aug 23, #3368)
 
+Add `:filter` support for various commands (Marcin Szamotulski, 2017 Nov 12
+#2322)  Patch now in #2856.
+
 Refactored HTML indent file. (Michael Lee, #1821)
 
 Patch to add getregpoint() and setreg() with an option to set "".
@@ -260,6 +268,11 @@
 
 'foldtext' is evaluated too often. (Daniel Hahler, #2773)
 
+ml_get error when using a Python script. (Yggdroot, 2017 Jun 1, #1737)
+Lemonboy can reproduce (2017 Jun 5)
+Also reproduced by Benjamin Doherty, 2018 Oct 4.
+Simpler way: Ken Takata, Oct 6.
+
 Height of quickfix window is not retained with vertical splits. (Lifepillar,
 2018 Aug 24, #2998)
 
@@ -275,6 +288,9 @@
 windows with it).  Can we just remove the jump list entries for the quickfix
 buffer?
 
+Patch to fix that executable() may fail on very long filename in MS-Windows.
+(Ken Takata, 2016 Feb 1, update 2018 Oct 7)
+
 Patch to be able to use hex numbers with :digraph. (Lcd, 2015 Sep 6)
 Update Sep 7.  Update by Christian Brabandt, 2015 Sep 8, 2016 Feb 1.
 
@@ -292,9 +308,6 @@
 Maybe call it v:motiontype.  Update in #3490)
 Alternaitve: add the force flag to mode(), after "no".
 
-Patch to fix that executable() may fail on very long filename in MS-Windows.
-(Ken Takata, 2016 Feb 1)
-
 Try out background make plugin: 
   https://github.com/AndrewVos/vim-make-background
 or asyncmake: 
@@ -450,9 +463,6 @@
 directory (Paulo Marcel Coelho Arabic, 2017 Oct 30, #2266)
 Also see #1689.
 
-ml_get error when using a Python script. (Yggdroot, 2017 Jun 1, #1737)
-Lemonboy can reproduce (2017 Jun 5)
-
 crash when removing an element while inside map(). (Nikolai Pavlov, 2018 Feb
 17, #2652)
 
@@ -636,9 +646,6 @@
 Profile of a dict function is lost when the dict is deleted.  Would it be
 possible to collect this?  (Daniel Hahler, #2350)
 
-Add `:filter` support for various commands (Marcin Szamotulski, 2017 Nov 12
-#2322)  Patch now in #2856.
-
 When checking if a bufref is valid, also check the buffer number, to catch the
 case of :bwipe followed by :new.
 
@@ -2412,9 +2419,6 @@
 Bug in using a transparent syntax region. (Hanlen in vim-dev maillist, 2007
 Jul 31)
 
-C syntax: {} inside () causes following {} to be highlighted as error.
-(Michalis Giannakidis, 2006 Jun 1)
-
 When 'diffopt' has "context:0" a single deleted line causes two folds to merge
 and mess up syncing. (Austin Jennings, 2008 Jan 31)
 
@@ -2877,8 +2881,6 @@
 -   Another patch for Javascript indenting. (Hari Kumar, 2010 Jul 11)
     Needs a few tests.
 -   Add 'cscopeignorecase' option. (Liang Wenzhi, 2006 Sept 3)
--   Load intl.dll too, not only libintl.dll. (Mike Williams, 2006 May 9, docs
-    patch May 10)
 -   Extra argument to strtrans() to translate special keys to their name (Eric
     Arnold, 2006 May 22)
 -   'threglookexp' option: only match with first word in thesaurus file.
@@ -5574,9 +5576,6 @@
     that marks if the option was set.  Useful to keep the effect of setting
     'compatible' after ":syntax on" has been used.
 7   There is 'titleold', why is there no 'iconold'? (Chazelas)
-7   Make 'scrolloff' a global-local option, so that it can be different in the
-    quickfix window, for example. (Gary Holloway)
-    Also do 'sidescrolloff'.
 
 
 External commands: