changeset 2282:a888ed7ba375 vim73

Make updating text for conceal mode simpler. A few compiler warning fixes.
author Bram Moolenaar <bram@vim.org>
date Fri, 02 Jul 2010 20:20:09 +0200
parents e41433ea71df
children 7e1bd501306d
files runtime/doc/Makefile runtime/doc/index.txt runtime/doc/quickref.txt runtime/doc/tags runtime/doc/todo.txt runtime/indent/vhdl.vim runtime/optwin.vim runtime/syntax/tex.vim runtime/syntax/vim.vim src/edit.c src/eval.c src/gui.c src/if_ruby.c src/main.c src/normal.c src/search.c src/undo.c
diffstat 17 files changed, 323 insertions(+), 266 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/doc/Makefile
+++ b/runtime/doc/Makefile
@@ -168,6 +168,7 @@ HTMLS = \
 	gui_x11.html \
 	hangulin.html \
 	hebrew.html \
+	helphelp.html \
 	howto.html \
 	if_cscop.html \
 	if_mzsch.html \
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1352,6 +1352,7 @@ The commands are sorted on the non-optio
 |:options|	:opt[ions]	open the options-window
 |:ounmap|	:ou[nmap]	like ":unmap" but for Operator-pending mode
 |:ounmenu|	:ounme[nu]	remove menu for Operator-pending mode
+|:ownsyntax|	:ow[nsyntax]	set new local syntax highlight for this window
 |:pclose|	:pc[lose]	close preview window
 |:pedit|	:ped[it]	edit file in the preview window
 |:perl|		:pe[rl]		execute Perl command
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -647,6 +647,7 @@ Short explanation of each option:		*opti
 'complete'	  'cpt'     specify how Insert mode completion works
 'completefunc'	  'cfu'     function to be used for Insert mode completion
 'completeopt'	  'cot'     options for Insert mode completion
+'conceallevel'	  'conc'    whether concealable text is shown or hidden 
 'confirm'	  'cf'	    ask what to do about unsaved/read-only files
 'conskey'	  'consk'   get keys directly from console (MS-DOS only)
 'copyindent'	  'ci'	    make 'autoindent' use existing indent structure
@@ -658,6 +659,7 @@ Short explanation of each option:		*opti
 'cscopetag'       'cst'     use cscope for tag commands
 'cscopetagorder'  'csto'    determines ":cstag" search order
 'cscopeverbose'   'csverb'  give messages when adding a cscope database
+'cursorbind'	  'crb'     move cursor in window as it moves in other windows
 'cursorcolumn'	  'cuc'	    highlight the screen column of the cursor
 'cursorline'	  'cul'	    highlight the screen line of the cursor
 'debug'			    set to "msg" to see all error messages
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -1682,6 +1682,7 @@ 31.5	usr_31.txt	/*31.5*
 32.1	usr_32.txt	/*32.1*
 32.2	usr_32.txt	/*32.2*
 32.3	usr_32.txt	/*32.3*
+32.4	usr_32.txt	/*32.4*
 40.1	usr_40.txt	/*40.1*
 40.2	usr_40.txt	/*40.2*
 40.3	usr_40.txt	/*40.3*
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -30,11 +30,16 @@ be worked on, but only if you sponsor Vi
 							*known-bugs*
 -------------------- Known bugs and current work -----------------------
 
+Bug in undo, using freed memory. (Dominique Pelle, Jul 1)
+
 Cursor positioning wrong with 0x200e character. (John Becket, 2010 May 6)
 
 E315 when trying to change a file in FileChangedRO autocommand event.
 (Dominique Pelle, 2010 Apr 30)
 
+Bug: searching for tags file uses 'suffixesadd', should not happen. (Dominique
+Pelle, 2010 June 28)
+
 When directory "/tmp/tags" contains "tags1" and "tags2", setting 'tags' to
 "/tmp/tags/*" doesn't pick up these files.  (Simon Ruggier, 2010 Mar 17)
 
@@ -74,6 +79,9 @@ 8   Add an event like CursorHold that is
 Need for CursorHold that retriggers.  Use a key that doesn't do anything, or a
 function that resets did_cursorhold.
 
+Cscope "cs add" stopped working somewhat before 7.2.438. (Gary Johnson, 2010
+Jun 29)  Caused by 7.2.433?
+
 I often see pasted text (from Firefox, to Vim in xterm) appear twice.
 Also, Vim in xterm sometimes loses copy/paste ability (probably after running
 an external command).
@@ -984,8 +992,6 @@ visible.
 GTK: when setting 'columns' in a startup script and doing ":vertical diffsplit"
 the window isn't redrawn properly, see two vertical bars.
 
-GTK: file chooser is disabled.  Patch by Tim Starling, 2009 Nov 13.
-
 The magic clipboard format "VimClipboard2" appears in several places.  Should
 be only one.
 
@@ -1083,16 +1089,17 @@ When switching between windows the curso
 Remember the relative position and restore that, just like lnum and col are
 restored. (Luc St-Louis)
 
+Patch to support horizontal scroll wheel in GTK. Untested. (Bjorn Winckler,
+2010 Jun 30)
+
 
 Vim 7.3:
 - using NSIS 2.46: install on Windows 7 works, but no "Edit with Vim" menu.
    Use register_shell_extension()?
    Patch from Geoffrey Reilly, 2010 Jun 22
-- Patch for conceal feature from Vince, 2010 June 16.
-  Needs some more testing, better patch is coming.
-- implement ":earlier 1f" (f for file)?
-  Also add ":earlier 1d" (d for day).
-  Something like changenr() to see the "file saved" marker?
+- Patch for conceal feature from Vince, 2010 Jul 1.
+    fix insert mode, cursor up/down?
+    CTRL-O j doesn't trigger cursormoved event?
 - in August remove UF_VERSION_CRYPT_PREV and UF_VERSION_PREV.
 Patches to include:
 - Patch for Lisp support with ECL (Mikael Jansson, 2008 Oct 25)
@@ -1102,8 +1109,11 @@ Patches to include:
 - Patch to support :browse for more commands. (Lech Lorens, 2009 Jul 18)
 - Patch to improve javascript indenting. (Hari Kumar G, 2010 May 22)
 - Patch to use return value of 'formatexpr'. (James Vega, 2010 Jun 16)
+- Patch for gtk main_loop() to enable GtkFileChooser. (James Vega, 2010 Jun 28)
+    Same as this one?  GTK: file chooser is disabled.  Patch by Tim Starling,
+    2009 Nov 13.
 - Patch to make CTRL-L work better with 'ignorecase' and 'smarcase'. (Martin
-  Toft, 2010 Jun 8, Jun 16)
+  Toft, 2010 Jun 8, Jun 16, Jun 30)
 - Patch to add diff functionality to 2html.vim. (Christian Brabandt, 2009 Dec
   15)
 - Win32: patch for better font scaling. (George Reilly, 2009 Mar 26) 
@@ -1356,16 +1366,6 @@ 6   Vi compatibility (optional): make "i
     thing.  (only repeat insert for the first line).
 
 
-GTK+ 1 (OK in GTK 2):
-8   When using "gvim -geom 40x30" or setting 'columns' in .gvimrc or with a
-    GUIEnter autocommand, the width is still set to fit the toolbar.  Also
-    happens when changing the font.  How to avoid that the toolbar specifies
-    the minimal window width?
-8   When using a theme with different scrollbars (gtkstep), the scrollbars can
-    be too narrow. (Drazen Kacar)
-8   Font "7x14" has a bold version "7x14bold".  Try to find the bold font by
-    appending "bold" when there are not 14 dashes.
-
 GTK+ GUI known bugs:
 9   Crash with X command server over ssh. (Ciaran McCreesh, 2006 Feb 6)
 8   GTK 2: Combining UTF-8 characters not displayed properly in menus (Mikolaj
@@ -2433,8 +2433,6 @@ 7   When using manual folding, the undo 
 	edit version.c
     Can editing version.c twice be avoided?
 -   'foldmethod' "textobject": fold on sections and paragraph text objects.
--   Add 'hidecomment' option: don't display comments in /* */ and after //.
-    Or is the conceal patch from Vince Negri a more generic solution?
 -   "zuf": undo change in manual fold. "zUf" redo change in manual fold.  How
     to implement this?
 -   "zJ" command: add the line or fold below the fold in the fold under the
--- a/runtime/indent/vhdl.vim
+++ b/runtime/indent/vhdl.vim
@@ -1,8 +1,8 @@
 " VHDL indent ('93 syntax)
 " Language:    VHDL
 " Maintainer:  Gerald Lai <laigera+vim?gmail.com>
-" Version:     1.54
-" Last Change: 2007 Aug 17
+" Version:     1.55
+" Last Change: 2010 Jun 27
 " URL:         http://www.vim.org/scripts/script.php?script_id=1450
 
 " only load this indent file when no other was loaded
@@ -156,7 +156,7 @@ function GetVHDLindent()
     let ps = getline(pn)
     while pn > 0
       let t = indent(pn)
-      if ps !~ '^\s*--' && t < ind
+      if ps !~ '^\s*--' && (t < ind || (t == ind && m == 3))
         " make sure one of these is true
         " keywords: variable + "<=" without ";" ending
         " where:    start of previous non-comment line
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -482,6 +482,11 @@ if has("scrollbind")
   call append("$", "scrollopt\t\"ver\", \"hor\" and/or \"jump\"; list of options for 'scrollbind'")
   call <SID>OptionG("sbo", &sbo)
 endif
+if has("cursorbind")
+  call append("$", "cursorbind\tthis window's cursor moves together with other bound windows")
+  call append("$", "\t(local to window)")
+  call <SID>BinOptionL("crb")
+endif
 
 
 call <SID>Header("multiple tab pages")
--- a/runtime/syntax/tex.vim
+++ b/runtime/syntax/tex.vim
@@ -1,8 +1,8 @@
 " Vim syntax file
 " Language:	TeX
 " Maintainer:	Dr. Charles E. Campbell, Jr. <NdrchipO@ScampbellPfamily.AbizM>
