Commit Graph

12366 Commits

Author SHA1 Message Date
Jan Edmund Lazo
4157f4c72d ex_docmd: '/' is not a path for Cmdline* events
Code from https://github.com/neovim/neovim/pull/9348#issuecomment-446416118

autocmd_fname_full was removed in 82cd0be2ea
but Vim uses this hack for <afile> on CmdlineEnter and related events
in vim-patch:8.0.1748.
Port the hack by not treating "/" as a path for <afile> on these events.
2018-12-12 19:15:05 -05:00
Jan Edmund Lazo
0930435fc3 vim-patch:8.0.1748: CmdlineEnter command uses backslash instead of slash
Problem:    CmdlineEnter command uses backslash instead of slash.
Solution:   Don't treat the character as a file name. (closes vim/vim#2837)
a4baf5b325
2018-12-12 19:14:16 -05:00
Marco Hinz
315769ae6d
test: :ruby reports E319 if provider is missing 2018-12-12 22:11:00 +01:00
Marco Hinz
5062d8e0dd
provider: make :ruby provider check use same code path as :python
Prior to this change, the provider check for ruby was special-cased and now it
returns E319, like :python etc.

References #9354
2018-12-12 21:59:02 +01:00
Björn Linse
2f3a18695e
Merge pull request #7946 from bfredl/vim-8.0.1445
implement CmdlineChanged: vim-patch:8.0.1445 + nvim specific v:event stuff
2018-12-12 21:40:10 +01:00
Björn Linse
5f82889be7 cmdline: support v:event in CmdlineChanged 2018-12-12 15:31:52 +01:00
Björn Linse
6c602be33a vim-patch:8.0.1445: cannot act on edits in the command line
Problem:    Cannot act on edits in the command line.
Solution:   Add the CmdlineChanged autocommand event. (xtal8, closes vim/vim#2603,
            closes vim/vim#2524)

153b704e20
2018-12-12 10:25:36 +01:00
Justin M. Keyes
b9a441eb78
Merge #9354 from justinmk/provider-E319
provider: repurpose E319
2018-12-12 02:38:08 +01:00
Justin M. Keyes
61d0dfee32 provider: repurpose E319
In Vim (and some vestigial parts of Nvim) E319 was a placeholder for
ex_ni commands, i.e. commands that are only available in certain builds
of Vim.  That is obviously counter to Nvim's goals: all Nvim commands
are available on all platforms and build types (the remaining ex_ni
commands are actually just missing providers).

We need an error id for "missing provider", so it makes sense to use
E319 for that purpose.

ref #9344
ref #3577
2018-12-12 01:26:21 +01:00
Justin M. Keyes
2b01c3a8a8 ex_cmds: Remove various "not implemented" commands
Commands related to Netbeans, Sun Workshop, and GUI shims, were
intentionally removed and will not be implemented.
2018-12-11 23:53:27 +01:00
Marco Hinz
5fee0be915 provider: improve error message (#9344)
Executing `:python`, and similar commands that rely on `eval_call_provider()`,
while the accompanying provider it not available, leads to this error message:

    E117: Unknown function: provider#python#Call

This doesn't say much to a user. Since we introduced `:checkhealth` for this
very reason, we now point to it for further diagnosis.

Fixes #3577
2018-12-11 23:43:35 +01:00
Patrice Peterson
3c42d7a10a TUI: alacritty supports set_cursor_color #9353
Feature was added in:
https://github.com/jwilm/alacritty/pull/757

closes #9353
2018-12-11 22:49:16 +01:00
Marco Hinz
57acfceabe macOS: infer primary language if $LANG is empty #9345
The macOS preferences have a section called `Language & Region`. There is always
at least one language defined, the primary language.

CFLocaleCopyPreferredLanguages() returns the languages defined in that section,
the first element being the primary language.

Use the primary language in case CFLocaleCopyCurrent() returns NULL.

In the case that the above fallback does not work either, which is very
unlikely, log the error and continue with an empty $LANG.

References #9134
2018-12-11 21:58:35 +01:00
Björn Linse
5a90761e8a
Merge pull request #9351 from bfredl/clear_attr
TUI: don't use BCE with attributes affecting background
2018-12-11 18:58:07 +01:00
Björn Linse
ca1de71a3e TUI: don't use BCE with attributes affecting background 2018-12-11 17:20:19 +01:00
Jan Edmund Lazo
55c5185884 vim-patch:8.1.0574: 'commentstring', fold marker in C (#9339)
Problem:    'commentstring' not used when adding fold marker in C.
Solution:   Require white space before middle comment part. (mostly by
            Hirohito Higashi)
4af7259b2b
2018-12-10 03:11:56 +01:00
Justin M. Keyes
20620bae76 Merge #9306 'vim-patch: integrate xdiff library'
closes #1466
closes #1007
closes #1391
2018-12-09 23:07:28 +01:00
Anatolii Sakhnik
4e29810817 vim-patch:8.1.0562: parsing of 'diffopt' is slightly wrong
Problem:    Parsing of 'diffopt' is slightly wrong.
Solution:   Fix the parsing and add a test. (Jason Franklin, Christian
            Brabandt)

b6fc72851c
2018-12-09 22:19:41 +02:00
Anatolii Sakhnik
f273e43cb8 vim-patch:8.1.0513: no error for set diffopt+=algorithm:
Problem:    No error for set diffopt+=algorithm:.
Solution:   Check for missing argument. (Hirohito Higashi, closes #3598)

d0721058f4
2018-12-09 22:19:41 +02:00
Anatolii Sakhnik
89eba72792 vim-patch:8.1.0502: internal diff fails when diffing a context diff
Problem:    Internal diff fails when diffing a context diff. (Hirohito Higashi)
Solution:   Only use callback calls with one line. (closes #3581)

f080d70a82
2018-12-09 22:19:41 +02:00
Anatolii Sakhnik
8f20c22e10 vim-patch:8.1.0497: :%diffput changes order of lines
Problem:    :%diffput changes order of lines. (Markus Braun)
Solution:   Do adjust marks when using internal diff.

5f57bdcab7
2018-12-09 20:05:53 +02:00
Anatolii Sakhnik
e104228b1c vim-patch:8.1.0458: ml_get error and crash when using "do"
Problem:    Ml_get error and crash when using "do".
Solution:   Adjust cursor position also when diffupdate is not needed.
            (Hirohito Higashi)

df77cef92e
2018-12-09 19:55:08 +02:00
Anatolii Sakhnik
fe0114ec41 vim-patch:8.1.0402: the DiffUpdate event isn't triggered for :diffput
Problem:    The DiffUpdate event isn't triggered for :diffput.
Solution:   Also trigger DiffUpdate for :diffget and :diffput.

198fa066b2
2018-12-09 19:45:56 +02:00
Anatolii Sakhnik
271249a48a vim-patch:8.1.0400: using freed memory with :diffget
Problem:    Using freed memory with :diffget.
Solution:   Skip ex_diffupdate() while updating diffs. (closes #3442)

d2b58c0a2c
2018-12-09 19:45:56 +02:00
Anatolii Sakhnik
2c92a4d0c8 vim-patch:8.1.0397: no event triggered after updating diffs
Problem:    No event triggered after updating diffs.
Solution:   Add the DiffUpdated event.

e8fa05b5bc
2018-12-09 19:45:56 +02:00
Anatolii Sakhnik
b7f2c7dd1d vim-patch:8.1.0395: compiler warning on 64-bit MS-Windows
Problem:    Compiler warning on 64-bit MS-Windows.
Solution:   Add type cast. (Mike Williams)

6e272acc82
2018-12-09 19:45:56 +02:00
Anatolii Sakhnik
7b6c92eac1 vim-patch:8.1.0394: diffs are not always updated correctly
Problem:    Diffs are not always updated correctly.
Solution:   When using internal diff update for any changes properly.

e3521d9cbb
2018-12-09 19:45:56 +02:00
Anatolii Sakhnik
972ad11195 vim-patch:8.1.0393: not all white space difference options available
Problem:    Not all white space difference options available.
Solution:   Add "iblank", "iwhiteall" and "iwhiteeol" to 'diffopt'.

785fc6567f
2018-12-09 19:45:56 +02:00
Anatolii Sakhnik
72c5a9db70 vim-patch:8.1.0375: cannot use diff mode with Cygwin diff.exe
Problem:    Cannot use diff mode with Cygwin diff.exe. (Igor Forca)
Solution:   Skip over unrecognized lines in the diff output.

3b8defd0a5
2018-12-09 19:45:56 +02:00
Anatolii Sakhnik
cf1ffa9166 vim-patch:8.1.0360: using an external diff program is slow and inflexible
Problem:    Using an external diff program is slow and inflexible.
Solution:   Include the xdiff library. (Christian Brabandt)
            Use it by default.

e828b7621c

vim-patch:8.1.0360
vim-patch:8.1.0364
vim-patch:8.1.0366
vim-patch:8.1.0370
vim-patch:8.1.0377
vim-patch:8.1.0378
vim-patch:8.1.0381
vim-patch:8.1.0396
vim-patch:8.1.0432
2018-12-09 19:45:56 +02:00
Anatolii Sakhnik
67c5bc1ac0 Calm down the clinter 2018-12-09 08:07:59 +02:00
Justin M. Keyes
857a7312d0
doc (#9288)
- misc
- doc: `:help config`. closes #9329
- cleanup test/README.md
2018-12-09 01:31:34 +01:00
Jan Edmund Lazo
f1eb25f0c4 vim-patch:8.1.0570: 'commentstring' not used when adding fold marker (#9331)
Problem:    'commentstring' not used when adding fold marker. (Maxim Kim)
Solution:   Only use empty 'comments' middle when leader is empty. (Christian
            Brabandt, closes vim/vim#3670)
539328197c
2018-12-08 14:21:49 +01:00
Justin M. Keyes
bd97577954
Merge #9322 from janlazo/vim-8.1.0563
vim-patch:8.1.{563,564}
2018-12-08 01:20:21 +01:00
Justin M. Keyes
bc132ae123
runtime/syntax: Fix highlighting of augroup contents (#9328)
Comparing `vimCommand` from Vim's runtime/syntax/vim.vim, one can see
that "augroup" and similar commands are conspicuously missing. They are
handled specially (`vimAugroupKey`, `vimAutoCmd`).

Excluding them from the generated `vimCommand` keyword list, fixes their
highlighting.

closes #9327
2018-12-08 01:16:58 +01:00
Justin M. Keyes
8b9f6103bd
CI/Travis: install gperf using package manager (#9325)
Install gperf using package manager instead of building it from source.
When building/installing gperf from source, its install step requires
`texi2pdf` which randomly goes missing on Travis:

    cd doc; /usr/bin/make install
    make[1]: Entering directory '/home/travis/nvim-deps/build/src/gperf/doc'
    cd . && rm -f gperf.aux gperf.toc gperf.cp gperf.fn gperf.ky gperf.pg gperf.tp gperf.vr gperf.log gperf.cps
    cd . && texi2pdf gperf.texi
    /bin/sh: 1: texi2pdf: not found

It's nice to test the "bundled" deps on Travis, but that gets enough
exercise on Windows and macOS, which are the platforms that actually
need "bundled" gperf.
2018-12-07 20:09:44 +01:00
Björn Linse
b93670174e
Merge pull request #9324 from bfredl/virtfix
api: make nvim_set_virtual_text use correct namespace counter
2018-12-07 18:49:00 +01:00
Björn Linse
b4a04fd80c api: make nvim_buf_set_virtual_text use correct namespace counter 2018-12-07 17:31:05 +01:00
Jan Edmund Lazo
f177005447 vim-patch:8.1.0564: setting v:errors to wrong type still possible
Problem:    Setting v:errors to wrong type still possible.
Solution:   Return after giving an error message. (Christian Brabandt)
88b53fd052
2018-12-06 23:24:09 -05:00
Jan Edmund Lazo
4c4997e988 vim-patch:8.1.0563: setting v:errors to a string give confusing error
Problem:    Setting v:errors to a string give confusing error. (Christian
            Brabandt)
Solution:   Change internal error into normal error message.
74ea88c170
2018-12-06 23:21:49 -05:00
Jan Edmund Lazo
7697628345 vim-patch:8.0.1425: execute() does not work in completion of user command (#9317)
Problem:    execute() does not work in completion of user command. (thinca)
Solution:   Switch off redir_off and restore it. (Ozaki Kiichi, closes vim/vim#2492)
2095148277
2018-12-06 01:14:19 +01:00
Björn Linse
77b5e9ae25
Merge pull request #9315 from bfredl/clear_status
screen: add missing status redraw when <c-l> was used
2018-12-05 11:54:46 +01:00
Björn Linse
f1ce9b3be2 screen: add missing status redraw when redraw_later(CLEAR) was used 2018-12-05 10:57:43 +01:00
Justin M. Keyes
e509576e53
provider/lang: expand() g:foo_host_prog (#9312)
Before this commit, if user does this:
    let g:node_host_prog = '~/.nvm/versions/node/v11.3.0/bin/neovim-node-host'
the "~/" is not expanded to user's home directory.

`:help g:ruby_host_prog` suggests a path with "~/" so technically we
already claimed to support this.

closes https://github.com/neovim/node-client/issues/102
2018-12-05 00:11:28 +01:00
Justin M. Keyes
c07e48a900
vim-patch:8.1.0559: command line completion not sufficiently tested (#9310)
Problem:    Command line completion not sufficiently tested.
Solution:   Add more tests. (Dominique Pelle, closes vim/vim#3622)
b513d3079b
2018-12-04 21:39:18 +01:00
@equalsraf
d207440f1e clipboard: Revert unused check #9309
PR #9304 added support for functions in clipboard providers. As part of
the PR I meant to move two checks in the provider code out of an if
statement into separate statements and adding additional checks for
g:clipboard attributes - as it turns out the code is wrong and it does
not implement additional checks while it adds two conditions that make
very little sense

    type(g:clipboard['copy']) #isnot# v:t_func

what would make sense would be something along the lines of

    type(g:clipboard['copy']['+']) #isnot# v:t_func

but might not be what we want either, so I'm reverting this.
2018-12-04 21:38:20 +01:00
Jan Edmund Lazo
abd32c1bb8 vim-patch:8.1.0559: command line completion not sufficiently tested
Problem:    Command line completion not sufficiently tested.
Solution:   Add more tests. (Dominique Pelle, closes vim/vim#3622)
b513d3079b
2018-12-03 22:48:27 -05:00
James McCoy
7e97587dae
Merge pull request #9307 from jamessan/codecov-threshold
codecov: Tolerate a 1% drop in coverage for a PR
2018-12-03 11:22:48 -05:00
Björn Linse
231de72539
Merge pull request #9300 from bfredl/asyncerr
rpc: fix invalid responses, turn errors from async calls into notifications
2018-12-03 13:00:41 +01:00
Björn Linse
8b42249cdd RPC: turn errors from async calls into notifications
Previously, nvim sent a response with invalid request id (UINT64_MAX).
In functionaltests, catch unexpected error notifications in after_each().
2018-12-03 10:42:00 +01:00