exit from terminal OK?

10 views
Skip to first unread message

tooth pik

unread,
Jan 1, 2021, 10:00:11 AM1/1/21
to vim...@googlegroups.com
i started a :term from a gvim session to grep for a string, found the string
and the module i wanted to edit, and from the terminal i started another
gvim session to edit a 2nd file

switching back to the 1st window i typed 'exit' in the terminal to end that,
but it wouldn't end until i quit the 2nd gvim session

is this the expected behavior?  was i supposed to start my 2nd gvim with an
ampersand at the end of the command?

gvim 8.2.2262
bash 4.4.23(1)
opensuse 15.2

Bram Moolenaar

unread,
Jan 1, 2021, 12:44:53 PM1/1/21
to vim...@googlegroups.com, tooth pik
The terminal is automatically closed when the job is finished. If you
start a child process, the parent process (the shell) will hang around
until the child is done. This the job isn't fully finished. You can
manually close the terminal though.

I think this is OK, although it might be unexpected that the terminal
window closes when the child process is done. And in this case any
output might be lost in the redraw.

To simulate the effect use this shell script:

#!/bin/sh
sleep 3
echo DONE NOW

And execute that from the shell, then type "exit".

--
hundred-and-one symptoms of being an internet addict:
77. The phone company asks you to test drive their new PBX system

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages