Commit Graph

7803 Commits

Author SHA1 Message Date
Justin M. Keyes
e20e9645b2 build: Rename NEOVIM_* to NVIM_* 2017-03-27 14:27:20 +02:00
Eiichi NISHINA
62774e4356 ci: Check that #include "*.h" works as a single include
Lesser form of include-what-you-use: at least guarantees that header
file did not forget to include something through some other included
file.

Activate run_single_includes_tests on CI.
Fix some IWYU violations.

References #5321
2017-03-27 13:51:05 +02:00
Jakob Schnitzer
7bc37ffb22 terminal: global 'scrollback' #6352
Make the 'scrollback' option work like most other buffer-local options:
- `:set scrollback=x` sets the global and local value
- `:setglobal scrollback=x` sets only the global default
- new terminal buffers inherit the global

Normal buffers are still always -1, and :setlocal there is an error.

Closes #6337
2017-03-27 13:43:20 +02:00
Justin M. Keyes
2b1398c31e Merge #6372 from lonerover/vim-7.4.2307 2017-03-27 13:16:17 +02:00
lonerover
9cd7e19904 vim-patch:7.4.2334
Problem:    On MS-Windows test_getcwd leaves Xtopdir behind.
Solution:   Set 'noswapfile'. (Michael Soyka)

1b0c2fcf6e
2017-03-27 12:19:14 +08:00
lonerover
85ba14af6a vim-patch:7.4.2330
Problem:    Coverity complains about not checking curwin to be NULL.
Solution:   Use firstwin to avoid the warning.

030cddc7ec
2017-03-27 12:19:14 +08:00
lonerover
20e7652b69 vim-patch:7.4.2307
Problem:    Several tests are old style.
Solution:   Turn them into new style tests. (Yegappan Lakshmanan)

