diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-08-29 22:44:59 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-08-29 22:44:59 +0200 |
commit | e561a7e2fa511d643c9692d26f4cf65378fd1983 (patch) | |
tree | cf6dc86878bcd2fa7a9d8baf467e66e3427f390c /runtime | |
parent | 48340b62e812dc9280f621a2eb6db76d43555c66 (diff) | |
download | vim-git-e561a7e2fa511d643c9692d26f4cf65378fd1983.tar.gz |
patch 8.0.1013: terminal window behaves different from a buffer with changesv8.0.1013
Problem: A terminal window with a running job behaves different from a
window containing a changed buffer.
Solution: Do not set 'bufhidden' to "hide". Fix that a buffer where a
terminal used to run is listed as "[Scratch]".
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/terminal.txt | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt index fd0a0ace4..9e903d26a 100644 --- a/runtime/doc/terminal.txt +++ b/runtime/doc/terminal.txt @@ -1,4 +1,4 @@ -*terminal.txt* For Vim version 8.0. Last change: 2017 Aug 26 +*terminal.txt* For Vim version 8.0. Last change: 2017 Aug 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -140,11 +140,17 @@ Syntax ~ When the buffer associated with the terminal is unloaded or wiped out the job is killed, similar to calling `job_stop(job, "kill")` -By default the 'bufhidden' option of the buffer will be set to "hide". -So long as the job is running: If the window is closed the buffer becomes -hidden. The command will not be stopped. The `:buffer` command can be used -to turn the current window into a terminal window. If there are unsaved -changes this fails, use ! to force, as usual. +So long as the job is running the window behaves like it contains a modified +buffer. Trying to close the window with `CTRL-W :close` or `CTRL-W :hide` +fails, unless "!" is added, in which case the job is ended. The text in the +window is lost. The buffer still exists, but getting it in a window with +`:buffer` will show an +empty buffer. + +You can use `CTRL-W :hide` to close the terminal window and make the buffer +hidden, the job keeps running. The `:buffer` command can be used to turn the +current window into a terminal window. If there are unsaved changes this +fails, use ! to force, as usual. To have a background job run without a window, and open the window when it's done, use options like this: > |