Commit Graph

10214 Commits

Author SHA1 Message Date
ckelsel
fe4ba69958 vim-patch:8.0.0385: no tests for arabic
Problem:    No tests for arabic.
Solution:   Add a first test for arabic. (Dominique Pelle, closes vim/vim#1518)

b5e8377364
2018-01-14 20:57:27 +08:00
ckelsel
7faeaf9f24 vim-patch:8.0.0381: diff mode is not sufficiently tested
Problem:    Diff mode is not sufficiently tested.
Solution:   Add more diff mode tests. (Dominique Pelle, closes vim/vim#1515)

aeb661e1f4
2018-01-14 20:50:59 +08:00
ckelsel
4b8d6caf48 vim-patch:8.0.0380: with 'linebreak' double wide char wraps badly
Problem:    With 'linebreak' set and 'breakat' includes ">" a double-wide
            character results in "<<" displayed.
Solution:   Check for the character not to be replaced. (Ozaki Kiichi,
            closes vim/vim#1456)

38632faf63
2018-01-14 20:50:35 +08:00
ZyX
a8cb510a2e channel: Make empty output be represented by [''] again 2018-01-14 01:33:18 +03:00
ZyX
6a1557f2f4 eval/typval: Log list actions
New logging is guarded by cmake LOG_LIST_ACTIONS define. To make it more
efficient it is allocated as a linked list with chunks of length
2^(7+chunk_num); that uses basically the same idea as behind increasing kvec
length (make appending O(1) (amortized)), but reduces constant by not bothering
to move memory around what realloc() would surely do: it is not like we need
random access to log entries here to justify usage of a single continuous memory
block.
2018-01-14 01:33:18 +03:00
ZyX
c10ae4bc85 os/fileio: Fix some flag names in file_* functions documentation 2018-01-14 01:33:17 +03:00
ZyX
9ea1752d60 *: Provide list length when allocating lists 2018-01-14 01:33:16 +03:00
Justin M. Keyes
8eb0888a5d vim-patch:8.0.0582: illegal memory access with z= command
Problem:    Illegal memory access with z= command. (Dominique Pelle)
Solution:   Avoid case folded text to be longer than the original text.  Use
            MB_PTR2LEN() instead of MB_BYTE2LEN().

5b276aa80e
2018-01-13 19:42:07 +01:00
KunMing Xie
9ddeb6e187 vim-patch:8.0.0364 (#7837)
vim-patch:8.0.0364: ]s does not move cursor with two spell errors in one line

Problem:    ]s does not move cursor with two spell errors in one line. (Manuel
            Ortega)
Solution:   Don't stop search immediately when wrapped, search the line first.
            (Ken Takata)  Add a test.

d3f78dc9eb

* disable spell test for now
2018-01-13 19:26:21 +01:00
Justin M. Keyes
624ac8aede coverity/161216: get_user_input: RETURN_LOCAL
*** CID 161216:  Memory - illegal accesses  (RETURN_LOCAL)
    /src/nvim/eval.c: 11143 in get_user_input()
    11137       rettv->vval.v_string =
    11138         (char_u *)getcmdline_prompt(inputsecret_flag ? NUL : '@', p, echo_attr,
    11139                                     xp_type, xp_arg, input_callback);
    11140       ex_normal_busy = save_ex_normal_busy;
    11141       callback_free(&input_callback);
    11142
    >>>     CID 161216:  Memory - illegal accesses  (RETURN_LOCAL)
    >>>     Using "cancelreturn", which points to an out-of-scope variable "def".
    11143       if (rettv->vval.v_string == NULL && cancelreturn != NULL) {
    11144         rettv->vval.v_string = (char_u *)xstrdup(cancelreturn);
    11145       }
    11146
    11147       xfree(xp_arg);
    11148
2018-01-11 10:45:16 +01:00
Justin M. Keyes
18d244eded coverity/169163: decode_string: Null pointer deref
*** CID 169163:  Null pointer dereferences  (FORWARD_NULL)
    /src/nvim/eval/decode.c: 290 in decode_string()
    284         if (elw_ret == -1) {
    285           tv_clear(&tv);
    286           return (typval_T) { .v_type = VAR_UNKNOWN, .v_lock = VAR_UNLOCKED };
    287         }
    288         return tv;
    289       } else {
    >>>     CID 169163:  Null pointer dereferences  (FORWARD_NULL)
    >>>     Passing null pointer "s" to "xmemdupz", which dereferences it. (The dereference is assumed on the basis of the 'nonnull' parameter attribute.)
    290         return (typval_T) {
    291           .v_type = VAR_STRING,
    292           .v_lock = VAR_UNLOCKED,
    293           .vval = { .v_string = (char_u *)(
    294               s_allocated ? (char *)s : xmemdupz(s, len)) },
    295         };
2018-01-11 10:45:16 +01:00
Justin M. Keyes
911b1e49ab
Merge #7821 'api: nvim_command_output' 2018-01-11 10:39:41 +01:00
Justin M. Keyes
5055d4a755 api: nvim_command_output: direct impl 2018-01-10 23:58:56 +01:00
Justin M. Keyes
c095f83116 api: change nvim_command_output behavior
Implement nvim_command_output with `execute({cmd},"silent")`.

Behavior changes:
- does not provoke any hit-enter prompt
- no longer prepends a newline char
- does not capture some noise (like the "[New File]" message, see the
  change to tabnewentered_spec.lua)

Technically ("bug-for-bug") this a breaking change.  But the previous
behavior of nvim_command_output meant that it probably wasn't used for
anything outside of tests.

Also remove the undocumented `v:command_output` variable which was
a hack introduced only for the purposes of nvim_command_output.

closes #7726
2018-01-10 23:45:44 +01:00
Justin M. Keyes
f0845197d8 ci/travis: require "sudo" for ASAN_UBSAN build
Workaround for this fun new issue:

    ==27404==LeakSanitizer has encountered a fatal error.
    ==27404==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
    ==27404==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
    Failed: E /build|logs :: Runtime errors detected.

https://github.com/travis-ci/travis-ci/issues/9033
https://github.com/google/sanitizers/issues/764
2018-01-10 23:35:10 +01:00
dvejmz
34de6d33c9 lint 2018-01-09 22:58:24 +00:00
dvejmz
b23fc444b5 vim-patch:8.0.0204: compiler warns for uninitialized variable
Problem:    Compiler warns for uninitialized variable. (Tony Mechelynck)
Solution:   When skipping set "id" to -1.

eb46f8fa14
2018-01-09 22:11:16 +00:00
dvejmz
e888439f55 vim-patch:8.0.0202: no test for invalid syntax group name
Problem:    No test for invalid syntax group name.
Solution:   Add a test for group name error and warning.

4007ed4a5e
2018-01-09 22:11:16 +00:00
dvejmz
7f70c5f7b7 vim-patch:8.0.0201: completion of highlight groups includes cleared names
Problem:    When completing a group name for a highlight or syntax command
            cleared groups are included.
Solution:   Skip groups that have been cleared.

d61e8aaae5
2018-01-09 22:11:16 +00:00
dvejmz
889bc3c20c vim-patch:8.0.0200: some syntax arguments are not tested
Problem:    Some syntax arguments are not tested.
Solution:   Add more syntax command tests.

58f60ca2fc
2018-01-09 22:11:16 +00:00
dvejmz
b58c17f8df vim-patch:8.0.0198
Problem:    Some syntax arguments take effect even after "if 0". (Taylor
            Venable)
Solution:   Properly skip the syntax statements.  Make "syn case" and "syn
            conceal" report the current state.  Fix that "syn clear" didn't
            reset the conceal flag.  Add tests for :syntax skipping properly.

de318c5c35
2018-01-09 22:11:15 +00:00
Justin M. Keyes
a8ad6b4d51 cmake: install *.lua files 2018-01-09 11:37:49 +01:00
Justin M. Keyes
59888b68ab Merge #7623 'man.vim: highlight bold, underlined text' 2018-01-09 10:10:22 +01:00
Justin M. Keyes
0ed31303b5
Merge #7826 from ckelsel/vim-8.0.0351 2018-01-08 22:23:05 +01:00
ckelsel
e182a8c836 vim-patch:8.0.0352: not easy to see when a typval needs to be cleared
Problem:    The condition for when a typval needs to be cleared is too
            complicated.
Solution:   Init the type to VAR_UNKNOWN and clear it always.

f06e5a549f
2018-01-08 13:23:05 +08:00
ckelsel
b61a305039 vim-patch:8.0.0351: no test for concatenating an empty string
Problem:    No test for concatenating an empty string that results from out of
            bounds indexing.
Solution:   Add a simple test.

218426896c
2018-01-08 12:24:21 +08:00
Jan Edmund Lazo
9370a0e5d8 ci/travis: install neovim npm module on osx (#7825)
Always get latest nvm on osx to fix lts aliases.
2018-01-08 00:37:31 +01:00
Justin M. Keyes
ccdbcfea0b
Merge #7820 'ci/travis/macOS: skip ruby gem install' 2018-01-07 20:34:16 +01:00
Justin M. Keyes
46a9600d0e ci/travis: macOS: skip ruby-neovim install
With 6fa0a0a516 the neovim-ruby gem installs successfully, but
ruby_spec.lua can't find it: g:ruby_host_prog needs to be set correctly.

Just skip the whole thing for now, so that CI builds don't fail.
2018-01-07 20:09:25 +01:00
Justin M. Keyes
6fa0a0a516 ci/travis: macOS: switch ruby version
Travis macOS builds are failing because of neovim-ruby gem dependencies.
Switch default ruby to a newer version to make the builds pass.
2018-01-07 20:04:57 +01:00
Justin M. Keyes
8c2cb81d7e
test: set_shell_powershell(): update flags (#7819) 2018-01-07 16:20:37 +01:00
Justin M. Keyes
4fedad6c5b Merge #7753 'win: enable more functional tests' 2018-01-06 17:52:14 +01:00
Jan Edmund Lazo
ab1e11e44f test: win: yes is unavailable on Windows 2018-01-06 17:50:49 +01:00
Jan Edmund Lazo
d4485f7cc0 win: test: check non-shell system() 2018-01-06 17:49:42 +01:00
Jan Edmund Lazo
8d58012786 test: use unix fileformat to test NULs on systemlist 2018-01-06 17:49:42 +01:00
Jan Edmund Lazo
7311fb7cad win: enable more functional tests
- plugin/shada_spec.lua: Use \r\n as Windows EOL for tests on
  BufWriteCmd, FileWriteCmd, FileAppendCmd. Alternative is 'set
  fileformat=unix'.
2018-01-06 17:47:00 +01:00
Jan Edmund Lazo
e9b5616eaf win: enable tests in ex_terminal_spec 2018-01-06 17:46:49 +01:00
Marvim the Paranoid Android
c82e7c75fe version.c: update [ci skip] (#7780) 2018-01-06 16:35:19 +01:00
Justin M. Keyes
a18db72a36 third-party: revert to jemalloc 4.5.0
ref #7746
closes #7808
jemalloc-5.0.1 broke the Ubuntu Unstable PPA builds on arm64:
https://launchpadlibrarian.net/351647411/buildlog_ubuntu-artful-arm64.neovim_0.2.0ubuntu1+git201712291800+3837+26~ubuntu17.10.1_BUILDING.txt.gz).

    make[5]: Entering directory '/<<BUILDDIR>>/neovim-0.2.0ubuntu1+git201712291800+3837+26~ubuntu17.10.1/build'
    Segmentation fault (core dumped)
    runtime/CMakeFiles/vimball-tags.dir/build.make:57: recipe for target 'runtime/CMakeFiles/vimball-tags' failed
    make[5]: *** [runtime/CMakeFiles/vimball-tags] Error 139
    make[5]: Leaving directory '/<<BUILDDIR>>/neovim-0.2.0ubuntu1+git201712291800+3837+26~ubuntu17.10.1/build'
    CMakeFiles/Makefile2:7467: recipe for target 'runtime/CMakeFiles/vimball-tags.dir/all' failed

jemalloc bug:
https://github.com/jemalloc/jemalloc/issues/979
2018-01-06 16:22:38 +01:00
Justin M. Keyes
b616ef9b22 tests: stderr output contains cp noise
closes #7811
2018-01-05 18:18:26 +01:00
Justin M. Keyes
7c4bb23ff3 defaults: do :filetype stuff unless explicitly "off"
Until now, the default `:filetype ...` setup was skipped if the user
config touched `:filetype` in any way (including implicitly via `:syntax
on`).  No one needs that, and it's very confusing.

Instead, proceed with `:filetype ... on` unless the user explicitly
called `:filetype ... off`.

closes #7765
2018-01-04 10:32:09 +01:00
Justin M. Keyes
dc4a9cbe85 Merge #7805 'eval.c: fix some scan-build warnings' 2018-01-03 19:34:47 +01:00
Justin M. Keyes
0a881575da vim-patch:8.0.0955: Test_existent_file() fails on some file systems
Problem:    Test_existent_file() fails on some file systems.
Solution:   Run the test again with a sleep when the test fails without a
            sleep. (James McCoy, closes vim/vim#1984)

82de3c2c03
2018-01-03 19:16:17 +01:00
Justin M. Keyes
5898a1dcbb
Merge #7801 'tutor: adjust for 80 columns' 2018-01-03 19:11:02 +01:00
James McCoy
d2bc610d64
Merge pull request #7804 from jamessan/vim-8.0.0160
[RFC] vim-patch:8.0.0160
2018-01-03 07:22:35 -05:00
Jan Edmund Lazo
d55881d278 test: enable K_spec tests in Windows 2018-01-03 00:12:28 -05:00
Paul Rigge
88d643eb36 Add null check when adding variable to dict. 2018-01-02 17:22:33 -08:00
Paul Rigge
1bbe6d0a30 Add null pointer assertions for do_unlet_var. 2018-01-02 17:22:33 -08:00
Paul Rigge
2e630d2611 Refactor profiling check in call_user_func.
do_profiling is a global variable, and as such the clang static
analyzer has trouble making arguments about it.

This commit does one comparison against do_profiling and puts the
result in a local variable. This prevents errors from the value of
do_profiling changing between comparisons.
2018-01-02 17:22:33 -08:00
Paul Rigge
65ec4ea629 Add assertions for watchers
The clang static analyzer convinced itself lp->ll_newkey could be NULL.
This adds an assertion that checks this doesn't actually happen, as well
as a parallel assertion for di->di_key.
2018-01-02 17:22:33 -08:00