Commit Graph

6730 Commits

Author SHA1 Message Date
Michael Ennen
d6e27f90b9 vim-patch:7.4.1730
Problem:    It is not easy to get a character out of a string.
Solution:   Add strgetchar() and strcharpart().

58de0e2dcc
2016-10-23 18:04:28 -07: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
Marco Hinz
657ba62a84 rplugin: resolve paths in manifest file (#5501)
`:CheckHealth nvim` would always report an outdated manifest if symlinks were
used, because the manifest file contains unresolved paths that get compared
against resolved paths.

Now we resolve paths before they get written to the manifest file.
2016-10-18 23:16:13 +02:00
James McCoy
73da9fdafd hist_char2type: Return '/' for NUL.
During -S execution, ccline.cmdfirstc is NULL, so calling histadd() with
a hist-name of '' would fail.  Mimic Vim's behavior and fallback to '/'
in this scenario, since '' is a documented hist-name as of
vim/vim@3e496b0e.
2016-10-18 10:48:29 -04:00
Patrick
6bbd4b2298 vim-patch:7.4.1494
Problem:    clr_history() does not work properly.
Solution:   Increment hisptr. Add a test. (Yegappan Lakshmanan)

119d4693e0

Note: Only added a test. The change to `histptr` had already been made.
2016-10-18 10:34:40 -04:00
Marco Hinz
869a9078e1 Doc: Ruby omni-completion works (#5497) 2016-10-17 19:49:57 +02:00
Justin M. Keyes
fbd6b10e1b Merge #5493 from justinmk/checkhealth
CheckHealth: check tmux, terminfo
2016-10-16 20:14:14 +02:00
Justin M. Keyes
acdc0b1955 CheckHealth: check terminfo 2016-10-16 18:14:24 +02:00
Justin M. Keyes
c40b3b680d CheckHealth: check tmux configuration 2016-10-16 18:08:53 +02:00
Justin M. Keyes
6fc122e600 doc 2016-10-16 18:08:53 +02:00
Marco Hinz
0fa4f98a05
Revert "Makefile: add PREFIX variable"
This reverts commit c13f72ee0a.

References #5447.
2016-10-16 12:17:00 +02:00
Justin M. Keyes
97caabc49a test: execute_spec: Adjust screen assertion.
The previous form was passing because it happens immediately before this form;
 but on a very fast(?) server the screen check might miss that form. It's also
 not really want we want to assert anyways.
2016-10-15 22:16:48 +02:00
Michael Ennen
3a2903c836 vim-patch: 7.4.1619 (#5475)
Problem:    When 'fileformats' is set in the vimrc it applies to new buffers
            but not the initial buffer.
Solution:   Set 'fileformat' when starting up. (Mike Williams)

364fa5c7ec
2016-10-16 00:02:31 +02:00
Shougo
4169fc8281 vim-patch:7.4.1833 (#5484)
Problem:    Cannot use an Ex command for 'keywordprg'.
Solution:   Accept an Ex command. (Nelo-Thara Wallus)

2ff8b64679
2016-10-15 23:59:23 +02:00
James McCoy
b268ba353a Merge pull request #5424 from jamessan/win-tab-nr
api: Support getting the number of a window/tabpage
2016-10-15 15:29:53 -04:00
James McCoy
885db120fa Merge pull request #5456 from jamessan/char-sign-conversion
Enable CI testing of unsigned char and fix fallout
2016-10-15 15:29:13 -04:00
Björn Linse
9477c5bb5b Merge pull request #5384 from bfredl/getchar_event
allow event processing in getchar()
2016-10-15 10:36:34 +02:00
Björn Linse
719dae2e01 events: allow event processing in getchar()
this is consistent with vim, and is necessary for plugins that implement
their own input modes using "getchar()" and still want to do async
event processing.
2016-10-15 09:50:59 +02:00
Shougo Matsushita
3bb388664d vim-patch:7.4.1565
Problem:    Crash when assert_equal() runs into a NULL string.
Solution:   Check for NULL. (Dominique) Add a test.

f155196444
2016-10-15 14:25:50 +09:00