Commit Graph

6697 Commits

Author SHA1 Message Date
Justin M. Keyes
242c3d5f0b version bump 2016-10-28 15:16:59 +02:00
Justin M. Keyes
cc1ec959f1 NVIM v0.1.6
FEATURES:
0b5a7e4ad5 #4432 API: external UIs can render custom popupmenu
c6ac4f84b1 #4934 API: call any API method from vimscript
31df051ed9 #4568 API: nvim_call_atomic(): multiple calls in a single request
b268ba353a #5424 API: nvim_win_get_number(), nvim_tabpage_get_number()
e7e2844d46 has("nvim-1.2.3") checks for a specific Nvim version
522b885a0d #5295, #5493 `:CheckHealth` checks tmux, terminfo, performance
719dae2e01 #5384 events: allow event processing in getchar()
f25797f869 #5386 API: metadata: Nvim version & API level
22dfe6925d #5389 API: metadata: "since", "deprecated_since"
605e74327a Added QuickFixLine highlight group

CHANGES:
4af6ec746c #5253 perf: Disable clipboard in do_cmdline()
6e9f329d05 #5299 perf: Skip foldUpdate() in insert-mode.
9d4fcec7c6 #5426 perf: Do not auto-update folds for some foldmethods.
eeec0cab58 #5419 tui: Default to normal-mode cursor shape.

FIXES:
e83845285c #5436 tui: Fix "weird characters" / "bleeding termcodes"
10a54ad12e #5243 signal_init: Always unblock SIGCHLD.
bccb49bedb #5316 eval.c: Fix memory leak for detached pty job
626065d385 #5227 tchdir: New tab should inherit CWD.
cd321b7d0f #5292 getcwd(): Return empty string if CWD is invalid.
6127eaef05 shada: Fix non-writeable ShaDa directory handling
ca65514a24 #2789 system(): Respect shellxescape, shellxquote
2daf54ee8d #4874 Restore vim-like tab dragging
0c536b5d8a #5319 syntax.c: Support bg/fg special color-names.
3c53371b0c #4972 from justinmk/schedule-ui_refresh
68bcb32ec4 #4789 tui.c: Do not wait for tui loop on teardown.
c8b6ec2e6a #5409 v:count broken in command-line window
6bc3bcefc6 #5461 fix emoji display
51937e1322 #5470 fix :terminal with :argadd, :argu
79d77da8a0 #5481 external UIs: opening multiple files from command-line
657ba62a84 #5501 rplugin: resolve paths in manifest file
6a6f188d2a #5502 system('foo &', 'bar'): Show error, don't crash.
1ff162c0d9 #5515 os_nodetype: open fd with O_NONBLOCK
2a6c5bb0c4 #5450 modeline: Handle version number overflow.
0ade1bb706 #5225 CI tests now run against Windows!
2016-10-28 15:16:45 +02:00
Justin M. Keyes
5b514b5988 Merge #5535 from justinmk/api_level
api: Nvim version + API level
2016-10-28 14:53:09 +02:00
Justin M. Keyes
c5f5f427c6 api: api_info()['version']
API level is disconnected from NVIM version. The API metadata holds the
current API level, and the lowest backwards-compatible level supported
by this instance.

Release 0.1.6 is the first release that reports the Nvim version and API
level.

    metadata['version'] = {
      major: 0,
      minor: 1,
      patch: 6,
      api_level: 1,
      api_compatible: 0,
      api_prerelease: false,
    }

The API level may remain unchanged across Nvim releases if the API has
not changed.

When changing the API,
    - set NVIM_API_PRERELEASE to true
    - increment NVIM_API_LEVEL (at most once per Nvim version)
    - adjust NVIM_API_LEVEL_COMPAT if backwards-compatibility was broken

api_level_0.mpack was generated from Nvim 0.1.5 with:
    nvim --api-info
2016-10-28 14:33:13 +02:00
Justin M. Keyes
fb4d5b0516 CheckHealth: check for sensible.vim 2016-10-28 13:54:08 +02:00
Rui Abreu Ferreira
f25797f869 api: Nvim version, API level #5386
The API level is disconnected from the NVIM version. The API metadata
holds the current API level, and the lowest backwards-compatible level
supported by this instance.

Release 0.1.6 will be the first release reporting the Nvim version and
API level.

    metadata['version'] = {
      major: 0,
      minor: 1,
      patch: 6,
      prerelease: true,
      api_level: 1,
      api_compatible: 0,
    }

