1
0
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:
Bram Moolenaar
2018-03-09 21:33:34 +01:00
parent 20586cb4f4
commit 4d8bac8bf5
12 changed files with 274 additions and 20 deletions

View File

@@ -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