-" Last Change:	Apr 14, 2010
-" Version:	47
+" Last Change:	Jun 24, 2010
+" Version:	48
 " URL:		http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
 "
 " Notes: {{{1
@@ -125,6 +125,10 @@ if !exists("tex_no_math")
  syn cluster texSubSectionGroup		contains=texSubSubSectionZone,texParaZone
  syn cluster texSubSubSectionGroup	contains=texParaZone
  syn cluster texParaGroup		contains=texSubParaZone
+ if has("conceal") && &enc == 'utf-8'
+  syn cluster texMathZoneGroup	add=texGreek,texSuperscript,texSubscript
+  syn cluster texMathMatchGroup	add=texGreek,texSuperscript,texSubscript
+ endif
 endif
 
 " Try to flag {} and () mismatches: {{{1
@@ -337,11 +341,11 @@ if !exists("tex_no_math")
  call TexNewMathZone("L","xxalignat",0)
 
  " Inline Math Zones: {{{2
- syn region texMathZoneV	matchgroup=Delimiter start="\\("	matchgroup=Delimiter end="\\)\|%stopzone\>"	keepend contains=@texMathZoneGroup
- syn region texMathZoneW	matchgroup=Delimiter start="\\\["	matchgroup=Delimiter end="\\]\|%stopzone\>"	keepend contains=@texMathZoneGroup
- syn region texMathZoneX	matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>"	contains=@texMathZoneGroup
- syn region texMathZoneY	matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>"	keepend		contains=@texMathZoneGroup
- syn region texMathZoneZ	matchgroup=texStatement start="\\ensuremath\s*{" matchgroup=texStatement end="}" end="%stopzone\>"	contains=@texMathZoneGroup
+ syn region texMathZoneV	matchgroup=Delimiter start="\\("			matchgroup=Delimiter end="\\)\|%stopzone\>"	keepend contains=@texMathZoneGroup
+ syn region texMathZoneW	matchgroup=Delimiter start="\\\["			matchgroup=Delimiter end="\\]\|%stopzone\>"	keepend contains=@texMathZoneGroup
+ syn region texMathZoneX	matchgroup=Delimiter start="\$" skip="\\\\\|\\\$"	matchgroup=Delimiter end="\$" end="%stopzone\>"	contains=@texMathZoneGroup
+ syn region texMathZoneY	matchgroup=Delimiter start="\$\$" 			matchgroup=Delimiter end="\$\$" end="%stopzone\>"	keepend		contains=@texMathZoneGroup
+ syn region texMathZoneZ	matchgroup=texStatement start="\\ensuremath\s*{"	matchgroup=texStatement end="}" end="%stopzone\>"	contains=@texMathZoneGroup
 
  syn match texMathOper		"[_^=]" contained
 
@@ -465,6 +469,118 @@ if !exists("g:tex_no_error")
  syn region texStyleMatcher		matchgroup=Delimiter start="\["				end="]"		contains=@texStyleGroup,texError	contained
 endif
 
+" support for 
+if has("conceal") && &enc == 'utf-8'
+ syn match texGreek '\\alpha\>'		contained conceal cchar=α
+ syn match texGreek '\\beta\>'		contained conceal cchar=β
+ syn match texGreek '\\gamma\>'		contained conceal cchar=γ
+ syn match texGreek '\\delta\>'		contained conceal cchar=δ
+ syn match texGreek '\\epsilon\>'	contained conceal cchar=ϵ
+ syn match texGreek '\\varepsilon\>'	contained conceal cchar=ε
+ syn match texGreek '\\zeta\>'		contained conceal cchar=ζ
+ syn match texGreek '\\eta\>'		contained conceal cchar=η
+ syn match texGreek '\\theta\>'		contained conceal cchar=θ
+ syn match texGreek '\\vartheta\>'	contained conceal cchar=ϑ
+ syn match texGreek '\\kappa\>'		contained conceal cchar=κ
+ syn match texGreek '\\lambda\>'	contained conceal cchar=λ
+ syn match texGreek '\\mu\>'		contained conceal cchar=μ
+ syn match texGreek '\\nu\>'		contained conceal cchar=ν
+ syn match texGreek '\\xi\>'		contained conceal cchar=ξ
+ syn match texGreek '\\pi\>'		contained conceal cchar=π
+ syn match texGreek '\\varpi\>'		contained conceal cchar=ϖ
+ syn match texGreek '\\rho\>'		contained conceal cchar=ρ
+ syn match texGreek '\\varrho\>'	contained conceal cchar=ϱ
+ syn match texGreek '\\sigma\>'		contained conceal cchar=σ
+ syn match texGreek '\\varsigma\>'	contained conceal cchar=ς
+ syn match texGreek '\\tau\>'		contained conceal cchar=τ
+ syn match texGreek '\\upsilon\>'	contained conceal cchar=υ
+ syn match texGreek '\\phi\>'		contained conceal cchar=φ
+ syn match texGreek '\\varphi\>'	contained conceal cchar=ϕ
+ syn match texGreek '\\chi\>'		contained conceal cchar=χ
+ syn match texGreek '\\psi\>'		contained conceal cchar=ψ
+ syn match texGreek '\\omega\>'		contained conceal cchar=ω
+ syn match texGreek '\\Gamma\>'		contained conceal cchar=Γ
+ syn match texGreek '\\Delta\>'		contained conceal cchar=Δ
+ syn match texGreek '\\Theta\>'		contained conceal cchar=Θ
+ syn match texGreek '\\Lambda\>'	contained conceal cchar=Λ
+ syn match texGreek '\\Xi\>'		contained conceal cchar=Χ
+ syn match texGreek '\\Pi\>'		contained conceal cchar=Π
+ syn match texGreek '\\Sigma\>'		contained conceal cchar=Σ
+ syn match texGreek '\\Upsilon\>'	contained conceal cchar=Υ
+ syn match texGreek '\\Phi\>'		contained conceal cchar=Φ
+ syn match texGreek '\\Psi\>'		contained conceal cchar=Ψ
+ syn match texGreek '\\Omega\>'		contained conceal cchar=Ω
+ syn match texSuperscript	'\^0'	contained conceal cchar=⁰
+ syn match texSuperscript	'\^1'	contained conceal cchar=¹
+ syn match texSuperscript	'\^2'	contained conceal cchar=²
+ syn match texSuperscript	'\^3'	contained conceal cchar=³
+ syn match texSuperscript	'\^4'	contained conceal cchar=⁴
+ syn match texSuperscript	'\^5'	contained conceal cchar=⁵
+ syn match texSuperscript	'\^6'	contained conceal cchar=⁶
+ syn match texSuperscript	'\^7'	contained conceal cchar=⁷
+ syn match texSuperscript	'\^8'	contained conceal cchar=⁸
+ syn match texSuperscript	'\^9'	contained conceal cchar=⁹
+ syn match texSuperscript	'\^a'	contained conceal cchar=ᵃ
+ syn match texSuperscript	'\^b'	contained conceal cchar=ᵇ
+ syn match texSuperscript	'\^c'	contained conceal cchar=ᶜ
+ syn match texSuperscript	'\^d'	contained conceal cchar=ᵈ
+ syn match texSuperscript	'\^e'	contained conceal cchar=ᵉ
+ syn match texSuperscript	'\^f'	contained conceal cchar=ᶠ
+ syn match texSuperscript	'\^g'	contained conceal cchar=ᵍ
+ syn match texSuperscript	'\^h'	contained conceal cchar=ʰ
+ syn match texSuperscript	'\^i'	contained conceal cchar=ⁱ
+ syn match texSuperscript	'\^j'	contained conceal cchar=ʲ
+ syn match texSuperscript	'\^k'	contained conceal cchar=ᵏ
+ syn match texSuperscript	'\^l'	contained conceal cchar=ˡ
+ syn match texSuperscript	'\^m'	contained conceal cchar=ᵐ
+ syn match texSuperscript	'\^n'	contained conceal cchar=ⁿ
+ syn match texSuperscript	'\^o'	contained conceal cchar=ᵒ
+ syn match texSuperscript	'\^p'	contained conceal cchar=ᵖ
+ syn match texSuperscript	'\^r'	contained conceal cchar=ʳ
+ syn match texSuperscript	'\^s'	contained conceal cchar=ˢ
+ syn match texSuperscript	'\^t'	contained conceal cchar=ᵗ
+ syn match texSuperscript	'\^u'	contained conceal cchar=ᵘ
+ syn match texSuperscript	'\^v'	contained conceal cchar=ᵛ
+ syn match texSuperscript	'\^w'	contained conceal cchar=ʷ
+ syn match texSuperscript	'\^x'	contained conceal cchar=ˣ
+ syn match texSuperscript	'\^y'	contained conceal cchar=ʸ
+ syn match texSuperscript	'\^z'	contained conceal cchar=ᶻ
+ syn match texSuperscript	'\^A'	contained conceal cchar=ᴬ
+ syn match texSuperscript	'\^B'	contained conceal cchar=ᴮ
+ syn match texSuperscript	'\^D'	contained conceal cchar=ᴰ
+ syn match texSuperscript	'\^E'	contained conceal cchar=ᴱ
+ syn match texSuperscript	'\^G'	contained conceal cchar=ᴳ
+ syn match texSuperscript	'\^H'	contained conceal cchar=ᴴ
+ syn match texSuperscript	'\^I'	contained conceal cchar=ᴵ
+ syn match texSuperscript	'\^J'	contained conceal cchar=ᴶ
+ syn match texSuperscript	'\^K'	contained conceal cchar=ᴷ
+ syn match texSuperscript	'\^L'	contained conceal cchar=ᴸ
+ syn match texSuperscript	'\^M'	contained conceal cchar=ᴹ
+ syn match texSuperscript	'\^N'	contained conceal cchar=ᴺ
+ syn match texSuperscript	'\^O'	contained conceal cchar=ᴼ
+ syn match texSuperscript	'\^P'	contained conceal cchar=ᴾ
+ syn match texSuperscript	'\^R'	contained conceal cchar=ᴿ
+ syn match texSuperscript	'\^T'	contained conceal cchar=ᵀ
+ syn match texSuperscript	'\^U'	contained conceal cchar=ᵁ
+ syn match texSuperscript	'\^W'	contained conceal cchar=ᵂ
+ syn match texSubscript		'_0'	contained conceal cchar=₀
+ syn match texSubscript		'_1'	contained conceal cchar=₁
+ syn match texSubscript		'_2'	contained conceal cchar=₂
+ syn match texSubscript		'_3'	contained conceal cchar=₃
+ syn match texSubscript		'_4'	contained conceal cchar=₄
+ syn match texSubscript		'_5'	contained conceal cchar=₅
+ syn match texSubscript		'_6'	contained conceal cchar=₆
+ syn match texSubscript		'_7'	contained conceal cchar=₇
+ syn match texSubscript		'_8'	contained conceal cchar=₈
+ syn match texSubscript		'_9'	contained conceal cchar=₉
+ syn match texSubscript		'_a'	contained conceal cchar=ₐ
+ syn match texSubscript		'_e'	contained conceal cchar=ₑ
+ syn match texSubscript		'_i'	contained conceal cchar=ᵢ
+ syn match texSubscript		'_o'	contained conceal cchar=ₒ
+ syn match texSubscript		'_u'	contained conceal cchar=ᵤ
+endif
+
+" ---------------------------------------------------------------------
 " LaTeX synchronization: {{{1
 syn sync maxlines=200
 syn sync minlines=50
