| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
| |
Requires libtermkey 0.19+
Closes #2048
Closes #5693
See https://github.com/neovim/libtermkey/compare/a9b61424aae9f7548162ff112393c5f706cf54f1%5E...c0eb4e4a05f49ad8fee0195c77f2c29d09cc36af
See https://bugzilla.redhat.com/show_bug.cgi?id=142659
See https://github.com/tmux/tmux/blob/fe4e9470bb504357d073320f5d305b22663ee3fd/tty-keys.c#L625-L632
|
|
|
|
|
|
|
| |
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 #5267
Helped-by: oni-link <knil.ino@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
As discussed on #5243 and #5283.
Helped-by: John Szakmeister <john@szakmeister.net>
Helped-by: Justin M. Keyes <justinkz@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inherited signal mask may block SIGCHLD, which causes libuv to hang at
epoll_wait.
Closes #5230
Helped-by: Nicolas Hillegeer <nicolas@hillegeer.com>
Helped-by: John Szakmeister <john@szakmeister.net>
Note: the #pragma gymnastics are a workaround for broken system headers on
macOS.
signal.h:
int sigaddset(sigset_t *, int);
#define sigaddset(set, signo) (*(set) |= __sigbits(signo), 0)
sys/_types/_sigset.h:
typedef __darwin_sigset_t sigset_t;
sys/_types.h:
typedef __uint32_t __darwin_sigset_t; /* [???] signal set */
sigset_t is defined as unsigned int, but the sigaddset() ORs it with an int,
mixing the types. So GCC generates a sign-conversion warning:
sig.c:9:13: warning: implicit conversion changes signedness: 'int' to 'unsigned int' [-Wsign-conversion]
(*(&s) |= __sigbits((sigset_t) 20), 0);
~~ ^~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
System headers are normally ignored when the compiler generates warnings:
https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html
> GCC gives code found in system headers special treatment. All warnings,
> other than those generated by ‘#warning’ (see Diagnostics), are suppressed
> while GCC is processing a system header. Macros defined in a system header
> are immune to a few warnings wherever they are expanded. This immunity is
> granted on an ad-hoc basis, when we find that a warning generates lots of
> false positives because of code in macros defined in system headers.
Instead of the #pragma workaround, we could cast the sigset_t pointer:
# if defined(__APPLE__)
sigaddset((int *)&mask, SIGCHLD);
# else
sigaddset(&mask, SIGCHLD);
# endif
but that could break if the headers are later fixed.
|
| |
|
|\ |
|
| | |
|
| | |
|
|\ \
| |/
|/| |
Enable MSYS/MinGW builds in Appveyor
|
| |
| |
| |
| |
| |
| | |
Wrap up uv_translate_sys_error and fallbacks into a new function
os_translate_sys_error(). In windows a copy of the original
uv_translate_sys_error() was imported from libuv.
|
|\ \
| |/
|/| |
option: Do not expand options, obtained from XDG vars
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
| |
Because the old name did not indicate that the function
would return true on directories as well.
|
|\
| |
| | |
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.
|
|\ \
| | |
| | | |
ex_cmds2.c: lint
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Still no busted tests. Not tested without HAVE_PREADV.
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
Moves low-level functions handling to os/fs.c. Adds file.c with a proxy
interface.
Target: while leaving syscalls handling is os.c (partially handled by libuv),
add buffering for reading and writing to file.c.
|
| |
| |
| |
| | |
This removes attribute FUNC_ATTR_NONNULL_ALL for functions without
a pointer parameter.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Processes in vim are always started in the current directory, which
causes issues when the process is a daemon and the current directory is
a mountpoint. Fix this by adding an option to set the cwd of the new
process with jobstart(). In addition, fix termopen() so that it actually
uses the cwd option from the dict (it couldn't previously set the cwd
value due to dead code).
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Conforms to Vim's mch_nodetype. Regression by 7db4a15.
buf_write() expects NODE_WRITABLE for character devices such as
/dev/stderr.
Closes #4772
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
...and small refactorings:
- Style changes
- Variable renames
- Changes in variable scope
This change won't bring new problems (undefined behavior) as `memcpy` is
already being used in the function.
|
|/ |
|
|
|
|
|
|
|
|
|
| |
Problem: Editing a URL, which netrw should handle, doesn't work.
Solution: Avoid changing slashes to backslashes. (Yasuhiro Matsumoto)
https://github.com/vim/vim/commit/b4f6a46b01ed00b642a2271e9d1559e51ab0f2c4
Cherry-picked from https://github.com/neovim/neovim/pull/810, rebased.
|