Merge tag 'v8.0.0133' into HEAD
diff --git a/.gitignore b/.gitignore
index 81f9343..762a234 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@
 src/auto/if_perl.c
 src/auto/gui_gtk_gresources.c
 src/auto/gui_gtk_gresources.h
+src/objects/.dirstamp
 src/tags
 
 # We do need src/auto/configure.
diff --git a/runtime/compiler/ghc.vim b/runtime/compiler/ghc.vim
new file mode 100644
index 0000000..c98ae30
--- /dev/null
+++ b/runtime/compiler/ghc.vim
@@ -0,0 +1,26 @@
+" Vim compiler file
+" Compiler:         GHC Haskell Compiler
+" Maintainer:       Daniel Campoverde <alx@sillybytes.net>
+" Latest Revision:  2016-11-29
+
+if exists("current_compiler")
+  finish
+endif
+let current_compiler = "ghc"
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+CompilerSet errorformat=
+    \%-G%.%#:\ build,
+    \%-G%.%#preprocessing\ library\ %.%#,
+    \%-G[%.%#]%.%#,
+    \%E%f:%l:%c:\ %m,
+    \%-G--%.%#
+
+if exists('g:compiler_ghc_ignore_unmatched_lines')
+  CompilerSet errorformat+=%-G%.%#
+endif
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index 6dced7b..e40805e 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -1,4 +1,4 @@
-*change.txt*    For Vim version 8.0.  Last change: 2016 Oct 02
+*change.txt*    For Vim version 8.0.  Last change: 2016 Nov 19
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -684,6 +684,7 @@
 							*:s_flags*
 The flags that you can use for the substitute commands:
 
+							*:&&*
 [&]	Must be the first one: Keep the flags from the previous substitute
 	command.  Examples: >
 		:&&
diff --git a/runtime/doc/channel.txt b/runtime/doc/channel.txt
index 4fb55bf..c72f9c8 100644
--- a/runtime/doc/channel.txt
+++ b/runtime/doc/channel.txt
@@ -1,4 +1,4 @@
-*channel.txt*      For Vim version 8.0.  Last change: 2016 Nov 07
+*channel.txt*      For Vim version 8.0.  Last change: 2016 Dec 01
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -480,11 +480,6 @@
 of a pipe causes the read end to get EOF).  To avoid this make the job sleep
 for a short while before it exits.
 
-Note that if the job exits before you read the output, the output may be lost.
-This depends on the system (on Unix this happens because closing the write end
-of a pipe causes the read end to get EOF).  To avoid this make the job sleep
-for a short while before it exits.
-
 The handler defined for "out_cb" will not receive stderr.  If you want to
 handle that separately, add an "err_cb" handler: >
     let job = job_start(command, {"out_cb": "MyHandler",
@@ -549,7 +544,7 @@
 
 To start another process without creating a channel: >
     let job = job_start(command,
-    	\ {"in_io": "null", "out_io": "null", "err_io": "null"})
+	\ {"in_io": "null", "out_io": "null", "err_io": "null"})
 
 This starts {command} in the background, Vim does not wait for it to finish.
 
@@ -611,6 +606,10 @@
 "close_cb": handler	Callback for when the channel is closed.  Same as
 			"close_cb" on |ch_open()|, see |close_cb|.
 						*job-exit_cb*
+"drop"			Specifies when to drop messages.  Same as "drop" on
+			|ch_open()|, see |channel-drop|.  For "auto" the
+			exit_cb is not considered.
+
 "exit_cb": handler	Callback for when the job ends.  The arguments are the
 			job and the exit status.
 			Vim checks up to 10 times per second for jobs that
@@ -644,7 +643,7 @@
 "channel": {channel}	Use an existing channel instead of creating a new one.
 			The parts of the channel that get used for the new job
 			will be disconnected from what they were used before.
-			If the channel was still use by another job this may
+			If the channel was still used by another job this may
 			cause I/O errors.
 			Existing callbacks and other settings remain.
 
@@ -662,7 +661,7 @@
 "out_io": "null"	disconnect stdout (goes to /dev/null)
 "out_io": "pipe"	stdout is connected to the channel (default)
 "out_io": "file"	stdout writes to a file
-"out_io": "buffer" 	stdout appends to a buffer (see below)
+"out_io": "buffer"	stdout appends to a buffer (see below)
 "out_name": "/path/file" the name of the file or buffer to write to
 "out_buf": number	the number of the buffer to write to
 "out_modifiable": 0	when writing to a buffer, 'modifiable' will be off
@@ -675,7 +674,7 @@
 "err_io": "null"	disconnect stderr  (goes to /dev/null)
 "err_io": "pipe"	stderr is connected to the channel (default)
 "err_io": "file"	stderr writes to a file
-"err_io": "buffer" 	stderr appends to a buffer (see below)
+"err_io": "buffer"	stderr appends to a buffer (see below)
 "err_name": "/path/file" the name of the file or buffer to write to
 "err_buf": number	the number of the buffer to write to
 "err_modifiable": 0	when writing to a buffer, 'modifiable' will be off
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt
index 1260194..17d8a52 100644
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -1,4 +1,4 @@
-*editing.txt*   For Vim version 8.0.  Last change: 2016 Sep 27
+*editing.txt*   For Vim version 8.0.  Last change: 2016 Nov 24
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -977,12 +977,12 @@
 
 							*:wa* *:wall*
 :wa[ll]			Write all changed buffers.  Buffers without a file
-			name or which are readonly are not written. {not in
-			Vi}
+			name cause an error message.  Buffers which are
+			readonly are not written. {not in Vi}
 
 :wa[ll]!		Write all changed buffers, even the ones that are
 			readonly.  Buffers without a file name are not
-			written. {not in Vi}
+			written and cause an error message. {not in Vi}
 
 
 Vim will warn you if you try to overwrite a file that has been changed
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 75c2ea1..1f54372 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt*	For Vim version 8.0.  Last change: 2016 Nov 04
+*eval.txt*	For Vim version 8.0.  Last change: 2016 Nov 29
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -3084,7 +3084,7 @@
 		|ch_logfile()|.
 		When {handle} is passed the channel number is used for the
 		message.
-		{handle} can be Channel or a Job that has a Channel.  The
+		{handle} can be a Channel or a Job that has a Channel.  The
 		Channel must be open for the channel number to be used.
 
 ch_logfile({fname} [, {mode}])					*ch_logfile()*
diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt
index 269f092..ba37c87 100644
--- a/runtime/doc/motion.txt
+++ b/runtime/doc/motion.txt
@@ -1,4 +1,4 @@
-*motion.txt*    For Vim version 8.0.  Last change: 2016 Jul 12
+*motion.txt*    For Vim version 8.0.  Last change: 2016 Nov 24
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -915,6 +915,7 @@
 			then the position can be near the end of what the
 			command changed.  For example when inserting a word,
 			the position will be on the last character.
+			To jump to older changes use |g;|.
 			{not in Vi}
 
 							*'(* *`(*
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 390fab0..5e0d060 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt*	For Vim version 8.0.  Last change: 2016 Oct 12
+*options.txt*	For Vim version 8.0.  Last change: 2016 Nov 26
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -242,7 +242,7 @@
 Handling of local options			*local-options*
 
 Some of the options only apply to a window or buffer.  Each window or buffer
-has its own copy of this option, thus can each have their own value.  This
+has its own copy of this option, thus each can have its own value.  This
 allows you to set 'list' in one window but not in another.  And set
 'shiftwidth' to 3 in one buffer and 4 in another.
 
@@ -3871,6 +3871,8 @@
 
 	The format of this option is like that of 'statusline'.
 	'guitabtooltip' is used for the tooltip, see below.
+	The expression will be evaluated in the |sandbox| when set from a
+	modeline, see |sandbox-option|.
 
 	Only used when the GUI tab pages line is displayed.  'e' must be
 	present in 'guioptions'.  For the non-GUI tab pages line 'tabline' is
@@ -5699,6 +5701,8 @@
 			and |+postscript| features}
 	Expression used to print the PostScript produced with |:hardcopy|.
 	See |pexpr-option|.