@@ -487,6 +603,7 @@ if !exists("tex_no_math")
  syn sync match texSyncMathZoneA		groupthere NONE		"\\\(sub\)*section\>"
 endif
 
+" ---------------------------------------------------------------------
 " Highlighting: {{{1
 if did_tex_syntax_inits == 1
  let did_tex_syntax_inits= 2
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -1,8 +1,8 @@
 " Vim syntax file
-" Language:	Vim 7.2 script
+" Language:	Vim 7.3 script
 " Maintainer:	Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change:	Nov 18, 2009
-" Version:	7.2-95
+" Last Change:	June 24, 2010
+" Version:	7.3-1
 " Automatically generated keyword lists: {{{1
 
 " Quit when a syntax file was already loaded {{{2
@@ -16,31 +16,31 @@ syn keyword vimTodo contained	COMBAK	FIX
 syn cluster vimCommentGroup	contains=vimTodo,@Spell
 
 " regular vim commands {{{2
-syn keyword vimCommand contained	abc[lear] argdo argu[ment] bel[owright] bN[ext] breakd[el] b[uffer] caddb[uffer] cb[uffer] cex[pr] cg[etfile] checkt[ime] cnew[er] col[der] con[tinue] cq[uit] delc[ommand] diffoff diffu[pdate] dr[op] echom[sg] em[enu] en[dif] ex files fini[sh] foldc[lose] for grepa[dd] helpg[rep] iabc[lear] imapc[lear] j[oin] keepj[umps] laddf[ile] lb[uffer] le[ft] lfir[st] lgr[ep] ll lmapc[lear] lnf[ile] lockv[ar] lp[revious] lv[imgrep] ma[rk] mk[exrc] mkv[imrc] mz[scheme] N[ext] ol[dfiles] opt[ions] perld[o] pp[op] P[rint] promptr[epl] ptj[ump] ptp[revious] pw[d] q[uit] redi[r] reg[isters] rew[ind] rubyd[o] sal[l] sba[ll] sbn[ext] sb[uffer] setf[iletype] sfir[st] sim[alt] sm[ap] sN[ext] snoremenu spe[llgood] spellw[rong] sta[g] stj[ump] sun[hide] sv[iew] tabc[lose] tabfir[st] tabn[ext] tabr[ewind] tc[l] tf[irst] tm to[pleft] ts[elect] u[ndo] unlo[ckvar] vert[ical] vi[sual] vs[plit] windo wN[ext] w[rite] xa[ll] xmenu xnoremenu
-syn keyword vimCommand contained	abo[veleft] arge[dit] as[cii] bf[irst] bo[tright] breakl[ist] buffers cad[dexpr] cc cf[ile] c[hange] cla[st] cn[ext] colo[rscheme] cope[n] cr[ewind] d[elete] diffpatch dig[raphs] ds[earch] echon emenu* endt[ry] exi[t] filetype fir[st] folddoc[losed] fu[nction] ha[rdcopy] helpt[ags] if is[earch] ju[mps] kee[pmarks] lan[guage] lc[d] lefta[bove] lgetb[uffer] lgrepa[dd] lla[st] lnew[er] lNf[ile] lol[der] lr[ewind] lvimgrepa[dd] marks mks[ession] mod[e] nbkey nmapc[lear] omapc[lear] pc[lose] po[p] pre[serve] profd[el] ps[earch] ptl[ast] ptr[ewind] pyf[ile] quita[ll] red[o] res[ize] ri[ght] rubyf[ile] san[dbox] sbf[irst] sbN[ext] scripte[ncoding] setg[lobal] sh[ell] sla[st] sme sni[ff] sor[t] spelli[nfo] sp[lit] startg[replace] st[op] sunme syncbind tabd[o] tabl[ast] tabN[ext] tabs tcld[o] th[row] tm[enu] tp[revious] tu undoj[oin] up[date] vie[w] viu[sage] wa[ll] winp[os] wp[revious] ws[verb] x[it] XMLent xunme
-syn keyword vimCommand contained	al[l] argg[lobal] bad[d] bl[ast] bp[revious] br[ewind] bun[load] caddf[ile] ccl[ose] cfir[st] changes cl[ist] cN[ext] comc[lear] co[py] cuna[bbrev] delf[unction] diffpu[t] di[splay] dsp[lit] e[dit] endfo[r] endw[hile] exu[sage] fina[lly] fix[del] foldd[oopen] go[to] h[elp] hid[e] ij[ump] isp[lit] k laddb[uffer] la[st] lch[dir] lex[pr] lgete[xpr] lh[elpgrep] lli[st] lne[xt] lo[adview] lop[en] ls lw[indow] mat[ch] mksp[ell] m[ove] new noh[lsearch] on[ly] ped[it] popu prev[ious] prof[ile] pta[g] ptn[ext] pts[elect] py[thon] r[ead] redr[aw] ret[ab] rightb[elow] ru[ntime] sa[rgument] sbl[ast] sbp[revious] scrip[tnames] setl[ocal] sign sl[eep] smenu sno[magic] so[urce] spellr[epall] spr[evious] star[tinsert] stopi[nsert] sunmenu t tabe[dit] tabm[ove] tabo[nly] ta[g] tclf[ile] tj[ump] tn[ext] tr[ewind] tu[nmenu] undol[ist] verb[ose] vim[grep] vmapc[lear] wh[ile] win[size] wq wv[iminfo] xmapc[lear] XMLns xunmenu
-syn keyword vimCommand contained	arga[dd] argl[ocal] ba[ll] bm[odified] brea[k] bro[wse] bw[ipeout] cal[l] cd cgetb[uffer] chd[ir] clo[se] cnf[ile] comp[iler] cpf[ile] cw[indow] delm[arks] diffsplit dj[ump] earlier el[se] endf[unction] ene[w] f[ile] fin[d] fo[ld] foldo[pen] gr[ep] helpf[ind] his[tory] il[ist] iuna[bbrev] keepalt lad[dexpr] later lcl[ose] lf[ile] lg[etfile] l[ist] lmak[e] lN[ext] loc[kmarks] lpf[ile] lt[ag] mak[e] menut[ranslate] mkvie[w] mzf[ile] n[ext] nu[mber] o[pen] pe[rl] popu[p] p[rint] promptf[ind] ptf[irst] ptN[ext] pu[t] qa[ll] rec[over] redraws[tatus] retu[rn] rub[y] rv[iminfo] sav[eas] sbm[odified] sbr[ewind] se[t] sf[ind] sil[ent] sm[agic] sn[ext] snoreme spelld[ump] spellu[ndo] sre[wind] startr[eplace] sts[elect] sus[pend] tab tabf[ind] tabnew tabp[revious] tags te[aroff] tl[ast] tN[ext] try una[bbreviate] unh[ide] ve[rsion] vimgrepa[dd] vne[w] winc[md] wn[ext] wqa[ll] X xme xnoreme y[ank]
-syn keyword vimCommand contained	argd[elete] ar[gs] bd[elete] bn[ext] breaka[dd] bufdo cabc[lear] cat[ch] ce[nter] cgete[xpr] che[ckpath] cmapc[lear] cNf[ile] conf[irm] cp[revious] debugg[reedy] diffg[et] diffthis dl[ist] echoe[rr] elsei[f] 
+syn keyword vimCommand contained	abc[lear] argdo argu[ment] bel[owright] bN[ext] breakd[el] b[uffer] caddb[uffer] cb[uffer] cex[pr] cg[etfile] checkt[ime] cnew[er] col[der] con[tinue] cq[uit] delc[ommand] diffoff diffu[pdate] dr[op] echoe[rr] el[se] endfo[r] endw[hile] f[ile] fin[d] fo[ld] foldo[pen] gr[ep] his[tory] il[ist] iuna[bbrev] keepalt lad[dexpr] later lcl[ose] lf[ile] lg[etfile] ll lmapc[lear] lnf[ile] lockv[ar] lp[revious] lv[imgrep] ma[rk] mk[exrc] mkv[imrc] mz[scheme] new noh[lsearch] on[ly] ped[it] popu prev[ious] prof[ile] pta[g] ptn[ext] pts[elect] py[thon] r[ead] redr[aw] ret[ab] rightb[elow] rundo san[dbox] sbf[irst] sbN[ext] scripte[ncoding] setg[lobal] sh[ell] sla[st] sme sni[ff] sor[t] spelli[nfo] sp[lit] startg[replace] st[op] sunme syncbind tabd[o] tabl[ast] tabN[ext] tabs tcld[o] th[row] tm[enu] tp[revious] tu undoj[oin] uns[ilent] vert[ical] vi[sual] wa[ll] winp[os] wp[revious] ws[verb] xa[ll] xmenu xnoremenu
+syn keyword vimCommand contained	abo[veleft] arge[dit] as[cii] bf[irst] bo[tright] breakl[ist] buffers cad[dexpr] cc cf[ile] c[hange] cla[st] cn[ext] colo[rscheme] cope[n] cr[ewind] d[elete] diffpatch dig[raphs] ds[earch] echom[sg] elsei[f] endf[unction] ene[w] files fini[sh] foldc[lose] for grepa[dd] iabc[lear] imapc[lear] j[oin] keepj[umps] laddf[ile] lb[uffer] le[ft] lfir[st] lgr[ep] lla[st] lnew[er] lNf[ile] lol[der] lr[ewind] lvimgrepa[dd] marks mks[ession] mod[e] nbc[lose] n[ext] nu[mber] o[pen] pe[rl] popu[p] p[rint] promptf[ind] ptf[irst] ptN[ext] pu[t] qa[ll] rec[over] redraws[tatus] retu[rn] rub[y] ru[ntime] sa[rgument] sbl[ast] sbp[revious] scrip[tnames] setl[ocal] sign sl[eep] smenu sno[magic] so[urce] spellr[epall] spr[evious] star[tinsert] stopi[nsert] sunmenu t tabe[dit] tabm[ove] tabo[nly] ta[g] tclf[ile] tj[ump] tn[ext] tr[ewind] tu[nmenu] undol[ist] up[date] vie[w] vmapc[lear] wh[ile] win[size] wq wundo x[it] XMLent xunme
+syn keyword vimCommand contained	al[l] argg[lobal] bad[d] bl[ast] bp[revious] br[ewind] bun[load] caddf[ile] ccl[ose] cfir[st] changes cl[ist] cN[ext] comc[lear] co[py] cuna[bbrev] delf[unction] diffpu[t] di[splay] dsp[lit] echon em[enu] en[dif] ex filetype fir[st] folddoc[losed] fu[nction] ha[rdcopy] if is[earch] ju[mps] kee[pmarks] lan[guage] lc[d] lefta[bove] lgetb[uffer] lgrepa[dd] lli[st] lne[xt] lo[adview] lop[en] ls lw[indow] mat[ch] mksp[ell] m[ove] nb[key] N[ext] ol[dfiles] opt[ions] perld[o] pp[op] P[rint] promptr[epl] ptj[ump] ptp[revious] pw[d] q[uit] redi[r] reg[isters] rew[ind] rubyd[o] rv[iminfo] sav[eas] sbm[odified] sbr[ewind] se[t] sf[ind] sil[ent] sm[agic] sn[ext] snoreme spelld[ump] spellu[ndo] sre[wind] startr[eplace] sts[elect] sus[pend] tab tabf[ind] tabnew tabp[revious] tags te[aroff] tl[ast] tN[ext] try una[bbreviate] unh[ide] verb[ose] vim[grep] vne[w] winc[md] wn[ext] wqa[ll] wv[iminfo] xmapc[lear] XMLns xunmenu
+syn keyword vimCommand contained	arga[dd] argl[ocal] ba[ll] bm[odified] brea[k] bro[wse] bw[ipeout] cal[l] cd cgetb[uffer] chd[ir] clo[se] cnf[ile] comp[iler] cpf[ile] cw[indow] delm[arks] diffsplit dj[ump] earlier e[dit] emenu* endt[ry] exi[t] fina[lly] fix[del] foldd[oopen] go[to] hid[e] ij[ump] isp[lit] k laddb[uffer] la[st] lch[dir] lex[pr] lgete[xpr] l[ist] lmak[e] lN[ext] loc[kmarks] lpf[ile] lt[ag] mak[e] menut[ranslate] mkvie[w] mzf[ile] nbs[tart] nmapc[lear] omapc[lear] pc[lose] po[p] pre[serve] profd[el] ps[earch] ptl[ast] ptr[ewind] pyf[ile] quita[ll] red[o] res[ize] ri[ght] rubyf[ile] sal[l] sba[ll] sbn[ext] sb[uffer] setf[iletype] sfir[st] sim[alt] sm[ap] sN[ext] snoremenu spe[llgood] spellw[rong] sta[g] stj[ump] sun[hide] sv[iew] tabc[lose] tabfir[st] tabn[ext] tabr[ewind] tc[l] tf[irst] tm to[pleft] ts[elect] u[ndo] unlo[ckvar] ve[rsion] vimgrepa[dd] vs[plit] windo wN[ext] w[rite] X xme xnoreme y[ank]
+syn keyword vimCommand contained	argd[elete] ar[gs] bd[elete] bn[ext] breaka[dd] bufdo cabc[lear] cat[ch] ce[nter] cgete[xpr] che[ckpath] cmapc[lear] cNf[ile] conf[irm] cp[revious] debugg[reedy] diffg[et] diffthis dl[ist] 
 syn match   vimCommand contained	"\<z[-+^.=]"
 
 " vimOptions are caught only when contained in a vimSet {{{2
