bambu
5a5ef1c222
mouse: Implement horizontal scroll. #3450
...
- Code from Vim source.
- Removed the check for 'guioptions'
- mouse_spec.lua: test <ScrollWheelLeft> and <ScrollWheelRight>
- Move horizontal scroll logic to mouse.c
- Remove 'gui_' from the function names
- Renamed variables to be more specific (as opposed to generic p, w).
- Marked some functions as `static`
2016-04-25 01:31:44 -04:00
Justin M. Keyes
49c5689f45
test/unit: ensure event_init()
...
Closes #4635
References #4630
References https://github.com/neovim/neovim/pull/4070#discussion_r50626558
2016-04-25 00:42:44 -04:00
Justin M. Keyes
6e5343d230
test: shell_spec: rename variable
2016-04-24 23:58:11 -04:00
Björn Linse
3c4544c532
tests/ui: screen tests for completion popupmenu
2016-04-24 15:17:39 +02:00
Justin M. Keyes
3d7a6e4d54
Merge pull request #4367 from jbradaric/vim-7.4.1107
...
vim-patch:7.4.{1107,1114,1116,1117,1120}
2016-04-22 04:11:45 -04:00
Justin M. Keyes
5ebffaae4e
Merge #3229 ':tcd'
2016-04-21 03:15:52 -04:00
Björn Linse
ce17d03180
eval: let getreg() return valid list for an undefined register
...
vim-patch:7.4.1755
this prevents a crash when the list is used in setreg() later
2016-04-21 18:11:06 +02:00
Justin M. Keyes
89e6973fe2
tcd: doc, error messages
2016-04-21 03:15:08 -04:00
HiPhish
ec71d87b81
Implement tab-local working directory feature.
...
New ex commands: 'tcd', 'tchdir'
Changed Vimscript functions: 'haslocaldir', 'getcwd'
The ex-commands ':tcd' and ':tchdir' are the tab-local equivalents of
':lcd' and ':lchdir'. There are no new Vimscript functions introduced,
instead the functions 'haslocaldir' and 'getcwd' take in optional
arguments. See the documentation for details
Since there is now different levels of local directory a simple boolean
at source level is no longer sufficient; a new enumeration type is used
for the scope-level from now on.
The documentation has been accommodated for these new commands and
functional tests have been written to test the feature.
2016-04-20 12:52:31 +02:00
Jurica Bradaric
5734e21873
delete_spec: Fix linter errors.
2016-04-20 08:25:51 +02:00
Jurica Bradaric
2dfc8de1cf
Merge tempfile.c back into fileio.c
2016-04-20 08:25:51 +02:00
Jurica Bradaric
425fcdb5b4
vim-patch:7.4.1120
...
Problem: delete(x, 'rf') fails if a directory is empty. (Lcd)
Solution: Ignore not finding matches in an empty directory.
336bd622c3
2016-04-20 08:25:51 +02:00
Jurica Bradaric
88a735166b
vim-patch:7.4.1114
...
Problem: delete() does not work well with symbolic links.
Solution: Recognize symbolik links.
43a34f9f74
2016-04-20 08:25:51 +02:00
Jurica Bradaric
50a7517a6d
vim-patch:7.4.1107
...
Problem: Vim can create a directory but not delete it.
Solution: Add an argument to delete() to make it possible to delete a
directory, also recursively.
da440d21a6
2016-04-20 08:25:16 +02:00
Justin M. Keyes
a347b29aa3
test: remote/define.vim: Add some spice.
2016-04-18 05:42:27 -04:00
Case Nelson
c4117d4b2f
test: format
2016-04-18 05:40:24 -04:00
Case Nelson
4a200ceafa
test: remote/define.vim: range
2016-04-18 05:40:15 -04:00
Justin M. Keyes
8a14750dd3
test: convert test_marks.in.
...
vim-patch:35e7594
35e7594dd4
"Add missing test files from 7.4.634 to the repository."
The discrepancy between the expected getpos() result of the old test
[0, 15, 2, 0] and the converted test [0, 3, 2, 0] is just a matter of how
the buffer is constructed: in the old Vim test the buffer has a bunch of
junk at the top.
The central purpose of the test is to verify that the getpost("'a") does
*not* return [0, 0, 0, 0].
2016-04-18 03:00:43 -04:00
ZyX
a64114eba0
functests: Make json_functions_spec use new NIL where appropriate
2016-04-18 02:48:20 +03:00
ZyX
bda0165514
eval/encode: Make sure that encoder can encode NULL variables
...
Adds two undocumented v: variables: _null_list and _null_dict because I do not
know a reproducible way to get such lists (though I think I heard about this)
and dictionaries (do not remember hearing about them). NULL strings are obtained
using $XXX_UNEXISTENT_VAR_XXX.
Fixes crash in json_encode($XXX_UNEXISTENT_VAR_XXX). Other added tests worked
fine before this commit.
2016-04-18 02:48:20 +03:00
ZyX
3e435df42c
functests: Replace \xXX escapes with \DDD in lua code
2016-04-18 02:48:20 +03:00
ZyX
fd92e648ac
eval/encode: Dump FF character correctly
2016-04-18 02:48:20 +03:00
ZyX
9af400f979
eval: Treat [] and [""] as any other empty string
2016-04-18 02:48:20 +03:00
ZyX
af7ff808c7
eval: Fix overflow in error message in f_json_decode
2016-04-18 02:48:20 +03:00
ZyX
4f8b686435
documentation,functests: State that UTF-8-only support is intentional
2016-04-18 02:48:20 +03:00
ZyX
c129f6cfaf
eval/decode: Accept \r
as space character
2016-04-18 02:48:20 +03:00
ZyX
d06c2a1b18
eval/decode: Do not overflow when parsing -
...
Also makes if’s less nested.
2016-04-18 02:48:20 +03:00
ZyX
515fea1ef0
eval/decode: Reject even more numbers
...
Rejects leading zeroes and numbers like 1.e+5 (decimal dot with missing number
with signed exponent).
2016-04-18 02:48:20 +03:00
ZyX
9c543f2e24
eval/decode: Reject more numbers, accept 1e5
2016-04-18 02:48:20 +03:00
ZyX
032ac502ff
eval/decode: Do not loose high surrogates followed by high surrogates
2016-04-18 02:48:20 +03:00
ZyX
eb806c9620
eval/decode: Make sure that error messages do not cause overflow
2016-04-18 02:48:20 +03:00
ZyX
52c6cc2189
eval/decode: Make sure that parsing strings does not overflow
2016-04-18 02:48:20 +03:00
ZyX
224d7df630
eval/decode: Make sure that blank input does not crash Neovim
2016-04-18 02:48:20 +03:00
ZyX
394830631f
eval/decode: Make sure that U+00C3 is parsed correctly
2016-04-18 02:48:20 +03:00
ZyX
b725f6b428
functests: Make sure that json functions are tested with C messages
2016-04-18 02:48:20 +03:00
ZyX
4eb5d05f01
eval/decode: Avoid overflow when parsing incomplete null/true/false
...
Note: second test does not crash or produce asan errors, even though it should.
2016-04-18 02:48:20 +03:00
ZyX
4a29995fe7
eval/decode: Rename brackets in error messages
...
U+007D is officially RIGHT CURLY BRACKET.
U+005D is officially RIGHT SQUARE BRACKET.
2016-04-18 02:48:20 +03:00
ZyX
942e0b338c
encode: Handle incomplete surrogates like \uSURR\uOTHR
properly
2016-04-18 02:48:20 +03:00
ZyX
406562ac6d
encode: Fail to dump NaN and infinity
...
Thanks to vim/vim#654
2016-04-18 02:48:20 +03:00
ZyX
2f67786796
eval: Rename json* functions to json_*
2016-04-18 02:48:20 +03:00
ZyX
f1ced96c28
api: Replace set_var(name, NIL) with del_var(name)
2016-04-18 02:47:13 +03:00
ZyX
f0bd4a1494
eval/encode: Fix invalid UTF-8 strings handling:
...
1. Do not allow reading past buffer end when creating error messages.
2. Fix surrogate pairs range, avoid magic constants.
2016-04-18 02:47:13 +03:00
ZyX
77776b09c6
eval/encode: Fix writing strings starting with NL to list
...
Error [found][1] by oni-link.
[1]: https://github.com/neovim/neovim/pull/4131/files#r52239384
2016-04-18 02:47:13 +03:00
ZyX
569e404622
eval/encode: Fix non-utf-8 &encoding handling, add tests
2016-04-18 02:46:34 +03:00
ZyX
d4106f6df3
shada: Make sure that NIL and EXT values can also be parsed back
...
Note: currently they are both *dumped*, but parsing them produces an error. This
is inappropriate: variables should either be skipped with error message when
dumping or should be read back properly.
It also appears that I did not have test for “has wrong variable value type”
error, so nothing got removed from errors_spec.
2016-04-18 02:46:34 +03:00
ZyX
0aa3e7b7ce
eval: Port parts of 7.4.1267 that are not already present
2016-04-18 02:46:34 +03:00
ZyX
b7cb8f0597
eval: Make assert_true and assert_false accept v:true and v:false
2016-04-18 02:45:49 +03:00
ZyX
6167ce6df2
eval: Remove v:none
...
To get v:none back just rever this commit. This will not make json*() functions
compatible with Vim though.
2016-04-18 02:45:49 +03:00
ZyX
e303ea8a19
eval/decode: Add support for special maps
...
Special dictionaries representing map are created when encountering duplicate
key or when key is empty or contains NUL.
Also checks that values are separated by a comma/colon properly.
2016-04-18 02:45:49 +03:00
ZyX
2c378fdfaf
eval/decode: Parse strings with NUL to special dictionaries
2016-04-18 02:45:49 +03:00
ZyX
5814e29cdb
eval/decode: Fix surrogate pairs processing
2016-04-18 02:45:49 +03:00
ZyX
ea82270d30
eval/decode: Fail on control and invalid unicode characters
2016-04-18 02:45:49 +03:00
ZyX
cddd7d47c3
eval/decode: Make msgpackparse() function use new v: vars
2016-04-18 02:45:49 +03:00
ZyX
e213ba1506
eval: Add jsondecode() function
2016-04-18 02:45:49 +03:00
ZyX
f5c35ba109
functests/msgpack: Test dumping special nil and bool dicts
2016-04-18 02:44:03 +03:00
ZyX
6e5498c3e3
runtime/msgpack: Add support for special values
2016-04-18 02:44:03 +03:00
ZyX
d70a322c40
eval: Add special variables v:false, v:null, v:none
2016-04-18 02:44:03 +03:00
ZyX
18903bd9b8
eval: Add special variable type
2016-04-18 02:44:03 +03:00
ZyX
68e58444b4
eval: Add jsonencode() function
...
Ref #3471
2016-04-18 02:44:03 +03:00
ZyX
c3efad5398
functests(msgpack): Fix location of one of the tests
2016-04-18 02:44:03 +03:00
ZyX
f21cb425fb
functests(msgpack): Fix test names
2016-04-18 02:44:03 +03:00
Justin M. Keyes
4043725991
Merge pull request #4574 from oni-link/fix.utfc_ptr2char_len
...
mbyte.c: Fix invalid memory access in utfc_ptr2char_len
2016-04-17 16:59:14 -04:00
oni-link
cd00aa6ae4
mbyte_spec.lua: Fix indentation
2016-04-17 21:07:42 +02:00
oni-link
a8fec15899
mbyte_spec.lua: Fix wording
2016-04-17 21:07:22 +02:00
KillTheMule
e6e843ebc0
Make completion_spec.lua more robust
...
Having a tags file in the calling directory of make test would make this test
fail, so disable tag file completion for it. Disable all other options except the
current buffer, to, applying the principle of least surprise.
2016-04-16 22:40:43 +02:00
oni-link
cfe4352897
mbyte.c: Unittest for utfc_ptr2char_len()
2016-04-15 21:17:33 +02:00
Justin M. Keyes
523ff9c55c
test: defaults_spec.lua
2016-04-15 02:23:27 -04:00
Justin M. Keyes
54188cddde
test: move server_spec.lua
...
Old layout was too granular, we do not need a server/ folder.
2016-04-15 02:23:27 -04:00
Björn Linse
01eafc0c17
tests: fix indeterministic oldfiles! test
2016-04-14 18:11:39 +02:00
Thiago de Arruda
c18d5917e3
Update lua client to 0.0.1-24
...
The new version of the lua client uses libmpack as a backend, and some test
scripts had to be updated to reflect that.
2016-04-13 09:21:32 -03:00
Thiago de Arruda
584b8eddb4
Mark cursor_spec.lua indeterministic test as pending
2016-04-11 23:07:52 -03:00
Thiago de Arruda
f5f11b9e2f
Remove indeterminism in oldfiles_spec.lua
...
If Nvim is in a "Press ENTER..." screen before the `get_vvar()` call, the test
will hang.
2016-04-11 23:07:52 -03:00
Thiago de Arruda
704f3dd855
Synchronize shada reset helper with other functional tests
2016-04-11 23:07:52 -03:00
Justin M. Keyes
bf2c2b34cf
Merge pull request #4357 from jbradaric/vim-7.4.1105
...
vim-patch:7.4.1105
2016-04-09 14:14:55 -04:00
Shougo Matsushita
d227c843bf
complete: noinsert/noselect should not set 'modified'. #4509
2016-04-09 13:36:37 -04:00
Charles Joachim
55844eee10
buffer.c: change return type to bool
...
Co-authored-by: Wayne Rowcliffe (@war1025)
2016-04-03 15:39:33 -04:00
Björn Linse
8eb8ebf905
tests: update tests to use [gs]et_lines instead of [gs]et_line_slice
2016-04-01 11:29:51 +02:00
Björn Linse
f3645e422f
api/buffer: add tests for buffer_[gs]et_lines
2016-04-01 11:29:51 +02:00
Björn Linse
51c7818d42
api/buffer: introduce buffer_[gs]et_lines with new indexing convention.
...
-1 is index past the end, and -2 is the index of the last element.
This eliminates the need for include_start/include_end.
Allow the handling of out-of-bounds to be configurable.
2016-04-01 11:29:51 +02:00
James McCoy
7558f42f7d
vim-patch:7.4.1654
...
Problem: Crash when using expand('%:S') in a buffer without a name.
Solution: Don't set a NUL. (James McCoy, closes vim/vim#714 )
52c6eaffd4
2016-03-30 08:30:35 -04:00
James McCoy
62c0d99474
vim-patch:7.4.1652
...
Problem: Old style test for fnamemodify().
Solution: Turn it into a new style test.
610cc1b9b3
2016-03-30 08:30:35 -04:00
James McCoy
e4d1bf7177
vim-patch:7.4.1643
...
Problem: Terminating file name has side effects.
Solution: Restore the character. (mostly by James McCoy, closes vim/vim#713 )
d4caf5c16a
2016-03-30 08:30:35 -04:00
James McCoy
5f0c76b243
vim-patch:7.4.1641
...
Problem: Using unterminated string.
Solution: Add NUL before calling vim_strsave_shellescape(). (James McCoy)
5ca84ce4aa
2016-03-30 08:30:35 -04:00
Justin M. Keyes
5730ad9376
Merge pull request #4461 from bfredl/pum_k_event
...
K_EVENT should not hide the popupmenu
2016-03-18 16:39:57 -04:00
Björn Linse
5aa0159f01
edit.c: K_EVENT should not hide the popupmenu
...
Nor should K_FOCUSGAINED and K_FOCUSLOST.
2016-03-17 13:26:51 +01:00
Justin M. Keyes
5a9d3be54c
test: minor changes
2016-03-17 00:21:48 -04:00
Shougo Matsushita
77a7ca458b
'shortmess': Add "F" flag. #4446
...
Add "Don't give the file editing message" flag in shortmess option.
Add the UI tests by @fmoralesc
Fix the changes for Vim 7.4.1570
2016-03-17 00:07:38 -04:00
Justin M. Keyes
e7485ab1c9
Merge pull request #2877 from lucc/test88
...
test: Migrate legacy test 88.
2016-03-10 10:16:44 -05:00
Lucas Hoffmann
316d38d98c
tests: Update migrated legacy test 88 for patch 7.4.639.
...
The patch was merged into master at d25a59f4
.
2016-03-09 23:55:16 +01:00
Lucas Hoffmann
925c020a1b
tests: Modernize legacy test 88.
2016-03-09 23:55:13 +01:00
Lucas Hoffmann
87c208a43f
tests: Migrate legacy test 88.
2016-03-09 23:54:26 +01:00
Anmol Sethi
0b468fd0cf
complete: disable folding when completing
...
Fixes vim/vim#643
2016-03-09 10:04:15 -05:00
Thiago de Arruda
96af115c71
Normalize nan/-nan in plugin/msgpack_spec.lua
...
-NaN doesn't exist in the IEEE 754 spec, it is a hardware-specific detail
abstracted away by luajit(and not by lua or nvim), so there's no need to test
it. Normalize all tests that involve -nan so the suite will be compatible with
both Lua and Luajit.
2016-03-07 13:08:48 -03:00
Thiago de Arruda
34a1bc1a46
Remove goto
statement in lua code.
...
`goto` is another luajit extension not compatible with 5.1.
2016-03-07 03:58:35 -03:00
Thiago de Arruda
c6ec148f2d
Rewrite hexadecimal escape sequences as decimal in lua strings
...
The hexadecimal notation is a Luajit extension which is not compatible with Lua
5.1. While Lua 5.2 does support hexadecimal sequences, it is better to target
Lua 5.1 for maximum compatibility with Luajit(which has fully compatible with
5.1 API/ABI).
2016-03-07 03:58:35 -03:00
Thiago de Arruda
35d8d10a6a
Remove dependency on ffi module
2016-03-07 03:58:29 -03:00
watiko
6d2ed7c0eb
tests: Migrate legacy test tagcase
2016-03-06 00:32:58 +09:00
Marco Hinz
67eeb8a798
Tests: check error messages from set{qf,loc}list()
2016-03-02 15:09:39 +01:00
Marco Hinz
a528d56ba0
Tests: add autocmd_spec.lua
2016-03-02 12:37:50 +01:00
Marco Hinz
d9e631f1b5
Tests: clean up tabnew_spec.lua
2016-03-02 12:37:50 +01:00