+	This option cannot be set from a |modeline| or in the |sandbox|, for
+	security reasons.
 
 						*'printfont'* *'pfn'*
 'printfont' 'pfn'	string	(default "courier")
@@ -7818,7 +7822,7 @@
 	Amiga console, Win32 console, all GUI versions and terminals with a
 	non-empty 't_ts' option).
 	When Vim was compiled with HAVE_X11 defined, the original title will
-	be restored if possible |X11|.
+	be restored if possible, see |X11|.
 	When this option contains printf-style '%' items, they will be
 	expanded according to the rules used for 'statusline'.
 	Example: >
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index 34500fc..49b1407 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -1,4 +1,4 @@
-*starting.txt*  For Vim version 8.0.  Last change: 2016 Sep 09
+*starting.txt*  For Vim version 8.0.  Last change: 2016 Nov 24
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 166ff59..3ce8dc0 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -1357,6 +1357,7 @@
 --servername	remote.txt	/*--servername*
 --socketid	starting.txt	/*--socketid*
 --startuptime	starting.txt	/*--startuptime*
+--ttyfail	starting.txt	/*--ttyfail*
 --version	starting.txt	/*--version*
 --windowid	starting.txt	/*--windowid*
 -A	starting.txt	/*-A*
@@ -1844,6 +1845,7 @@
 :$	cmdline.txt	/*:$*
 :%	cmdline.txt	/*:%*
 :&	change.txt	/*:&*
+:&&	change.txt	/*:&&*
 :'	cmdline.txt	/*:'*
 :,	cmdline.txt	/*:,*
 :.	cmdline.txt	/*:.*
@@ -5248,6 +5250,7 @@
 cc	change.txt	/*cc*
 ceil()	eval.txt	/*ceil()*
 ch.vim	syntax.txt	/*ch.vim*
+ch_canread()	eval.txt	/*ch_canread()*
 ch_close()	eval.txt	/*ch_close()*
 ch_close_in()	eval.txt	/*ch_close_in()*
 ch_evalexpr()	eval.txt	/*ch_evalexpr()*
@@ -5295,6 +5298,7 @@
 channel-close-in	channel.txt	/*channel-close-in*
 channel-commands	channel.txt	/*channel-commands*
 channel-demo	channel.txt	/*channel-demo*
+channel-drop	channel.txt	/*channel-drop*
 channel-functions	usr_41.txt	/*channel-functions*
 channel-mode	channel.txt	/*channel-mode*
 channel-more	channel.txt	/*channel-more*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 3b52051..1f3a90c 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt*      For Vim version 8.0.  Last change: 2016 Nov 17
+*todo.txt*      For Vim version 8.0.  Last change: 2016 Dec 01
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -35,22 +35,7 @@
 							*known-bugs*
 -------------------- Known bugs and current work -----------------------
 
-Test_help_complete sometimes fails on MS-Windows:
-function RunTheTest[9]..Test_help_complete line 22: Expected ['h test-char@ab',
-'h test-char@en', 'h test-col@ab', 'h test-col@en'] but got ['h test-char@en', '
-h test-char@en\t', 'h test-col@ab', 'h test-col@en']
-Appears to be related to calling feedkeys() with exactly 8 characters.
-
-Patch for GTK3: Kazunobu Kuriyama, 14 Nov.
-
-Patch for fix breakindent bug (Christian, Nov 15)
-
 +channel:
-- Skip checking if job ended if there aren't any. (ichizok, 2016 Nov 7, #1196)
-- problem with channel callback getting job, while the job was already
-  deleted.  #1242.  Fix in #1245 (ichizok), but is that correct?
-  Perhaps just replace job_still_alive() with job_still_useful()?
-  That's not sufficient.
 - Problem with stderr on Windows? (Vincent Rischmann, 2016 Aug 31, #1026)
 - Add 'cwd' argument to start_job(): directory to change to in the child.
     check for valid directory before forking.
@@ -115,25 +100,26 @@
 - Difference between two engines: ".*\zs\/\@>\/" on text "///"
   (Chris Paul, 2016 Nov 13)  New engine not greedy enough?
 
-Patch to support nested namespace syntax. (Pauli, 2016 Oct 30, #1214)
-
-Patch to fix popup menu positioning. (Hirohito Higashi, 2016 Nov 7, #1241)
-
-Patch to make help tag jumps keep language. (Tatsuki, #1249)
-Test by Hirohito Higashi.
+'] mark invalid after undoing insert "hello".
 
 Make html indent file use javascript indent, now that it's not just cindent.
 #1220
 
+Use __sun instead of sun define check.  #1296
+
 Patch to use buffer id for system() and systemlist() (LemonBoy, 2016 Nov 7,
 #1240)
 
+When using symbolic links, a package path will not be inserted at the right
+position in 'runtimepath'. (Dugan Chen, 2016 Nov 18)
+
 json_encode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23)
 What if there is an invalid character?
 
 Bug: ":earlier 100d" doesn't work after using undo file.
 (Pavol Juhas, 2016 Nov 15, #1254)
 Fix by Christian, but lacks a test.
+Test by Pavol Juhas, Nov 22.
 
 Bug: Json with same key should not give internal error. (Lcd, 2016 Oct 26)
 Make dict_add give a duplicate key error.
@@ -162,6 +148,9 @@
 Screen updated delayed when using CTRL-O u in Insert mode.
 (Barlik, #1191)  Perhaps because status message?
 
+Patch to fix that empty first tab is not in session.
+(Hirohito Higashi, 2016 Nov 25, #1282)
+
 Patch for restoring wide characters in the console buffer.
 (Ken Takata, 2016 Jun 7)
 
@@ -187,6 +176,11 @@
 On MS-Windows with 'clipboard' set to "unnamed" this doesn't work to double
 lines: :g/^/normal yyp   On Unix it works OK.  (Bryce Orgill, 2016 Nov 5)
 
+Patch for wrong cursor position on wrapped line, involving breakindent.
+(Ozaki Kiichi, 2016 Nov 25)
+
+Patch for 'cursorlinenr' option. (Ozaki Kiichi, 2016 Nov 30)
+
 Invalid behavior with NULL list. (Nikolai Pavlov, #768)
 E.g. deepcopy(test_null_list())
 
@@ -195,6 +189,13 @@
 
 Patch to add Zstandard compressed file support. (Nick Terrell, 2016 Oct 24)
 
+Patch to add trim() function. (Bukn, 2016 Nov 25, #1280)
+
+Patch to add MODIFIED_BY to MSVC build file. (Chen Lei, 2016 Nov 24, #1275)
+
+On Windows buffer completion sees backslash as escape char instead of path
+separator. (Toffanim, 2016 Nov 24, #1274)
+
 min() and max() spawn lots of error messages if sorted list/dictionary
 contains invalid data (Nikolay Pavlov, 2016 Sep 4, #1039)
 
@@ -272,6 +273,9 @@
 MS-Windows: use WS_HIDE instead of SW_SHOWMINNOACTIVE in os_win32.c?
 Otherwise task flickers in taskbar.
 
+Bogus characters inserted when triggering indent while changing test.
+(Vitor Antunes, 2016 Nov 22, #1269)
+
 Should make ":@r" handle line continuation. (Cesar Romani, 2016 Jun 26)
 Also for ":@.".
 
@@ -280,6 +284,9 @@
 Have a way to get the call stack, in a function and from an exception.
 #1125
 
+Patch to add 'pythonhome' and 'pythonthreehome' options. (Kazuki Sakamoto,
+2016 Nov 21, #1266)
+
 Second problem in #966: ins_compl_add_tv() uses get_dict_string() multiple
 times, overwrites the one buffer. (Nikolay Pavlov, 2016 Aug 5)
 
@@ -1306,6 +1313,7 @@
 
 Patch to add random number generator. (Hong Xu, 2010 Nov 8, update Nov 10)
 Alternative from Christian Brabandt. (2010 Sep 19)
+New one from Yasuhiro Matsumoto, #1277.
 
 Messages in message.txt are highlighted as examples.
 
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 2e2fd4f..918333e 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -1,4 +1,4 @@
-*usr_41.txt*	For Vim version 8.0.  Last change: 2016 Sep 01
+*usr_41.txt*	For Vim version 8.0.  Last change: 2016 Nov 29
 
 		     VIM USER MANUAL - by Bram Moolenaar
 
@@ -930,6 +930,7 @@
 	test_null_string()	return a null String
 
 Inter-process communication:		    *channel-functions*
+	ch_canread()		check if there is something to read
 	ch_open()		open a channel
 	ch_close()		close a channel
 	ch_close_in()		close the in part of a channel
diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt
index 3c695e6..fac7381 100644
--- a/runtime/doc/windows.txt
+++ b/runtime/doc/windows.txt
@@ -1,4 +1,4 @@
-*windows.txt*   For Vim version 8.0.  Last change: 2016 Oct 21
+*windows.txt*   For Vim version 8.0.  Last change: 2016 Dec 01
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -696,6 +696,8 @@
 		- If the file is not open in a window edit the file in the
 		  current window.  If the current buffer can't be |abandon|ed,
 		  the window is split first.
+		- Windows that are not in the argument list or are not full
+		  width will be closed if possible.
 		The |argument-list| is set, like with the |:next| command.
 		The purpose of this command is that it can be used from a
 		program that wants Vim to edit another file, e.g., a debugger.
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index cc99f67..16c7ce4 100644
--- a/runtime/syntax/c.vim
+++ b/runtime/syntax/c.vim
@@ -1,7 +1,7 @@
 " Vim syntax file
 " Language:	C
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last Change:	2016 Nov 17
+" Last Change:	2016 Nov 18
 
 " Quit when a (custom) syntax file was already loaded
 if exists("b:current_syntax")
@@ -363,23 +363,23 @@
 if !exists("c_no_if0")
   syn cluster	cCppOutInGroup	contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip
   syn region	cCppOutWrapper	start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold
-  syn region	cCppOutIf	contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
+  syn region	cCppOutIf	contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
   if !exists("c_no_if0_fold")
     syn region	cCppOutIf2	contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold
   else
     syn region	cCppOutIf2	contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
   endif
-  syn region	cCppOutElse	contained matchgroup=cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
+  syn region	cCppOutElse	contained matchgroup=cCppOutWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
   syn region	cCppInWrapper	start="^\s*\zs\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold
-  syn region	cCppInIf	contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
+  syn region	cCppInIf	contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
   if !exists("c_no_if0_fold")
-    syn region	cCppInElse	contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
+    syn region	cCppInElse	contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
   else
-    syn region	cCppInElse	contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
+    syn region	cCppInElse	contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
   endif
-  syn region	cCppInElse2	contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
-  syn region	cCppOutSkip	contained start="^\s*\zs\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
-  syn region	cCppInSkip	contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
+  syn region	cCppInElse2	contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
+  syn region	cCppOutSkip	contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
+  syn region	cCppInSkip	contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
 endif
 syn region	cIncluded	display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
 syn match	cIncluded	display contained "<[^>]*>"
diff --git a/src/Makefile b/src/Makefile
index a24eb7b..d6a5ba4 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1678,12 +1678,14 @@
 	$(WSDEBUG_OBJ)
 
 # The files included by tests are not in OBJ_COMMON.
-OBJ = $(OBJ_COMMON) \
+OBJ_MAIN = \
 	objects/json.o \
 	objects/main.o \
 	objects/memfile.o \
 	objects/message.o
 
+OBJ = $(OBJ_COMMON) $(OBJ_MAIN)
+
 OBJ_JSON_TEST = \
 	objects/memfile.o \
 	objects/message.o \
@@ -1705,7 +1707,11 @@
 
 MESSAGE_TEST_OBJ = $(OBJ_COMMON) $(OBJ_MESSAGE_TEST)
 
-ALL_OBJ = $(OBJ_COMMON) $(OBJ_JSON_TEST) $(OBJ_MEMFILE_TEST) $(OBJ_MESSAGE_TEST)
+ALL_OBJ = $(OBJ_COMMON) \
+	  $(OBJ_MAIN) \
+	  $(OBJ_JSON_TEST) \
+	  $(OBJ_MEMFILE_TEST) \
+	  $(OBJ_MESSAGE_TEST)
 
 
 PRO_AUTO = \
@@ -2085,6 +2091,7 @@
 	test_delete \
 	test_diffmode \
 	test_digraph \
+	test_display \
 	test_ex_undo \
 	test_execute_func \
 	test_expand \
@@ -2862,7 +2869,9 @@
 # commands understand putting object files in another directory, it must be
 # specified for each file separately.
 
-objects objects/.dirstamp:
+objects: objects/.dirstamp
+
+objects/.dirstamp:
 	mkdir -p objects
 	touch objects/.dirstamp
 
diff --git a/src/auto/configure b/src/auto/configure
index 27aea9c..b4745ea 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -7411,7 +7411,7 @@
 	/* Check bitfields */
 	struct nbbuf {
 	unsigned int  initDone:1;
-	ushort signmaplen;
+	unsigned short signmaplen;
 	};
 
 int
