Commit Graph

10075 Commits

Author SHA1 Message Date
Justin M. Keyes
e2eff5269f doc: if_cscop: cleanup 2018-01-21 12:41:35 +01:00
ckelsel
9db4dc971d vim-patch:8.0.0301 #7685
Problem:    No tests for ":set completion" and various errors of the :set
            command.
Solution:   Add more :set tests. (Dominique Pelle, closes vim/vim#1440)
698f8b207b

---

Also move test_options from test_alot to Makefile.  (That's done upstream
in Vim patch 8.0.0430.)
2018-01-21 11:22:43 +01:00
Marvim the Paranoid Android
72422b0748 version.c: update [ci skip] (#7828) 2018-01-21 11:04:39 +01:00
Justin M. Keyes
eb4aab7173 ui: forward 'linespace' option #7883
ref #7520
2018-01-21 09:39:12 +01:00
Justin M. Keyes
ada1956206
Merge #7880 'lua/executor: Remove lightuserdata' 2018-01-21 08:09:16 +01:00
KunMing Xie
6bf359fa79 vim-patch:8.0.0426: insufficient testing for statusline (#7882)
Problem:    Insufficient testing for statusline.
Solution:   Add several tests. (Dominique Pelle, closes vim/vim#1534)

300af82eca
2018-01-21 06:50:31 +01:00
ZyX
db346b5b48 lua/executor: Remove all places where lightuserdata is used
Should fix problems with luajit+arm64.

Fixes #7879
Ref LuaJIT/LuaJIT#230
2018-01-21 01:47:46 +03:00
Justin M. Keyes
0daaa49586 Merge #7863 'mingw64: fix gcc warnings' 2018-01-20 17:18:32 +01:00
Justin M. Keyes
ee84da358c
Merge #7878 from justinmk/keymap-leak 2018-01-20 16:33:43 +01:00
Justin M. Keyes
5a96a9eba2 free_buf_options(): free buf_T.b_kmap_ga
ASAN log:

    ==23244==ERROR: LeakSanitizer: detected memory leaks

    Direct leak of 3348 byte(s) in 228 object(s) allocated from:
        0 0x4ee3d3 in malloc /local/mnt/workspace/tmp/ubuntu_rel/llvm/utils/release/final/llvm.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:67:3
        1 0xf4e681 in try_malloc /home/travis/build/neovim/neovim/src/nvim/memory.c:87:15
        2 0xf4e8a9 in xmalloc /home/travis/build/neovim/neovim/src/nvim/memory.c:121:15
        3 0xf4ee68 in xmallocz /home/travis/build/neovim/neovim/src/nvim/memory.c:196:15
        4 0x170e3ee in vim_strnsave /home/travis/build/neovim/neovim/src/nvim/strings.c:70:28
        5 0x73b2ff in ex_loadkeymap /home/travis/build/neovim/neovim/src/nvim/digraph.c:1814:16
        6 0xb1ef4c in do_one_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:2242:5
        7 0xb011b3 in do_cmdline /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:609:20
        8 0xaee67d in do_source /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2970:3
        9 0xae82ae in source_callback /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2326:9
        10 0xae7adf in do_in_path /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2404:15
        11 0xae7f48 in do_in_path_and_pp /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2448:12
        12 0xae8281 in source_in_path /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2496:10
        13 0xae610c in source_runtime /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2490:10
        14 0x739887 in keymap_init /home/travis/build/neovim/neovim/src/nvim/digraph.c:1755:9
        15 0x11d423e in did_set_string_option /home/travis/build/neovim/neovim/src/nvim/option.c:2678:16
        16 0x11eecc4 in set_string_option /home/travis/build/neovim/neovim/src/nvim/option.c:2409:27
        17 0x119852f in set_option_value /home/travis/build/neovim/neovim/src/nvim/option.c:4849:14
        18 0x11bccac in set_bool_option /home/travis/build/neovim/neovim/src/nvim/option.c:3984:7
        19 0x11a9d50 in do_set /home/travis/build/neovim/neovim/src/nvim/option.c:1424:30
        20 0xb8caf7 in ex_set /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:9764:9
        21 0xb1ef4c in do_one_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:2242:5
        22 0xb011b3 in do_cmdline /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:609:20
        23 0x818b42 in call_user_func /home/travis/build/neovim/neovim/src/nvim/eval.c:21315:3
        24 0x7e41bb in call_func /home/travis/build/neovim/neovim/src/nvim/eval.c:6358:11
        25 0x7f8fb8 in get_func_tv /home/travis/build/neovim/neovim/src/nvim/eval.c:6120:11
        26 0x7f1ba1 in ex_call /home/travis/build/neovim/neovim/src/nvim/eval.c:2735:9
        27 0xb1ef4c in do_one_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:2242:5
        28 0xb011b3 in do_cmdline /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:609:20
        29 0x837ef1 in ex_execute /home/travis/build/neovim/neovim/src/nvim/eval.c:19463:7

    Direct leak of 456 byte(s) in 228 object(s) allocated from:
        0 0x4ee3d3 in malloc /local/mnt/workspace/tmp/ubuntu_rel/llvm/utils/release/final/llvm.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:67:3
        1 0xf4e681 in try_malloc /home/travis/build/neovim/neovim/src/nvim/memory.c:87:15
        2 0xf4e8a9 in xmalloc /home/travis/build/neovim/neovim/src/nvim/memory.c:121:15
        3 0xf4ee68 in xmallocz /home/travis/build/neovim/neovim/src/nvim/memory.c:196:15
        4 0x170e3ee in vim_strnsave /home/travis/build/neovim/neovim/src/nvim/strings.c:70:28
        5 0x73b18f in ex_loadkeymap /home/travis/build/neovim/neovim/src/nvim/digraph.c:1811:18
        6 0xb1ef4c in do_one_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:2242:5
        7 0xb011b3 in do_cmdline /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:609:20
        8 0xaee67d in do_source /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2970:3
        9 0xae82ae in source_callback /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2326:9
        10 0xae7adf in do_in_path /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2404:15
        11 0xae7f48 in do_in_path_and_pp /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2448:12
        12 0xae8281 in source_in_path /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2496:10
        13 0xae610c in source_runtime /home/travis/build/neovim/neovim/src/nvim/ex_cmds2.c:2490:10
        14 0x739887 in keymap_init /home/travis/build/neovim/neovim/src/nvim/digraph.c:1755:9
        15 0x11d423e in did_set_string_option /home/travis/build/neovim/neovim/src/nvim/option.c:2678:16
        16 0x11eecc4 in set_string_option /home/travis/build/neovim/neovim/src/nvim/option.c:2409:27
        17 0x119852f in set_option_value /home/travis/build/neovim/neovim/src/nvim/option.c:4849:14
        18 0x11bccac in set_bool_option /home/travis/build/neovim/neovim/src/nvim/option.c:3984:7
        19 0x11a9d50 in do_set /home/travis/build/neovim/neovim/src/nvim/option.c:1424:30
        20 0xb8caf7 in ex_set /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:9764:9
        21 0xb1ef4c in do_one_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:2242:5
        22 0xb011b3 in do_cmdline /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:609:20
        23 0x818b42 in call_user_func /home/travis/build/neovim/neovim/src/nvim/eval.c:21315:3
        24 0x7e41bb in call_func /home/travis/build/neovim/neovim/src/nvim/eval.c:6358:11
        25 0x7f8fb8 in get_func_tv /home/travis/build/neovim/neovim/src/nvim/eval.c:6120:11
        26 0x7f1ba1 in ex_call /home/travis/build/neovim/neovim/src/nvim/eval.c:2735:9
        27 0xb1ef4c in do_one_cmd /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:2242:5
        28 0xb011b3 in do_cmdline /home/travis/build/neovim/neovim/src/nvim/ex_docmd.c:609:20
        29 0x837ef1 in ex_execute /home/travis/build/neovim/neovim/src/nvim/eval.c:19463:7

    SUMMARY: AddressSanitizer: 3804 byte(s) leaked in 456 allocation(s).
    Failed: E /tests/oldtests|logs :: Runtime errors detected.
2018-01-20 15:35:08 +01:00
Matthieu Coudron
6a826fce91 busted: explicit LUA_PATH to test scripts (#7864)
in case LUA_PATH does not contain `./?.lua`, busted can not load lua test scripts.
(for instance on nixos). Thus we make it explicit.
2018-01-20 14:43:16 +01:00
Marco Hinz
ecf851bc60
Merge #7867 'Add completion for :checkhealth'
Add completion for :checkhealth
2018-01-20 13:15:21 +01:00
ckelsel
b00fd49640 vim-patch:8.0.0423: changing 'cinoptions' does not always work
Problem:    The effect of adding "vim/vim#" to 'cinoptions' is not always removed.
            (David Briscoe)
Solution:   Reset b_ind_hash_comment. (Christian Brabandt, closes vim/vim#1475)

6b64394f34
2018-01-20 15:48:23 +08:00
George Zhao
10b1738f59 Fix lint error in option.c 2018-01-19 13:01:30 +08:00
George Zhao
82adba0f2f Fix for lint 2018-01-19 13:01:30 +08:00
George Zhao
e76c6e2ee8 Fix warning: multi-line comment [-Wcomment] use :341,355s/: \zs.*/\=string(submatch(0)) 2018-01-19 13:01:29 +08:00
George Zhao
2408a05151 Fix warning, read/write have unsigned int count on windows. 2018-01-19 13:01:29 +08:00
Justin M. Keyes
94f4469638 man.vim: infer $MANPAGER invocation in more cases
This should handle most cases where Nvim was invoked as $MANPAGER.

Ultimately the stakes are low: :quit will prompt if there are unsaved
changes.

fix #7873
2018-01-19 02:05:23 +01:00
Justin M. Keyes
20e0cb8d47 Merge #7424 'vim-patch: 8.0.0198, 8.0.0200, 8.0.0201, 8.0.0202, 8.0.0204' 2018-01-18 22:58:50 +01:00
Marco Hinz
72a7a884b4
tests: :checkhealth completion 2018-01-18 22:47:37 +01:00
Marco Hinz
6acbd76b00
Add completion for :checkhealth 2018-01-18 22:47:36 +01:00
George Zhao
421f2605c0 Fix warning about NULL compare 2018-01-18 21:43:45 +08:00
George Zhao
23102bc18e Fix bug, use &loop->uv replace loop. 2018-01-18 21:43:44 +08:00
George Zhao
43833af53c Fix warning about math functions, include isnan, isinf, fpclassify. 2018-01-18 21:43:44 +08:00
George Zhao
3632f02564 Fix warning about variable length array. 2018-01-18 21:43:43 +08:00
George Zhao
5a594091dc Fix warning about unused value. 2018-01-18 21:30:06 +08:00
George Zhao
15334dcd89 Fix warning unused static function 2018-01-18 21:30:05 +08:00
George Zhao
12acf0f7a7 Fix warning when assing size_t type value to uv_buf_t.len, convert type to ULONG on Windows. 2018-01-18 21:30:04 +08:00
George Zhao
bac86a1941 Fix warning when redefine RGB on Windows
1
2018-01-18 21:30:04 +08:00
George Zhao
06994e0e21 Fix warning about conversion on mingw64 2018-01-18 21:30:03 +08:00
lePerdu
bc17ad31dc os/input.c: parse keycodes in non-string context #7411
cb02137dfa had two mistakes, of the same nature: trans_special() must
be invoked with in_string=false unless the parsing context is a VimL
string. replace_termcodes() and input_enqueue() are low-level
mechanisms where VimL strings do not exist.

keymap.c: adjust double-quote case to satisfy keymap_spec.lua

closes #7410
2018-01-18 01:37:51 +01:00
zandrmartin
8fc437ef43 runtime: UpdateRemotePlugins: allow bar (#7865) 2018-01-17 20:50:17 +01:00
Justin M. Keyes
1c6e956079
Merge #7862 'fix resize-related segfaults' 2018-01-16 10:10:02 +01:00
Justin M. Keyes
fed928b438 ugrid.c: destroy_cells(): avoid double-free
https://github.com/neovim/neovim/issues/7572#issuecomment-345257295
2018-01-16 09:38:08 +01:00
Justin M. Keyes
1be315de37 tui: final_column_wrap(): fix row calculation
closes #7572
closes #7579
closes #7628

ASAN report:

    ==9500==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6040000024c0 at pc 0x00000187d2ca bp 0x7fc3c6e58d10 sp 0x7fc3c6e58d08
    READ of size 8 at 0x6040000024c0 thread T1
        0 0x187d2c9 in ugrid_put /home/vagrant/neovim/build/../src/nvim/ugrid.c:107:17
        1 0x1850adf in tui_put /home/vagrant/neovim/build/../src/nvim/tui/tui.c:1012:10
        2 0x18a6ce6 in ui_bridge_put_event /home/vagrant/neovim/build/src/nvim/auto/ui_events_bridge.generated.h:154:3
        3 0xa4dcda in multiqueue_process_events /home/vagrant/neovim/build/../src/nvim/event/multiqueue.c:150:7
        4 0xa478bf in loop_poll_events /home/vagrant/neovim/build/../src/nvim/event/loop.c:63:3
        5 0x185451c in tui_main /home/vagrant/neovim/build/../src/nvim/tui/tui.c:362:12
        6 0x18a3080 in ui_thread_run /home/vagrant/neovim/build/../src/nvim/ui_bridge.c:106:3
        7 0x7fc3caaac6b9 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76b9)
        8 0x7fc3c9ca33dc in clone /build/glibc-bfm8X4/glibc-2.23/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:109

    0x6040000024c0 is located 0 bytes to the right of 48-byte region [0x604000002490,0x6040000024c0)
    allocated by thread T1 here:
        0 0x50e048 in malloc (/home/vagrant/neovim/build/bin/nvim+0x50e048)
        1 0xf7ab71 in try_malloc /home/vagrant/neovim/build/../src/nvim/memory.c:87:15
        2 0xf7ad99 in xmalloc /home/vagrant/neovim/build/../src/nvim/memory.c:121:15
        3 0x187937b in ugrid_resize /home/vagrant/neovim/build/../src/nvim/ugrid.c:32:17
        4 0x184be58 in tui_resize /home/vagrant/neovim/build/../src/nvim/tui/tui.c:770:3
        5 0x18a3dc8 in ui_bridge_resize_event /home/vagrant/neovim/build/src/nvim/auto/ui_events_bridge.generated.h:4:3
        6 0xa4dcda in multiqueue_process_events /home/vagrant/neovim/build/../src/nvim/event/multiqueue.c:150:7
        7 0xa478bf in loop_poll_events /home/vagrant/neovim/build/../src/nvim/event/loop.c:63:3
        8 0x185451c in tui_main /home/vagrant/neovim/build/../src/nvim/tui/tui.c:362:12
        9 0x18a3080 in ui_thread_run /home/vagrant/neovim/build/../src/nvim/ui_bridge.c:106:3
        10 0x7fc3caaac6b9 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76b9)

    Thread T1 created by T0 here:
        0 0x4655ed in __interceptor_pthread_create (/home/vagrant/neovim/build/bin/nvim+0x4655ed)
        1 0x1ad87b0 in uv_thread_create /home/vagrant/neovim/.deps/build/src/libuv/src/unix/thread.c:75
        2 0x184b9aa in tui_start /home/vagrant/neovim/build/../src/nvim/tui/tui.c:159:10
        3 0x188dd4c in ui_builtin_start /home/vagrant/neovim/build/../src/nvim/ui.c:125:3
        4 0xe6d399 in main /home/vagrant/neovim/build/../src/nvim/main.c:457:5
        5 0x7fc3c9bbc82f in __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:291
2018-01-16 09:37:55 +01:00
Justin M. Keyes
60d6a8b13d Merge #7860 'fix get_buffer_lines' 2018-01-16 08:21:25 +01:00
James McCoy
514a51ef3e
get_buffer_lines: Return a string, when requested, on invalid input
Closes #7859
2018-01-15 22:55:15 -05:00
Justin M. Keyes
c06995b34d
Merge #7858 'vim-patch: spell-related patches' 2018-01-16 02:14:41 +01:00
Justin M. Keyes
9cabe826ba lint 2018-01-16 01:12:16 +01:00
Justin M. Keyes
b558f750bf vim-patch:8.0.1419: cursor column is not updated after ]s
Problem:    Cursor column is not updated after ]s. (Gary Johnson)
Solution:   Set the curswant flag.

b73fa629d6
2018-01-16 00:13:22 +01:00
Justin M. Keyes
6020e8b69e vim-patch:8.0.1225: no check for spell region being zero
Problem:    No check for spell region being zero. (geeknik)
Solution:   Check for zero. (closes vim/vim#2252)

ee03b94124
2018-01-16 00:08:22 +01:00
Justin M. Keyes
fe7a53f3cf test/old: skip enc=latin1 tests 2018-01-16 00:06:59 +01:00
Justin M. Keyes
682d5ff8e6 vim-patch:8.0.0792: spell test leaves files behind
Problem:    Spell test leaves files behind.
Solution:   Delete the files.

1a0f200500
2018-01-16 00:04:13 +01:00
Justin M. Keyes
34cc04d753 vim-patch:8.0.0658: spell test is old style
Problem:    Spell test is old style.
Solution:   Turn the spell test into a new style test (pschuh, closes vim/vim#1778)

d2c061d24c
2018-01-16 00:03:05 +01:00
Justin M. Keyes
3f9f7cfab1 vim-patch:8.0.0601: no test coverage for :spellrepall
Problem:    No test coverage for :spellrepall.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#1717)

545cb79da5
2018-01-16 00:01:19 +01:00
Justin M. Keyes
2b1bcd446b runtime: include en.utf-8.spl
Install en.utf-8.spl by default.

- Allows spell-related tests to run.
- Avoids download prompt for spelllang=en users
2018-01-15 23:58:52 +01:00
KunMing Xie
26251d6d06 vim-patch:8.0.0374: invalid memory access when using :sc in Ex mode (#7849)
Problem:    Invalid memory access when using :sc in Ex mode. (Dominique Pelle)
Solution:   Avoid the column being negative.  Also fix a hang in Ex mode.

ba748c8a84
2018-01-15 23:54:56 +01:00
Justin M. Keyes
f8f7f9d5f5 vim-patch:8.0.0151,3,4 #7389
vim-patch:8.0.0151
Problem:    To pass buffer content to system() and systemlist() one has to
            first create a string or list.
Solution:   Allow passing a buffer number. (LemonBoy,
            closes vim/vim#1240)
12c4492dd3

vim-patch:8.0.0153
Problem:    system() test fails on MS-Windows.
Solution:   Deal when extra space and CR.
9d9c356517

vim-patch:8.0.0154
Problem:    system() test fails on OS/X.
Solution:   Deal with leading spaces.
31f19ce0a0
2018-01-15 23:50:40 +01:00
Justin M. Keyes
de0a9548f7
Merge #7806 from ZyX-I/list-stat
Add a way to collect list usage statistics
2018-01-15 23:35:20 +01:00
Justin M. Keyes
726197d890 Merge #7850 'vim patches' 2018-01-15 22:42:52 +01:00