forked from aniani/vim
patch 8.0.1592: terminal windows in a session are not properly restored
Problem: Terminal windows in a session are not properly restored.
Solution: Add "terminal" in 'sessionoptions'. When possible restore the
command running in a terminal.
This commit is contained in:
@@ -270,3 +270,10 @@ func! Screenline(lnum)
|
||||
let line = join(chars, '')
|
||||
return matchstr(line, '^.\{-}\ze\s*$')
|
||||
endfunc
|
||||
|
||||
" Stops the shell running in terminal "buf".
|
||||
func Stop_shell_in_terminal(buf)
|
||||
call term_sendkeys(a:buf, "exit\r")
|
||||
let job = term_getjob(a:buf)
|
||||
call WaitFor({-> job_status(job) == "dead"})
|
||||
endfunc
|
||||
|
||||
Reference in New Issue
Block a user