@@ -12000,8 +12000,8 @@
 
 fi
 
-for ac_func in bcmp fchdir fchown fsync getcwd getpseudotty \
-	getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
+for ac_func in fchdir fchown fsync getcwd getpseudotty \
+	getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat \
 	memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
 	setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
 	sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
diff --git a/src/configure.ac b/src/configure.ac
index 3a31f97..1706a8d 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -1995,7 +1995,7 @@
 	/* Check bitfields */
 	struct nbbuf {
 	unsigned int  initDone:1;
-	ushort signmaplen;
+	unsigned short signmaplen;
 	};
 	    ], [
 		/* Check creating a socket. */
diff --git a/src/edit.c b/src/edit.c
index 0d9e9d4..51a12b3 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -3875,7 +3875,7 @@
 		if (prev_col > 0)
 		    dec_cursor();
 		/* only format when something was inserted */
-		if (!arrow_used && !ins_need_undo)
+		if (!arrow_used && !ins_need_undo && c != Ctrl_E)
 		    insertchar(NUL, 0, -1);
 		if (prev_col > 0
 			     && ml_get_curline()[curwin->w_cursor.col] != NUL)
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 6721173..08be12b 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -471,7 +471,7 @@
     {"assert_exception", 1, 2, f_assert_exception},
     {"assert_fails",	1, 2, f_assert_fails},
     {"assert_false",	1, 2, f_assert_false},
-    {"assert_inrange",	2, 3, f_assert_inrange},
+    {"assert_inrange",	3, 4, f_assert_inrange},
     {"assert_match",	2, 3, f_assert_match},
     {"assert_notequal",	2, 3, f_assert_notequal},
     {"assert_notmatch",	2, 3, f_assert_notmatch},
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 439467c..2b0f15e 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2277,7 +2277,11 @@
 	if (*ea.cmd == ';')
 	{
 	    if (!ea.skip)
+	    {
 		curwin->w_cursor.lnum = ea.line2;
+		/* don't leave the cursor on an illegal line */
+		check_cursor_lnum();
+	    }
 	}
 	else if (*ea.cmd != ',')
 	    break;
@@ -2293,9 +2297,6 @@
 	    ea.addr_count = 0;
     }
 
