| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
| |
Problem: Various small code ugliness.
Solution: Remove pointless NULL checks. Fix function calls. Fix typos.
(Dominique Pelle, closes vim/vim#4060)
https://github.com/vim/vim/commit/bdace838c67c1bd94e55e34270a8325933891466
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- No code changes
- Rename mch_expand_wildcards => os_expand_wildcards
|
|
|
|
|
|
| |
0c1be45ea0b7 changed pulse logic to output "[...]" instead of nothing.
But that doesn't align with the "..." pulse which may follow it.
ref #11130
|
|
|
|
|
|
| |
- output "[...]" to indicate throttling is being used, instead of just
an empty line
- go to beginning of line after displaying the pulse, so that following
output is displayed over it
|
|
|
|
|
|
| |
Pulse every 0.1s only.
This makes `!yes` look much better (less busy).
|
|
|
|
|
|
|
|
| |
ref https://github.com/neovim/neovim/issues/9001#issuecomment-421843790
Steps to reproduce:
:set verbose=9
:call system(['echo'])
E730: using List as a String
|
|
|
|
|
| |
The output from shell commands is already handled by the messages.c/UI
layer.
|
|
|
|
| |
Remove occurences of these macros.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
fixes #7830 and #7788
|
|
|
|
|
|
|
|
|
| |
Test failure:
test/functional/eval/system_spec.lua: "works with an empty string"
E5677: Error writing input to shell-command: EPIPE
ref https://github.com/neovim/neovim/pull/6558#issuecomment-361061035
ref #6554
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Coverity warning is a false positive: if rbuffer_read_ptr() returns
NULL then `cnt` is zero.
Revert 76ea97c809e50fccc5ca6615943ac6da1db1e030 (which caused
the TSan build to hang often--possibly because of the missing ui_flush()).
Instead, modify out_data_append_to_screen() to check for NULL.
ref #6862
|
|
|
|
|
|
|
| |
rbuffer_read_ptr may return a null
if ptr == null && cnt == 0 && !out_data_decide_throttle(cnt)
then we would have called out_data_append_to_screen(ptr, cnt, eof)
which dereferences the null pointer.
|
|
|
|
|
|
| |
- Establish ERROR log level as "critical". Such errors are rare and will
be valuable when users encounter unusual circumstances.
- Set -DMIN_LOG_LEVEL=3 for release-type builds
|
| |
|
| |
|
|
|
| |
Returns an array of allocated strings.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tokenize p_sh if used as default in ex_terminal(). Previously p_sh was
used as the first arg in a list when calling termopen(), this would try
to call an untokenized version of shell, meaning if you had an argument
in 'shell':
set shell=/bin/bash\ --login
the command would fail.
Helped-by: oni-link <knil.ino@gmail.com>
Closes #3999
|
| |
|
|
|
|
|
|
|
| |
Instead of managing max_visits, check the time every N visits. This avoids edge
cases where max_visits is large but the chunk frequency slowed down, which would
causing the "..." pulse to show for a very long time. It's more important to
show output at reasonable intervals than to avoid calling os_hrtime().
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This ameliorates use-cases like:
:!cat foo.txt
:make
where the user is interested in the last few lines of output.
Try these shell-based ex-commands before/after this commit:
:grep -r '' *
:make
:!yes
:!grep -r '' *
:!git grep ''
:!cat foo
:!echo foo
:!while true; do date; done
:!for i in `seq 1 20000`; do echo XXXXXXXXXX $i; done
In all cases the last few lines of the command should always be shown,
regardless of where throttling was triggered.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
| |
Closes #5558
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Closes #3529
Closes #5241
In Vim,
:echo system('cat - &', 'foo')
works because for both system() and :! Vim writes input to a temp file and uses
shell syntax to redirect the file to the backgrounded `cat` (get_cmd_output()
.. make_filter_cmd()).
In Nvim,
:echo system('cat - &', 'foo')
fails because we write the input directly via pipes (shell.c:do_os_system()),
but (per POSIX[1]) backgrounded process input stream is redirected from
/dev/null (unless overridden by shell redirection; supported only by some shells
[2]), so our writes are ignored, the process exits quickly, and if we are
writing data larger than the buffer size we'll see EPIPE.
This still works:
:%w !tee > foo1358.txt &
but this does not:
:%w !tee foo1358.txt &
though it *should* (why doesn't it?) because we still do the temp file dance
in do_bang() .. do_filter().
[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_03_02
[2] http://unix.stackexchange.com/a/71218
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`lib/queue.h` implements a basic queue. `event/queue.c` implements
a specialized data structure on top of lib/queue.h; it is not a "normal"
queue.
Rename the specialized multi-level queue implemented in event/queue.c to
"multiqueue", to avoid confusion when reading the code.
Before this change one can eventually notice that "macros (uppercase
symbols) are for the normal queue, lowercase operations are for the
multi-level queue", but that is unnecessary friction for new developers
(or existing developers just visiting this part of the codebase).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
move `call_shell` to misc1.c
Move some fns to state.c
Move some fns to option.c
Move some fns to memline.c
Move `vim_chdir*` fns to file_search.c
Move some fns to new module, bytes.c
Move some fns to fileio.c
|
|
|
|
|
|
|
|
| |
- rename to shell_xescape_xquote
- move to os/shell.c
- disallow NULL argument
- eliminate casts, nesting
- test: empty shellxquote/shellxescape
|
|
|
|
| |
Fixes #2773
|
| |
|
|\
| |
| | |
Fix for missing output (#4569, ...)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The whole stream buffer is now put on screen at once instead of only
data up to the last newline. This has some advantages:
* RBuffer cannot wrap around, so we never forget to output second
half of the buffer.
* Stream data is not delayed anymore, because we don't have to wait for
a newline.
This works by remembering the last used screen column.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current name is inappropriate for the following reasons:
1. It is often masked by local `loop` variables.
2. It cannot be searched for. There are many `loop` variables where `loop` is
some local variable. There are many cases when “loop” word is used in
a comment.
3. It is in any case bad idea to use a generic name as a name of the global
variable. Best if global has module prefix: this is why it is in `main.h`:
`main_loop` both stands for “a main loop” and “a loop defined in `main.*`”.
Since I have no idea how to list every occurrence of this variable method used
to rename it is “remove it from globals.h, try to compile, fix errors”. Thus if
some occurrence was hidden under false `#if` branch it was not replaced.
|
| |
|
|
|
|
|
|
|
|
| |
Problem: On some systems automatically adding the missing EOL causes
problems. Setting 'binary' has too many side effects.
Solution: Add the 'fixeol' option, default on. (Pavel Samarkin)
https://github.com/vim/vim/commit/34d72d4b6c1a2b04a214d8a49b7d22c97bc7a8bc
|
| |
|