Commit Graph

2684 Commits

Author SHA1 Message Date
Daniel Hahler
52fced6090
build: update some test dependencies (#10339)
* build: update some test dependencies

* luacheck ignores

* BuildLua: add ${BUSTED} to depends for ${BUSTED_LUA}

This is required to rebuild it when busted gets updated.
2019-06-29 22:25:00 +02:00
Justin M. Keyes
2d4a37ebab
:ls : show "R", "F" for terminal-jobs #10370
This matches Vim behavior. From `:help :ls` :

    R    a terminal buffer with a running job
    F    a terminal buffer with a finished job
    ?    a terminal buffer without a job: `:terminal NONE`

TODO: implement `:terminal NONE`.

ref #10349
2019-06-29 21:03:38 +02:00
Daniel Hahler
e9f1bdabb8
tests: fix flaky "timers can be stopped from the handler" (#10364)
Seen on Travis (osx):

    [ RUN      ] timers can be stopped from the handler: FAIL
    .../build/neovim/neovim/test/functional/eval/timer_spec.lua:167: Expected objects to be the same.
    Passed in:
    (number) 2
    Expected:
    (number) 3
    stack traceback:
            .../build/neovim/neovim/test/functional/eval/timer_spec.lua:167: in function <.../build/neovim/neovim/test/functional/eval/timer_spec.lua:153>
2019-06-29 17:53:09 +02:00
Björn Linse
ac013d7147
Merge pull request #10342 from bfredl/apisandbox
eval/api: don't allow the API to be called in the sandbox
2019-06-26 11:59:08 +02:00
Björn Linse
8b263c7a68
Merge pull request #10344 from bfredl/extcmdredraw
cmdline: remove invalid cmdline_show event when aborting mapping
2019-06-26 10:47:18 +02:00
Björn Linse
4bf05ba399 cmdline: remove invalid cmdline_show event when aborting mapping 2019-06-26 09:16:17 +02:00
Björn Linse
2a2d288228 compositor: handle scrolling of blended window 2019-06-26 08:37:36 +02:00
Björn Linse
619a86cb1e eval/api: don't allow the API to be called in the sandbox.
Identifying and maintaining a "secure" subset of the API would be too
much busywork. So just disable the entire thing.
2019-06-26 08:19:57 +02:00
Björn Linse
4c4d964eeb ui: add 'winblend' to support blending of floating windows
Also add `hi blend=` attribute to override transparency of indiviual attributes.
2019-06-25 18:08:21 +02:00
Alan Wu
9fd4a0b526 getchar: Handle incomplete <Paste> in typeahead buffer #10311
<Paste> is a 3-byte sequence and the beginning one or two bytes can appear at
the very end of the typeahead buffer. When this happens, we were exiting from
`vgetorpeek()` instead of reading more characters to see the complete sequence.

I think this should fix #7994 -- at least partially. Before this change, when I
paste exactly 64 characters into a freshly booted instance, I get what I pasted
plus the literal text "<Paste>" at the end. Nvim also stays in nopaste mode.
The attached test case fails in this manner without the code change.

Fix #7994
2019-06-24 00:28:04 +02:00
oni-link
0bdeec8ef0 screen: Adjust buffer sizes for multiple sign columns #10314
* screen: Fix to draw signs with combining characters.
The buffer size for signs can be too small, because the upper length
limit of a sign can be 56 bytes. If combining characters are only two
bytes in size, this reduces to 32 bytes.

* screen: Adjust buffer size to maximal sign column count
2019-06-24 00:01:01 +02:00
Daniel Hahler
bc10a15ea7 tests: fix "api nvim_get_proc_children returns child process ids" (#10296)
There might be an existing job already - maybe due to some other test,
but in this case there was only one failure in the test run.

```
[----------] Running tests from C:/projects/neovim/test/functional\api\proc_spec.lua
  [ RUN      ] api nvim_get_proc_children returns child process ids: ERR
  test\functional\helpers.lua:392:
  retry() attempts: 450
  C:/projects/neovim/test/functional\api\proc_spec.lua:22: Expected objects to be the same.
  Passed in:
  (number) 2
  Expected:
  (number) 1

  stack traceback:
  	test\functional\helpers.lua:392: in function 'retry'
  	C:/projects/neovim/test/functional\api\proc_spec.lua:21: in function <C:/projects/neovim/test/functional\api\proc_spec.lua:17>
```

https://ci.appveyor.com/project/neovim/neovim/builds/25461215/job/8ns204v6091iy9rs?fullLog=true#L2672
2019-06-22 15:29:39 +02:00
Björn Linse
d4938743e6 channel: refactor events, prevent recursive invocation of events 2019-06-18 10:49:38 +02:00
Björn Linse
e39d217592 messages: fix crash with msg_advance when using ext_messages 2019-06-16 11:31:35 +02:00
Björn Linse
41f31ca90d messages: support shortmess-=S in ext_messages 2019-06-16 11:07:29 +02:00
Björn Linse
64cdf9f78a api/lua: add on_detach to nvim_buf_attach 2019-06-15 13:19:12 +02:00
Daniel Hahler
93f8c2793c
ci: AppVeyor: fix cov job, remove duplicate non-cov one (#10217)
* ci: AppVeyor: set GCOV_ERROR_FILE

This prevents the warnings/errors to be spilled into test results,
causing them to fail them, e.g.:

    [  FAILED  ] C:/projects/neovim/test/functional\core\main_spec.lua @ 97: Command-line option -s errors out when trying to use nonexistent file with -s
    C:/projects/neovim/test/functional\core\main_spec.lua:98: Expected objects to be the same.
    Passed in:
    (string) 'Cannot open for reading: "Xtest-functional-core-main-s.nonexistent": no such file or directory
    profiling:C:\projects\neovim\build/src/nvim/CMakeFiles/nvim.dir/buffer.c.gcda:Data file mismatch - some data files may have been concurrently updated without locking support
    '
    Expected:
    (string) 'Cannot open for reading: "Xtest-functional-core-main-s.nonexistent": no such file or directory
    '

    stack traceback:
            C:/projects/neovim/test/functional\core\main_spec.lua:98: in function <C:/projects/neovim/test/functional\core\main_spec.lua:97>

For reference, the locking appears to have been reworked for gcc 9.1 [1].

1: https://github.com/gcc-mirror/gcc/commit/56621355b

helpers.clear: keep GCOV_ERROR_FILE in environment

* ci: AppVeyor: remove MINGW_64 config (used with cov now)

Also:

- run MINGW_64-gcov first, and with PRs, since it provides coverage.
2019-06-14 13:39:57 +02:00
Daniel Hahler
dd21cd2a4d
tests: increase timeout with "timers doesn't mess up the cmdline" (#10212)
This might be required on (slower) CI.

    [ RUN      ] timers doesn't mess up the cmdline: ERR
    test/functional/ui/screen.lua:562: expected intermediate screen state before final screen state
    stack traceback:
            test/functional/ui/screen.lua:562: in function '_wait'
            test/functional/ui/screen.lua:366: in function 'expect'
            .../build/neovim/neovim/test/functional/eval/timer_spec.lua:221: in function <.../build/neovim/neovim/test/functional/eval/timer_spec.lua:199>

Ref: https://travis-ci.org/neovim/neovim/jobs/544974506#L3861
2019-06-13 22:11:33 +02:00
Harm te Hennepe
424ddd01f5 tui: support rgba background detection (#10205)
Fixes https://github.com/neovim/neovim/issues/10159.
2019-06-13 14:14:41 +02:00
Daniel Hahler
6f27f5ef91 main: do event_init before early_init #10183
Fixes https://github.com/neovim/neovim/issues/10172

* move log_init to event_init
* move init_signs to end of early_init
2019-06-12 14:22:42 +02:00
erw7
ce90a19abd TUI: set os/input.c:global_fd to input->in_fd #10174
Problem: When we changed startup to wait for the TUI (like a remote UI),
         we forgot to set os/input.c:global_fd.  That used to be done by
         input_start().

Solution: Initialize os/input.c:global_fd before initializing libtermkey
          (termkey_new_abstract) so that tui_get_stty_erase() and
          friends can inspect the correct fd.

fixes #10134
close #10174
2019-06-10 16:43:52 +02:00
George Zhao
c83926cd0a lua: introduce vim.loop (expose libuv event-loop) #10123
Co-authored-by: Andrey Popp <8mayday@gmail.com>

closes #9546
closes #10084
2019-06-10 14:13:18 +02:00
Justin M. Keyes
bb24fec333
defaults: exclude "S" from 'shortmess' #10136
ref #6289
2019-06-07 23:11:28 +02:00
Björn Linse
b684bd05b5 lua: docs and tests for vim.schedule 2019-06-05 10:46:22 +02:00
Björn Linse
16ee24082f
Merge pull request #10117 from bfredl/ctrl-o_event
normal: Don't exit CTRL-O mode after processing K_EVENT
2019-06-04 15:23:40 +02:00
Björn Linse
3adb8a10b1
Merge pull request #9170 from bfredl/lua_cb
lua callbacks for nvim_buf_attach
2019-06-04 14:54:44 +02:00
Björn Linse
e50aa2a6c6 normal: Don't exit CTRL-O mode after processing K_EVENT 2019-06-04 13:59:43 +02:00
Björn Linse
f5c56f03bb api: allow nvim_buf_attach from lua using callbacks 2019-06-04 13:45:20 +02:00
erw7
89c2747eed Fix issue where test fails 2019-06-04 08:49:27 +09:00
Justin M. Keyes
49733df939 Merge #9338 'vim-patch:8.1.{569,571}' 2019-06-03 22:56:43 +02:00
Björn Linse
7ac3c311ee api/buffer: create new buffers in the "opened" state
Otherwise vim will think that ml_append() needs to "enter" the buffer,
which emits unexpected autocommands.

ref https://github.com/vim-airline/vim-airline/issues/1930
2019-06-03 13:54:03 +02:00
Björn Linse
3d24bb48e7 test: don't detach screen just to change the size 2019-06-03 11:23:10 +02:00
Jit Yao Yap
c96aed2ba7 Add test 2019-06-03 11:14:07 +02:00
Jan Edmund Lazo
f0078c26c2 functionaltests: fix new execute() tests 2019-06-03 00:12:01 -04:00
Sha Liu
5a4e7af77d update functional test for "places cursor correctly #6035" 2019-06-03 00:12:01 -04:00
Sha Liu
73a2922413 UI: Fix wrong msg_col after execute()
closes #6035
closes #9250
2019-06-03 00:12:01 -04:00
Justin M. Keyes
c0134660ab test: avoid some boilerplate 2019-06-03 00:08:32 +02:00
Ville Hakulinen
40218d1180 Make sure msg_clear is sent after confirm message (#10065) 2019-06-02 23:38:19 +02:00
Jit
b65a7b7f66 [RDY] Fix wildmode=list,full and display+=msgsep interaction (#10103)
* Fix wildmode=list and display+=msgsep interaction
* Add test to check ext_messages behaviour is unchanged
2019-06-02 21:38:34 +02:00
Justin M. Keyes
2e171a6fd1 test: cleanup, reduce verbosity 2019-06-01 21:59:42 +02:00
Justin M. Keyes
fb4d5a1846
UI/ext_messages: restore kind=quickfix #10067
Accidentally removed in 34f9e72af9.
ref #6201
2019-05-27 00:01:41 +02:00
Justin M. Keyes
1ca84897a0
Merge #10059 from jerdna-regeiz/vim-8.1.0614
vim-patch:8.1.0614,8.1.0632,8.1.0644,8.1.0658,8.1.0660,8.1.0669,8.1.0673,8.1.0679,8.1.0697,8.1.0701,8.1.0702,8.1.0709,8.1.0717,8.1.0750,8.1.0767,8.1.0772,8.1.0039
2019-05-26 20:59:28 +02:00
Jit
0bbaef8a99 UI/cmdline: check if redraw is needed after K_EVENT, K_COMMAND #9804
fixes #8490
2019-05-26 19:52:30 +02:00
Andrej Zieger
35fbb4e1ca vim-patch:8.1.0701: sign message not translated and inconsistent spacing
Problem:    Sign message not translated and inconsistent spacing.
Solution:   Add _() for translation.  Add a space. (Ken Takata)  Also use
            MSG_BUF_LEN instead of BUFSIZ.
d730c8e297
2019-05-26 19:32:32 +02:00
Andrej Zieger
fb9abd7d99 vim-patch:8.1.0614: placing signs can be complicated
Problem:    Placing signs can be complicated.
Solution:   Add functions for defining and placing signs.  Introduce a group
            name to avoid different plugins using the same signs. (Yegappan
            Lakshmanan, closes vim/vim#3652)
162b71479b
2019-05-26 19:32:31 +02:00
Björn Linse
aabda31d54
Merge pull request #9547 from bfredl/rpc_multiline_err
messages: use proper multiline errors for rpcrequest and API wrappers
2019-05-26 18:11:49 +02:00
Björn Linse
8ed54bbec3 messages: use proper multiline error message for rpcrequest and API wrappers 2019-05-26 15:42:16 +02:00
Jan Edmund Lazo
08aa9b0023 vim-patch:8.1.0211: expanding a file name "~" results in $HOME
Problem:    Expanding a file name "~" results in $HOME. (Aidan Shafran)
Solution:   Change "~" to "./~" before expanding. (closes vim/vim#3072)
00136dc321
2019-05-25 20:36:01 -04:00
Justin M. Keyes
a9d7ec4587 refactor: introduce XFREE_CLEAR()
Unfortunately we cannot indiscriminately replace xfree() with
XFREE_CLEAR(), because comparing pointers after freeing them is a common
pattern. Example in `tv_list_remove_items()`:

    xfree(li);
    if (li == item2) {
      break;
    }

Instead we can do it selectively/explicitly.

ref #1375
2019-05-25 10:01:17 +02:00
Justin M. Keyes
5b04a4fa09 lua/shared: share trim() impl 2019-05-20 23:46:56 +02:00