-    /* Don't leave the cursor on an illegal line (caused by ';') */
-    check_cursor_lnum();
-
 /*
  * 5. Parse the command.
  */
diff --git a/src/mbyte.c b/src/mbyte.c
index 646235f..ccf23e8 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -5735,7 +5735,7 @@
 #endif
 
 #if defined(FEAT_GUI_X11) || defined(PROTO)
-# if defined(XtSpecificationRelease) && XtSpecificationRelease >= 6 && !defined(sun)
+# if defined(XtSpecificationRelease) && XtSpecificationRelease >= 6 && !defined(SUN_SYSTEM)
 #  define USE_X11R6_XIM
 # endif
 
diff --git a/src/misc2.c b/src/misc2.c
index baa614d..afafee1 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -6243,7 +6243,8 @@
 }
 #endif
 
-#ifdef ELAPSED_TIMEVAL  /* no PROTO here, proto is defined in vim.h */
+#ifndef PROTO  /* proto is defined in vim.h */
+# ifdef ELAPSED_TIMEVAL
 /*
  * Return time in msec since "start_tv".
  */
@@ -6256,9 +6257,9 @@
     return (now_tv.tv_sec - start_tv->tv_sec) * 1000L
 	 + (now_tv.tv_usec - start_tv->tv_usec) / 1000L;
 }