-syn keyword vimOption contained	acd ambiwidth arabicshape autowriteall backupdir bdlay binary breakat bufhidden cdpath cin cinwords columns completeopt cpo cscopetagorder csverb deco dictionary directory ed encoding errorfile exrc fdls fencs fileformats fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imak ims indentexpr is isp keywordprg lazyredraw lispwords ls makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc pastetoggle pexpr pmbfn printexpr pt readonly rightleft rtp sb scroll sect sessionoptions shellpipe shellxquote showbreak shq slm smd spc spf sr sta sts swapfile sxq tabpagemax tags tbis terse thesaurus titleold toolbariconsize tsr ttyfast tx ut verbosefile virtualedit wb wfw wildcharm winaltkeys winminwidth wmnu write
-syn keyword vimOption contained	ai ambw ari aw backupext beval biosk brk buflisted cedit cindent clipboard com confirm cpoptions cscopeverbose cuc def diff display edcompatible endofline errorformat fcl fdm fex filetype fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imc imsearch indentkeys isf isprint km lbr list lsp makeprg maxmem mh mmp more mouses mzq nuw opfunc patchexpr pfn popt printfont pumheight redrawtime rightleftcmd ru sbo scrollbind sections sft shellquote shiftround showcmd si sm sn spell spl srr stal su swapsync syn tabstop tagstack tbs textauto tildeop titlestring top ttimeout ttym uc vb vfile visualbell wc wh wildignore window winwidth wmw writeany
-syn keyword vimOption contained	akm anti arshape awa backupskip bex bioskey browsedir buftype cf cink cmdheight comments consk cpt cspc cul define diffexpr dy ef eol esckeys fcs fdn ff fillchars foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imcmdline inc indk isfname joinspaces kmp lcs listchars lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchmode ph preserveindent printheader pvh remap rl ruf sbr scrolljump secure sh shellredir shiftwidth showfulltag sidescroll smartcase so spellcapcheck splitbelow ss startofline sua swb synmaxcol tag tal tenc textmode timeout tl tpm ttimeoutlen ttymouse ul vbs vi vop wcm whichwrap wildmenu winfixheight wiv wop writebackup
-syn keyword vimOption contained	al antialias autochdir background balloondelay bexpr bk bs casemap cfu cinkeys cmdwinheight commentstring conskey cscopepathcomp csprg cursorcolumn delcombine diffopt ea efm ep et fdc fdo ffs fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imd include inex isi js kp linebreak lm lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa path pheader previewheight printmbcharset pvw report rlc ruler sc scrolloff sel shcf shellslash shm showmatch sidescrolloff smartindent softtabstop spellfile splitright ssl statusline suffixes swf syntax tagbsearch tb term textwidth timeoutlen tm tr ttm ttyscroll undolevels vdir viewdir wa wd wi wildmode winfixwidth wiw wrap writedelay
-syn keyword vimOption contained	aleph ar autoindent backspace ballooneval bg bkc bsdir cb ch cino cmp compatible copyindent cscopeprg csqf cursorline dex digraph ead ei equalalways eventignore fde fdt fileencoding fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imdisable includeexpr inf isident key langmap lines lmap ma matchtime mco ml modeline mousefocus mousetime nrformats ofu para pdev pi previewwindow printmbfont qe restorescreen ro rulerformat scb scrollopt selection shell shelltemp shortmess showmode siso smarttab sol spelllang spr ssop stl suffixesadd switchbuf ta taglength tbi termbidi tf title to ts tty ttytype updatecount ve viewoptions wak weirdinvert wig wildoptions winheight wm wrapmargin ws
-syn keyword vimOption contained	allowrevins arab autoread backup balloonexpr bh bl bsk ccv charconvert cinoptions cms complete cot cscopequickfix cst cwh dg dip eadirection ek equalprg ex fdi fen fileencodings flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imi incsearch infercase isk keymap langmenu linespace loadplugins macatsui maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pm printdevice printoptions quoteescape revins rs runtimepath scr scs selectmode shellcmdflag shelltype shortname showtabline sj smc sp spellsuggest sps st stmp sw sws tabline tagrelative tbidi termencoding tgst titlelen toolbar tsl ttybuiltin tw updatetime verbose viminfo warn wfh wildchar wim winminheight wmh wrapscan ww
-syn keyword vimOption contained	altkeymap arabic autowrite backupcopy bdir bin bomb bt cd ci cinw co completefunc cp cscopetag csto debug dict dir eb enc errorbells expandtab fdl fenc fileformat fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatekey iminsert inde insertmode iskeyword keymodel laststatus lisp lpl magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paste pex pmbcs printencoding prompt rdt ri relativenumber rnu
+syn keyword vimOption contained	acd ambiwidth arabicshape autowriteall backupdir bdlay binary breakat bufhidden cdpath cin cinwords columns completeopt cot cscopepathcomp csprg cursorbind define diffexpr dy ef eol esckeys fcs fdn ff fillchars foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imcmdline inc indk isfname joinspaces kmp lcs listchars lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchmode ph preserveindent printheader pvh relativenumber rightleftcmd ru sbr scrolloff selection shellcmdflag shellxquote showcmd sidescroll smartindent sol spelllang spr ssop stl suffixesadd switchbuf ta taglength tbi termbidi tf title to ts tty ttytype ul ut verbosefile virtualedit wb wfw wildcharm winaltkeys winminwidth wmnu write
+syn keyword vimOption contained	ai ambw ari aw backupext beval biosk brk buflisted cedit cindent clipboard com conc cp cscopeprg csqf cursorcolumn delcombine diffopt ea efm ep et fdc fdo ffs fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imd include inex isi js kp linebreak lm lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa path pheader previewheight printmbcharset pvw remap rl ruf sc scrollopt selectmode shellpipe shiftround showfulltag sidescrolloff smarttab sp spellsuggest sps st stmp sw sws tabline tagrelative tbidi termencoding tgst titlelen toolbar tsl ttybuiltin tw undodir vb vfile visualbell wc wh wildignore window winwidth wmw writeany
+syn keyword vimOption contained	akm anti arshape awa backupskip bex bioskey browsedir buftype cf cink cmdheight comments conceallevel cpo cscopequickfix cst cursorline dex digraph ead ei equalalways eventignore fde fdt fileencoding fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imdisable includeexpr inf isident key langmap lines lmap ma matchtime mco ml modeline mousefocus mousetime nrformats ofu para pdev pi previewwindow printmbfont qe report rlc ruler scb scs sessionoptions shellquote shiftwidth showmatch siso smc spc spf sr sta sts swapfile sxq tabpagemax tags tbis terse thesaurus titleold toolbariconsize tsr ttyfast tx undofile vbs vi vop wcm whichwrap wildmenu winfixheight wiv wop writebackup
+syn keyword vimOption contained	al antialias autochdir background balloondelay bexpr bk bs casemap cfu cinkeys cmdwinheight commentstring confirm cpoptions cscopetag csto cwh dg dip eadirection ek equalprg ex fdi fen fileencodings flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imi incsearch infercase isk keymap langmenu linespace loadplugins macatsui maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pm printdevice printoptions quoteescape restorescreen rnu rulerformat scr sect sft shellredir shm showmode sj smd spell spl srr stal su swapsync syn tabstop tagstack tbs textauto tildeop titlestring top ttimeout ttym uc undolevels vdir viewdir wa wd wi wildmode winfixwidth wiw wrap writedelay
+syn keyword vimOption contained	aleph ar autoindent backspace ballooneval bg bkc bsdir cb ch cino cmp compatible consk cpt cscopetagorder csverb debug dict dir eb enc errorbells expandtab fdl fenc fileformat fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatekey iminsert inde insertmode iskeyword keymodel laststatus lisp lpl magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paste pex pmbcs printencoding prompt rdt revins ro runtimepath scroll sections sh shellslash shortmess showtabline slm sn spellcapcheck splitbelow ss startofline sua swb synmaxcol tag tal tenc textmode timeout tl tpm ttimeoutlen ttymouse udf updatecount ve viewoptions wak weirdinvert wig wildoptions winheight wm wrapmargin ws
+syn keyword vimOption contained	allowrevins arab autoread backup balloonexpr bh bl bsk ccv charconvert cinoptions cms complete conskey crb cscopeverbose cuc deco dictionary directory ed encoding errorfile exrc fdls fencs fileformats fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imak ims indentexpr is isp keywordprg lazyredraw lispwords ls makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc pastetoggle pexpr pmbfn printexpr pt readonly ri rs sb scrollbind secure shcf shelltemp shortname shq sm so spellfile splitright ssl statusline suffixes swf syntax tagbsearch tb term textwidth timeoutlen tm tr ttm ttyscroll udir updatetime verbose viminfo warn wfh wildchar wim winminheight wmh wrapscan ww
+syn keyword vimOption contained	altkeymap arabic autowrite backupcopy bdir bin bomb bt cd ci cinw co completefunc copyindent cryptmethod cspc cul def diff display edcompatible endofline errorformat fcl fdm fex filetype fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imc imsearch indentkeys isf isprint km lbr list lsp makeprg maxmem mh mmp more mouses mzq nuw opfunc patchexpr pfn popt printfont pumheight redrawtime rightleft rtp sbo scrolljump sel shell shelltype showbreak si smartcase softtabstop 
 
 " vimOptions: These are the turn-off setting variants {{{2
-syn keyword vimOption contained	noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobuflisted nocin noconfirm nocopyindent nocscopeverbose nocuc nocursorline nodg noimdisable noeb noedcompatible noendofline noequalalways noesckeys noex noexrc nofk nofoldenable nogdefault nohid nohk nohkmapp nohls noic noignorecase noimc noimd noinf noinsertmode nojoinspaces nolazyredraw nolinebreak nolist nolpl noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw noremap norevins norightleft norl noro noru nosb noscb noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx novisualbell nowarn noweirdinvert nowfw nowinfixheight nowiv nowrap nowrite nowritebackup
-syn keyword vimOption contained	noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa nobeval nobiosk nobl nocf nocindent noconsk nocp nocst nocul nodeco nodiff noea noed noek noeol noerrorbells noet noexpandtab nofen nofkmap nogd noguipty nohidden nohkmap nohkp nohlsearch noicon noim noimcmdline noincsearch noinfercase nois nojs nolbr nolisp noloadplugins nolz nomacatsui nomh nomod nomodifiable nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly norestorescreen nori norightleftcmd norlc nors noruler nosc noscrollbind nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast novb nowa nowb nowfh nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
-syn keyword vimOption contained	noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobioskey nobomb noci nocompatible noconskey nocscopetag nocsverb nocursorcolumn nodelcombine nodigraph norelativenumber nornu
+syn keyword vimOption contained	noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobuflisted nocin noconfirm nocopyindent nocscopetag nocsverb nocursorbind nodeco nodiff noeb noek noequalalways noet noexpandtab nofen nofkmap nogd noguipty nohidden nohkmap nohkp nohlsearch noicon noim noimcmdline noimdisable noinf noinsertmode nojoinspaces nolazyredraw nolinebreak nolist nolpl noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norightleftcmd norlc noro noru nosb noscb noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx novisualbell nowarn noweirdinvert nowfw nowinfixheight nowiv nowrap nowrite nowritebackup
+syn keyword vimOption contained	noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa nobeval nobiosk nobl nocf nocindent noconsk nocp nocscopeverbose nocuc nocursorcolumn nodelcombine nodigraph noed noendofline noerrorbells noex noexrc nofk nofoldenable nogdefault nohid nohk nohkmapp nohls noic noignorecase noimc noimd noincsearch noinfercase nois nojs nolbr nolisp noloadplugins nolz nomacatsui nomh nomod nomodifiable nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft norl nornu nors noruler nosc noscrollbind nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast novb nowa nowb nowfh nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
+syn keyword vimOption contained	noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobioskey nobomb noci nocompatible noconskey nocrb nocst nocul nocursorline nodg noea noedcompatible noeol noesckeys 
 
 " vimOptions: These are the invertible variants {{{2
-syn keyword vimOption contained	invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbinary invbk invbuflisted invcin invconfirm invcopyindent invcscopeverbose invcuc invcursorline invdg invdisable inveb invedcompatible invendofline invequalalways invesckeys invex invexrc invfk invfoldenable invgdefault invhid invhk invhkmapp invhls invic invignorecase invimc invimd invinf invinsertmode invjoinspaces invlazyredraw invlinebreak invlist invlpl invma invmagic invml invmodeline invmodified invmousef invmousehide invnumber invopendevice invpi invpreviewwindow invpvw invremap invrevins invrightleft invrl invro invru invsb invscb invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invvisualbell invwarn invweirdinvert invwfw invwinfixheight invwiv invwrap invwrite invwritebackup
-syn keyword vimOption contained	invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invbeval invbiosk invbl invcf invcindent invconsk invcp invcst invcul invdeco invdiff invea inved invek inveol inverrorbells invet invexpandtab invfen invfkmap invgd invguipty invhidden invhkmap invhkp invhlsearch invicon invim invimcmdline invincsearch invinfercase invis invjs invlbr invlisp invloadplugins invlz invmacatsui invmh invmod invmodifiable invmore invmousefocus invnu invodev invpaste invpreserveindent invprompt invreadonly invrestorescreen invri invrightleftcmd invrlc invrs invruler invsc invscrollbind invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtf invtildeop invtitle invtop invttimeout invttyfast invvb invwa invwb invwfh invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws
-syn keyword vimOption contained	invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbioskey invbomb invci invcompatible invconskey invcscopetag invcsverb invcursorcolumn invdelcombine invdigraph invrelativenumber invrnu
+syn keyword vimOption contained	invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbinary invbk invbuflisted invcin invconfirm invcopyindent invcscopetag invcsverb invcursorbind invdeco invdiff inveb invek invequalalways invet invexpandtab invfen invfkmap invgd invguipty invhidden invhkmap invhkp invhlsearch invicon invim invimcmdline invimdisable invinf invinsertmode invjoinspaces invlazyredraw invlinebreak invlist invlpl invma invmagic invml invmodeline invmodified invmousef invmousehide invnumber invopendevice invpi invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrightleftcmd invrlc invro invru invsb invscb invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invvisualbell invwarn invweirdinvert invwfw invwinfixheight invwiv invwrap invwrite invwritebackup
+syn keyword vimOption contained	invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invbeval invbiosk invbl invcf invcindent invconsk invcp invcscopeverbose invcuc invcursorcolumn invdelcombine invdigraph inved invendofline inverrorbells invex invexrc invfk invfoldenable invgdefault invhid invhk invhkmapp invhls invic invignorecase invimc invimd invincsearch invinfercase invis invjs invlbr invlisp invloadplugins invlz invmacatsui invmh invmod invmodifiable invmore invmousefocus invnu invodev invpaste invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrl invrnu invrs invruler invsc invscrollbind invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtf invtildeop invtitle invtop invttimeout invttyfast invvb invwa invwb invwfh invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws
+syn keyword vimOption contained	invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbioskey invbomb invci invcompatible invconskey invcrb invcst invcul invcursorline invdg invea invedcompatible inveol invesckeys 
 
 " termcap codes (which can also be set) {{{2
 syn keyword vimOption contained	t_AB t_al t_bc t_ce t_cl t_Co t_cs t_Cs t_CS t_CV t_da t_db t_dl t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_te t_ti t_ts t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xs t_ZH t_ZR
