1
0
forked from aniani/vim

patch 8.1.0603: the :stop command is not tested

Problem:    The :stop command is not tested.
Solution:   Test :stop using a terminal window.
This commit is contained in:
Bram Moolenaar
2018-12-16 16:16:10 +01:00
parent 2caad3fbbd
commit e751a5f531
3 changed files with 43 additions and 0 deletions

View File

@@ -345,3 +345,13 @@ func Stop_shell_in_terminal(buf)
let job = term_getjob(a:buf)
call WaitFor({-> job_status(job) == "dead"})
endfunc
" Gets the text of a terminal line, using term_scrape()
func Get_terminal_text(bufnr, row)
let list = term_scrape(a:bufnr, a:row)
let text = ''
for item in list
let text .= item.chars
endfor
return text
endfunc