-#endif
+# endif
 
-#ifdef ELAPSED_TICKCOUNT
+# ifdef ELAPSED_TICKCOUNT
 /*
  * Return time in msec since "start_tick".
  */
@@ -6269,4 +6270,5 @@
 
     return (long)now - (long)start_tick;
 }
+# endif
 #endif
diff --git a/src/option.c b/src/option.c
index 7356816..920f163 100644
--- a/src/option.c
+++ b/src/option.c
@@ -435,8 +435,8 @@
 
 				/* when option changed, what to display: */
 #define P_RSTAT		0x1000	/* redraw status lines */
-#define P_RWIN		0x2000	/* redraw current window */
-#define P_RBUF		0x4000	/* redraw current buffer */
+#define P_RWIN		0x2000	/* redraw current window and recompute text */
+#define P_RBUF		0x4000	/* redraw current buffer and recompute text */
 #define P_RALL		0x6000	/* redraw all windows */
 #define P_RCLR		0x7000	/* clear and redraw all */
 
@@ -457,6 +457,7 @@
 #define P_CURSWANT    0x4000000L /* update curswant required; not needed when
 				  * there is a redraw flag */
 #define P_NDNAME      0x8000000L /* only normal dir name chars allowed */
+#define P_RWINONLY   0x10000000L /* only redraw current window */
 
 #define ISK_LATIN1  (char_u *)"@,48-57,_,192-255"
 
