summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-09-20 14:38:13 +0200
committerBram Moolenaar <Bram@vim.org>2019-09-20 14:38:13 +0200
commit589edb340454e7f1b19358f129287a636d53d0e1 (patch)
tree1b91750b013c59c0e970d77ac8300350c593f755 /runtime
parent56ebbabea1d8409ba67127b9674f6c714739c8e0 (diff)
Updte runtime files
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/autocmd.txt10
-rw-r--r--runtime/doc/eval.txt45
-rw-r--r--runtime/doc/options.txt6
-rw-r--r--runtime/doc/repeat.txt6
-rw-r--r--runtime/doc/syntax.txt12
-rw-r--r--runtime/doc/tags7
-rw-r--r--runtime/doc/terminal.txt8
-rw-r--r--runtime/doc/todo.txt29
-rw-r--r--runtime/pack/dist/opt/termdebug/plugin/termdebug.vim145
-rw-r--r--runtime/plugin/netrwPlugin.vim10
-rw-r--r--runtime/syntax/json.vim6
11 files changed, 168 insertions, 116 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 85a5547449..95618e659f 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt* For Vim version 8.1. Last change: 2019 Jun 26
+*autocmd.txt* For Vim version 8.1. Last change: 2019 Sep 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -581,7 +581,7 @@ ColorScheme After loading a color scheme. |:colorscheme|
ColorSchemePre Before loading a color scheme. |:colorscheme|
Useful to setup removing things added by a
color scheme, before another one is loaded.
-CompleteChanged *CompleteChanged*
+CompleteChanged *CompleteChanged*
After each time the Insert mode completion
menu changed. Not fired on popup menu hide,
use |CompleteDone| for that. Never triggered
@@ -1117,8 +1117,8 @@ TextYankPost After text has been yanked or deleted in the
current buffer. The following values of
|v:event| can be used to determine the operation
that triggered this autocmd:
- operator The operation performed.
- regcontents Text that was stored in the
+ operator The operation performed.
+ regcontents Text that was stored in the
register, as a list of lines,
like with: >
getreg(r, 1, 1)
@@ -1154,7 +1154,7 @@ VimEnter After doing all the startup stuff, including
if v:vim_did_enter
call s:init()
else
- au VimEnter * call s:init()
+ au VimEnter * call s:init()
endif
< *VimLeave*
VimLeave Before exiting Vim, just after writing the
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 0621966659..6bbfa26d68 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 8.1. Last change: 2019 Sep 15
+*eval.txt* For Vim version 8.1. Last change: 2019 Sep 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2595,7 +2595,7 @@ or({expr}, {expr}) Number bitwise OR
pathshorten({expr}) String shorten directory names in a path
perleval({expr}) any evaluate |Perl| expression
popup_atcursor({what}, {options}) Number create popup window near the cursor
-popup_beval({what}, {options}) Number create popup window for 'ballooneval'
+popup_beval({what}, {options}) Number create popup window for 'ballooneval'
popup_clear() none close all popup windows
popup_close({id} [, {result}]) none close popup window {id}
popup_create({what}, {options}) Number create a popup window
@@ -9048,31 +9048,36 @@ state([{what}]) *state()*
current state. Mostly useful in callbacks that want to do
work that may not always be safe. Roughly this works like:
- callback uses state() to check if work is safe to do.
- If yes, then do it right away.
- Otherwise add to work queue and add SafeState and/or
- SafeStateAgain autocommand.
- - When SafeState or SafeStateAgain is triggered, check with
- state() if the work can be done now, and if yes remove it
- from the queue and execute.
+ Yes: then do it right away.
+ No: add to work queue and add a |SafeState| and/or
+ |SafeStateAgain| autocommand (|SafeState| triggers at
+ toplevel, |SafeStateAgain| triggers after handling
+ messages and callbacks).
+ - When SafeState or SafeStateAgain is triggered and executes
+ your autocommand, check with `state()` if the work can be
+ done now, and if yes remove it from the queue and execute.
+ Remove the autocommand if the queue is now empty.
Also see |mode()|.
When {what} is given only characters in this string will be
added. E.g, this checks if the screen has scrolled: >
- if state('s') != ''
+ if state('s') == ''
+ " screen has not scrolled
<
These characters indicate the state, generally indicating that
something is busy:
- m halfway a mapping, :normal command, feedkeys() or
- stuffed command
- o operator pending or waiting for a command argument
- a Insert mode autocomplete active
- x executing an autocommand
- w blocked on waiting, e.g. ch_evalexpr() and
- ch_read(), ch_readraw() when reading json.
- S not triggering SafeState or SafeStateAgain
- c callback invoked, including timer (repeats for
- recursiveness up to "ccc")
- s screen has scrolled for messages
+ m halfway a mapping, :normal command, feedkeys() or
+ stuffed command
+ o operator pending or waiting for a command argument,
+ e.g. after |f|
+ a Insert mode autocomplete active
+ x executing an autocommand
+ w blocked on waiting, e.g. ch_evalexpr() and
+ ch_read(), ch_readraw() when reading json.
+ S not triggering SafeState or SafeStateAgain
+ c callback invoked, including timer (repeats for
+ recursiveness up to "ccc")
+ s screen has scrolled for messages
str2float({expr}) *str2float()*
Convert String {expr} to a Float. This mostly works the same
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 4890a986c3..9f3d1dae67 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 8.1. Last change: 2019 Sep 09
+*options.txt* For Vim version 8.1. Last change: 2019 Sep 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -8565,8 +8565,8 @@ A jump table for the options with a short description can be found at |Q_op|.
":map <BS> X" to make backspace delete the character in front of the
cursor.
When 'l' is included and it is used after an operator at the end of a
- line then it will not move to the next line. This makes "dl", "cl",
- "yl" etc. work normally.
+ line (not an empty line) then it will not move to the next line. This
+ makes "dl", "cl", "yl" etc. work normally.
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.
diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt
index b5664728bc..8dd506a3d9 100644
--- a/runtime/doc/repeat.txt
+++ b/runtime/doc/repeat.txt
@@ -1,4 +1,4 @@
-*repeat.txt* For Vim version 8.1. Last change: 2019 Jun 14
+*repeat.txt* For Vim version 8.1. Last change: 2019 Sep 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -219,10 +219,10 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
When {file} contains wildcards it is expanded to all
matching files. Example: >
- :runtime! plugin/*.vim
+ :runtime! plugin/**/*.vim
< This is what Vim uses to load the plugin files when
starting up. This similar command: >
- :runtime plugin/*.vim
+ :runtime plugin/**/*.vim
< would source the first file only.
When 'verbose' is one or higher, there is a message
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 0fd9769c6a..6365e3622c 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 8.1. Last change: 2019 Jul 15
+*syntax.txt* For Vim version 8.1. Last change: 2019 Sep 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1923,6 +1923,16 @@ displayed line. The default value is 10. The disadvantage of using a larger
number is that redrawing can become slow.
+JSON *json.vim* *ft-json-syntax*
+
+The json syntax file provides syntax highlighting with conceal support by
+default. To disable concealment: >
+ let g:vim_json_conceal = 0
+
+To disable syntax highlighting of errors: >
+ let g:vim_json_warnings = 0
+
+
LACE *lace.vim* *ft-lace-syntax*
Lace (Language for Assembly of Classes in Eiffel) is case insensitive, but the
diff --git a/runtime/doc/tags b/runtime/doc/tags
index ab0215e7e0..a7f899b0d3 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -312,6 +312,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'go-a' options.txt /*'go-a'*
'go-b' options.txt /*'go-b'*
'go-c' options.txt /*'go-c'*
+'go-d' options.txt /*'go-d'*
'go-e' options.txt /*'go-e'*
'go-f' options.txt /*'go-f'*
'go-g' options.txt /*'go-g'*
@@ -5003,6 +5004,8 @@ S change.txt /*S*
SHELL starting.txt /*SHELL*
SQLGetType ft_sql.txt /*SQLGetType*
SQLSetType ft_sql.txt /*SQLSetType*
+SafeState autocmd.txt /*SafeState*
+SafeStateAgain autocmd.txt /*SafeStateAgain*
Select visual.txt /*Select*
Select-mode visual.txt /*Select-mode*
Select-mode-mapping visual.txt /*Select-mode-mapping*
@@ -6425,6 +6428,7 @@ ft-ia64-syntax syntax.txt /*ft-ia64-syntax*
ft-inform-syntax syntax.txt /*ft-inform-syntax*
ft-java-syntax syntax.txt /*ft-java-syntax*
ft-javascript-omni insert.txt /*ft-javascript-omni*
+ft-json-syntax syntax.txt /*ft-json-syntax*
ft-ksh-syntax syntax.txt /*ft-ksh-syntax*
ft-lace-syntax syntax.txt /*ft-lace-syntax*
ft-lex-syntax syntax.txt /*ft-lex-syntax*
@@ -7411,6 +7415,7 @@ join() eval.txt /*join()*
js_decode() eval.txt /*js_decode()*
js_encode() eval.txt /*js_encode()*
jsbterm-mouse options.txt /*jsbterm-mouse*
+json.vim syntax.txt /*json.vim*
json_decode() eval.txt /*json_decode()*
json_encode() eval.txt /*json_encode()*
jtags tagsrch.txt /*jtags*
@@ -8646,6 +8651,7 @@ scriptversion eval.txt /*scriptversion*
scriptversion-1 eval.txt /*scriptversion-1*
scriptversion-2 eval.txt /*scriptversion-2*
scriptversion-3 eval.txt /*scriptversion-3*
+scriptversion-4 eval.txt /*scriptversion-4*
scroll-binding scroll.txt /*scroll-binding*
scroll-cursor scroll.txt /*scroll-cursor*
scroll-down scroll.txt /*scroll-down*
@@ -8925,6 +8931,7 @@ starting.txt starting.txt /*starting.txt*
startup starting.txt /*startup*
startup-options starting.txt /*startup-options*
startup-terminal term.txt /*startup-terminal*
+state() eval.txt /*state()*
static-tag tagsrch.txt /*static-tag*
status-line windows.txt /*status-line*
statusmsg-variable eval.txt /*statusmsg-variable*
diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt
index b6fba8b389..c0caa67971 100644
--- a/runtime/doc/terminal.txt
+++ b/runtime/doc/terminal.txt
@@ -1,4 +1,4 @@
-*terminal.txt* For Vim version 8.1. Last change: 2019 Sep 08
+*terminal.txt* For Vim version 8.1. Last change: 2019 Sep 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1225,8 +1225,10 @@ gdb:
`:Run` [args] run the program with [args] or the previous arguments
`:Arguments` {args} set arguments for the next `:Run`
- *:Break* set a breakpoint at the current line; a sign will be displayed
- *:Clear* delete the breakpoint at the current line
+ *:Break* set a breakpoint at the cursor position
+ :Break {position}
+ set a breakpoint at the specified position
+ *:Clear* delete the breakpoint at the cursor position
*:Step* execute the gdb "step" command
*:Over* execute the gdb "next" command (`:Next` is a Vim command)
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 754f09cde7..b2dea421ae 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 8.1. Last change: 2019 Sep 10
+*todo.txt* For Vim version 8.1. Last change: 2019 Sep 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,9 +38,21 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------
-Split off part of option.c: #4918
+Add test for state().
+Add test for using SafeState and SafeStateAgain autocommand.
+Then plugin can:
+- When callback is invoked and state() returns non-empty, add to work queue
+- When SafeState autocommand event triggers, process work queue
+
+Fix for "x" should be done by fixing "dl" ? 8.1.2052
+
+'completeopt' "popup" variant that uses a callback after the popup has been
+created, so the contents can be changed. Make it hidden, callback
+or later has to make it visible. #4924 Setting the buffer contents later
+doesn't work well.
Popup windows:
+- Use popup (or popup menu) for command line completion
- Implement flip option
- Why does 'nrformats' leak from the popup window buffer???
Happens in Test_simple_popup() at the second screendump.
@@ -130,6 +142,11 @@ E278, E279, E290, E292, E362, E366, E450, E451, E452,
E453, E454, E460, E489, E491, E565, E578, E610, E611, E653,
E654, E856, E857, E860, E861, E863, E889, E900
+Improve running tests on MS-Windows: #4922
+
+Patch to properly break CJK lines: #3875
+Ready to include now?
+
Remove check for cmd_silent when calling search_stat()? (Gary Johnson)
undo result wrong: Masato Nishihata, #4798
@@ -510,9 +527,6 @@ Further xdiff changes:
Difference between two regexp engines: #3373
-Patch to properly break CJK lines: #3875
-Requires more tests. dbcs_ functions are not implemented.
-
Patch to add ch_listen() (Yasuhiro Matsumoto, 2018 Nov 26, #3639)
What is the practical use for this?
@@ -783,7 +797,7 @@ Problem with 'delcombine'. (agguser, 2017 Nov 10, #2313)
MS-Windows: buffer completion doesn't work when using backslash (or slash)
for a path separator. (xtal8, #2201)
-Would be nice for insert mode completion to highlight the text that was added
+Would be nice for Insert mode completion to highlight the text that was added
(and may change when picking another completion).
Test runtime files.
@@ -1894,9 +1908,6 @@ Syntax region with 'concealends' and a 'cchar' value, 'conceallevel' set to 2,
only one of the two ends gets the cchar displayed. (Brett Stahlman, 2010 Aug
21, Ben Fritz, 2010 Sep 14)
-'cursorline' works on a text line only. Add 'cursorscreenline' for
-highlighting the screen line. (Christian Brabandt, 2012 Mar 31)
-
Win32: Patch to use task dialogs when available. (Sergiu Dotenco, 2011 Sep 17)
New feature, requires testing. Made some remarks.
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
index 26a0ebdaea..8629eb88c0 100644
--- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
+++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
@@ -156,9 +156,9 @@ endfunc
func s:StartDebug_term(dict)
" Open a terminal window without a job, to run the debugged program in.
let s:ptybuf = term_start('NONE', {
- \ 'term_name': 'debugged program',
- \ 'vertical': s:vertical,
- \ })
+ \ 'term_name': 'debugged program',
+ \ 'vertical': s:vertical,
+ \ })
if s:ptybuf == 0
echoerr 'Failed to open the program terminal window'
return
@@ -177,10 +177,10 @@ func s:StartDebug_term(dict)
" Create a hidden terminal window to communicate with gdb
let s:commbuf = term_start('NONE', {
- \ 'term_name': 'gdb communication',
- \ 'out_cb': function('s:CommOutput'),
- \ 'hidden': 1,
- \ })
+ \ 'term_name': 'gdb communication',
+ \ 'out_cb': function('s:CommOutput'),
+ \ 'hidden': 1,
+ \ })
if s:commbuf == 0
echoerr 'Failed to open the communication terminal window'
exe 'bwipe! ' . s:ptybuf
@@ -196,8 +196,8 @@ func s:StartDebug_term(dict)
let cmd = [g:termdebugger, '-quiet', '-tty', pty] + gdb_args
call ch_log('executing "' . join(cmd) . '"')
let s:gdbbuf = term_start(cmd, {
- \ 'term_finish': 'close',
- \ })
+ \ 'term_finish': 'close',
+ \ })
if s:gdbbuf == 0
echoerr 'Failed to open the gdb terminal window'
call s:CloseBuffers()
@@ -229,17 +229,17 @@ func s:StartDebug_term(dict)
let line1 = term_getline(s:gdbbuf, lnum)
let line2 = term_getline(s:gdbbuf, lnum + 1)
if line1 =~ 'new-ui mi '
- " response can be in the same line or the next line
- let response = line1 . line2
- if response =~ 'Undefined command'
- echoerr 'Sorry, your gdb is too old, gdb 7.12 is required'
+ " response can be in the same line or the next line
+ let response = line1 . line2
+ if response =~ 'Undefined command'
+ echoerr 'Sorry, your gdb is too old, gdb 7.12 is required'
call s:CloseBuffers()
- return
- endif
- if response =~ 'New UI allocated'
- " Success!
- break
- endif
+ return
+ endif
+ if response =~ 'New UI allocated'
+ " Success!
+ break
+ endif
elseif line1 =~ 'Reading symbols from' && line2 !~ 'new-ui mi '
" Reading symbols might take a while, try more times
let try_count -= 1
@@ -300,9 +300,9 @@ func s:StartDebug_prompt(dict)
call ch_log('executing "' . join(cmd) . '"')
let s:gdbjob = job_start(cmd, {
- \ 'exit_cb': function('s:EndPromptDebug'),
- \ 'out_cb': function('s:GdbOutCallback'),
- \ })
+ \ 'exit_cb': function('s:EndPromptDebug'),
+ \ 'out_cb': function('s:GdbOutCallback'),
+ \ })
if job_status(s:gdbjob) != "run"
echoerr 'Failed to start gdb'
exe 'bwipe! ' . s:promptbuf
@@ -327,8 +327,8 @@ func s:StartDebug_prompt(dict)
" Unix: Run the debugged program in a terminal window. Open it below the
" gdb window.
belowright let s:ptybuf = term_start('NONE', {
- \ 'term_name': 'debugged program',
- \ })
+ \ 'term_name': 'debugged program',
+ \ })
if s:ptybuf == 0
echoerr 'Failed to open the program terminal window'
call job_stop(s:gdbjob)
@@ -508,9 +508,14 @@ func s:DecodeMessage(quotedText)
if a:quotedText[i] == '\'
let i += 1
if a:quotedText[i] == 'n'
- " drop \n
- let i += 1
- continue
+ " drop \n
+ let i += 1
+ continue
+ elseif a:quotedText[i] == 't'
+ " append \t
+ let i += 1
+ let result .= "\t"
+ continue
endif
endif
let result .= a:quotedText[i]
@@ -594,28 +599,38 @@ func s:CommOutput(chan, msg)
endif
if msg != ''
if msg =~ '^\(\*stopped\|\*running\|=thread-selected\)'
- call s:HandleCursor(msg)
+ call s:HandleCursor(msg)
elseif msg =~ '^\^done,bkpt=' || msg =~ '^=breakpoint-created,'
- call s:HandleNewBreakpoint(msg)
+ call s:HandleNewBreakpoint(msg)
elseif msg =~ '^=breakpoint-deleted,'
- call s:HandleBreakpointDelete(msg)
+ call s:HandleBreakpointDelete(msg)
elseif msg =~ '^=thread-group-started'
- call s:HandleProgramRun(msg)
+ call s:HandleProgramRun(msg)
elseif msg =~ '^\^done,value='
- call s:HandleEvaluate(msg)
+ call s:HandleEvaluate(msg)
elseif msg =~ '^\^error,msg='
- call s:HandleError(msg)
+ call s:HandleError(msg)
endif
endif
endfor
endfunc
+func s:GotoProgram()
+ if has('win32')
+ if executable('powershell')
+ call system(printf('powershell -Command "add-type -AssemblyName microsoft.VisualBasic;[Microsoft.VisualBasic.Interaction]::AppActivate(%d);"', s:pid))
+ endif
+ else
+ win_gotoid(s:ptywin)
+ endif
+endfunc
+
" Install commands in the current window to control the debugger.
func s:InstallCommands()
let save_cpo = &cpo
set cpo&vim
- command Break call s:SetBreakpoint()
+ command -nargs=? Break call s:SetBreakpoint(<q-args>)
command Clear call s:ClearBreakpoint()
command Step call s:SendCommand('-exec-step')
command Over call s:SendCommand('-exec-next')
@@ -633,7 +648,7 @@ func s:InstallCommands()
command -range -nargs=* Evaluate call s:Evaluate(<range>, <q-args>)
command Gdb call win_gotoid(s:gdbwin)
- command Program call win_gotoid(s:ptywin)
+ command Program call s:GotoProgram()
command Source call s:GotoSourcewinOrCreateIt()
command Winbar call s:InstallWinbar()
@@ -695,12 +710,12 @@ func s:DeleteCommands()
let curwinid = win_getid(winnr())
for winid in s:winbar_winids
if win_gotoid(winid)
- aunmenu WinBar.Step
- aunmenu WinBar.Next
- aunmenu WinBar.Finish
- aunmenu WinBar.Cont
- aunmenu WinBar.Stop
- aunmenu WinBar.Eval
+ aunmenu WinBar.Step
+ aunmenu WinBar.Next
+ aunmenu WinBar.Finish
+ aunmenu WinBar.Cont
+ aunmenu WinBar.Stop
+ aunmenu WinBar.Eval
endif
endfor
call win_gotoid(curwinid)
@@ -733,7 +748,7 @@ func s:DeleteCommands()
endfunc
" :Break - Set a breakpoint at the cursor position.
-func s:SetBreakpoint()
+func s:SetBreakpoint(at)
" Setting a breakpoint may not work while the program is running.
" Interrupt to make it work.
let do_continue = 0
@@ -746,9 +761,11 @@ func s:SetBreakpoint()
endif
sleep 10m
endif
+
" Use the fname:lnum format, older gdb can't handle --source.
- call s:SendCommand('-break-insert '
- \ . fnameescape(expand('%:p')) . ':' . line('.'))
+ let at = empty(a:at) ?
+ \ fnameescape(expand('%:p')) . ':' . line('.') : a:at
+ call s:SendCommand('-break-insert ' . at)
if do_continue
call s:SendCommand('-exec-continue')
endif
@@ -763,14 +780,14 @@ func s:ClearBreakpoint()
let idx = 0
for id in s:breakpoint_locations[bploc]
if has_key(s:breakpoints, id)
- " Assume this always works, the reply is simply "^done".
- call s:SendCommand('-break-delete ' . id)
- for subid in keys(s:breakpoints[id])
- exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid)
- endfor
- unlet s:breakpoints[id]
- unlet s:breakpoint_locations[bploc][idx]
- break
+ " Assume this always works, the reply is simply "^done".
+ call s:SendCommand('-break-delete ' . id)
+ for subid in keys(s:breakpoints[id])
+ exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid)
+ endfor
+ unlet s:breakpoints[id]
+ unlet s:breakpoint_locations[bploc][idx]
+ break
else
let idx += 1
endif
@@ -899,14 +916,14 @@ func s:HandleCursor(msg)
if lnum =~ '^[0-9]*$'
call s:GotoSourcewinOrCreateIt()
if expand('%:p') != fnamemodify(fname, ':p')
- if &modified
- " TODO: find existing window
- exe 'split ' . fnameescape(fname)
- let s:sourcewin = win_getid(winnr())
- call s:InstallWinbar()
- else
- exe 'edit ' . fnameescape(fname)
- endif
+ if &modified
+ " TODO: find existing window
+ exe 'split ' . fnameescape(fname)
+ let s:sourcewin = win_getid(winnr())
+ call s:InstallWinbar()
+ else
+ exe 'edit ' . fnameescape(fname)
+ endif
endif
exe lnum
exe 'sign unplace ' . s:pc_id
@@ -1001,8 +1018,8 @@ func s:HandleBreakpointDelete(msg)
if has_key(s:breakpoints, id)
for [subid, entry] in items(s:breakpoints[id])
if has_key(entry, 'placed')
- exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid)
- unlet entry['placed']
+ exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid)
+ unlet entry['placed']
endif
endfor
unlet s:breakpoints[id]
@@ -1026,7 +1043,7 @@ func s:BufRead()
for [id, entries] in items(s:breakpoints)
for [subid, entry] in items(entries)
if entry['fname'] == fname
- call s:PlaceSign(id, subid, entry)
+ call s:PlaceSign(id, subid, entry)
endif
endfor
endfor
@@ -1038,7 +1055,7 @@ func s:BufUnloaded()
for [id, entries] in items(s:breakpoints)
for [subid, entry] in items(entries)
if entry['fname'] == fname
- let entry['placed'] = 0
+ let entry['placed'] = 0
endif
endfor
endfor
diff --git a/runtime/plugin/netrwPlugin.vim b/runtime/plugin/netrwPlugin.vim
index e39bde88a7..d565929969 100644
--- a/runtime/plugin/netrwPlugin.vim
+++ b/runtime/plugin/netrwPlugin.vim
@@ -1,6 +1,6 @@
" netrwPlugin.vim: Handles file transfer and remote directory listing across a network
" PLUGIN SECTION
-" Date: Feb 08, 2016
+" Date: Feb 08, 2016 (update for gx 2019 Sep 20)
" Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 1999-2013 Charles E. Campbell {{{1
@@ -47,9 +47,9 @@ augroup Network
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(1,expand("<amatch>"))|exe "sil doau FileReadPost ".fnameescape(expand("<amatch>"))
au BufWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufWritePre ".fnameescape(expand("<amatch>"))|exe 'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau BufWritePost ".fnameescape(expand("<amatch>"))
au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileWritePre ".fnameescape(expand("<amatch>"))|exe "'[,']".'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau FileWritePost ".fnameescape(expand("<amatch>"))
- try
+ try
au SourceCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
- catch /^Vim\%((\a\+)\)\=:E216/
+ catch /^Vim\%((\a\+)\)\=:E216/
au SourcePre ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
endtry
augroup END
@@ -81,7 +81,7 @@ if !exists("g:netrw_nogx")
if !hasmapto('<Plug>NetrwBrowseX')
nmap <unique> gx <Plug>NetrwBrowseX
endif
- nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(netrw#GX(),netrw#CheckIfRemote(netrw#GX()))<cr>
+ nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '<cfile>')),netrw#CheckIfRemote())<cr>
endif
if maparg('gx','v') == ""
if !hasmapto('<Plug>NetrwBrowseXVis')
@@ -103,7 +103,7 @@ fun! s:LocalBrowse(dirname)
" Unfortunate interaction -- only DechoMsg debugging calls can be safely used here.
" Otherwise, the BufEnter event gets triggered when attempts to write to
" the DBG buffer are made.
-
+
if !exists("s:vimentered")
" If s:vimentered doesn't exist, then the VimEnter event hasn't fired. It will,
" and so s:VimEnter() will then be calling this routine, but this time with s:vimentered defined.
diff --git a/runtime/syntax/json.vim b/runtime/syntax/json.vim
index e3210a9702..3f49b0c5ea 100644
--- a/runtime/syntax/json.vim
+++ b/runtime/syntax/json.vim
@@ -2,7 +2,7 @@
" Language: JSON
" Maintainer: vacancy
" Previous Maintainer: Eli Parra <eli@elzr.com>
-" Last Change: 2019 Jul 08
+" Last Change: 2019 Sep 17
" Version: 0.12
if !exists("main_syntax")
@@ -20,7 +20,7 @@ syntax match jsonNoise /\%(:\|,\)/
" Syntax: JSON Keywords
" Separated into a match and region because a region by itself is always greedy
syn match jsonKeywordMatch /"\([^"]\|\\\"\)\+"[[:blank:]\r\n]*\:/ contains=jsonKeyword
-if has('conceal')
+if has('conceal') && (!exists("g:vim_json_conceal") || g:vim_json_conceal==1)
syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ concealends contained
else
syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ contained
@@ -31,7 +31,7 @@ endif
" Needs to come after keywords or else a json encoded string will break the
" syntax
syn match jsonStringMatch /"\([^"]\|\\\"\)\+"\ze[[:blank:]\r\n]*[,}\]]/ contains=jsonString
-if has('conceal')
+if has('conceal') && (!exists("g:vim_json_conceal") || g:vim_json_conceal==1)
syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ concealends contains=jsonEscape contained
else
syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=jsonEscape contained