summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-04-14 18:14:06 +0200
committerBram Moolenaar <Bram@vim.org>2018-04-14 18:14:06 +0200
commit8c041b6b95f49f7383cf00e2036cf009b326fa8d (patch)
treecea34047b3462e2bcaa580f616f054dfa20b1473 /runtime
parenta42d363bac8a581afe769c370db70cf833767c41 (diff)
downloadvim-8c041b6b95f49f7383cf00e2036cf009b326fa8d.zip
patch 8.0.1712: terminal scrollback is not limited
Problem: Terminal scrollback is not limited. Solution: Add the 'terminalscroll' option.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/options.txt12
-rw-r--r--runtime/doc/terminal.txt11
2 files changed, 19 insertions, 4 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index cc19e253d..0820699c6 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 8.0. Last change: 2018 Mar 13
+*options.txt* For Vim version 8.0. Last change: 2018 Apr 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -7933,6 +7933,16 @@ A jump table for the options with a short description can be found at |Q_op|.
Note that the "cterm" attributes are still used, not the "gui" ones.
NOTE: This option is reset when 'compatible' is set.
+ *'terminalscroll'* *'tlsl'*
+'terminalscroll' 'tlsl' number (default 10000)
+ global
+ {not in Vi}
+ {not available when compiled without the
+ |+terminal| feature}
+ Number of scrollback lines to keep. When going over this limit the
+ first 10% of the scrollback lines are deleted. This is just to reduce
+ the memory usage. See |Terminal-Normal|.
+
*'termkey'* *'tk'*
'termkey' 'tk' string (default "")
local to window
diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt
index 63217c2fa..23e210dc8 100644
--- a/runtime/doc/terminal.txt
+++ b/runtime/doc/terminal.txt
@@ -288,7 +288,7 @@ not when 'termsize' is "rowsXcols".
Terminal-Job and Terminal-Normal mode ~
- *Terminal-mode*
+ *Terminal-mode* *Terminal-Job*
When the job is running the contents of the terminal is under control of the
job. That includes the cursor position. Typed keys are sent to the job.
The terminal contents can change at any time. This is called Terminal-Job
@@ -301,7 +301,9 @@ suspended. CTRL-\ CTRL-N does the same.
Terminal-Job mode is where |:tmap| mappings are applied. Keys sent by
|term_sendkeys()| are not subject to tmap, but keys from |feedkeys()| are.
- *E946*
+It is not possible to enter Insert mode from Terminal-Job mode.
+
+ *Terminal-Normal* *E946*
In Terminal-Normal mode you can move the cursor around with the usual Vim
commands, Visually mark text, yank text, etc. But you cannot change the
contents of the buffer. The commands that would start insert mode, such as
@@ -312,7 +314,10 @@ In Terminal-Normal mode the statusline and window title show "(Terminal)". If
the job ends while in Terminal-Normal mode this changes to
"(Terminal-finished)".
-It is not possible to enter Insert mode from Terminal-Job mode.
+When the job outputs lines in the terminal, such that the contents scrolls off
+the top, those lines are remembered and can be seen in Terminal-Normal mode.
+The number of lines is limited by the 'terminalscroll' option. When going over
+this limit, the first 10% of the scrolled lins are deleted and are lost.
Cursor style ~