@@ -967,7 +968,7 @@
 			    (char_u *)NULL, PV_NONE,
 #endif
 			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-    {"cursorline",   "cul", P_BOOL|P_VI_DEF|P_RWIN,
+    {"cursorline",   "cul", P_BOOL|P_VI_DEF|P_RWINONLY,
 #ifdef FEAT_SYN_HL
 			    (char_u *)VAR_WIN, PV_CUL,
 #else
@@ -9055,6 +9056,8 @@
 	changed_window_setting();
     if (flags & P_RBUF)
 	redraw_curbuf_later(NOT_VALID);
+    if (flags & P_RWINONLY)
+	redraw_later(NOT_VALID);
     if (doclear)
 	redraw_all_later(CLEAR);
     else if (all)
diff --git a/src/os_unixx.h b/src/os_unixx.h
index 8ed52d1..f1aad2c 100644
--- a/src/os_unixx.h
+++ b/src/os_unixx.h
@@ -17,8 +17,8 @@
 # define signal sigset
 #endif
 
-   /* sun's sys/ioctl.h redefines symbols from termio world */
-#if defined(HAVE_SYS_IOCTL_H) && !defined(sun)
+   /* Sun's sys/ioctl.h redefines symbols from termio world */
+#if defined(HAVE_SYS_IOCTL_H) && !defined(SUN_SYSTEM)
 # include <sys/ioctl.h>
 #endif
 
diff --git a/src/pty.c b/src/pty.c
index c07256f..20ab65b 100644
--- a/src/pty.c
+++ b/src/pty.c
@@ -62,7 +62,7 @@
 #ifdef sinix
 #undef buf_T
 #endif
-# ifdef sun
+# ifdef SUN_SYSTEM
 #  include <sys/conf.h>
 # endif
 #endif
@@ -87,11 +87,11 @@
 # include <sys/ptem.h>
 #endif
 
-#if !defined(sun) && !defined(VMS) && !defined(MACOS)
+#if !defined(SUN_SYSTEM) && !defined(VMS) && !defined(MACOS)
 # include <sys/ioctl.h>
 #endif
 
-#if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL)
+#if defined(SUN_SYSTEM) && defined(LOCKPTY) && !defined(TIOCEXCL)
 # include <sys/ttold.h>
 #endif
 
@@ -166,7 +166,7 @@
 # endif
     if (ioctl(fd, I_PUSH, "ldterm") != 0)
 	return -1;
-# ifdef sun
+# ifdef SUN_SYSTEM
     if (ioctl(fd, I_PUSH, "ttcompat") != 0)
 	return -1;
 # endif
@@ -391,7 +391,7 @@
 		continue;
 	    }
 #endif
-#if defined(sun) && defined(TIOCGPGRP) && !defined(SUNOS3)
+#if defined(SUN_SYSTEM) && defined(TIOCGPGRP) && !defined(SUNOS3)
 	    /* Hack to ensure that the slave side of the pty is
 	     * unused. May not work in anything other than SunOS4.1
 	     */
diff --git a/src/screen.c b/src/screen.c
index 45e7c7c..ee61a01 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -3649,13 +3649,19 @@
 		draw_state = WL_FOLD;
 		if (fdc > 0)
 		{
-		    /* Draw the 'foldcolumn'. */
-		    fill_foldcolumn(extra, wp, FALSE, lnum);
-		    n_extra = fdc;
-		    p_extra = extra;
-		    p_extra[n_extra] = NUL;
-		    c_extra = NUL;
-		    char_attr = hl_attr(HLF_FC);
+		    /* Draw the 'foldcolumn'.  Allocate a buffer, "extra" may
+		     * already be in used. */
+		    p_extra_free = alloc(12 + 1);
+
+		    if (p_extra_free != NULL)
+		    {
+			fill_foldcolumn(p_extra_free, wp, FALSE, lnum);
+			n_extra = fdc;
+			p_extra_free[n_extra] = NUL;
+			p_extra = p_extra_free;
+			c_extra = NUL;
+			char_attr = hl_attr(HLF_FC);
+		    }
 		}
 	    }
 #endif
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak
index 17c70f3..c78e34b 100644
--- a/src/testdir/Make_all.mak
+++ b/src/testdir/Make_all.mak
@@ -148,6 +148,7 @@
 	    test_cscope.res \
 	    test_diffmode.res \
 	    test_digraph.res \
+	    test_display.res \
 	    test_farsi.res \
 	    test_fnameescape.res \
 	    test_gf.res \
diff --git a/src/testdir/test_assert.vim b/src/testdir/test_assert.vim
index 0ab664a..25630f2 100644
--- a/src/testdir/test_assert.vim
+++ b/src/testdir/test_assert.vim
@@ -117,6 +117,8 @@
   call assert_inrange(5, 7, 8)
   call assert_match("Expected range 5 - 7, but got 8", v:errors[0])
   call remove(v:errors, 0)
+
+  call assert_fails('call assert_inrange(1, 1)', 'E119:')
 endfunc
 
 func Test_user_is_happy()
diff --git a/src/testdir/test_channel.py b/src/testdir/test_channel.py
index 07a2241..6668752 100644
--- a/src/testdir/test_channel.py
+++ b/src/testdir/test_channel.py
@@ -126,6 +126,9 @@
                         print("sending: {0}".format(cmd))
                         self.request.sendall(cmd.encode('utf-8'))
                         response = "ok"
+                        # Need to wait for Vim to give up, otherwise it
+                        # sometimes fails on OS X.
+                        time.sleep(0.2)
                     elif decoded[1] == 'malformed2':
                         cmd = '"unterminated string'
                         print("sending: {0}".format(cmd))
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index 31c2e50..7baac1d 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -26,7 +26,10 @@
 endfunc
 
 func Ch_communicate(port)
+  " Avoid dropping messages, since we don't use a callback here.
+  let s:chopt.drop = 'never'
   let handle = ch_open('localhost:' . a:port, s:chopt)
