mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
fix(termdebug): send SIGINT when interrupting prompt mode
Unlike Vim's job_stop(), Nvim's jobstop() does not take a signal argument, and always sends SIGTERM/KILL. :Stop and Ctrl-C in prompt mode is supposed to interrupt the program like in terminal mode, not kill GDB. Also, maybe libuv's kill() works on Windows? If so, the logic above could be removed, but I don't have a Windows machine available to test that. Also "set nomodified" when ending prompt mode, like Vim (avoids E37).
This commit is contained in:
parent
21477bdb27
commit
8aad4b8425
@ -624,7 +624,7 @@ func s:PromptInterrupt()
|
||||
call debugbreak(s:pid)
|
||||
endif
|
||||
else
|
||||
call jobstop(s:gdbjob)
|
||||
call v:lua.vim.uv.kill(jobpid(s:gdbjob), 'sigint')
|
||||
endif
|
||||
endfunc
|
||||
|
||||
@ -821,6 +821,7 @@ func s:EndPromptDebug(job_id, exit_code, event)
|
||||
|
||||
let curwinid = win_getid()
|
||||
call win_gotoid(s:gdbwin)
|
||||
set nomodified
|
||||
close
|
||||
if curwinid != s:gdbwin
|
||||
call win_gotoid(curwinid)
|
||||
|
Loading…
Reference in New Issue
Block a user