Commit Graph

7825 Commits

Author SHA1 Message Date
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
Justin M. Keyes
b0e34497b3 test/legacy: fix test_autocmd.vim
vim-patch:8.0.0487
2017-03-22 18:42:58 +01:00
Justin M. Keyes
2e9c1a9c4a vim-patch:8.0.0178
Problem:    test_command_count may fail when a previous test interferes, seen
            on MS-Windows.
Solution:   Run it separately.

9b73c4a215
2017-03-22 18:42:58 +01:00
Justin M. Keyes
10f6624f65 vim-patch:7.4.2328
Problem:    Crash when BufWinLeave autocmd goes to another tab page.
            (Hirohito Higashi)
Solution:   Make close_buffer() go back to the right window.
2017-03-22 18:42:56 +01:00
Justin M. Keyes
4a2e6f460d vim-patch:7.4.2341
Problem:    Tiny things.  Test doesn't clean up properly.
Solution:   Adjust comment and white space. Restore option value.
2017-03-22 18:42:17 +01:00
Justin M. Keyes
4c18670e91 vim-patch:7.4.2346
Problem:    Autocommand test fails when run directly, passes when run as
            part of test_alot.
Solution:   Add command to make the cursor move.  Close a tab page.
2017-03-22 18:42:17 +01:00
Justin M. Keyes
6a8bad0308 vim-patch:8.0.0019
Problem:    Test_command_count is old style.
Solution:   Turn it into a new style test. (Naruhiko Nishino)
            Use more assert functions.
2017-03-22 18:42:16 +01:00
Justin M. Keyes
165ba3e636 vim-patch:7.4.2324
Problem:    Crash when editing a new buffer and BufUnload autocommand wipes
            out the new buffer. (Norio Takagi)
Solution:   Don't allow wiping out this buffer. (partly by Hirohito Higashi)
            Move old style test13 into test_autocmd. Avoid ml_get error when
            editing a file.

e0ab94e712
2017-03-22 18:42:16 +01:00
Justin M. Keyes
ca853edb6f vim-patch:8.0.0177
Problem:    When opening a buffer on a directory and inside a try/catch then
            the BufEnter event is not triggered.