+  unlet s:chopt.drop
   if ch_status(handle) == "fail"
     call assert_false(1, "Can't open channel")
     return
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index 3718087..96fee0b 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -194,3 +194,50 @@
   bwipe!
   call delete('a', 'rf')
 endfunc
+
+func Test_paste_in_cmdline()
+  let @a = "def"
+  call feedkeys(":abc \<C-R>a ghi\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"abc def ghi', @:)
+
+  new
+  call setline(1, 'asdf.x /tmp/some verylongword a;b-c*d ')
+
+  call feedkeys(":aaa \<C-R>\<C-W> bbb\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"aaa asdf bbb', @:)
+
+  call feedkeys("ft:aaa \<C-R>\<C-F> bbb\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"aaa /tmp/some bbb', @:)
+
+  set incsearch
+  call feedkeys("fy:aaa veryl\<C-R>\<C-W> bbb\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"aaa verylongword bbb', @:)
+
+  call feedkeys("f;:aaa \<C-R>\<C-A> bbb\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"aaa a;b-c*d bbb', @:)
+
+  call feedkeys(":\<C-\>etoupper(getline(1))\<CR>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"ASDF.X /TMP/SOME VERYLONGWORD A;B-C*D ', @:)
+  bwipe!
+endfunc
+
+func Test_remove_char_in_cmdline()
+  call feedkeys(":abc def\<S-Left>\<Del>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"abc ef', @:)
+
+  call feedkeys(":abc def\<S-Left>\<BS>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"abcdef', @:)
+
+  call feedkeys(":abc def ghi\<S-Left>\<C-W>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"abc ghi', @:)
+
+  call feedkeys(":abc def\<S-Left>\<C-U>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"def', @:)
+endfunc
+
+func Test_illegal_address()
+  new
+  2;'(
+  2;')
+  quit
+endfunc
diff --git a/src/testdir/test_display.vim b/src/testdir/test_display.vim
new file mode 100644
index 0000000..609e16c
--- /dev/null
+++ b/src/testdir/test_display.vim
@@ -0,0 +1,39 @@
+" Test for displaying stuff
+if !has('gui_running') && has('unix')
+  set term=ansi
+endif
+
+function! s:screenline(lnum, nr) abort
+  let line = []
+  for j in range(a:nr)
+    for c in range(1, winwidth(0))
+        call add(line, nr2char(screenchar(a:lnum+j, c)))
+    endfor
+    call add(line, "\n")
+  endfor
+  return join(line, '')
+endfunction
+
+function! Test_display_foldcolumn()
+  new
+  vnew
+  vert resize 25
+  call assert_equal(25, winwidth(winnr()))
+  set isprint=@
+
+  1put='e more noise blah blah‚ more stuff here'
+
+  let expect = "e more noise blah blah<82\n> more stuff here        \n"
+
+  call cursor(2, 1)
+  norm! zt
+  redraw!
+  call assert_equal(expect, s:screenline(1,2))
+  set fdc=2
+  redraw!
+  let expect = "  e more noise blah blah<\n  82> more stuff here    \n"
+  call assert_equal(expect, s:screenline(1,2))
+
+  quit!
+  quit!
+endfunction
diff --git a/src/testdir/test_goto.vim b/src/testdir/test_goto.vim
index d0daeeb..2573401 100644
--- a/src/testdir/test_goto.vim
+++ b/src/testdir/test_goto.vim
@@ -273,3 +273,18 @@
 	\ ]
   call XTest_goto_decl('gd', lines, 5, 10)
 endfunc
+
+" Check that setting 'cursorline' does not change curswant
+func Test_cursorline_keep_col()
+  new
+  call setline(1, ['long long long line', 'short line'])
+  normal ggfi
+  let pos = getcurpos()
+  normal j
+  set cursorline
+  normal k
+  call assert_equal(pos, getcurpos())
+  bwipe!
+  set nocursorline
+endfunc
+
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index f1e2c98..96c8d7e 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -464,4 +464,22 @@
   set completeopt&
 endfunc
 
+" <C-E> - select original typed text before the completion started without
+" auto-wrap text.
+func Test_completion_ctrl_e_without_autowrap()
+  new
+  let tw_save=&tw
+  set tw=78
+  let li = [
+        \ '"                                                        zzz',
+        \ '" zzzyyyyyyyyyyyyyyyyyyy']
+  call setline(1, li)
+  0
+  call feedkeys("A\<C-X>\<C-N>\<C-E>\<Esc>", "tx")
+  call assert_equal(li, getline(1, '$'))
+
+  let &tw=tw_save
+  q!
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_syntax.vim b/src/testdir/test_syntax.vim
index 4b88fe3..7cb67e6 100644
--- a/src/testdir/test_syntax.vim
+++ b/src/testdir/test_syntax.vim
@@ -54,7 +54,7 @@
   setlocal isk-=_
   call assert_equal('DLTD_BY', GetSyntaxItem('DLTD'))
   /\<D\k\+\>/:norm! ygn
-  let b2=@0
+  let b2 = @0
   call assert_equal('DLTD', @0)
 
   syn iskeyword clear
@@ -80,3 +80,79 @@
   call assert_true(exists('g:gotit'))
   call delete('Xsomefile')
 endfunc
+
+func Test_syntime()
+  if !has('profile')
+    return
+  endif
+
+  syntax on
+  syntime on
+  let a = execute('syntime report')
+  call assert_equal("\nNo Syntax items defined for this buffer", a)
+
+  view ../memfile_test.c
+  setfiletype cpp
+  redraw
+  let a = execute('syntime report')
+  call assert_match('^  TOTAL *COUNT *MATCH *SLOWEST *AVERAGE *NAME *PATTERN', a)
+  call assert_match(' \d*\.\d* \+[^0]\d* .* cppRawString ', a)
+  call assert_match(' \d*\.\d* \+[^0]\d* .* cppNumber ', a)
+
+  syntime off
+  syntime clear
+  let a = execute('syntime report')
+  call assert_match('^  TOTAL *COUNT *MATCH *SLOWEST *AVERAGE *NAME *PATTERN', a)
+  call assert_notmatch('.* cppRawString *', a)
+  call assert_notmatch('.* cppNumber*', a)
+  call assert_notmatch('[1-9]', a)
+
+  call assert_fails('syntime abc', 'E475')
+
+  syntax clear
+  let a = execute('syntime report')
+  call assert_equal("\nNo Syntax items defined for this buffer", a)
+
+  bd
+endfunc
+
+func Test_syntax_list()
+  syntax on
+  let a = execute('syntax list')
+  call assert_equal("\nNo Syntax items defined for this buffer", a)
+
+  view ../memfile_test.c
+  setfiletype c
+
+  let a = execute('syntax list')
+  call assert_match('cInclude*', a)
+  call assert_match('cDefine', a)
+
+  let a = execute('syntax list cDefine')
+  call assert_notmatch('cInclude*', a)
+  call assert_match('cDefine', a)
+  call assert_match(' links to Macro$', a)
+
+  call assert_fails('syntax list ABCD', 'E28:')
+  call assert_fails('syntax list @ABCD', 'E392:')
+
+  syntax clear
+  let a = execute('syntax list')
+  call assert_equal("\nNo Syntax items defined for this buffer", a)
+
+  bd
+endfunc
+
+func Test_syntax_completion()
+  call feedkeys(":syn \<C-A>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"syn case clear cluster conceal enable include iskeyword keyword list manual match off on region reset spell sync', @:)
+
+  call feedkeys(":syn case \<C-A>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"syn case ignore match', @:)
+
+  call feedkeys(":syn list \<C-A>\<C-B>\"\<CR>", 'tx')
+  call assert_match('^"syn list Boolean Character ', @:)
+
+  call feedkeys(":syn match \<C-A>\<C-B>\"\<CR>", 'tx')
+  call assert_match('^"syn match Boolean Character ', @:)
+endfunc
diff --git a/src/version.c b/src/version.c
index 372d92f..75bb16a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,38 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    133,
+/**/
+    132,
+/**/
+    131,
+/**/
+    130,
+/**/
+    129,
+/**/
+    128,
+/**/
+    127,
+/**/
+    126,
+/**/
+    125,
+/**/
+    124,
+/**/
+    123,
+/**/
+    122,
+/**/
+    121,
+/**/
+    120,
+/**/
+    119,
+/**/
+    118,
+/**/
     117,
 /**/
     116,
diff --git a/src/vim.h b/src/vim.h
index de26c63..ef75ea2 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -268,6 +268,11 @@
 # define UNUSED
 #endif
 
+/* Used to check for "sun", "__sun" is used by newer compilers. */
+#if defined(__sun)
+# define SUN_SYSTEM
+#endif
+
 /* if we're compiling in C++ (currently only KVim), the system
  * headers must have the correct prototypes or nothing will build.
  * conversely, our prototypes might clash due to throw() specifiers and
@@ -2487,7 +2492,7 @@
 #define FNE_INCL_BR	1	/* include [] in name */
 #define FNE_CHECK_START	2	/* check name starts with valid character */
 
-#if (defined(sun) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) \
+#if (defined(SUN_SYSTEM) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) \
 	&& defined(S_ISCHR)
 # define OPEN_CHR_FILES
 #endif
diff --git a/uninstal.txt b/uninstal.txt
index 9b0d967..0f9c7f7 100644
--- a/uninstal.txt
+++ b/uninstal.txt
@@ -17,7 +17,7 @@
    have to use uninstal.exe.
 
 It's recommended to use the method that matches with how you installed Vim.
-Thus if you installed Vim by hand, deleted it by hand.
+Thus if you installed Vim by hand, delete it by hand.
 
 The first two methods should be available from the Add/Remove software window
 and the Vim entry in the Start menu.  If these have been removed already, find
@@ -33,8 +33,8 @@
    menu entry.  You only need to run uninstal.exe when you have installed the
    menu entry.  You can also run uninstal.exe from the Control panel with the
    Add/Remove programs application.
-   Note that uninstal.exe offers you to uninstal other items.  You can skip
-   this.
+   Note that uninstal.exe offers you the option to uninstal other items.  You
+   can skip this.
 
 2. Only if you have used the OLE version of gvim: Remove the registration of
    this program by running "gvim -unregister" in a console window.
@@ -46,7 +46,7 @@
    If you created .bat files when installing Vim, also search for vim.bat,
    gvim.bat, etc.
 
-4. If you completely want to delete vim, and are not going to install another
+4. If you want to completely delete vim, and are not going to install another
    version, you can delete the vimrc files that you created.  These are
    normally located in a directory like "C:\vim".  If the $VIM environment
    variable is set, it will tell the name of the directory.  Normally you can