@@ -62,7 +62,7 @@ syn case ignore
 syn keyword vimAutoEvent contained	BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave ColorScheme CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave TermChanged TermResponse User UserGettingBored VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave 
 
 " Highlight commonly used Groupnames {{{2
-syn keyword vimGroup contained	Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo None
+syn keyword vimGroup contained	Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo 
 
 " Default highlighting groups {{{2
 syn keyword vimHLGroup contained	Cursor CursorColumn CursorIM CursorLine DiffAdd DiffChange DiffDelete DiffText Directory ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu 
@@ -70,9 +70,9 @@ syn match vimHLGroup contained	"Conceal"
 syn case match
 
 " Function Names {{{2
-syn keyword vimFuncName contained	abs argc atan bufexists bufname byte2line ceil cindent complete confirm count deepcopy diff_filler escape executable expr8 filereadable finddir floor foldclosed foldtext function getbufline getcharmod getcmdtype getfperm getftype getmatches getqflist gettabwinvar getwinposy glob has haslocaldir histadd histget hlexists hostname indent input inputlist inputsave insert islocked join len libcallnr line2byte localtime map mapcheck matchadd matchdelete matchlist max mkdir nextnonblank pathshorten prevnonblank pumvisible readfile reltimestr remote_foreground remote_read remove repeat reverse search searchpair searchpos serverlist setcmdpos setloclist setpos setreg setwinvar simplify sort spellbadword split str2float strftime string strpart strtrans substitute synIDattr synstack tabpagebuflist tabpagewinnr taglist tolower tr type virtcol winbufnr winheight winnr winrestview winwidth
-syn keyword vimFuncName contained	add argidx browse buflisted bufnr byteidx changenr clearmatches complete_add copy cscope_connection delete diff_hlID eval exists extend filewritable findfile fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcmdline getcwd getfsize getline getpid getreg getwinposx getwinvar globpath has_key hasmapto histdel histnr hlID iconv index inputdialog inputrestore inputsecret isdirectory items keys libcall line lispindent log10 maparg match matcharg matchend matchstr min mode nr2char pow printf range reltime remote_expr remote_peek remote_send rename resolve round searchdecl searchpairpos server2client setbufvar setline setmatches setqflist settabwinvar shellescape sin soundfold spellsuggest sqrt str2nr stridx strlen strridx submatch synID synIDtrans system tabpagenr tagfiles tempname toupper trunc values visualmode wincol winline winrestcmd winsaveview writefile
-syn keyword vimFuncName contained	append argv browsedir bufloaded bufwinnr call char2nr col complete_check cos cursor did_filetype empty eventhandler expand feedkeys filter float2nr fnamemodify foldlevel foreground get getchar getcmdpos getfontname getftime getloclist getpos getregtype 
+syn keyword vimFuncName contained	abs append argv atan2 bufexists bufname byte2line ceil cindent complete confirm cosh cursor did_filetype empty eventhandler exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdtype getfperm getftype getmatches getqflist gettabvar getwinposy globpath haslocaldir histdel hlexists iconv input inputrestore insert items len line lispindent log map mapcheck matchadd matchdelete matchlist max mkdir mzeval nr2char pow printf range reltime remote_expr remote_peek remote_send rename resolve round searchdecl searchpairpos server2client setbufvar setline setmatches setqflist settabvar setwinvar simplify sinh soundfold spellsuggest sqrt str2nr stridx strlen strridx submatch synID synIDtrans system tabpagenr tagfiles tan tempname toupper trunc undofile virtcol winbufnr winheight winnr winrestview winwidth
+syn keyword vimFuncName contained	acos argc asin browse buflisted bufnr byteidx changenr clearmatches complete_add copy count deepcopy diff_filler escape executable expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcmdline getcwd getfsize getline getpid getreg gettabwinvar getwinvar has hasmapto histget hlID indent inputdialog inputsave isdirectory join libcall line2byte localtime log10 maparg match matcharg matchend matchstr min mode nextnonblank pathshorten prevnonblank pumvisible readfile reltimestr remote_foreground remote_read remove repeat reverse search searchpair searchpos serverlist setcmdpos setloclist setpos setreg settabwinvar shellescape sin sort spellbadword split str2float strftime string strpart strtrans substitute synIDattr synstack tabpagebuflist tabpagewinnr taglist tanh tolower tr type values visualmode wincol winline winrestcmd winsaveview writefile
+syn keyword vimFuncName contained	add argidx atan browsedir bufloaded bufwinnr call char2nr col complete_check cos cscope_connection delete diff_hlID eval exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdpos getfontname getftime getloclist getpos getregtype getwinposx glob has_key histadd histnr hostname index inputlist inputsecret islocked keys libcallnr 
 
 "--- syntax above generated by mkvimvim ---
 " Special Vim Highlighting (not automatic) {{{1