cd055da370
2017-03-27 12:19:14 +08:00
raichoo
edc80f6b46 vim-patch:7.4.2357 (#6354)
Problem:    Attempt to read history entry while not initialized.
Solution:   Skip when the index is negative.

46643713dc
2017-03-26 23:15:53 +02:00
lonerover
f9a31e9850 vim-patch:7.4.2349 (#6368)
Problem:    Valgrind reports using uninitialzed memory. (Dominique Pelle)
Solution:   Check the length before checking for a NUL.

2321ca2a78
2017-03-26 19:04:57 +02:00
Yichao Zhou
43a99f77a8 highlight: :match should override 'list' (#6343)
Closes #4946
2017-03-26 13:04:20 +02:00
Justin M. Keyes
cf202b74db build: Do not ref libuv CMake target if USE_BUNDLED_LIBUV=OFF. (#6363)
CMake Warning: The dependency target "libuv" of target "luv-static" does
not exist. (CMP0046)

Closes #6355
2017-03-26 00:22:15 +01:00
Daniel Hahler
b60e5c85ad cmake: USE_BUNDLED_X instead of X_USE_BUNDLED (#6357) 2017-03-25 23:02:20 +01:00
Anmol Sethi
a346cb1d58 man.vim: call s:error in man#read_page (#6362)
The comment is incorrect, s:error does need to be called. I thought the
call was unnecessary because it didn't show any message for me but I had
shortmess+=F which was hiding the message.
2017-03-25 22:43:25 +01:00
Matthew Malcomson
098e91400e refactor: Remove allow_keys global (#6346)
* The allow_keys global is unused in nvim, remove it

* clint
2017-03-25 15:43:19 +01:00
Justin M. Keyes
0cd829161a Merge #6221 2017-03-25 00:16:33 +01:00
Justin M. Keyes
90ac8b09f5 fold.c: uppercase macros 2017-03-25 00:15:31 +01:00
James McCoy
d094a36e7c Merge pull request #6350 from jamessan/vim-8.0.0250
vim-patch:8.0.0250
2017-03-24 16:43:01 -04:00
James McCoy
2a6d44ca52 vim-patch:8.0.0250
Problem:    When virtcol() gets a column that is not the first byte of a
            multi-byte character the result is unpredictable. (Christian
            Ludwig)
Solution:   Correct the column to the first byte of a multi-byte character.
            Change the utf-8 test to new style.

0c0590d982

Closes #6269
2017-03-24 15:11:51 -04:00
Justin M. Keyes
38274051c0 Merge pull request #6323 from justinmk/vimpatches 2017-03-24 18:30:35 +01:00
Tommy Allen
a62ec4eb98 health.vim: tmux: Try -qvg and -qvgs (#6348) 2017-03-24 01:38:01 +01:00
Justin M. Keyes
7214d0bc84 XXX: ex_tabonly(): aucmd_win is not part of the window list.
During free_all_mem, somehow ex_tabonly() may free aucmd_win. But it
isn't fully destroyed (maybe autocmd_busy?). When win_free_all() tries
to free aucmd_win directly, it double-frees the sub-fields.

Tried unnsuccessfully to work around this by invoking `:tabonly!` with
autocmds disabled:

    diff --git a/src/nvim/memory.c b/src/nvim/memory.c
    index 58c01fbe7a12..91c845e94d22 100644
    --- a/src/nvim/memory.c
    +++ b/src/nvim/memory.c
    @@ -565,9 +565,9 @@ void free_all_mem(void)
       /* Close all tabs and windows.  Reset 'equalalways' to avoid redraws. */
       p_ea = false;
       if (first_tabpage->tp_next != NULL)
    -    do_cmdline_cmd("tabonly!");
    +    do_cmdline_cmd("noautocmd tabonly!");
       if (firstwin != lastwin)
    -    do_cmdline_cmd("only!");
    +    do_cmdline_cmd("noautocmd only!");

       /* Free all spell info. */
       spell_free_all();
2017-03-23 23:47:20 +01:00
Matthew Malcomson
a6c9c91841 vim-patch:8.0.0407 : filtering folds with marker method not tested
Problem:    Filtering folds with marker method not tested.
Solution:   Also set 'foldmethod' to "marker".
2017-03-23 15:55:57 +00:00
Matthew Malcomson
308a953e0b Fix wrap-around in 32 bit 2017-03-23 14:37:47 +00:00
Matthew Malcomson
b2b88423aa Robustly handle folds during a :move command
In order to re-order marks according to the :move command, do_move()
uses mark_adjust() in a non-standard manner. The non-standard action is
that it moves some marks *past* other marks. This doesn't matter for
marks, but mark_adjust() calls foldMarkAdjust() which simply changes
fold starts and lengths and doesn't have enough information to know that
other folds have to be checked and reordered.

The array of folds for each window are assumed to be in order of
increasing line number, and if this gets broken some folds can get
"lost".

There has been a previous patch to avoid this problem by deleting and
recalculating all folds in the window, but this comes at the cost of
closing all folds when executing :move, and doesn't cover the case of
manual folds.
This patch adds a new function foldMoveRange() specifically for the
:move command that handles reordering folds as well as simply moving
them. Additionally, we allow calling mark_adjust_nofold() that does the
same as mark_adjust() but doesn't affect any fold array.

Calling mark_adjust_nofold() should be done in the same manner as
calling mark_adjust(), but according changes to the fold arrays must be
done seperately by the calling function.

vim-patch:8.0.0457
vim-patch:8.0.0459
vim-patch:8.0.0461
vim-patch:8.0.0465
2017-03-23 14:37:47 +00:00
Jurica Bradarić
06ed7a189b vim-patch:7.4.2329 (#6341)
Problem:    Error for min() and max() contains %s. (Nikolay Pavlov)
Solution:   Pass the function name. (closes vim/vim#1040)

26b84339fd
2017-03-23 08:54:01 +01:00
raichoo
44e75eba30 vim-patch:7.4.2161 (#6340)
Problem:    Expression test fails without conceal feature.
Solution:   Only check "conceal" with the conceal feature.

7ab6defcaf
2017-03-22 21:57:20 +01:00
Björn Linse
f7aa1bfde6 Merge pull request #6335 from bfredl/mbyte_dead
mbyte: remove dead code
2017-03-22 19:49:07 +01:00
Justin M. Keyes
c398402f12 vim-patch:8.0.0307
Problem:    Asan detects a memory error when EXITFREE is defined. (Dominique
            Pelle)
Solution:   In getvcol() check for ml_get_buf() returning an empty string.
            Also skip adjusting the scroll position.  Set "exiting" in
            mch_exit() for all systems.

955f198fc5
2017-03-22 18:43:01 +01:00
Justin M. Keyes
830b31683e vim-patch:8.0.0502
Problem:    Coverity complains about possible NULL pointer.
Solution:   Add an assert(), let's see if this works on all systems.

a37ffaa5e0
2017-03-22 18:43:01 +01:00
Justin M. Keyes
41bffeacff vim-patch:8.0.0331
Problem:    Restoring help snapshot accesses freed memory. (Dominique Pelle)
Solution:   Don't restore a snapshot when the window closes.

343b8c0429
2017-03-22 18:43:01 +01:00
Justin M. Keyes
54f31187ba vim-patch:8.0.0482
Problem:    The setbufvar() function may mess up the window layout. (Kay Z.)
Solution:   Do not check the window to be valid if it is NULL.

2c90d51123
2017-03-22 18:43:01 +01:00
Justin M. Keyes
f58a593cea vim-patch:8.0.0483
Problem:    Illegal memory access when using :all. (Dominique Pelle)
Solution:   Adjust the cursor position right after setting "curwin".

f79225ed4f
2017-03-22 18:43:01 +01:00
Justin M. Keyes
2b32053559 test/legacy: Test_three_windows: rtp for :help 2017-03-22 18:43:00 +01:00
Justin M. Keyes
51bc9f243a ex_tabnext: Disallow "+NN" arg.
Need to do this explicitly because our implementation of getdigits() is
slightly different.
2017-03-22 18:43:00 +01:00
Justin M. Keyes
33858ccb9b vim-patch:8.0.0485
Problem:    Not all windows commands are tested.
Solution:   Add more tests for windows commands. (Dominique Pelle,
            closes vim/vim#1575) Run test_autocmd separately, it interferes with
            other tests.  Fix tests that depended on side effects.

4520d440c5
2017-03-22 18:43:00 +01:00
Justin M. Keyes
01bf78971c vim-patch:8.0.0172
Problem:    The command selected in the command line window is not executed.
            (Andrey Starodubtsev)
Solution:   Save and restore the command line at a lower level. (closes vim/vim#1370)

1d669c233c
2017-03-22 18:43:00 +01:00
Justin M. Keyes
b82e3358e0 vim-patch:8.0.0083
Problem:    Using freed memory with win_getid(). (Domenique Pelle)
Solution:   For the current tab use curwin.

8e63905263
2017-03-22 18:43:00 +01:00
Justin M. Keyes
9c8540edfd vim-patch:8.0.0159
References #5406

Problem:    Using a NULL pointer when using feedkeys() to trigger drawing a
            tabline.
Solution:   Skip drawing a tabline if TabPageIdxs is NULL. (Dominique Pelle)
            Also fix recursing into getcmdline() from the cmd window.

c695cec469
2017-03-22 18:43:00 +01:00
Justin M. Keyes
f06a691326 vim-patch:8.0.0037
Problem:    Get E924 when switching tabs. ()
Solution:   Use win_valid_any_tab() instead of win_valid(). (Martin Vuille,
            closes vim/vim#1167, closes vim/vim#1171)

0a9046fbcb
2017-03-22 18:43:00 +01:00
Justin M. Keyes
a24c6cc6a8 get_tabpage_arg: satisfy clang warning
vim-patch:8.0.0266
2017-03-22 18:43:00 +01:00
Justin M. Keyes
7e23ce6b4f lint 2017-03-22 18:42:59 +01:00
Justin M. Keyes
0f3afdaa1b vim-patch:8.0.0259
Problem:    Tab commands do not handle count correctly. (Ken Hamada)
Solution:   Add ADDR_TABS_RELATIVE. (Hirohito Higashi)

2f72c70657
2017-03-22 18:42:59 +01:00
Justin M. Keyes
386a5f379b test/legacy: Makefile Add missing tests
These tests aren't in test_alot.vim, so they need to be added to the
Makefile or they won't be run.
2017-03-22 18:42:59 +01:00
Justin M. Keyes
c99514c2a4 test/legacy: Run test_match, test_tabpage isolated
These are failing when run as a batch. Most likely some Vim runtime
patch fixed something, but we don't have it yet. Just isolate them for
now.

Also test_matchadd_conceal_utf8 (it's not there in Vim tree, either).
2017-03-22 18:42:59 +01:00
Justin M. Keyes
78a4c73cf0 vim-patch:7.4.2339
Problem:    Tab page test fails when run as fake root.
Solution:   Check 'buftype' instead of 'filetype'. (James McCoy, closes vim/vim#1042)

100f5c90f4
2017-03-22 18:42:59 +01:00
Justin M. Keyes
89abed7d85 vim-patch:8.0.0032
Problem:    Tests may change the input file when something goes wrong.
Solution:   Avoid writing the input file.

3e8474dd50
2017-03-22 18:42:59 +01:00
Justin M. Keyes
cd9fc4627e vim-patch:8.0.0049
Problem:    When a match ends in part of concealed text highlighting, it might
            mess up concealing by resetting prev_syntax_id.
Solution:   Do not reset prev_syntax_id and add a test to verify. (Christian
            Brabandt, closes vim/vim#1092)

2f97912800
2017-03-22 18:42:59 +01:00
Justin M. Keyes
5ee211770d vim-patch:8.0.0033
Problem:    Cannot use overlapping positions with matchaddpos().
Solution:   Check end of match. (Ozaki Kiichi) Add a test (Hirohito Higashi)

a6c27ee6db
2017-03-22 18:42:58 +01:00
Justin M. Keyes
929859ed81 vim-patch:7.4.2355
Problem:    Regexp fails to match when using "\>\)\?". (Ramel)
Solution:   When a state is already in the list, but addstate_here() is used
            and the existing state comes later, add the new state anyway.

16b3578f35
2017-03-22 18:42:58 +01:00
Justin M. Keyes
53ccd07fa1 lint 2017-03-22 18:42:58 +01:00