Commit Graph

7807 Commits

Author SHA1 Message Date
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
Justin M. Keyes
03a04172ec scripts/vim-patch.sh: Remove "Last change ..." lines.
Also:
- fix ignoring doc/tags file
- use 12 chars of hash instead of 7
2017-03-21 12:19:16 +01:00
Jack Bracewell
66259e4c49 vim-patch:7.4.2293 (#6307)
The original patch makes all the modeline comments consistent, but these
have been removed in the neovim source. However there as a correction of
a comment included in the patch that we can use.

edf3f97ae2
2017-03-21 11:11:32 +01:00
Jurica Bradaric
c6c8e1e8cc version: Mark patch 2221 as applied.
It was implemented as a part of #3916.
2017-03-21 07:34:08 +01:00
Jurica Bradaric
cad9a76be2 vim-patch:7.4.2291
Problem:    printf() handles floats wrong when there is a sign.
Solution:   Fix placing the sign.  Add tests. (Dominique Pelle)

0418609534
2017-03-20 22:47:09 +01:00
Jurica Bradaric
6ca580be9b vim-patch:7.4.2280
Problem:    printf() doesn't handle infinity float values correctly.
Solution:   Add a table with possible infinity values. (Dominique Pelle)

e999782e36
2017-03-20 22:45:26 +01:00
Jurica Bradaric
b4cb5fa610 vim-patch:7.4.2266
Problem:    printf() test fails on Windows. "-inf" is not used.
Solution:   Check for Windows-specific values for "nan".  Add sign to "inf"
            when appropriate.

9992237a3e
2017-03-20 21:40:41 +01:00
Justin M. Keyes
df1e7b7eda Merge #6320 from jamessan/vim-8.0.0116
vim-patch:8.0.0116,8.0.0190,8.0.0195,8.0.0190,8.0.0223,8.0.0393
2017-03-20 20:20:35 +01:00
Drew Neil
ae16e4fa13 doc: remove "only available when compiled with +timers" (#6321) 2017-03-20 13:23:19 +01:00
James McCoy
a56615214d
lint 2017-03-19 23:43:49 -04:00
James McCoy
097d04ac71
vim-patch:8.0.0393
Problem:    When the same tag appears more than once, the order is
            unpredictable. (Charles Campbell)
Solution:   Besides using a dict for finding duplicates, use a grow array for
            keeping the tags in sequence.

98e83b2956
2017-03-19 23:43:43 -04:00
James McCoy
d3f15f1e6d
vim-patch:8.0.0223
Problem:    Coverity gets confused by the flags passed to find_tags() and
            warnts for an uninitialized variable.
Solution:   Disallow using cscope and help tags at the same time.

fffbf308dd
2017-03-19 23:42:15 -04:00
James McCoy
e1af49b425
vim-patch:8.0.0195
Problem:    Jumping to a tag that is a static item in the current file fails.
            (Kazunobu Kuriyama)
Solution:   Make sure the first byte of the tag key is not NUL. (Suggested by
            James McCoy, closes vim/vim#1387)

a9d23c2087
2017-03-19 23:42:14 -04:00
James McCoy
058516aaf9
vim-patch:8.0.0190
Problem:    Detecting duplicate tags uses a slow linear search.
Solution:   Use a much faster hash table solution. (James McCoy, closes vim/vim#1046)
            But don't add hi_keylen, it makes hash tables 50% bigger.

810f9c361c
2017-03-19 23:42:01 -04:00
Justin M. Keyes
091a99afd4 Merge #6318 from justinmk/pr6244
test/legacy: fix test_normal.vim
2017-03-20 00:47:27 +01:00
Justin M. Keyes
2f54d6927c test/legacy: fix test_normal.vim 2017-03-19 23:52:17 +01:00
raichoo
db128974fc vim-patch:7.4.2348
Problem:    Crash on exit when EXITFREE is defined. (Dominique Pelle)
Solution:   Don't access curwin when exiting.

9a27c7fde6
2017-03-19 21:14:11 +01:00
raichoo
99f2dc1341 vim-patch:8.0.0229
Problem:    When freeing a buffer the local value of the 'formatprg' option is
            not cleared.
Solution:   Add missing change.

24a2d416ec
2017-03-19 21:14:11 +01:00
raichoo
0f5c3f111a vim-patch:8.0.0179
Problem:    'formatprg' is a global option but the value may depend on the
            type of buffer. (Sung Pae)
Solution:   Make 'formatprg' global-local. (closes vim/vim#1380)

9be7c04e6c
2017-03-19 21:14:11 +01:00