The API level may remain unchanged across Neovim releases if the API has
not changed.

When changing the API the CMake variable NVIM_API_PRERELEASE is set to
true, and  NVIM_API_CURRENT/NVIM_API_COMPATIBILITY are incremented
accordingly.

The functional tests check the API table against fixtures of past
versions of Neovim. It compares all the functions in the old table with
the new one, it does ignore some metadata attributes that do not alter
the function signature or were removed since 0.1.5.  Currently the only
fixture is 0.mpack, generated from Neovim 0.1.5 with nvim --api-info.
2016-10-26 14:23:50 +02:00
Justin M. Keyes
90bf31c742 Merge #5500
Closes #5246
2016-10-26 14:01:49 +02:00
Justin M. Keyes
26b90e95e7 test: Add missing test from vim-patch:7.4.2312 2016-10-26 13:53:14 +02:00
Michael Ennen
e350902b7d vim-patch:7.4.2128 (#5517)
Problem:    Memory leak when saving for undo fails.
Solution:   Free allocated memory. (Hirohito Higashi)

1e2258297b
2016-10-26 13:27:00 +02:00
Florian Larysch
2a6c5bb0c4 modeline: Handle version number overflow. #5450
Closes #5449

A file containing the string "vim" followed by a very large number in a modeline
location will trigger an overflow in getdigits() which is called by
chk_modeline() when trying to parse the version number.

Add getdigits_safe(), which does not assert overflows, but reports them to the
caller.
2016-10-26 13:05:25 +02:00
Michael Ennen
0f32088ea2 vim-patch:7.4.2109 (#5518)
vim-patch:7.4.2109

Problem:    Setting 'display' to "lastline" is a drastic change, while
            omitting it results in lots of "@" lines.
Solution:   Add "truncate" to show "@@@" for a truncated line.

ad9c2a08f0
2016-10-25 21:15:43 +02:00
Justin M. Keyes
e828a5a76b Merge #5530 from justinmk/checkhealth
CheckHealth: more checks. Also hack around an infinite loop.
2016-10-25 20:42:04 +02:00
Justin M. Keyes
e8ddbbdf07 list_features(): Hack around infinite loop.
msg_putchar() is not updating msg_col, this causes an infinite loop. Observed
with execute('version') *nested* in another execute(), in particular this line:
    let buildtype = matchstr(execute('version'), '\v\cbuild type:?\s*[^\n\r\t ]+')
when called by :CheckHealth (see runtime/autoload/health/nvim ..
s:check_performance()).

But invoking some variation of execute('...execute("version")') is not enough to
provoke the bug, maybe it needs to be in a user function?
2016-10-25 15:55:29 +02:00
Justin M. Keyes
c853fd6fab CheckHealth: more checks 2016-10-25 15:55:29 +02:00
Justin M. Keyes
714ec09c6d version: Allow has("nvim-x"), has("nvim-x.y") 2016-10-25 13:08:48 +02:00
Justin M. Keyes
e7e2844d46 version: has("nvim-1.2.3")
Helped-by: Daniel Hahler <git@thequod.de>
2016-10-25 11:40:37 +02:00
Justin M. Keyes
f96dfae52f doc; vim-patch.sh
Also include missing changes from:
06d2d38ab7
26852128a2
2016-10-24 13:26:55 +02:00
Justin M. Keyes
fb503d73da Merge #5483 from Shougo/vim-0648142
vim-patch 0648142, 91c4937, 06d2d38, 2685212, 269f595
2016-10-24 13:17:41 +02:00
Justin M. Keyes
43309d1993 test/api: Specify handling of VimL errors, v:errmsg.
TODO: Also spec behavior of Press-Enter prompt for these API functions.
2016-10-24 01:10:23 +02:00
Grzegorz Milka
d357a42389 Fix lint errors. 2016-10-23 01:17:39 +02:00
Grzegorz Milka
9755a2ffd5 vim-patch:7.4.2312
Problem:    Crash when autocommand moves to another tab. (Dominique Pelle)
Solution:   When navigating to another window halfway the :edit command go
            back to the right window.

5a49789a9b
2016-10-23 00:41:45 +02:00
Grzegorz Milka
c5c8a82134 vim-patch:7.4.2309
Problem:    Crash when doing tabnext in a BufUnload autocmd. (Dominique Pelle)
Solution:   When detecting that the tab page changed, don't just abort but
            delete the window where w_buffer is NULL.

11fbc2866c
2016-10-23 00:37:13 +02:00
Grzegorz Milka
d7b942b54e vim-patch:7.4.2237
Problem:    Can't use "." and "$" with ":tab".
Solution:   Support a range for ":tab". (Hirohito Higashi)

9b7f8ce9eb
2016-10-23 00:37:13 +02:00
Justin M. Keyes
fdc48cad7d Merge #5523 from justinmk/test-system
test: system(): Avoid indeterminism. Also adjust docs.
2016-10-23 00:33:51 +02:00
Justin M. Keyes
459a6ff058 test: system(): Avoid indeterminism. 2016-10-23 00:13:33 +02:00
Justin M. Keyes
8b8db9e158 api: documentation
Clarify behavior of v:errmsg and the Error object.
2016-10-23 00:13:33 +02:00
Grzegorz Milka
9ca90fdb9f vim-patch:7.4.2212
Problem:    Mark " is not set when closing a window in another tab. (Guraga)
Solution:   Check all tabs for the window to be valid. (based on patch by
            Hirohito Higashi, closes vim/vim#974)

e59215c7dc
2016-10-22 23:43:14 +02:00
Justin M. Keyes
500c485e36 Merge #5499 from tweekmonster/vim-8.0.0041
vim-patch: 8.0.0041, 8.0.0042, 8.0.0043
2016-10-22 23:36:04 +02:00
Grzegorz
e62f681d2d vim-patch:7.4.2227 (#5521)
Problem:    Tab page tests are old style.
Solution:   Change into new style tests. (Hirohito Higashi)

1381d79147
2016-10-22 23:22:50 +02:00
Tommy Allen
f2af6177fb vim-patch:8.0.0043
Problem:    When using Insert mode completion with 'completeopt' containing
            "noinsert" with CTRL-N the change is not saved for undo.  (Tommy
            Allen)
Solution:   Call stop_arrow() before inserting for any key.
2016-10-22 15:15:27 -04:00
Tommy Allen
d733beb0be vim-patch:8.0.0042
Problem:    When using Insert mode completion with 'completeopt' containing
            "noinsert" change is not saved for undo.  (Tommy Allen)
Solution:   Call stop_arrow() before inserting for pressing Enter.
2016-10-22 15:15:27 -04:00
Tommy Allen
c377c8be61 vim-patch:8.0.0041
Problem:    When using Insert mode completion but not actually inserting
            anything an undo item is still created. (Tommy Allen)
Solution:   Do not call stop_arrow() when not inserting anything.
2016-10-22 15:15:21 -04:00
Björn Linse
31df051ed9 Merge pull request #4568 from bfredl/multirequest
atomic multi request for async remote plugins
2016-10-22 12:50:50 +02:00
Björn Linse
f6968dc0f7 api: call multiple methods atomically (useful in async contexts)
remove unused response_id parameter of handle_nvim_... helpers
2016-10-22 10:51:32 +02:00
Shougo Matsushita
e904186277 vim-patch: mark applied #5381
vim-patch:b20617b
Add OSX build to Travis CI. (Christian Brabandt)
b20617b0b0

vim-patch:471a897
Update gitignore for new test binary.  (Oyvind Holm, closes vim/vim#954)
471a897569

vim-patch:2cb70a2
Put building with interfaces on the right target.
2cb70a2744

vim-patch:87776a1
Correct build condition.
87776a1ac1

vim-patch:8de7465
Add missing "then".
8de7465d77

vim-patch:1a9f947
Add a separate build target for the unittests. Hopefully the coverage will be merged then.
1a9f947cde

vim-patch:8211fcb
Run unittests before scripttests.  Hopefully does not mess up coverage.
8211fcbdc9

vim-patch:8e77bad
Add json_test to gitignore (Hirohito Higashi)
8e77bad3c1
2016-10-21 23:00:57 +02:00
Justin M. Keyes
1ff162c0d9 os_nodetype: open fd with O_NONBLOCK (#5515)
Closes #5267

Helped-by: oni-link <knil.ino@gmail.com>
2016-10-21 22:03:01 +02:00
Michael Ennen
82f30bfeda [RFC] vim-patch:7.4.1704 (#5487)
vim-patch:7.4.1704

Problem:    Using freed memory with "wincmd p". (Dominique Pelle)
Solution:   Also clear "prevwin" in other tab pages.

3dda7db4e1
2016-10-21 12:55:57 -04:00
Justin M. Keyes
6636e2a259 test: :terminal should not interrupt Press-ENTER
References #2748
2016-10-20 23:41:59 +02:00
James McCoy
5bcb7aa8bf Merge pull request #5441 from Shougo/vim-7.4.1588
vim-patch:7.4.1588
2016-10-20 10:47:42 -04:00
James McCoy
1ad5a970ce Merge pull request #5440 from Shougo/vim-7.4.1565
vim-patch:7.4.1565
2016-10-20 10:28:03 -04:00
James McCoy
978c1fd11f Merge pull request #5503 from jamessan/vim-7.4.1494
vim-patch:7.4.1494
2016-10-20 09:40:07 -04:00
Colin Caine
e19234f391 man.vim: silence file call (#5509)
When a file is opened by nvim with ft=man already set, and
"has('vim_starting')", ftplugin/man.vim calls
'execute 'file man://'.ref', this causes nvim to display something like
this:

````
"<name of original file>" 977, 41017C
"man://foo(1)" [Not edited] 977 lines --0%--
Press ENTER or type command to continue
````

This is annoying, because nothing of note has actually happened.

Use cases why you might want to read a man page from a file:

`MANPAGER='bash -c "nvim -c \"set ft=man\" </dev/tty <(col -bx)"' man git`
`nvim -c 'set ft=man' <(man -P cat git)`
2016-10-20 08:35:48 +02:00
Björn Linse
13262aef7a Merge pull request #5507 from bfredl/terminal_api
tests: fix racyness in terminal/api_spec.lua
2016-10-19 22:12:37 +02:00
Björn Linse
d1070787ca tests: fix racyness in terminal/api_spec.lua
Previously, the nvim_input from the socket channels could be processed
before the input from stdin in rare cases.
2016-10-19 15:21:49 +02:00
Björn Linse
2d961403ba Merge pull request #5393 from bfredl/dispatchfix
refactor gendispatch.lua to move verbatim c code to .c files
2016-10-19 15:16:05 +02:00
Björn Linse
caf85b80ae api: move verbatim c code out of gendispatch.lua and into c files
Remove max_fname_len check, which caused false successful lookups,
and was an optimization for a very rare case.
2016-10-19 09:06:30 +02:00
Shougo Matsushita
9d4fcec7c6 folds: Do not auto-update folds for some foldmethods. #5426 2016-10-19 02:22:55 +02:00
Justin M. Keyes
6a6f188d2a Merge #5502 from justinmk/error-write-to-bg-process
system('foo &', 'bar'): Show error, don't crash.
2016-10-19 02:09:29 +02:00
Justin M. Keyes
9706664b88 system('foo &', 'bar'): Show error, don't crash.
Closes #3529
Closes #5241

In Vim,
    :echo system('cat - &', 'foo')
works because for both system() and :! Vim writes input to a temp file and uses
shell syntax to redirect the file to the backgrounded `cat` (get_cmd_output()
.. make_filter_cmd()).

In Nvim,
    :echo system('cat - &', 'foo')
fails because we write the input directly via pipes (shell.c:do_os_system()),
but (per POSIX[1]) backgrounded process input stream is redirected from
/dev/null (unless overridden by shell redirection; supported only by some shells
[2]), so our writes are ignored, the process exits quickly, and if we are
writing data larger than the buffer size we'll see EPIPE.

This still works:
    :%w !tee > foo1358.txt &
but this does not:
    :%w !tee foo1358.txt &
though it *should* (why doesn't it?) because we still do the temp file dance
in do_bang() .. do_filter().

[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_03_02
[2] http://unix.stackexchange.com/a/71218
2016-10-19 01:39:05 +02:00
Justin M. Keyes
16da3a6fe0 test: system(): backgrounded shell command
These tests are essentially affirming a regression vs Vim. In Vim,
    :echo system('cat - &', 'foo')
returns "foo", because Vim internally wraps the command with shell-specific
syntax to redirect the streams from /dev/null[1].

That can't work in Nvim because we use pipes directly (instead of temp files)
and don't wrap the command with shell-specific redirection syntax.

References #3529
References #5241

[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_03_02
2016-10-19 01:01:27 +02:00