--- a/src/edit.c
+++ b/src/edit.c
@@ -1457,17 +1457,33 @@ force_cindent:
 ins_redraw(ready)
     int		ready UNUSED;	    /* not busy with something */
 {
+#ifdef FEAT_CONCEAL
+    linenr_T	conceal_old_cursor_line = 0;
+    linenr_T	conceal_new_cursor_line = 0;
+    int		conceal_update_lines = FALSE;
+#endif
+
     if (!char_avail())
     {
-#ifdef FEAT_AUTOCMD
+#if defined(FEAT_AUTOCMD) || defined(FEAT_CONCEAL)
 	/* Trigger CursorMoved if the cursor moved.  Not when the popup menu is
 	 * visible, the command might delete it. */
-	if (ready && has_cursormovedI()
-			     && !equalpos(last_cursormoved, curwin->w_cursor)
+	if (ready && (
+# ifdef FEAT_AUTOCMD
+		    has_cursormovedI()
+# endif
+# if defined(FEAT_AUTOCMD) && defined(FEAT_CONCEAL)
+		    ||
+# endif
+# ifdef FEAT_CONCEAL
+		    curwin->w_p_conceal
+# endif
+		    )
+	    && !equalpos(last_cursormoved, curwin->w_cursor)
 # ifdef FEAT_INS_EXPAND
-			     && !pum_visible()
+	    && !pum_visible()
 # endif
-			     )
+	   )
 	{
 # ifdef FEAT_SYN_HL
 	    /* Need to update the screen first, to make sure syntax
@@ -1477,7 +1493,18 @@ ins_redraw(ready)
 	    if (syntax_present(curwin) && must_redraw)
 		update_screen(0);
 # endif
-	    apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf);
+# ifdef FEAT_AUTOCMD
+	    if (has_cursormovedI())
+		apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf);
+# endif
+# ifdef FEAT_CONCEAL
+	    if (curwin->w_p_conceal)
+	    {
+		conceal_old_cursor_line = last_cursormoved.lnum;
+		conceal_new_cursor_line = curwin->w_cursor.lnum;
+		conceal_update_lines = TRUE;
+	    }
+# endif
 	    last_cursormoved = curwin->w_cursor;
 	}
 #endif
@@ -1485,6 +1512,15 @@ ins_redraw(ready)
 	    update_screen(0);
 	else if (clear_cmdline || redraw_cmdline)
 	    showmode();		/* clear cmdline and show mode */
+# if defined(FEAT_CONCEAL)
+	if (conceal_update_lines
+		&& conceal_old_cursor_line != conceal_new_cursor_line)
+	{
+	    update_single_line(curwin, conceal_old_cursor_line);
+	    update_single_line(curwin, conceal_new_cursor_line);
+	    curwin->w_valid &= ~VALID_CROW;
+	}
+# endif
 	showruler(FALSE);
 	setcursor();
 	emsg_on_display = FALSE;	/* may remove error message now */
@@ -9123,9 +9159,6 @@ ins_s_right()
 ins_up(startcol)
     int		startcol;	/* when TRUE move to Insstart.col */
 {
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
     pos_T	tpos;
     linenr_T	old_topline = curwin->w_topline;
 #ifdef FEAT_DIFF
@@ -9148,13 +9181,6 @@ ins_up(startcol)
 #ifdef FEAT_CINDENT
 	can_cindent = TRUE;
 #endif
-#ifdef FEAT_CONCEAL
-	if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-	{
-	    update_single_line(curwin, oldline);
-	    update_single_line(curwin, curwin->w_cursor.lnum);
-	}
-#endif
     }
     else
 	vim_beep();
@@ -9196,10 +9222,6 @@ ins_pageup()
 ins_down(startcol)
     int		startcol;	/* when TRUE move to Insstart.col */
 {
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-    linenr_T	oldbotline = curwin->w_botline;
-#endif
     pos_T	tpos;
     linenr_T	old_topline = curwin->w_topline;
 #ifdef FEAT_DIFF
@@ -9222,16 +9244,6 @@ ins_down(startcol)
 #ifdef FEAT_CINDENT
 	can_cindent = TRUE;
 #endif
-#ifdef FEAT_CONCEAL
-	if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-	{
-	    update_single_line(curwin, oldline);
-	    /* Don't do this if we've scrolled, the line is already
-	     * drawn */
-	    if (oldbotline == curwin->w_botline)
-		update_single_line(curwin, curwin->w_cursor.lnum);
-	}
-#endif
     }
     else
 	vim_beep();
--- a/src/eval.c
+++ b/src/eval.c
@@ -9437,9 +9437,6 @@ f_cursor(argvars, rettv)
     typval_T	*rettv;
 {
     long	line, col;
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
 #ifdef FEAT_VIRTUALEDIT
     long	coladd = 0;
 #endif
@@ -9489,13 +9486,6 @@ f_cursor(argvars, rettv)
 #endif
 
     curwin->w_set_curswant = TRUE;
-#ifdef FEAT_CONCEAL
-    if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-    {
-	update_single_line(curwin, oldline);
-	update_single_line(curwin, curwin->w_cursor.lnum);
-    }
-#endif
     rettv->vval.v_number = 0;
 }
 
@@ -15165,15 +15155,6 @@ search_cmn(argvars, match_pos, flagsp)
     /* If 'n' flag is used: restore cursor position. */
     if (flags & SP_NOMOVE)
 	curwin->w_cursor = save_cursor;
-#ifdef FEAT_CONCEAL
-	else if (curwin->w_p_conceal
-				 && save_cursor.lnum != curwin->w_cursor.lnum)
-	{
-	    curwin->w_set_curswant = TRUE;
-	    update_single_line(curwin, save_cursor.lnum);
-	    update_single_line(curwin, curwin->w_cursor.lnum);
-	}
-#endif
     else
 	curwin->w_set_curswant = TRUE;
 theend:
--- a/src/gui.c
+++ b/src/gui.c
@@ -4908,19 +4908,57 @@ no_console_input()
     void
 gui_update_screen()
 {
+#ifdef FEAT_CONCEAL
+    linenr_T	conceal_old_cursor_line = 0;
+    linenr_T	conceal_new_cursor_line = 0;
+    int		conceal_update_lines = FALSE;
+#endif
+
     update_topline();
     validate_cursor();
-#ifdef FEAT_AUTOCMD
+
+#if defined(FEAT_AUTOCMD) || defined(FEAT_CONCEAL)
     /* Trigger CursorMoved if the cursor moved. */
-    if (!finish_op && has_cursormoved()
-	    && !equalpos(last_cursormoved, curwin->w_cursor))
+    if (!finish_op && (
+# ifdef FEAT_AUTOCMD
+		has_cursormoved()
+# endif
+# if defined(FEAT_AUTOCMD) && defined(FEAT_CONCEAL)
+		||
+# endif
+# ifdef FEAT_CONCEAL
+		curwin->w_p_conceal
+# endif
+		)
+		     && !equalpos(last_cursormoved, curwin->w_cursor))
     {
-	apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf);
+# ifdef FEAT_AUTOCMD
+	if (has_cursormoved())
+	    apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf);
+# endif
+# ifdef FEAT_CONCEAL
+	if (curwin->w_p_conceal)
+	{
+	    conceal_old_cursor_line = last_cursormoved.lnum;
+	    conceal_new_cursor_line = curwin->w_cursor.lnum;
+	    conceal_update_lines = TRUE;
+	}
+# endif
 	last_cursormoved = curwin->w_cursor;
     }
 #endif
+
     update_screen(0);	/* may need to update the screen */
     setcursor();
+# if defined(FEAT_CONCEAL)
+    if (conceal_update_lines
+	    && conceal_old_cursor_line != conceal_new_cursor_line)
+    {
+	update_single_line(curwin, conceal_old_cursor_line);
+	update_single_line(curwin, conceal_new_cursor_line);
+	curwin->w_valid &= ~VALID_CROW;
+    }
+# endif
     out_flush();		/* make sure output has been written */
     gui_update_cursor(TRUE, FALSE);
     gui_mch_flush();
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -609,10 +609,12 @@ static int ensure_ruby_initialized(void)
 	    char *argv[] = {"gvim.exe"};
 	    NtInitialize(&argc, &argv);
 #endif
+	    {
 #ifdef RUBY19_OR_LATER
-	    RUBY_INIT_STACK;
+		RUBY_INIT_STACK;
 #endif
-	    ruby_init();
+		ruby_init();
+	    }
 #ifdef RUBY19_OR_LATER
 	    ruby_script("vim-ruby");
 #endif
--- a/src/main.c
+++ b/src/main.c
@@ -980,6 +980,11 @@ main_loop(cmdwin, noexmode)
 {
     oparg_T	oa;				/* operator arguments */
     int		previous_got_int = FALSE;	/* "got_int" was TRUE */
+#ifdef FEAT_CONCEAL
+    linenr_T	conceal_old_cursor_line = 0;
+    linenr_T	conceal_new_cursor_line = 0;
+    int		conceal_update_lines = FALSE;
+#endif
 
 #if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)
     /* Setup to catch a terminating error from the X server.  Just ignore
@@ -1079,12 +1084,34 @@ main_loop(cmdwin, noexmode)
 	    skip_redraw = FALSE;
 	else if (do_redraw || stuff_empty())
 	{
-#ifdef FEAT_AUTOCMD
+#if defined(FEAT_AUTOCMD) || defined(FEAT_CONCEAL)
 	    /* Trigger CursorMoved if the cursor moved. */
-	    if (!finish_op && has_cursormoved()
-			     && !equalpos(last_cursormoved, curwin->w_cursor))
+	    if (!finish_op && (
+# ifdef FEAT_AUTOCMD
+			has_cursormoved()
+# endif
+# if defined(FEAT_AUTOCMD) && defined(FEAT_CONCEAL)
+			||
+# endif
+# ifdef FEAT_CONCEAL
+			curwin->w_p_conceal
+# endif
+			)
+		 && !equalpos(last_cursormoved, curwin->w_cursor))
 	    {
-		apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf);
+# ifdef FEAT_AUTOCMD
+		if (has_cursormoved())
+		    apply_autocmds(EVENT_CURSORMOVED, NULL, NULL,
+							       FALSE, curbuf);
+# endif
+# ifdef FEAT_CONCEAL
+		if (curwin->w_p_conceal)
+		{
+		    conceal_old_cursor_line = last_cursormoved.lnum;
+		    conceal_new_cursor_line = curwin->w_cursor.lnum;
+		    conceal_update_lines = TRUE;
+		}
+# endif
 		last_cursormoved = curwin->w_cursor;
 	    }
 #endif
@@ -1164,6 +1191,15 @@ main_loop(cmdwin, noexmode)
 	    may_clear_sb_text();	/* clear scroll-back text on next msg */
 	    showruler(FALSE);
 
+# if defined(FEAT_CONCEAL)
+	    if (conceal_update_lines
+		    && conceal_old_cursor_line != conceal_new_cursor_line)
+	    {
+		update_single_line(curwin, conceal_old_cursor_line);
+		update_single_line(curwin, conceal_new_cursor_line);
+		curwin->w_valid &= ~VALID_CROW;
+	    }
+# endif
 	    setcursor();
 	    cursor_on();
 
--- a/src/normal.c
+++ b/src/normal.c
@@ -2298,9 +2298,6 @@ do_mouse(oap, c, dir, count, fixindent)
     int		old_mode = VIsual_mode;
 #endif
     int		regname;
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
 
 #if defined(FEAT_FOLDING)
     save_cursor = curwin->w_cursor;
@@ -2773,14 +2770,6 @@ do_mouse(oap, c, dir, count, fixindent)
 	    curwin->w_cursor = save_cursor;
     }
 #endif
-#ifdef FEAT_CONCEAL
-    if (curwin->w_p_conceal && moved
-		&& (old_curwin != curwin || oldline != curwin->w_cursor.lnum))
-    {
-	update_single_line(old_curwin, oldline);
-	update_single_line(curwin, curwin->w_cursor.lnum);
-    }
-#endif
 
 #if defined(FEAT_CLIPBOARD) && defined(FEAT_CMDWIN)
     if ((jump_flags & IN_OTHER_WIN) && !VIsual_active && clip_star.available)
@@ -5713,9 +5702,6 @@ nv_scroll(cap)
     linenr_T	lnum;
 #endif
     int		half;
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
 
     cap->oap->motion_type = MLINE;
     setpcmark();
@@ -5803,13 +5789,6 @@ nv_scroll(cap)
 
     cursor_correct();	/* correct for 'so' */
     beginline(BL_SOL | BL_FIX);
-#ifdef FEAT_CONCEAL
-    if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-    {
-	update_single_line(curwin, oldline);
-	update_single_line(curwin, curwin->w_cursor.lnum);
-    }
-#endif
 }
 
 /*
@@ -5825,9 +5804,6 @@ nv_right(cap)
 #else
 # define PAST_LINE 0
 #endif
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
 
     if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL))
     {
@@ -5932,13 +5908,6 @@ nv_right(cap)
 					       && cap->oap->op_type == OP_NOP)
 	foldOpenCursor();
 #endif
-#ifdef FEAT_CONCEAL
-    if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-    {
-	update_single_line(curwin, oldline);
-	update_single_line(curwin, curwin->w_cursor.lnum);
-    }
-#endif
 }
 
 /*
@@ -5951,9 +5920,6 @@ nv_left(cap)
     cmdarg_T	*cap;
 {
     long	n;
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
 
     if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL))
     {
@@ -6012,13 +5978,6 @@ nv_left(cap)
 					       && cap->oap->op_type == OP_NOP)
 	foldOpenCursor();
 #endif
-#ifdef FEAT_CONCEAL
-    if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-    {
-	update_single_line(curwin, oldline);
-	update_single_line(curwin, curwin->w_cursor.lnum);
-    }
-#endif
 }
 
 /*
@@ -6037,21 +5996,11 @@ nv_up(cap)
     }
     else
     {
-#ifdef FEAT_CONCEAL
-	linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
 	cap->oap->motion_type = MLINE;
 	if (cursor_up(cap->count1, cap->oap->op_type == OP_NOP) == FAIL)
 	    clearopbeep(cap->oap);
 	else if (cap->arg)
 	    beginline(BL_WHITE | BL_FIX);
-#ifdef FEAT_CONCEAL
-	if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-	{
-	    update_single_line(curwin, oldline);
-	    update_single_line(curwin, curwin->w_cursor.lnum);
-	}
-#endif
     }
 }
 
@@ -6080,10 +6029,6 @@ nv_down(cap)
     else
 #endif
     {
-#ifdef FEAT_CONCEAL
-	linenr_T	oldline = curwin->w_cursor.lnum;
-	linenr_T	oldbotline = curwin->w_botline;
-#endif
 #ifdef FEAT_CMDWIN
 	/* In the cmdline window a <CR> executes the command. */
 	if (cmdwin_type != 0 && cap->cmdchar == CAR)
