Commit Graph

9778 Commits

Author SHA1 Message Date
ZyX
fbdc3ac4ef tests: Fix linter errors 2017-12-03 20:22:09 +03:00
ZyX
6bc54832ef Revert "fix! set lsan options"
This reverts commit 6299332349.
2017-12-03 16:53:29 +03:00
ZyX
7af8601db4 Merge branch 'master' into expression-parser
Hoping that could fix the LSAN issue: no idea what it is talking about.
2017-12-03 16:19:40 +03:00
Felipe Morales
27a577586e
Merge pull request #7666 from wsdjeg/patch-1
Fix example in job_control doc
2017-12-02 20:34:31 +01:00
KunMing Xie
44421a22c0 vim-patch:8.0.0306 (#7675)
Problem:    mode() not sufficiently tested.
Solution:   Add more tests. (Yegappan Lakshmanan)

e971df39a5
2017-12-02 17:25:50 +01:00
Justin M. Keyes
ad32307e3b
Merge #7672 from ckelsel/vim-8.0.0298 2017-12-02 17:20:05 +01:00
KunMing Xie
7a4c9dc1c2 vim-patch:8.0.0295 (#7671)
Problem:    test_viml hangs.
Solution:   Put resetting 'more' before sourcing the script.

7a073549a3
2017-12-02 17:14:18 +01:00
Justin M. Keyes
4b83f37912 tui.c: request focus-reporting (fix regression) #7670
ref #7649
ref #7664

27f9b1c7b0 caused a regression: it uses loop_schedule_deferred() to
defer emitting the "enable focus reporting" termcode. tui_main() never
processes `tui_loop.events` (which loop_schedule_deferred() depends on),
so the event was never actually processed.

But fixing that (by processing `tui_loop.events`) would bring back the
problem 27f9b1c7b0 tried to fix: it still emits the event too soon.

Instead, do a little dance: schedule the event on `main_loop` and then
forward it to `tui_loop`.

NOTE: after this commit, in tmux 2.3 with `focus-events` enabled,
FocusGained is fired on startup and when resuming from suspend.

Using `script` to record the terminal session (and `vterm-dump` to
post-process the result):

BEFORE:
    {DECSM 1049}{DECSM 1}{ESC =}
    {CUP *}{ED *}{DECSM 2004}{DECSM 1004}{CSI 1,43 r}
    {CUP 1,1}
    {CUP *}{ED *}{SM 34}{DECSM 25}
    {DECRM 25}{CSI 2   q}{CSI 2   q}
    {CUP *}{ED *}{LF}
    {SGR *}{LS1}{SGR 94}~
    ...

AFTER:
    {CUP *}{ED *}{CSI 1,43 r}
    {CUP 1,1}
    {CUP *}{ED *}{SM 34}{DECSM 25}
    {DECRM 25}{CSI 2   q}{CSI 2   q}
    {CUP *}{ED *}{DECSM 2004}{DECSM 1004}{LF}
    {SGR *}{LS1}{SGR 94}~
    ...
2017-12-02 15:55:09 +01:00
ckelsel
7ab36403e1 fix lint error 2017-12-02 15:45:19 +08:00
ckelsel
585d664b7b vim-patch:8.0.0298
Problem:    Ex command range with repeated search does not work. (Bruce
            DeVisser)
Solution:   Skip over \/, \? and \&.

cbf20fbcd3
2017-12-02 15:40:57 +08:00
Wang Shidong
ee2e6d1d1a
Fix type in job_control doc 2017-12-01 06:40:03 -06:00
Justin M. Keyes
27f9b1c7b0
tui: emit some termcodes later (after startup) (#7664)
For some reason, enabling focus reporting during terminal setup, causes
slow rendering during Nvim startup on tmux 2.3 with the tmux
`focus-events` option enabled.

To workaround that issue, this commit defers the request.

closes #7649

init.vim:
    call plug#begin('~/.config/nvim/plugged')
    Plug 'morhetz/gruvbox'
    call plug#end()
    set background=light " background light just to see the effect more quickly
    colorscheme gruvbox
.tmux.conf:
    set -g focus-events on
    set-option -ga terminal-overrides ",xterm-256color:Tc"
    set-option -g default-terminal "screen-256color"

Using `script` to record the terminal session (and `vterm-dump` to
post-process the result):

BEFORE this commit:
    ./build/bin/nvim -u NONE{CR}{LF}
    {DECSM 1049}{DECSM 1}{ESC =}
    {CUP *}{ED 2}{DECSM 2004}{DECSM 1004}{CSI 8,44,156 t}{CSI * r}
    {CUP 1,1}
    {CUP *}{ED 2}{DECSM 25}
    {DECRM 25}{CSI 2   q}{CSI 2   q}
    {CUP *}{ED 2}{LF}
    {ESC (B}{SGR *}{SGR 94}~                                                                                                                                                           {CR}{LF}
    ~                                                                                                                                                           {CR}{LF}

AFTER this commit:
    ./build/bin/nvim -u NONE{CR}{LF}
    {DECSM 1049}{DECSM 1}{ESC =}
    {CUP *}{ED 2}{CSI 8,44,156 t}{CSI * r}
    {CUP 1,1}
    {CUP *}{ED 2}{DECSM 2004}{DECSM 1004}{DECSM 25}
    {DECRM 25}{CSI 2   q}{CSI 2   q}
    {CUP *}{ED 2}{LF}
    {ESC (B}{SGR *}{SGR 94}~                                                                                                                                                           {CR}{LF}
    ~                                                                                                                                                           {CR}{LF}
    ...
2017-12-01 04:18:34 +01:00
Justin M. Keyes
3d0ee17c91 tui/rxvt: enable focus-reporting
closes #7578
2017-12-01 04:12:59 +01:00
ZyX
6299332349 fix! set lsan options 2017-12-01 00:34:16 +03:00
ZyX
5ab0f988ca *: Replace all occurrences of NVim with Nvim 2017-11-30 11:53:25 +03:00
ZyX
0b4054e043 unittests: Reduce memory used by vim_str2nr test 2017-11-30 11:48:23 +03:00
James McCoy
10c3b206cb
version.c: Mark 8.0.0171 as NA
[ci skip]
2017-11-29 20:43:07 -05:00
ZyX
b588ccddd7 Merge branch 'master' into expression-parser 2017-11-30 02:02:55 +03:00
ZyX
de45ec0146 keymap: Do not use vim_isIDc in keymap.c
Note: there are three changes to ascii_isident. Reverting first two (in 
find_special_key and first in get_special_key_code) normally fails the new test 
with empty &isident, but reverting the third does not. Hence adding `>` to 
&isident.

Ref vim/vim#2389.
2017-11-30 02:01:49 +03:00
Justin M. Keyes
4618c9c43b Revert "tui: update cleared area only if non-default bg"
Reverts 0b93bab6c2. This change was
counter-productive to the other changes which intended to reduce the
role of BCE.

ref #7624
2017-11-29 23:51:48 +01:00
James McCoy
e0466dc592
Merge pull request #7657 from jamessan/float128-ffi
unittest: Ignore _Float128 types in ffi
2017-11-29 15:23:49 -05:00
James McCoy
59f4bd435c unittest: Ignore _Float128 types in ffi
When building with certain GCC versions, a _Float128 type is present
when setting up the ffi for unit tests.

    ./test/unit/helpers.lua:256: declaration specifier expected near '_Float128' at line 396
    /usr/bin/luajit: /usr/share/lua/5.1/busted/runner.lua:99: attempt to concatenate local 'message' (a table value)
    stack traceback:
    	/usr/share/lua/5.1/busted/runner.lua:99: in function 'fn'
    	/usr/share/lua/5.1/mediator.lua:103: in function 'publish'
    	/usr/share/lua/5.1/busted/modules/helper_loader.lua:21: in function 'helperLoader'
    	/usr/share/lua/5.1/busted/runner.lua:147: in function </usr/share/lua/5.1/busted/runner.lua:11>
    	/usr/bin/busted:3: in main chunk
    	[C]: at 0x004044a0

    CMake Error at /<<PKGBUILDDIR>>/cmake/RunTests.cmake:53 (message):
      Running unit tests failed with error: 1.

Since this is being pulled in by a dependency, not directly used by
nvim, just ignore the type.

Closes #7423
2017-11-29 10:07:12 -05:00
Jan Edmund Lazo
2d732a11b1 provider: fix batchfile extension for ruby gem (#7651)
ruby uses batchfiles with 'cmd' extension.
gem creates batchfiles with 'bat' extension.
`gem install rails` does the following in Windows (not Cygwin):

1. Run `gem.cmd install rails` on cmd.exe
2. gem.cmd runs `ruby.exe -x gem install rails`
3. `rails` gem is installed.
   `rails.bat` is created in the same directory
   where ruby.exe and gem.cmd reside.
2017-11-29 03:19:33 +01:00
James McCoy
27a4fc436f
Merge pull request #7639 from jamessan/openbsd-chr
Add OpenBSD as an expected OS for opening char devices
2017-11-28 19:47:44 -05:00
James McCoy
8f91f2c9b4
Use defined(BSD) check when defining OPEN_CHR_FILES
Rather than enumerate predefines for all BSD systems, just rely on the
fact that they all "#define BSD" in sys/param.h.

Debian's GNU/kFreeBSD still requires its own check, since it isn't using
the BSD userspace.

References:
OpenBSD - 210ebf9df0/sys/sys/param.h (L40)
FreeBSD - f5d95e1f8d/sys/sys/param.h (L43)
NetBSD - ea62098079/sys/sys/param.h (L49)
DragonFlyBSD - 94ecf1295b/sys/sys/param.h (L41)

vim-patch:8.0.1357
2017-11-28 18:07:51 -05:00
James McCoy
20bde8866e
Add OpenBSD as an expected OS for opening char devices
Closes #7542
2017-11-28 17:53:41 -05:00
James McCoy
122dbc86ab
Merge pull request #7650 from jamessan/na-patches
version.c: mark NA patches
2017-11-28 16:24:27 -05:00
Michael Schupikov
27a70fec48 version.c: mark NA patches
- channels: vim-patch:8.0.0018
- GUI: vim-patch:8.0.0021
- Different recursive function implementation: vim-patch:8.0.0141
- JSON handling: vim-patch:8.0.0166, vim-patch:8.0.0169, vim-patch:8.0.0170,
  vim-patch:8.0.0171, vim-patch:8.0.0180

Mark vim-patch:8.0.0096 applied, since it was added in
860ecd7055.

[ci skip]
2017-11-28 15:56:51 -05:00
Justin M. Keyes
d109f5645b
Merge #7640 'term' option 2017-11-27 22:07:23 +01:00
Björn Linse
e3c4c8a90e tests: mark flaky socket test pending for now 2017-11-27 11:43:24 +01:00
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