mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:6304be625ce4 (#16450)
Update runtime files.
6304be625c
skip doc/sign.txt (needs 8.2.3664)
This commit is contained in:
parent
b51b0aecc9
commit
03d250eb45
@ -8552,6 +8552,7 @@ setbufline({buf}, {lnum}, {text}) *setbufline()*
|
|||||||
For the use of {buf}, see |bufname()| above.
|
For the use of {buf}, see |bufname()| above.
|
||||||
|
|
||||||
{lnum} is used like with |setline()|.
|
{lnum} is used like with |setline()|.
|
||||||
|
Use "$" to refer to the last line in buffer {buf}.
|
||||||
When {lnum} is just below the last line the {text} will be
|
When {lnum} is just below the last line the {text} will be
|
||||||
added below the last line.
|
added below the last line.
|
||||||
On success 0 is returned, on failure 1 is returned.
|
On success 0 is returned, on failure 1 is returned.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
" Acknowledgement: Based off of vim-jsonc maintained by Kevin Locke <kevin@kevinlocke.name>
|
" Acknowledgement: Based off of vim-jsonc maintained by Kevin Locke <kevin@kevinlocke.name>
|
||||||
" https://github.com/kevinoid/vim-jsonc
|
" https://github.com/kevinoid/vim-jsonc
|
||||||
" License: MIT
|
" License: MIT
|
||||||
" Last Change: 2021-07-01
|
" Last Change: 2021 Nov 22
|
||||||
|
|
||||||
runtime! ftplugin/json.vim
|
runtime! ftplugin/json.vim
|
||||||
|
|
||||||
@ -14,14 +14,8 @@ else
|
|||||||
let b:did_ftplugin_jsonc = 1
|
let b:did_ftplugin_jsonc = 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" A list of commands that undo buffer local changes made below.
|
|
||||||
let s:undo_ftplugin = []
|
|
||||||
|
|
||||||
" Set comment (formatting) related options. {{{1
|
" Set comment (formatting) related options. {{{1
|
||||||
setlocal commentstring=//%s comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
|
setlocal commentstring=//%s comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
|
||||||
call add(s:undo_ftplugin, 'commentstring< comments<')
|
|
||||||
|
|
||||||
" Let Vim know how to disable the plug-in.
|
" Let Vim know how to disable the plug-in.
|
||||||
call map(s:undo_ftplugin, "'execute ' . string(v:val)")
|
let b:undo_ftplugin = 'setlocal commentstring< comments<'
|
||||||
let b:undo_ftplugin = join(s:undo_ftplugin, ' | ')
|
|
||||||
unlet s:undo_ftplugin
|
|
||||||
|
175
runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
vendored
175
runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
vendored
@ -2,7 +2,7 @@
|
|||||||
"
|
"
|
||||||
" Author: Bram Moolenaar
|
" Author: Bram Moolenaar
|
||||||
" Copyright: Vim license applies, see ":help license"
|
" Copyright: Vim license applies, see ":help license"
|
||||||
" Last Change: 2021 Nov 21
|
" Last Change: 2021 Nov 27
|
||||||
"
|
"
|
||||||
" WORK IN PROGRESS - Only the basics work
|
" WORK IN PROGRESS - Only the basics work
|
||||||
" Note: On MS-Windows you need a recent version of gdb. The one included with
|
" Note: On MS-Windows you need a recent version of gdb. The one included with
|
||||||
@ -102,6 +102,7 @@ endfunc
|
|||||||
|
|
||||||
call s:Highlight(1, '', &background)
|
call s:Highlight(1, '', &background)
|
||||||
hi default debugBreakpoint term=reverse ctermbg=red guibg=red
|
hi default debugBreakpoint term=reverse ctermbg=red guibg=red
|
||||||
|
hi default debugBreakpointDisabled term=reverse ctermbg=gray guibg=gray
|
||||||
|
|
||||||
func s:StartDebug(bang, ...)
|
func s:StartDebug(bang, ...)
|
||||||
" First argument is the command to debug, second core file or process ID.
|
" First argument is the command to debug, second core file or process ID.
|
||||||
@ -241,15 +242,29 @@ func s:StartDebug_term(dict)
|
|||||||
let comm_job_info = nvim_get_chan_info(s:comm_job_id)
|
let comm_job_info = nvim_get_chan_info(s:comm_job_id)
|
||||||
let commpty = comm_job_info['pty']
|
let commpty = comm_job_info['pty']
|
||||||
|
|
||||||
" Open a terminal window to run the debugger.
|
|
||||||
" Add -quiet to avoid the intro message causing a hit-enter prompt.
|
|
||||||
let gdb_args = get(a:dict, 'gdb_args', [])
|
let gdb_args = get(a:dict, 'gdb_args', [])
|
||||||
let proc_args = get(a:dict, 'proc_args', [])
|
let proc_args = get(a:dict, 'proc_args', [])
|
||||||
|
|
||||||
let cmd = [g:termdebugger, '-quiet', '-tty', pty, '--eval-command', 'echo startupdone\n'] + gdb_args
|
let gdb_cmd = [g:termdebugger]
|
||||||
"call ch_log('executing "' . join(cmd) . '"')
|
" Add -quiet to avoid the intro message causing a hit-enter prompt.
|
||||||
|
let gdb_cmd += ['-quiet']
|
||||||
|
" Disable pagination, it causes everything to stop at the gdb
|
||||||
|
let gdb_cmd += ['-iex', 'set pagination off']
|
||||||
|
" Interpret commands while the target is running. This should usually only
|
||||||
|
" be exec-interrupt, since many commands don't work properly while the
|
||||||
|
" target is running (so execute during startup).
|
||||||
|
let gdb_cmd += ['-iex', 'set mi-async on']
|
||||||
|
" Open a terminal window to run the debugger.
|
||||||
|
let gdb_cmd += ['-tty', pty]
|
||||||
|
" Command executed _after_ startup is done, provides us with the necessary feedback
|
||||||
|
let gdb_cmd += ['-ex', 'echo startupdone\n']
|
||||||
|
|
||||||
|
" Adding arguments requested by the user
|
||||||
|
let gdb_cmd += gdb_args
|
||||||
|
|
||||||
execute 'new'
|
execute 'new'
|
||||||
let s:gdb_job_id = termopen(cmd, {'on_exit': function('s:EndTermDebug')})
|
" call ch_log('executing "' . join(gdb_cmd) . '"')
|
||||||
|
let s:gdb_job_id = termopen(gdb_cmd, {'on_exit': function('s:EndTermDebug')})
|
||||||
if s:gdb_job_id == 0
|
if s:gdb_job_id == 0
|
||||||
echoerr 'invalid argument (or job table is full) while opening gdb terminal window'
|
echoerr 'invalid argument (or job table is full) while opening gdb terminal window'
|
||||||
exe 'bwipe! ' . s:ptybuf
|
exe 'bwipe! ' . s:ptybuf
|
||||||
@ -272,8 +287,8 @@ func s:StartDebug_term(dict)
|
|||||||
|
|
||||||
for lnum in range(1, 200)
|
for lnum in range(1, 200)
|
||||||
if get(getbufline(s:gdbbuf, lnum), 0, '') =~ 'startupdone'
|
if get(getbufline(s:gdbbuf, lnum), 0, '') =~ 'startupdone'
|
||||||
let try_count = 9999
|
let try_count = 9999
|
||||||
break
|
break
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
let try_count += 1
|
let try_count += 1
|
||||||
@ -286,7 +301,7 @@ func s:StartDebug_term(dict)
|
|||||||
|
|
||||||
" Set arguments to be run.
|
" Set arguments to be run.
|
||||||
if len(proc_args)
|
if len(proc_args)
|
||||||
call chansend(s:gdb_job_id, 'set args ' . join(proc_args) . "\r")
|
call chansend(s:gdb_job_id, 'server set args ' . join(proc_args) . "\r")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Connect gdb to the communication pty, using the GDB/MI interface.
|
" Connect gdb to the communication pty, using the GDB/MI interface.
|
||||||
@ -310,6 +325,7 @@ func s:StartDebug_term(dict)
|
|||||||
let response = line1 . line2
|
let response = line1 . line2
|
||||||
if response =~ 'Undefined command'
|
if response =~ 'Undefined command'
|
||||||
echoerr 'Sorry, your gdb is too old, gdb 7.12 is required'
|
echoerr 'Sorry, your gdb is too old, gdb 7.12 is required'
|
||||||
|
" CHECKME: possibly send a "server show version" here
|
||||||
call s:CloseBuffers()
|
call s:CloseBuffers()
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
@ -333,17 +349,6 @@ func s:StartDebug_term(dict)
|
|||||||
sleep 10m
|
sleep 10m
|
||||||
endwhile
|
endwhile
|
||||||
|
|
||||||
" Interpret commands while the target is running. This should usually only be
|
|
||||||
" exec-interrupt, since many commands don't work properly while the target is
|
|
||||||
" running.
|
|
||||||
call s:SendCommand('-gdb-set mi-async on')
|
|
||||||
" Older gdb uses a different command.
|
|
||||||
call s:SendCommand('-gdb-set target-async on')
|
|
||||||
|
|
||||||
" Disable pagination, it causes everything to stop at the gdb
|
|
||||||
" "Type <return> to continue" prompt.
|
|
||||||
call s:SendCommand('set pagination off')
|
|
||||||
|
|
||||||
" Set the filetype, this can be used to add mappings.
|
" Set the filetype, this can be used to add mappings.
|
||||||
set filetype=termdebug
|
set filetype=termdebug
|
||||||
|
|
||||||
@ -371,14 +376,26 @@ func s:StartDebug_prompt(dict)
|
|||||||
exe (&columns / 2 - 1) . "wincmd |"
|
exe (&columns / 2 - 1) . "wincmd |"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Add -quiet to avoid the intro message causing a hit-enter prompt.
|
|
||||||
let gdb_args = get(a:dict, 'gdb_args', [])
|
let gdb_args = get(a:dict, 'gdb_args', [])
|
||||||
let proc_args = get(a:dict, 'proc_args', [])
|
let proc_args = get(a:dict, 'proc_args', [])
|
||||||
|
|
||||||
let cmd = [g:termdebugger, '-quiet', '--interpreter=mi2'] + gdb_args
|
let gdb_cmd = [g:termdebugger]
|
||||||
"call ch_log('executing "' . join(cmd) . '"')
|
" Add -quiet to avoid the intro message causing a hit-enter prompt.
|
||||||
|
let gdb_cmd += ['-quiet']
|
||||||
|
" Disable pagination, it causes everything to stop at the gdb, needs to be run early
|
||||||
|
let gdb_cmd += ['-iex', 'set pagination off']
|
||||||
|
" Interpret commands while the target is running. This should usually only
|
||||||
|
" be exec-interrupt, since many commands don't work properly while the
|
||||||
|
" target is running (so execute during startup).
|
||||||
|
let gdb_cmd += ['-iex', 'set mi-async on']
|
||||||
|
" directly communicate via mi2
|
||||||
|
let gdb_cmd += ['--interpreter=mi2']
|
||||||
|
|
||||||
let s:gdbjob = jobstart(cmd, {
|
" Adding arguments requested by the user
|
||||||
|
let gdb_cmd += gdb_args
|
||||||
|
|
||||||
|
" call ch_log('executing "' . join(gdb_cmd) . '"')
|
||||||
|
let s:gdbjob = jobstart(gdb_cmd, {
|
||||||
\ 'on_exit': function('s:EndPromptDebug'),
|
\ 'on_exit': function('s:EndPromptDebug'),
|
||||||
\ 'on_stdout': function('s:GdbOutCallback'),
|
\ 'on_stdout': function('s:GdbOutCallback'),
|
||||||
\ })
|
\ })
|
||||||
@ -392,13 +409,6 @@ func s:StartDebug_prompt(dict)
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Interpret commands while the target is running. This should usually only
|
|
||||||
" be exec-interrupt, since many commands don't work properly while the
|
|
||||||
" target is running.
|
|
||||||
call s:SendCommand('-gdb-set mi-async on')
|
|
||||||
" Older gdb uses a different command.
|
|
||||||
call s:SendCommand('-gdb-set target-async on')
|
|
||||||
|
|
||||||
let s:ptybuf = 0
|
let s:ptybuf = 0
|
||||||
if has('win32')
|
if has('win32')
|
||||||
" MS-Windows: run in a new console window for maximum compatibility
|
" MS-Windows: run in a new console window for maximum compatibility
|
||||||
@ -433,8 +443,6 @@ func s:StartDebug_prompt(dict)
|
|||||||
endif
|
endif
|
||||||
call s:SendCommand('set print pretty on')
|
call s:SendCommand('set print pretty on')
|
||||||
call s:SendCommand('set breakpoint pending on')
|
call s:SendCommand('set breakpoint pending on')
|
||||||
" Disable pagination, it causes everything to stop at the gdb
|
|
||||||
call s:SendCommand('set pagination off')
|
|
||||||
|
|
||||||
" Set arguments to be run
|
" Set arguments to be run
|
||||||
if len(proc_args)
|
if len(proc_args)
|
||||||
@ -516,6 +524,15 @@ func TermDebugSendCommand(cmd)
|
|||||||
endif
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
" Send a command only when stopped. Used for :Next and :Step.
|
||||||
|
func s:SendCommandIfStopped(cmd)
|
||||||
|
if s:stopped
|
||||||
|
call s:SendCommand(a:cmd)
|
||||||
|
" else
|
||||||
|
" call ch_log('dropping command, program is running: ' . a:cmd)
|
||||||
|
endif
|
||||||
|
endfunc
|
||||||
|
|
||||||
" Function called when entering a line in the prompt buffer.
|
" Function called when entering a line in the prompt buffer.
|
||||||
func s:PromptCallback(text)
|
func s:PromptCallback(text)
|
||||||
call s:SendCommand(a:text)
|
call s:SendCommand(a:text)
|
||||||
@ -584,32 +601,23 @@ func s:GdbOutCallback(job_id, msgs, event)
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Decode a message from gdb. quotedText starts with a ", return the text up
|
" Decode a message from gdb. quotedText starts with a ", return the text up
|
||||||
" to the next ", unescaping characters.
|
" to the next ", unescaping characters:
|
||||||
|
" - remove line breaks
|
||||||
|
" - change \\t to \t
|
||||||
|
" - change \0xhh to \xhh
|
||||||
|
" - change \ooo to octal
|
||||||
|
" - change \\ to \
|
||||||
func s:DecodeMessage(quotedText)
|
func s:DecodeMessage(quotedText)
|
||||||
if a:quotedText[0] != '"'
|
if a:quotedText[0] != '"'
|
||||||
echoerr 'DecodeMessage(): missing quote in ' . a:quotedText
|
echoerr 'DecodeMessage(): missing quote in ' . a:quotedText
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
let result = ''
|
return a:quotedText
|
||||||
let i = 1
|
\->substitute('^"\|".*\|\\n', '', 'g')
|
||||||
while a:quotedText[i] != '"' && i < len(a:quotedText)
|
\->substitute('\\t', "\t", 'g')
|
||||||
if a:quotedText[i] == '\'
|
\->substitute('\\0x\(\x\x\)', {-> eval('"\x' .. submatch(1) .. '"')}, 'g')
|
||||||
let i += 1
|
\->substitute('\\\o\o\o', {-> eval('"' .. submatch(0) .. '"')}, 'g')
|
||||||
if a:quotedText[i] == 'n'
|
\->substitute('\\\\', '\', 'g')
|
||||||
" 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]
|
|
||||||
let i += 1
|
|
||||||
endwhile
|
|
||||||
return result
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Extract the "name" value from a gdb message with fullname="name".
|
" Extract the "name" value from a gdb message with fullname="name".
|
||||||
@ -770,8 +778,10 @@ func s:CommOutput(job_id, msgs, event)
|
|||||||
elseif msg != ''
|
elseif msg != ''
|
||||||
if msg =~ '^\(\*stopped\|\*running\|=thread-selected\)'
|
if msg =~ '^\(\*stopped\|\*running\|=thread-selected\)'
|
||||||
call s:HandleCursor(msg)
|
call s:HandleCursor(msg)
|
||||||
elseif msg =~ '^\^done,bkpt=' || msg =~ '^=breakpoint-created,' || msg =~ '^=breakpoint-modified,'
|
elseif msg =~ '^\^done,bkpt=' || msg =~ '^=breakpoint-created,'
|
||||||
call s:HandleNewBreakpoint(msg)
|
call s:HandleNewBreakpoint(msg, 0)
|
||||||
|
elseif msg =~ '^=breakpoint-modified,'
|
||||||
|
call s:HandleNewBreakpoint(msg, 1)
|
||||||
elseif msg =~ '^=breakpoint-deleted,'
|
elseif msg =~ '^=breakpoint-deleted,'
|
||||||
call s:HandleBreakpointDelete(msg)
|
call s:HandleBreakpointDelete(msg)
|
||||||
elseif msg =~ '^=thread-group-started'
|
elseif msg =~ '^=thread-group-started'
|
||||||
@ -805,9 +815,9 @@ func s:InstallCommands()
|
|||||||
|
|
||||||
command -nargs=? Break call s:SetBreakpoint(<q-args>)
|
command -nargs=? Break call s:SetBreakpoint(<q-args>)
|
||||||
command Clear call s:ClearBreakpoint()
|
command Clear call s:ClearBreakpoint()
|
||||||
command Step call s:SendCommand('-exec-step')
|
command Step call s:SendCommandIfStopped('-exec-step')
|
||||||
command Over call s:SendCommand('-exec-next')
|
command Over call s:SendCommandIfStopped('-exec-next')
|
||||||
command Finish call s:SendCommand('-exec-finish')
|
command Finish call s:SendCommandIfStopped('-exec-finish')
|
||||||
command -nargs=* Run call s:Run(<q-args>)
|
command -nargs=* Run call s:Run(<q-args>)
|
||||||
command -nargs=* Arguments call s:SendCommand('-exec-arguments ' . <q-args>)
|
command -nargs=* Arguments call s:SendCommand('-exec-arguments ' . <q-args>)
|
||||||
|
|
||||||
@ -1024,21 +1034,24 @@ endfunc
|
|||||||
|
|
||||||
" clean up expression that may got in because of range
|
" clean up expression that may got in because of range
|
||||||
" (newlines and surrounding whitespace)
|
" (newlines and surrounding whitespace)
|
||||||
|
" As it can also be specified via ex-command for assignments this function
|
||||||
|
" may not change the "content" parts (like replacing contained spaces
|
||||||
func s:CleanupExpr(expr)
|
func s:CleanupExpr(expr)
|
||||||
" replace all embedded newlines/tabs/...
|
" replace all embedded newlines/tabs/...
|
||||||
let expr = substitute( a:expr, '\s', ' ', 'g')
|
let expr = substitute(a:expr, '\_s', ' ', 'g')
|
||||||
|
|
||||||
if &filetype ==# 'cobol'
|
if &filetype ==# 'cobol'
|
||||||
" extra cleanup for COBOL: _every: expression ends with a period,
|
" extra cleanup for COBOL:
|
||||||
" a semicolon nmay be used instead of a space
|
" - a semicolon nmay be used instead of a space
|
||||||
" a trailing comma is ignored as it commonly separates multiple expr
|
" - a trailing comma or period is ignored as it commonly separates/ends
|
||||||
let expr = substitute(expr, '\..*', '', '')
|
" multiple expr
|
||||||
let expr = substitute(expr, ';', ' ', 'g')
|
let expr = substitute(expr, ';', ' ', 'g')
|
||||||
let expr = substitute(expr, ',*$', '', '')
|
let expr = substitute(expr, '[,.]\+ *$', '', '')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" get rid of surrounding spaces
|
" get rid of leading and trailing spaces
|
||||||
let expr = substitute(expr, '^ *\(.*\) *', '\1', '')
|
let expr = substitute(expr, '^ *', '', '')
|
||||||
|
let expr = substitute(expr, ' *$', '', '')
|
||||||
return expr
|
return expr
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@ -1050,6 +1063,8 @@ let s:evalFromBalloonExprResult = ''
|
|||||||
func s:HandleEvaluate(msg)
|
func s:HandleEvaluate(msg)
|
||||||
let value = substitute(a:msg, '.*value="\(.*\)"', '\1', '')
|
let value = substitute(a:msg, '.*value="\(.*\)"', '\1', '')
|
||||||
let value = substitute(value, '\\"', '"', 'g')
|
let value = substitute(value, '\\"', '"', 'g')
|
||||||
|
" multi-byte characters arrive in octal form
|
||||||
|
let value = substitute(value, '\\\o\o\o', {-> eval('"' .. submatch(0) .. '"')}, 'g')
|
||||||
let value = substitute(value, '
', '\1', '')
|
let value = substitute(value, '
', '\1', '')
|
||||||
if s:evalFromBalloonExpr
|
if s:evalFromBalloonExpr
|
||||||
if s:evalFromBalloonExprResult == ''
|
if s:evalFromBalloonExprResult == ''
|
||||||
@ -1329,11 +1344,16 @@ endfunc
|
|||||||
|
|
||||||
let s:BreakpointSigns = []
|
let s:BreakpointSigns = []
|
||||||
|
|
||||||
func s:CreateBreakpoint(id, subid)
|
func s:CreateBreakpoint(id, subid, enabled)
|
||||||
let nr = printf('%d.%d', a:id, a:subid)
|
let nr = printf('%d.%d', a:id, a:subid)
|
||||||
if index(s:BreakpointSigns, nr) == -1
|
if index(s:BreakpointSigns, nr) == -1
|
||||||
call add(s:BreakpointSigns, nr)
|
call add(s:BreakpointSigns, nr)
|
||||||
exe "sign define debugBreakpoint" . nr . " text=" . substitute(nr, '\..*', '', '') . " texthl=debugBreakpoint"
|
if a:enabled == "n"
|
||||||
|
let hiName = "debugBreakpointDisabled"
|
||||||
|
else
|
||||||
|
let hiName = "debugBreakpoint"
|
||||||
|
endif
|
||||||
|
exe "sign define debugBreakpoint" . nr . " text=" . substitute(nr, '\..*', '', '') . " texthl=" . hiName
|
||||||
endif
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@ -1343,7 +1363,7 @@ endfunction
|
|||||||
|
|
||||||
" Handle setting a breakpoint
|
" Handle setting a breakpoint
|
||||||
" Will update the sign that shows the breakpoint
|
" Will update the sign that shows the breakpoint
|
||||||
func s:HandleNewBreakpoint(msg)
|
func s:HandleNewBreakpoint(msg, modifiedFlag)
|
||||||
if a:msg !~ 'fullname='
|
if a:msg !~ 'fullname='
|
||||||
" a watch or a pending breakpoint does not have a file name
|
" a watch or a pending breakpoint does not have a file name
|
||||||
if a:msg =~ 'pending='
|
if a:msg =~ 'pending='
|
||||||
@ -1366,7 +1386,8 @@ func s:HandleNewBreakpoint(msg)
|
|||||||
" If "nr" is 123 it becomes "123.0" and subid is "0".
|
" If "nr" is 123 it becomes "123.0" and subid is "0".
|
||||||
" If "nr" is 123.4 it becomes "123.4.0" and subid is "4"; "0" is discarded.
|
" If "nr" is 123.4 it becomes "123.4.0" and subid is "4"; "0" is discarded.
|
||||||
let [id, subid; _] = map(split(nr . '.0', '\.'), 'v:val + 0')
|
let [id, subid; _] = map(split(nr . '.0', '\.'), 'v:val + 0')
|
||||||
call s:CreateBreakpoint(id, subid)
|
let enabled = substitute(msg, '.*enabled="\([yn]\)".*', '\1', '')
|
||||||
|
call s:CreateBreakpoint(id, subid, enabled)
|
||||||
|
|
||||||
if has_key(s:breakpoints, id)
|
if has_key(s:breakpoints, id)
|
||||||
let entries = s:breakpoints[id]
|
let entries = s:breakpoints[id]
|
||||||
@ -1393,8 +1414,18 @@ func s:HandleNewBreakpoint(msg)
|
|||||||
|
|
||||||
if bufloaded(fname)
|
if bufloaded(fname)
|
||||||
call s:PlaceSign(id, subid, entry)
|
call s:PlaceSign(id, subid, entry)
|
||||||
|
let posMsg = ' at line ' . lnum . '.'
|
||||||
|
else
|
||||||
|
let posMsg = ' in ' . fname . ' at line ' . lnum . '.'
|
||||||
endif
|
endif
|
||||||
echomsg 'Breakpoint ' . nr . ' created at line ' . lnum . '.'
|
if !a:modifiedFlag
|
||||||
|
let actionTaken = 'created'
|
||||||
|
elseif enabled == 'n'
|
||||||
|
let actionTaken = 'disabled'
|
||||||
|
else
|
||||||
|
let actionTaken = 'enabled'
|
||||||
|
endif
|
||||||
|
echomsg 'Breakpoint ' . nr . ' ' . actionTaken . posMsg
|
||||||
endfor
|
endfor
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
@ -741,10 +741,10 @@ if g:vimsyn_embed =~# 'P' && filereadable(s:pythonpath)
|
|||||||
unlet! b:current_syntax
|
unlet! b:current_syntax
|
||||||
syn cluster vimFuncBodyList add=vimPythonRegion
|
syn cluster vimFuncBodyList add=vimPythonRegion
|
||||||
exe "syn include @vimPythonScript ".s:pythonpath
|
exe "syn include @vimPythonScript ".s:pythonpath
|
||||||
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript
|
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*\%(trim\s*\)\=\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript
|
||||||
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript
|
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*\%(trim\s*\)\=$+ end=+\.$+ contains=@vimPythonScript
|
||||||
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript
|
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\%(trim\s*\)\=\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript
|
||||||
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript
|
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*\%(trim\s*\)\=$+ end=+\.$+ contains=@vimPythonScript
|
||||||
syn cluster vimFuncBodyList add=vimPythonRegion
|
syn cluster vimFuncBodyList add=vimPythonRegion
|
||||||
else
|
else
|
||||||
syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
|
syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
|
||||||
|
@ -226,7 +226,13 @@ fu! Result(err)
|
|||||||
endif
|
endif
|
||||||
endfu
|
endfu
|
||||||
|
|
||||||
call Test_check_colors()
|
try
|
||||||
|
call Test_check_colors()
|
||||||
let &cpo = s:save_cpo
|
catch
|
||||||
unlet s:save_cpo
|
echohl ErrorMsg
|
||||||
|
echomsg v:exception
|
||||||
|
echohl NONE
|
||||||
|
finally
|
||||||
|
let &cpo = s:save_cpo
|
||||||
|
unlet s:save_cpo
|
||||||
|
endtry
|
||||||
|
Loading…
Reference in New Issue
Block a user