aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-09-30 02:33:50 +0200
committerJustin M. Keyes <justinkz@gmail.com>2016-12-09 18:51:17 +0100
commit97204e1cef4f922cc1f8e67f8a1f2f695d7da826 (patch)
treedac7ed60f3f1f41a9a320da2b7b6774da202f26f /runtime
parent043f85210a06168e36f103950897e00918504f6f (diff)
downloadrneovim-97204e1cef4f922cc1f8e67f8a1f2f695d7da826.tar.gz
rneovim-97204e1cef4f922cc1f8e67f8a1f2f695d7da826.tar.bz2
rneovim-97204e1cef4f922cc1f8e67f8a1f2f695d7da826.zip
os/shell: Throttle :! output, pulse "..." message.
Periodically skip :! spam. This is a "cheat" that works for all UIs and greatly improves responsiveness when :! spams MB or GB of output: :!yes :!while true; do date; done :!git grep '' :grep -r '' * After ~10KB of data is seen from a single :! invocation, output will be skipped for ~1s and three dots "..." will pulse in the bottom-left. Thereafter the behavior alternates at every: * 10KB received * ~1s throttled This also avoids out-of-memory which could happen with large :! outputs. Note: This commit does not change the behavior of execute(':!foo'). execute(':!foo') returns the string ':!foo^M', it captures *only* Vim messages, *not* shell command output. Vim behaves the same way. Use system('foo') for capturing shell command output. Closes #1234 Helped-by: oni-link <knil.ino@gmail.com>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/various.txt12
-rw-r--r--runtime/doc/vim_diff.txt5
2 files changed, 14 insertions, 3 deletions
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index a1bf379d86..625416146e 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -255,14 +255,20 @@ g8 Print the hex values of the bytes used in the
backslashes are before the newline, only one is
removed.
- On Unix the command normally runs in a non-interactive
- shell. If you want an interactive shell to be used
- (to use aliases) set 'shellcmdflag' to "-ic".
+ The command runs in a non-interactive shell connected
+ to a pipe (not a terminal). Use |:terminal| to run an
+ interactive shell connected to a terminal.
+
For Win32 also see |:!start|.
After the command has been executed, the timestamp and
size of the current file is checked |timestamp|.
+ If the command produces a lot of output the displayed
+ output will be "throttled" so the command can execute
+ quickly without waiting for the display. This only
+ affects the display, no data is lost.
+
Vim redraws the screen after the command is finished,
because it may have printed any text. This requires a
hit-enter prompt, so that you can read any messages.
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index c4795bec57..1940bc55fa 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -155,6 +155,11 @@ are always available and may be used simultaneously in separate plugins. The
|system()| does not support writing/reading "backgrounded" commands. |E5677|
+Nvim truncates ("throttles") shell-command messages echoed by |:!|, |:grep|,
+and |:make|. No data is lost, this only affects display. This makes things
+faster, but may seem weird for commands like ":!cat foo". Use ":te cat foo"
+instead, |:terminal| output is never throttled.
+
|mkdir()| behaviour changed:
1. Assuming /tmp/foo does not exist and /tmp can be written to
mkdir('/tmp/foo/bar', 'p', 0700) will create both /tmp/foo and /tmp/foo/bar