Solution:   Return NOTDONE from readfile() for a directory and deal with the
            three possible return values. (Justin M. Keyes, closes vim/vim#1375,
            closes vim/vim#1353)

e13b9afe12
2017-03-22 18:42:16 +01:00
Justin M. Keyes
b9e1289819 vim-patch:8.0.0486
Problem:    Crash and endless loop when closing windows in a SessionLoadPost
            autocommand.
Solution:   Check for valid tabpage.  (partly neovim/neovim#6308)

8c752bd6c4

Closes #6308
2017-03-22 18:42:16 +01:00
Björn Linse
1d8356a807 mbyte: remove dead code 2017-03-22 17:52:42 +01:00
Justin M. Keyes
a1732b46ab terminal: Avoid invalid cursor col (#6265)
Patch-by: oni-link <knil.ino@gmail.com>

Closes #6203

https://s3.amazonaws.com/archive.travis-ci.org/jobs/206794197/log.txt

References #3161

    [ RUN      ] ...d/neovim/neovim/test/functional/terminal/buffer_spec.lua @ 199: terminal buffer term_close() use-after-free #4393
    ./test/functional/helpers.lua:187: attempt to perform arithmetic on local 'written' (a nil value)

    stack traceback:
    	./test/functional/helpers.lua:187: in function 'nvim_feed'
    	./test/functional/helpers.lua:329: in function 'execute'
    	...d/neovim/neovim/test/functional/terminal/buffer_spec.lua:206: in function <...d/neovim/neovim/test/functional/terminal/buffer_spec.lua:199>

    [  ERROR   ] ...d/neovim/neovim/test/functional/terminal/buffer_spec.lua @ 199: terminal buffer term_close() use-after-free #4393 (199.47 ms)
    ==================== File /home/travis/build/neovim/neovim/build/log/ubsan.15466 ====================
    = =================================================================
    = ==15466==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x621000029101 at pc 0x000000ea7ba0 bp 0x7ffd5bb628c0 sp 0x7ffd5bb628b8
    = READ of size 1 at 0x621000029101 thread T0
    =     #0 0xea7b9f in utf_head_off /home/travis/build/neovim/neovim/src/nvim/mbyte.c:1637:7
    =     #1 0xeaaf53 in mb_adjustpos /home/travis/build/neovim/neovim/src/nvim/mbyte.c:1840:16
    =     #2 0xeaab48 in mb_adjust_cursor /home/travis/build/neovim/neovim/src/nvim/mbyte.c:1825:3
    =     #3 0x11000d0 in normal_finish_command /home/travis/build/neovim/neovim/src/nvim/normal.c:928:5
    =     #4 0x1077df1 in normal_execute /home/travis/build/neovim/neovim/src/nvim/normal.c:1147:3
    =     #5 0x16ff943 in state_enter /home/travis/build/neovim/neovim/src/nvim/state.c:58:26
    =     #6 0x102d8db in normal_enter /home/travis/build/neovim/neovim/src/nvim/normal.c:463:3
    =     #7 0xdf3398 in main /home/travis/build/neovim/neovim/src/nvim/main.c:540:3
    =     #8 0x2b973e8b4f44 in __libc_start_main /build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:287
    =     #9 0x447445 in _start (/home/travis/build/neovim/neovim/build/bin/nvim+0x447445)
    =
    = 0x621000029101 is located 1 bytes to the right of 4096-byte region [0x621000028100,0x621000029100)
    = allocated by thread T0 here:
    =     #0 0x4f17b8 in malloc (/home/travis/build/neovim/neovim/build/bin/nvim+0x4f17b8)
    =     #1 0xf1f374 in try_malloc /home/travis/build/neovim/neovim/src/nvim/memory.c:84:15
    =     #2 0xf1f534 in xmalloc /home/travis/build/neovim/neovim/src/nvim/memory.c:118:15
    =     #3 0xebe6a8 in mf_alloc_bhdr /home/travis/build/neovim/neovim/src/nvim/memfile.c:646:17
    =     #4 0xebc394 in mf_new /home/travis/build/neovim/neovim/src/nvim/memfile.c:297:12
    =     #5 0xed1368 in ml_new_data /home/travis/build/neovim/neovim/src/nvim/memline.c:2704:16
    =     #6 0xece6ab in ml_open /home/travis/build/neovim/neovim/src/nvim/memline.c:349:8
    =     #7 0x6438ad in open_buffer /home/travis/build/neovim/neovim/src/nvim/buffer.c:109:7
    =     #8 0xa6ec8d in do_ecmd /home/travis/build/neovim/neovim/src/nvim/ex_cmds.c:2489:24
    =     #9 0xb5a0f9 in do_exedit /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:6723:9
    =     #10 0xb791f8 in ex_edit /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:6651:3
    =     #11 0xb28b43 in do_one_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:2198:5
    =     #12 0xb077a7 in do_cmdline /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:601:20
    =     #13 0x10905db in nv_colon /home/travis/build/neovim/neovim/src/nvim/normal.c:4495:18
    =     #14 0x1077de8 in normal_execute /home/travis/build/neovim/neovim/src/nvim/normal.c:1144:3
    =     #15 0x16ff943 in state_enter /home/travis/build/neovim/neovim/src/nvim/state.c:58:26
    =     #16 0x102d8db in normal_enter /home/travis/build/neovim/neovim/src/nvim/normal.c:463:3
    =     #17 0xdf3398 in main /home/travis/build/neovim/neovim/src/nvim/main.c:540:3
    =     #18 0x2b973e8b4f44 in __libc_start_main /build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:287
    =
    = SUMMARY: AddressSanitizer: heap-buffer-overflow /home/travis/build/neovim/neovim/src/nvim/mbyte.c:1637:7 in utf_head_off
    stack traceback:
    	./test/helpers.lua:80: in function 'check_logs'
    	./test/functional/helpers.lua:639: in function <./test/functional/helpers.lua:638>

    [----------] 9 tests from /home/travis/build/neovim/neovim/test/functional/terminal/buffer_spec.lua (2263.12 ms total)
2017-03-22 14:49:37 +01:00
Justin M. Keyes
ef57ee23bd Merge #6312 from lonerover/vim-7.4.2255
vim-patch: 7.4.2255,7.42256
2017-03-22 12:32:52 +01:00
Justin M. Keyes
92d7cf4511 Merge #6331 from lonerover/vim-7.4.2283
vim-patch:7.4.2283,7.4.2296,7.4.2303
2017-03-22 11:42:17 +01:00
lonerover
114a18b935 vim-patch:7.4.2303
Problem:    When using "is" the mode isn't always updated.
Solution:   Redraw the command line. (Christian Brabandt)

779f2fc3a7
2017-03-22 15:36:10 +08:00
lonerover
c554b53040 vim-patch:7.4.2296
Problem:    No tests for :undolist and "U" command.
Solution:   Add tests. (Dominique Pelle)

c628fdcd46
2017-03-22 15:35:46 +08:00
John Szakmeister
56e400d800 vim_vsnprintf: fix conversion warning #6333
Re-apply fix from #6311 which was accidentally regressed in #6231.
2017-03-22 03:21:32 +01:00
lonerover
ab16c07584 vim-patch:7.4.2283
Problem:    Part of ":oldfiles" command isn't cleared. (Lifepillar)
Solution:   Clear the rest of the line. (closes 1018)

885c00eabe
2017-03-22 08:33:12 +08:00
Justin M. Keyes
7cc4e782a0 doc: Update missing headers. (#6330)
pi_* docs are considered standalone plugins so they don't follow this
convention.
2017-03-22 01:13:51 +01:00
Justin M. Keyes
ab16535580 Merge #6231 from jbradaric/vim-7.4.2266
vim-patch:7.4.2266,7.4.2280,7.4.2291
2017-03-22 00:29:58 +01:00
Jurica Bradaric
3e33025133 strings: Fix problems found during code review 2017-03-21 22:56:05 +01:00
Justin M. Keyes
82c67768fa doc: Replace "For Vim ... Last change ..." headers (#6328) 2017-03-21 17:08:19 +01:00
Justin M. Keyes
6baa669c10 vim-patch:7.4.2164 (#6326)
Problem:    It is not possible to use plugins in an "after" directory to tune
            the behavior of a package.
Solution:   First load plugins from non-after directories, then packages and
            finally plugins in after directories.
            Reset 'loadplugins' before executing --cmd arguments.

66459b7c98

vim-patch:7.4.2172
vim-patch:7.4.2169
vim-patch:7.4.2177
vim-patch:7.4.2178
vim-patch:7.4.2184
vim-patch:8.0.0050
vim-patch:8.0.0105
vim-patch:8.0.0400
vim-patch:8.0.0405

Closes #6034
2017-03-21 17:07:00 +01:00
James McCoy
5657bb9ea6 Merge pull request #6327 from lonerover/issue-#6319
[RFC] fix the behavior of CTRL-F with 'scrolloff' (#6319)
2017-03-21 10:12:02 -04:00
lonerover
7418adc143 move.c: add cursor adjustment for scrolloff (#6319) 2017-03-21 21:37:52 +08:00
lonerover
26d7757ccb vim-patch:7.4.2256
Problem:    Coverity complains about null pointer check.
Solution:   Remove wrong and superfluous error check.

db249f26ed
2017-03-21 21:16:11 +08:00
Justin M. Keyes
2611ba8abb Merge #6324 from justinmk/vim-patch-bc8801c9317eb
vim-patch.sh, vim-patch:bc8801c9317eb
2017-03-21 13:52:38 +01:00
Justin M. Keyes
cc421270ee vim-patch:bc8801c9317eb
Updated runtime files.

bc8801c931
2017-03-21 12:19:17 +01:00
Justin M. Keyes
d6797e2865 .gitignore: Do not ignore *.rej 2017-03-21 12:19:16 +01:00