mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
vim-patch:589edb340454
Updte runtime files
589edb3404
Omit state() changes in eval.txt because patch v8.1.2047 is not merged.
This commit is contained in:
@@ -552,9 +552,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]
|
||||
@@ -715,12 +720,22 @@ func s:CommOutput(job_id, msgs, event)
|
||||
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
|
||||
set cpo&vim
|
||||
|
||||
command -nargs=? Break call s:SetBreakpoint(<q-args>)
|
||||
command Clear call s:ClearBreakpoint()
|
||||
@@ -738,7 +753,7 @@ func s:InstallCommands()
|
||||
command Continue call chansend(s:gdb_job_id, "continue\r")
|
||||
endif
|
||||
|
||||
command -range -nargs=* Evaluate call s:Evaluate(<range>, <q-args>)
|
||||
command -range -nargs=* Evaluate call s:Evaluate(<range>, <q-args>)
|
||||
command Gdb call win_gotoid(s:gdbwin)
|
||||
command Program call s:GotoProgram()
|
||||
command Source call s:GotoSourcewinOrCreateIt()
|
||||
@@ -801,7 +816,7 @@ func s:DeleteCommands()
|
||||
endfor
|
||||
let s:BreakpointSigns = []
|
||||
endfunc
|
||||
|
||||
|
||||
" :Break - Set a breakpoint at the cursor position.
|
||||
func s:SetBreakpoint(at)
|
||||
" Setting a breakpoint may not work while the program is running.
|
||||
@@ -814,9 +829,11 @@ func s:SetBreakpoint()
|
||||
else
|
||||
call s:SendCommand('-exec-interrupt')
|
||||
endif
|
||||
sleep 10m
|
||||
endif
|
||||
endif
|
||||
" Use the fname:lnum format, older gdb can't handle --source.
|
||||
|
||||
" Use the fname:lnum format, older gdb can't handle --source.
|
||||
let at = empty(a:at) ?
|
||||
\ fnameescape(expand('%:p')) . ':' . line('.') : a:at
|
||||
call s:SendCommand('-break-insert ' . at)
|
||||
if do_continue
|
||||
@@ -831,14 +848,14 @@ func s:ClearBreakpoint()
|
||||
let bploc = printf('%s:%d', fname, lnum)
|
||||
if has_key(s:breakpoint_locations, bploc)
|
||||
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]
|
||||
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
|
||||
else
|
||||
@@ -1242,8 +1259,8 @@ func s:HandleBreakpointDelete(msg)
|
||||
if empty(id)
|
||||
return
|
||||
endif
|
||||
if has_key(s:breakpoints, id)
|
||||
for [subid, entry] in items(s:breakpoints[id])
|
||||
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']
|
||||
@@ -1267,7 +1284,7 @@ func s:BufRead()
|
||||
" Handle a BufRead autocommand event: place any signs.
|
||||
func s:BufRead()
|
||||
let fname = expand('<afile>:p')
|
||||
for [id, entries] in items(s:breakpoints)
|
||||
for [id, entries] in items(s:breakpoints)
|
||||
for [subid, entry] in items(entries)
|
||||
if entry['fname'] == fname
|
||||
call s:PlaceSign(id, subid, entry)
|
||||
@@ -1279,7 +1296,7 @@ func s:BufUnloaded()
|
||||
" Handle a BufUnloaded autocommand event: unplace any signs.
|
||||
func s:BufUnloaded()
|
||||
let fname = expand('<afile>:p')
|
||||
for [id, entries] in items(s:breakpoints)
|
||||
for [id, entries] in items(s:breakpoints)
|
||||
for [subid, entry] in items(entries)
|
||||
if entry['fname'] == fname
|
||||
let entry['placed'] = 0
|
||||
|
Reference in New Issue
Block a user