Commit Graph

9655 Commits

Author SHA1 Message Date
Justin M. Keyes
d31b94ac20
Merge #7188 from justinmk/doc
doc; minor runtime bug fixes
2017-11-06 05:04:37 +01:00
Justin M. Keyes
280943d9b9 doc: API (generated) 2017-11-06 04:51:34 +01:00
Justin M. Keyes
7e59b897c1 gen_api_vimdoc.py: workaround: attributes of (void) functions 2017-11-06 04:27:31 +01:00
Justin M. Keyes
7984959ef5 gen_api_vimdoc.py: support Doxygen @note 2017-11-06 04:16:07 +01:00
Justin M. Keyes
fb3c21e090 doc: job-control
closes #4266
closes #4746
ref https://github.com/neovim/neovim/issues/7058#issuecomment-317196803
2017-11-06 01:56:04 +01:00
Justin M. Keyes
5d2af7e452 man.vim: allow other ex-commands after :Man 2017-11-06 01:56:04 +01:00
Justin M. Keyes
8cb77acb44 spellfile.vim: use :keeppatterns before :global 2017-11-06 01:56:04 +01:00
Justin M. Keyes
73fabf4f15 doc: nvim_buf_add_highlight(): zero-indexed lines 2017-11-06 01:56:04 +01:00
Justin M. Keyes
842a54a1bb doc 2017-11-06 01:56:04 +01:00
KillTheMule
04b3c32772 'inccommand': Fix matches for zero-width (#7487)
closes #7485
2017-11-05 17:11:44 +01:00
Justin M. Keyes
54cac3033f test: startup_spec: cmd.exe escaping 2017-11-04 09:36:52 +01:00
Justin M. Keyes
68bef0a57d test: has("ttyin"), has("ttyout") 2017-11-04 09:36:52 +01:00
Justin M. Keyes
860ecd7055 vim-patch:8.0.0096: has('ttyin'), has('ttyout')
Nvim note: intentionally did not include `--ttyfail` since its purpose
is not clear. (And it isn't used in any Vim test files/scripts).

---

Problem:    When the input or output is not a tty Vim appears to hang.
Solution:   Add the --ttyfail argument.  Also add the "ttyin" and "ttyout"
            features to be able to check in Vim script.

2cab0e1910
2017-11-04 09:36:52 +01:00
Björn Linse
739bc5124a
docs: correct cmdline_special_char documentation (#7475) 2017-11-03 09:34:31 +01:00
James McCoy
a39c8b7ce3 test: server_spec: Tolerate missing protocol (#7478)
Travis disabled IPv6:

[ RUN      ] serverstart(), serverstop() parses endpoints correctly: FAIL
...build/neovim/neovim/test/functional/eval/server_spec.lua:83: Expected objects to be the same.
Passed in:
(table) {
  [1] = '127.0.0.1:12345' }
Expected:
(table) {
  [1] = '127.0.0.1:12345'
 *[2] = '::1:12345' }

Change all tests to ensure a server was actually started before
expecting it to be returned from serverlist().
2017-11-02 10:45:38 +01:00
Lech Lorens
ff819d8ad7 quickfix: fix location list updates.
Fix quickfix performance optimization which prevented quickfix items
from being updated when there were multiple windows with location lists
but the buffer with errors only in one of the lists.
2017-10-31 19:14:23 +01:00
Lech Lorens
6340689582 quickfix: fix location list updates (test). 2017-10-31 19:14:23 +01:00
Billy Vong
eed10f7e23 use provider#stderr_collector 2017-10-31 08:35:29 -07:00
Justin M. Keyes
54b79f19d7
win/package: nvim-qt v0.2.8 (#7464) 2017-10-31 12:53:07 +01:00
Justin M. Keyes
b67f58b284 Merge #7454 'ui: ext_wildmenu'
closes #6168
ref #5686
2017-10-31 10:45:06 +01:00
Justin M. Keyes
60b1e8ad12 Merge #7315 "'inccommand': multiline, other fixes"
closes #5589
closes #5590
closes #5598
closes #5608
2017-10-31 01:11:35 +01:00
Justin M. Keyes
241fe704a5
pvs/V575: false positive (#7462)
./src/nvim/ex_getln.c:2787:1: error: V575 The 'memcpy' function doesn't
copy the whole string. Use 'strcpy / strcpy_s' function to preserve
terminal null.

We could instead "trick" PVS like this:

    diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
    index e79476ab532a..295630693b27 100644
    --- a/src/nvim/ex_getln.c
    +++ b/src/nvim/ex_getln.c
    @@ -2782,9 +2782,10 @@ static void ui_ext_cmdline_show(CmdlineInfo *line)

     void ui_ext_cmdline_block_append(int indent, const char *line)
     {
    -  char *buf = xmallocz(indent + strlen(line));
    +  size_t linelen = strlen(line);
    +  char *buf = xmallocz(indent + linelen);
       memset(buf, ' ', indent);
    -  memcpy(buf+indent, line, strlen(line));
    +  memcpy(buf + indent, line, linelen);

       Array item = ARRAY_DICT_INIT;
       ADD(item, DICTIONARY_OBJ((Dictionary)ARRAY_DICT_INIT));
2017-10-30 23:29:47 +01:00
Justin M. Keyes
efa9152852
Merge #7456 from justinmk/vim-8.0.1207 2017-10-30 09:49:50 +01:00
Justin M. Keyes
cc7285823c eval_clear: free profile data
Memory leak exposed by new test added in #7444.

==38771==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 2400 byte(s) in 1 object(s) allocated from:
    0 0x51163d in realloc (/home/travis/build/neovim/neovim/build/bin/nvim+0x51163d)
    1 0xfda51c in xrealloc /home/travis/build/neovim/neovim/src/nvim/memory.c:169:15
    2 0xda6802 in ga_grow /home/travis/build/neovim/neovim/src/nvim/garray.c:98:14
    3 0xb67ccd in script_line_start /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:3286:11
    4 0xb62885 in getsourceline /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:3110:5
    5 0xb5fbfd in do_source /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2951:15
    6 0xb5c484 in cmd_source /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2710:14
    7 0xb5c5b0 in ex_source /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2691:3
    8 0xb950b9 in do_one_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:2242:5
    9 0xb737e1 in do_cmdline /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:609:20
    10 0xb79ac5 in do_cmdline_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:280:10
    11 0xed8a7b in exe_commands /home/travis/build/neovim/neovim/src/nvim/main.c:1684:5
    12 0xec6602 in main /home/travis/build/neovim/neovim/src/nvim/main.c:521:5
    13 0x2ae968600f44 in __libc_start_main /build/eglibc-SvCtMH/eglibc-2.19/csu/libc-start.c:287
2017-10-30 08:37:59 +01:00
Billy Vong
7890157931 remote: add node.js as a remote plugin provider 2017-10-29 11:10:33 -07:00
Billy Vong
8b199cb2fe health: add node health check 2017-10-29 11:06:47 -07:00
KillTheMule
4daf63871a Fix cmd modifier tests for the new highlight 2017-10-29 18:21:26 +01:00
KillTheMule
7b4baad674 Remove superflous parameter from show_sub 2017-10-29 18:11:32 +01:00
KillTheMule
369ac900f9 Adjust tests for new highlighting.
Also extend an old test to show of the new way.
2017-10-29 18:11:32 +01:00
KillTheMule
0c358725b1 Fix highlighting conflict 2017-10-29 18:11:32 +01:00
KillTheMule
ab942b7ffb Test for clearing the highlight 2017-10-29 18:11:32 +01:00
KillTheMule
353c81af1e Clear highlight when there's no match 2017-10-29 18:11:32 +01:00
KillTheMule
be20b20cf3 Adjust tests for the new preview window
... that does not have that superflous last line.

Also, remove some indeterminism for the freebsd64 tests. Partially,
those were suggested by the tests themselves, while successfull. Some of
them were added after some testing because the lookaround test would
fail on freebsd64 only.
2017-10-29 18:11:32 +01:00
KillTheMule
d8bb1dabb6 Fix the last line in the preview buffer
It would always show an empty line at the end that didn't belong.
2017-10-29 18:11:32 +01:00
KillTheMule
3e5ecd9538 Remove pat/sub from show_sub
They were only used to not show the preview window when typing "s/" or
"s//" only, in which case the previous pattern would be reused. Now the
window is shown in that case.
2017-10-29 18:11:32 +01:00
KillTheMule
a4e4f2bd02 Move tests into original file, lint, and add a test 2017-10-29 18:11:32 +01:00
KillTheMule
35b867d786 Lint 2017-10-29 18:10:46 +01:00
KillTheMule
1fcd838942 Fix old inccomand tests, and add more for the new functionality. 2017-10-29 18:10:46 +01:00
KillTheMule
8d929f558c Inccommand: Multiline substitutions, highlighting, multibyte.
Make inccomand work with multiline patterns and substitutions. Also care
for proper highlighting and multibyte characters.
2017-10-29 18:10:46 +01:00
Justin M. Keyes
1e2ae942f3 vim-patch:8.0.1207
Problem:    Profiling skips the first and last script line.
Solution:   Check for BOM after setting script ID. (Lemonboy, closes vim/vim#2103,
            closes vim/vim#2112) Add a test. List the trailing script lines.

67435d9983
2017-10-29 17:42:37 +01:00
Justin M. Keyes
45296b331f Merge #7444 'vim-patch: test :profile' 2017-10-29 13:54:17 +01:00
Justin M. Keyes
6c43fccb27 vim-patch:8.0.0944
Problem:    Test_profile is a little bit flaky.
Solution:   Accept a match when self and total time are the same. (James
            McCoy, closes vim/vim#1972)

d21b16f3c0
2017-10-29 13:48:03 +01:00
Björn Linse
59f5eb0065 doc: ui.txt 2017-10-29 08:18:03 +01:00
Dongdong Zhou
39e83fa7cb ui: allow external ui to draw wildmenu
Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
Updated docs and tests.
2017-10-29 08:18:03 +01:00
Björn Linse
2a3bcd1ff8 rpc: Don't delay notifications when request is pending (#6544)
With the old behavior, if a GUI makes a blocking request that requires user
interaction (like nvim_input()), it would not get any screen updates.

The client, not nvim, should decide how to handle notifications during a
pending request. If an rplugin wants to avoid async calls while a sync call is
busy, it likely wants to avoid processing async calls while another async call
also is handled as well.

This may break the expectation of some existing rplugins. For compatibility,
remote/define.vim reimplements the old behavior. Clients can opt-out by
specifying `sync=urgent`.

- Legacy hosts should be updated to use `sync=urgent`. They could add a flag
  indicating which async methods are always safe to call and which must wait
  until the main loop returns.
- New hosts can expose the full asyncness, they don't need to offer both
  behaviors.

ref #6532
ref #1398 d83868fe90
2017-10-29 03:06:53 +01:00
Justin M. Keyes
3a938fff09
test/win: partially disable :terminal resize test (#7453) 2017-10-29 02:10:37 +01:00
Justin M. Keyes
7b0ceb3726 Merge #7173 'api/ui: externalize cmdline'
closes #6162
2017-10-29 02:13:12 +02:00
Justin M. Keyes
1a93f58831 test: ui/cmdline_spec.lua: enable on Windows 2017-10-29 02:12:45 +02:00
Justin M. Keyes
8526902790 doc/ui.txt 2017-10-29 02:12:45 +02:00
KunMing Xie
122f52bf89 vim-patch:8.0.0206 (#7446)
Problem:    Test coverage for :retab insufficient.
Solution:   Add test for :retab. (Dominique Pelle, closes vim/vim#1391)

8822744b4d
2017-10-28 18:05:59 +02:00