@@ -6096,16 +6041,6 @@ nv_down(cap)
 		clearopbeep(cap->oap);
 	    else if (cap->arg)
 		beginline(BL_WHITE | BL_FIX);
-#ifdef FEAT_CONCEAL
-	    if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-	    {
-		update_single_line(curwin, oldline);
-		/* Don't do this if we've scrolled, the line is already
-		 * drawn */
-		if (oldbotline == curwin->w_botline)
-		    update_single_line(curwin, curwin->w_cursor.lnum);
-	    }
-#endif
 	}
     }
 }
@@ -6664,7 +6599,7 @@ nv_percent(cap)
     cmdarg_T	*cap;
 {
     pos_T	*pos;
-#if defined(FEAT_FOLDING) || defined(FEAT_CONCEAL)
+#if defined(FEAT_FOLDING)
     linenr_T	lnum = curwin->w_cursor.lnum;
 #endif
 
@@ -6716,13 +6651,6 @@ nv_percent(cap)
 	    && KeyTyped)
 	foldOpenCursor();
 #endif
-#ifdef FEAT_CONCEAL
-	if (curwin->w_p_conceal && lnum != curwin->w_cursor.lnum)
-	{
-	    update_single_line(curwin, lnum);
-	    update_single_line(curwin, curwin->w_cursor.lnum);
-	}
-#endif
 }
 
 /*
@@ -6777,9 +6705,6 @@ nv_mark(cap)
 nv_findpar(cap)
     cmdarg_T	*cap;
 {
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
     cap->oap->motion_type = MCHAR;
     cap->oap->inclusive = FALSE;
     cap->oap->use_reg_one = TRUE;
@@ -6795,13 +6720,6 @@ nv_findpar(cap)
 	if ((fdo_flags & FDO_BLOCK) && KeyTyped && cap->oap->op_type == OP_NOP)
 	    foldOpenCursor();
 #endif
-#ifdef FEAT_CONCEAL
-	if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-	{
-	    update_single_line(curwin, oldline);
-	    update_single_line(curwin, curwin->w_cursor.lnum);
-	}
-#endif
     }
 }
 
@@ -7723,9 +7641,6 @@ nv_g_cmd(cap)
 #endif
     int		i;
     int		flag = FALSE;
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline;
-#endif
 
     switch (cap->nchar)
     {
@@ -7867,9 +7782,6 @@ nv_g_cmd(cap)
     case K_DOWN:
 	/* with 'nowrap' it works just like the normal "j" command; also when
 	 * in a closed fold */
-#ifdef FEAT_CONCEAL
-	oldline = curwin->w_cursor.lnum;
-#endif
 	if (!curwin->w_p_wrap
 #ifdef FEAT_FOLDING
 		|| hasFolding(curwin->w_cursor.lnum, NULL, NULL)
@@ -7883,22 +7795,12 @@ nv_g_cmd(cap)
 	    i = nv_screengo(oap, FORWARD, cap->count1);
 	if (i == FAIL)
 	    clearopbeep(oap);
-#ifdef FEAT_CONCEAL
-	else if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-	{
-	    update_single_line(curwin, oldline);
-	    update_single_line(curwin, curwin->w_cursor.lnum);
-	}
-#endif
 	break;
 
     case 'k':
     case K_UP:
 	/* with 'nowrap' it works just like the normal "k" command; also when
 	 * in a closed fold */
-#ifdef FEAT_CONCEAL
-	oldline = curwin->w_cursor.lnum;
-#endif
 	if (!curwin->w_p_wrap
 #ifdef FEAT_FOLDING
 		|| hasFolding(curwin->w_cursor.lnum, NULL, NULL)
@@ -7912,13 +7814,6 @@ nv_g_cmd(cap)
 	    i = nv_screengo(oap, BACKWARD, cap->count1);
 	if (i == FAIL)
 	    clearopbeep(oap);
-#ifdef FEAT_CONCEAL
-	else if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-	{
-	    update_single_line(curwin, oldline);
-	    update_single_line(curwin, curwin->w_cursor.lnum);
-	}
-#endif
 	break;
 
     /*
@@ -8545,9 +8440,6 @@ nv_pipe(cap)
 nv_bck_word(cap)
     cmdarg_T	*cap;
 {
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
     cap->oap->motion_type = MCHAR;
     cap->oap->inclusive = FALSE;
     curwin->w_set_curswant = TRUE;
@@ -8557,13 +8449,6 @@ nv_bck_word(cap)
     else if ((fdo_flags & FDO_HOR) && KeyTyped && cap->oap->op_type == OP_NOP)
 	foldOpenCursor();
 #endif
-#ifdef FEAT_CONCEAL
-    if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-    {
-	update_single_line(curwin, oldline);
-	update_single_line(curwin, curwin->w_cursor.lnum);
-    }
-#endif
 }
 
 /*
@@ -8578,9 +8463,6 @@ nv_wordcmd(cap)
     int		word_end;
     int		flag = FALSE;
     pos_T	startpos = curwin->w_cursor;
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = startpos.lnum;
-#endif
 
     /*
      * Set inclusive for the "E" and "e" command.
@@ -8658,13 +8540,6 @@ nv_wordcmd(cap)
 	    foldOpenCursor();
 #endif
     }
-#ifdef FEAT_CONCEAL
-    if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-    {
-	update_single_line(curwin, oldline);
-	update_single_line(curwin, curwin->w_cursor.lnum);
-    }
-#endif
 }
 
 /*
@@ -8827,10 +8702,6 @@ nv_goto(cap)
     if ((fdo_flags & FDO_JUMP) && KeyTyped && cap->oap->op_type == OP_NOP)
 	foldOpenCursor();
 #endif
-#ifdef FEAT_CONCEAL
-    if (curwin->w_p_conceal)
-	changed_window_setting();
-#endif
 }
 
 /*
@@ -9256,9 +9127,6 @@ nv_put(cap)
     int		empty = FALSE;
     int		was_visual = FALSE;
 #endif
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
     int		dir;
     int		flags = 0;
 
@@ -9378,13 +9246,6 @@ nv_put(cap)
 	}
 #endif
 	auto_format(FALSE, TRUE);
-#ifdef FEAT_CONCEAL
-	if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-	{
-	    update_single_line(curwin, oldline);
-	    update_single_line(curwin, curwin->w_cursor.lnum);
-	}
-#endif
     }
 }
 
--- a/src/search.c
+++ b/src/search.c
@@ -1077,9 +1077,6 @@ do_search(oap, dirc, pat, count, options
     char_u	    *dircp;
     char_u	    *strcopy = NULL;
     char_u	    *ps;
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
 
     /*
      * A line offset is not remembered, this is vi compatible.
@@ -1425,13 +1422,6 @@ do_search(oap, dirc, pat, count, options
 	setpcmark();
     curwin->w_cursor = pos;
     curwin->w_set_curswant = TRUE;
-#ifdef FEAT_CONCEAL
-    if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-    {
-	update_single_line(curwin, oldline);
-	update_single_line(curwin, curwin->w_cursor.lnum);
-    }
-#endif
 
 end_do_search:
     if (options & SEARCH_KEEP)
--- a/src/undo.c
+++ b/src/undo.c
@@ -1551,7 +1551,7 @@ u_read_undo(name, hash, orig_name)
     int		num_head = 0;
     long	old_header_seq, new_header_seq, cur_header_seq;
     long	seq_last, seq_cur;
-    long_u	last_save_nr = 0;
+    long	last_save_nr = 0;
     short	old_idx = -1, new_idx = -1, cur_idx = -1;
     long	num_read_uhps = 0;
     time_t	seq_time;
@@ -2662,6 +2662,18 @@ u_undo_end(did_undo, absolute)
     else
 	u_add_time(msgbuf, sizeof(msgbuf), uhp->uh_time);
 
+#ifdef FEAT_CONCEAL
+    {
+	win_T	*wp;
+
+	FOR_ALL_WINDOWS(wp)
+	{
+	    if (wp->w_buffer == curbuf && wp->w_p_conceal)
+		redraw_win_later(wp, NOT_VALID);
+	}
+    }
+#endif
+
     smsg((char_u *)_("%ld %s; %s #%ld  %s"),
 	    u_oldcount < 0 ? -u_oldcount : u_oldcount,
 	    _(msgstr),
@@ -3230,7 +3242,7 @@ u_eval_tree(first_uhp, list)
 	if (dict == NULL)
 	    return;
 	dict_add_nr_str(dict, "seq", uhp->uh_seq, NULL);
-	dict_add_nr_str(dict, "time", uhp->uh_time, NULL);
+	dict_add_nr_str(dict, "time", (long)uhp->uh_time, NULL);
 	if (uhp == curbuf->b_u_newhead)
 	    dict_add_nr_str(dict, "newhead", 1, NULL);
 	if (uhp == curbuf->b_u_curhead)