Commit Graph

10032 Commits

Author SHA1 Message Date
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
Justin M. Keyes
f09a30d5b0
Merge #7839 'coverity fixes' 2018-01-15 22:31:11 +01:00
Justin M. Keyes
900708f93b
Merge #7855 from ckelsel/vim-8.0.0398 2018-01-15 22:10:05 +01:00
Felipe Morales
7dd3910f47 tutor: don't resize (#7854) 2018-01-15 21:59:37 +01:00
mkotha
ac87d9de69 Fix an off-by-one error in the documentation of nvim_buf_clear_highlight (#7853) 2018-01-15 21:45:10 +01:00
Filip Szymański
423d7af3df man.lua: avoid float conversion on lua 5.3 (#7851)
Error detected while processing function man#open_page[58]..<SNR>54_put_page:
    line    8:
    E5105: Error while calling lua chunk: /usr/share/nvim/runtime/lua/man.lua:165: Vim(let):E805: Using a Float as a Number
2018-01-15 20:14:27 +01:00
ckelsel
808f504305 vim-patch:8.0.0421: diff mode wrong when adding line at end of buffer
Problem:    Diff mode is displayed wrong when adding a line at the end of a
            buffer.
Solution:   Adjust marks in diff mode. (James McCoy, closes vim/vim#1329)

f58a8475e1
2018-01-15 20:20:15 +08:00
ckelsel
28998cfd81 vim-patch:8.0.0402: :map completion does not have <special>
Problem:    :map completion does not have <special>. (Dominique Pelle)
Solution:   Recognize <special> in completion.  Add a test.

cf5fdf7d16
2018-01-15 19:48:18 +08:00
ckelsel
63bb7198df vim-patch:8.0.0398: illegal memory access with "t"
Problem:    Illegal memory access with "t".
Solution:   Use strncmp() instead of memcmp(). (Dominique Pelle, closes vim/vim#1528)

66727e1607
2018-01-15 19:41:01 +08:00
ckelsel
b9f3805447 vim-patch:8.0.0406: arabic shaping code is verbose
Problem:    The arabic shaping code is verbose.
Solution:   Shorten the code without changing the functionality.

7f73b54631
2018-01-15 19:16:04 +08:00
ckelsel
770ec228c7 vim-patch:8.0.0391: arabic support is verbose and not well tested
Problem:    Arabic support is verbose and not well tested.
Solution:   Simplify the code.  Add more tests.

5f53dd3f74
2018-01-15 18:18:59 +08:00
ckelsel
fc97e9fbdf vim-patch:8.0.0389: test for arabic does not check what is displayed
Problem:    Test for arabic does not check what is displayed.
Solution:   Improve what is asserted. (Dominique Pelle, closes vim/vim#1523)
            Add a first shaping test.

5342f00ff9
2018-01-15 17:33:13 +08:00
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
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