Björn Linse
df019cebd5
Revert "provider: delete vimL stderr collector, now that it exists builtin"
...
This change exposed a memory issue with buffered channels, possibly
involving GC. Revert until it has been fixed.
This reverts commit 0de019b6a6
.
2017-11-27 11:07:49 +01:00
Justin M. Keyes
6cf186edb5
lint
2017-11-27 09:45:32 +01:00
Justin M. Keyes
c8b40930c0
test: tui_spec.lua: use robust settings
2017-11-27 09:45:32 +01:00
Justin M. Keyes
944e3c0619
tui: expose terminal type in 'term' option
...
Since "builtin" terminfo definitions were implemented (7cbf52db1b
),
the decisions made by tui.c and terminfo.c are more relevant. Exposing
that decision in the 'term' option helps with troubleshooting.
Also: remove code that allowed setting t_Co. `:set t_Co=…` has never
worked; the highlight_spec test asserting that nvim_set_option('t_Co')
_does_ work makes no sense, and should not have worked.
2017-11-27 09:45:32 +01:00
Justin M. Keyes
a043899ba2
Merge #7633 'Retry fgets on EINTR'
...
closes #7632
2017-11-26 21:17:35 +01:00
ZyX
36a4f3a259
viml/parser/expressions: Make sure that listed nodes may be present
...
With the new test leaving `assert(false);` for any of the cases makes tests
crash.
2017-11-26 16:57:42 +03:00
ZyX
cddf84c398
functests: Add some more tests
2017-11-26 16:45:29 +03:00
ZyX
17077b6813
viml/parser/expressions: Make $ENV not depend on &isident
2017-11-26 16:08:53 +03:00
ZyX
11a05e778f
doc: Some small fixes
2017-11-26 15:56:27 +03:00
ZyX
b9c7813058
Merge branch 'master' into expression-parser
2017-11-26 15:54:03 +03:00
Björn Linse
207b7ca4bc
Merge pull request #6844 from bfredl/channel
...
channels: support buffered output and bytes sockets/stdio
2017-11-26 10:18:01 +01:00
Björn Linse
0de019b6a6
provider: delete vimL stderr collector, now that it exists builtin
2017-11-26 09:17:06 +01:00
Björn Linse
91b856ccce
channels: tests
2017-11-26 09:17:04 +01:00
Justin M. Keyes
b57d9a4ff0
Merge #7631 'highlight: no refresh on validation error'
2017-11-25 23:22:46 +01:00
nate
ebed8c6a2e
test: :highlight validation errors
...
add test when highlight group doesn't exist.
add test when an invalid color name is used for `cterm`.
2017-11-25 23:22:23 +01:00
nate
b1a4db0b69
:highlight : avoid redraw on error
...
do_highlight() should not redraw if a validation error occurred.
closes #7489
2017-11-25 23:22:08 +01:00
Matt Widmann
bab2f8200a
io: fix handling EOF in vim_fgets
...
If an EOF is returned from `fgets`, `vim_fgets` might spin forever, as
it tries to consume the current line.
A `NULL` return value from `fgets` should break out of the function
(unless `errno` is `EINTR`), and then `feof` should be used to check for
the EOF condition on the stream.
2017-11-25 14:21:02 -08:00
Matt Widmann
0f9c90e0ed
io: retry fgets on EINTR ( #7632 )
...
The calls to `fgets` in `src/nvim/if_cscope.c` (and elsewhere) can show
communication errors to the user if a signal is delivered during its
system calls. For plugins that proxy subprocess output into cscope
requests, a `SIGCHLD` might *always* interfere with calls into `fgets`.
To see this in a debugger, put a breakpoint on `cs_reading_emsg` and
watch signals come in (with lldb, using `process handle --notify true
--pass true`). Next, run a subcommand from neovim that calls through
cscope when it returns. A tag picker plugin, like vim-picker and fzy,
with `cscopetag` and `cscopetagorder=0` set, reproduced this reliably.
The breakpoint will hit after a `SIGCHLD` is delivered, and `errno` will
be set to 4, `EINTR`.
The caller of `fgets` should retry when `NULL` is returned with `errno`
set to `EINTR`.
2017-11-25 13:59:07 -08:00
Justin M. Keyes
303e1df13f
Merge #7624 'tui: disable BCE almost always'
...
closes #7035
closes #7337
2017-11-25 22:36:34 +01:00
Björn Linse
baa981ea21
channels: update documentation
2017-11-25 09:37:01 +01:00
Björn Linse
753d0091e8
core dumps: don't use pipe, it does not work
2017-11-25 09:37:00 +01:00
Björn Linse
8540b5e4ad
test: add hexdump utilitiy function
2017-11-25 09:37:00 +01:00
Björn Linse
85bc6630c0
input: only change mode of input fd if there is an input fd
2017-11-25 09:37:00 +01:00
Justin M. Keyes
9acd7bfe25
tui: job-control: use saved termios for pty jobs
...
On startup, if running in a terminal, save the termios properties.
Use the saved termios for `:terminal` and `jobstart()` pty jobs.
This won't affect nvim spawned outside of a terminal.
questions:
- This affects `:terminal` and `jobstart({'pty'✌️ true})`.
Should we be more conservative for `jobstart({'pty'✌️ true})` (e.g.
pass NULL to forkpty() and let the OS defaults prevail)?
- Note: `iutf8` would not be set in that case.
2017-11-25 09:37:00 +01:00
Björn Linse
a97cdff14d
channels: improvements to buffering
2017-11-25 09:37:00 +01:00
Björn Linse
fee367a74f
channels: more consistent event handling
...
terminal: libvterm now receives data in async context. This was "almost" safe
already, as redraws were queued anyway.
2017-11-25 09:37:00 +01:00
Björn Linse
f629f8312d
channels: refactor jobwait
2017-11-25 09:37:00 +01:00
Björn Linse
5517d2323b
channels: reimplement logging (as stub for proper event)
2017-11-25 09:37:00 +01:00
Björn Linse
5af4703177
channels: stderr channel
2017-11-25 09:37:00 +01:00
Björn Linse
90e5cc5484
channels: generalize jobclose()
2017-11-25 09:37:00 +01:00
Björn Linse
3e59c1e20d
channels: move away term code from eval.c
2017-11-25 09:37:00 +01:00
Björn Linse
1ebc96fe10
channels: allow bytes sockets and stdio, and buffered bytes output
2017-11-24 14:54:15 +01:00
Björn Linse
5215e3205a
channels: refactor
2017-11-24 14:50:00 +01:00
Björn Linse
3717e2157f
Revert channel logging, rebased on new code below
2017-11-24 14:04:56 +01:00
Justin M. Keyes
0b93bab6c2
tui: update cleared area only if non-default bg
...
This check was removed in 133ae5eeef
without explanation.
2017-11-24 09:53:09 +01:00
Justin M. Keyes
b838ad5b7a
tui: Disable BCE almost always. #7624
...
133ae5eeef
implemented BCE (background color erase). But we can't
trust terminfo, so it is safer disable BCE if we are not certain.
Per https://github.com/kovidgoyal/kitty/issues/160#issuecomment-346470545
terminal support for BCE seems to be (1) optional and (2) inconsistent.
ref #4210 #4421 #7035 #7337 #7381 #7425 #7618
2017-11-24 09:18:13 +01:00
Justin M. Keyes
9888a54f15
tui: Disable BCE by default. #7624
...
133ae5eeef
implemented BCE (background color erase). That's fine if
the system terminfo claims to support it; but our built-in fallback
should not assume it.
Per https://github.com/kovidgoyal/kitty/issues/160#issuecomment-346470545
terminal support for BCE seems to be (1) optional and (2) inconsistent.
So the built-in terminfos should disable it by default.
ref #4210 #4421 #7035 #7337 #7381 #7425 #7618
2017-11-23 21:21:58 +01:00
Björn Linse
d9b3ebfede
FIXUP: duplicate error number in #7422
2017-11-23 07:36:35 +01:00
Justin M. Keyes
51637f4256
tui: move terminfo_is_term_family()
2017-11-22 23:19:51 +01:00
Justin M. Keyes
8c959be511
Merge #7593 'PVS static analysis fixes'
2017-11-22 23:12:30 +01:00
Björn Linse
a4f6cec7a3
cmdline: CmdlineEnter and CmdlineLeave autocommands ( #7422 )
...
vim-patch:fafcf0dd59fd
patch 8.0.1206: no autocmd for entering or leaving the command line
Problem: No autocmd for entering or leaving the command line.
Solution: Add CmdlineEnter and CmdlineLeave.
fafcf0dd59
2017-11-22 22:35:20 +01:00
Peter Kalauskas
fe2546c81a
move.c: remove unreachable break statement
...
n > 0 verified by while condition, (--n < 0) always false
2017-11-22 09:21:34 -08:00
Peter Kalauskas
1b94f24d6e
eval.c: remove nonnullret deadcode
...
The following calls can't return null:
* xmalloc
* xcalloc
* get_buffer_info
* get_tabpage_info
* get_vim_var_str
* get_win_info
* tv_get_string
* tv_list_alloc
* tv_list_alloc_ret
* vim_strnsave
2017-11-22 09:21:34 -08:00
Peter Kalauskas
c030a38168
helpers.c: statically assert integer falls within range
2017-11-22 09:21:34 -08:00
Peter Kalauskas
c24b74c229
Fix for pvs V782, pointer access to first element of array
2017-11-22 09:21:34 -08:00
Peter Kalauskas
fdcde7dba3
input.c: replace if/else with switch
2017-11-22 09:21:34 -08:00
Peter Kalauskas
dddc609859
menu.c: remove conditional expression that is always true
2017-11-22 09:21:34 -08:00
KunMing Xie
9393be477a
vim-patch:8.0.0289 ( #7591 )
...
Problem: No test for "ga" and :ascii.
Solution: Add a test. (Dominique Pelle, closes vim/vim#1429 )
21d7c9b601
2017-11-22 11:59:30 +01:00
KunMing Xie
bb7795e820
vim-patch:8.0.0292 ( #7592 )
...
Problem: The stat test is a bit slow.
Solution: Remove a couple of sleep comments and reduce another.
a2f28859bf
2017-11-22 11:57:56 +01:00
Jan Edmund Lazo
7b686881a1
win: default grepprg to findstr.exe ( #7611 )
2017-11-22 00:35:51 +01:00