Commit Graph

440 Commits

Author SHA1 Message Date
Johan Klokkhammer Helsing
123361f187 vim-patch:7.4.670
Problem:    Using 'cindent' for Javascript is less than perfect.
Solution:   Improve indenting of continuation lines. (Hirohito Higashi)

dcefba9934
2015-12-13 11:55:37 +01:00
Justin M. Keyes
1b6e7f9e39 test: fixeol_spec: setup/teardown
Without this cleanup, test will fail if run multiple times.
2015-12-13 00:21:11 -05:00
Justin M. Keyes
aca51f3d93 Merge #3443 'vim-patch:7.4.{785,795,898}' 2015-12-13 00:09:07 -05:00
Justin M. Keyes
cc203e4b93 Merge pull request #3753 from watiko/vim-7.4.790
Vim 7.4.{786,787,789,790}
2015-12-12 17:43:23 -05:00
watiko
a3a8df8359 tests: Improve legacy autocmd_option.
* Compare tables instead of strings
 * Add neovim specific test
2015-12-12 03:34:17 +09:00
Marco Hinz
483d4abee7 Test: remove artifacts from root directory
The tests would leave the following test files in the root directory:

    Xtest-functional-plugin-shada.shada
    Xtest-functional-plugin-shada.shada.tmp.f

Clean them up in teardown().
2015-12-01 20:46:13 +01:00
watiko
8c00c34b91 tests: Keep each autocmd_option's test in isolation. 2015-11-28 20:15:28 +09:00
watiko
d9c0293824 tests: Improve legacy test autocmd_option. 2015-11-28 17:22:53 +09:00
watiko
21956adb6e tests: Migrate legacy test autocmd_option. 2015-11-28 17:22:53 +09:00
Justin M. Keyes
b9139e009f Merge pull request #3724 from ZyX-I/fix-3635
shada: Do not save unlisted and quickfix buffers
2015-11-27 18:06:52 -05:00
Felipe Morales
80cf03602e Merge pull request #3581 from ZyX-I/fix-shada
Store last search direction when writing ShaDa files
2015-11-23 23:03:29 +01:00
ZyX
b98cea909f shada: Also store last search direction
Note: it looks like viminfo files do not store search direction intentionally.
After reading viminfo file search direction was considered to be “forward”.

Note 2: all files created on earlier Neovim version will automatically receive
“forward” direction.

Fixes #3580
2015-11-23 17:08:01 +03:00
Marco Hinz
d9fbc1865b test/functional: clean up according to luacheck (part 2) 2015-11-23 13:57:21 +01:00
Marco Hinz
4a69e55f39 test/functional: clean up according to luacheck (part 1) 2015-11-23 13:57:21 +01:00
Joe Hermaszewski
6329fd420e Reorganize focus events test into individual tests
The focus event tests now live in their own `describe` block with each
test testing the handling of focus events in a single mode.
2015-11-23 13:18:27 +01:00
Joe Hermaszewski
442cd0672b Enable focus events in cmdline and terminal modes
This change adds switch cases for K_FOCUSGAINED and K_FOCUSLOST to the
input handling functions in ex_getln.c and terminal.c. The handling is
identical to what's found in edit.c (just calling apply_autocmds).

If one enters cmdline-mode by feeding `:` and sends a focuslost event (by
leaving the window for example) the text `<FocusLost>` will be inserted
into the command line. There is similar behaviour in terminal mode. This
patch corrects this behavior to fire the apropriate autocmd instead.

Fixes #3714
2015-11-23 13:18:27 +01:00
ZyX
ec8e60a055 shada: Do not save unlisted and quickfix buffers
Fixes #3635
2015-11-23 15:12:08 +03:00
Felipe Morales
321db59ca1 Merge pull request #3270 from ZyX-I/shada-support
Add plugin for editing ShaDa files
2015-11-23 00:27:18 +01:00
Johan Klokkhammer Helsing
b1d7b5294a Convert legacy test for fixeol to lua test. 2015-11-22 20:03:41 +01:00
Joe Hermaszewski
f480b38a2f Add tests for focus events 2015-11-17 22:36:28 +00:00
John Szakmeister
d4f3d819d8 Workaround the unstable ordering of v:oldfiles in some more tests.
Fixes #3676.

Reviewed-by: Marco Hinz <mh.codebro@gmail.com>
2015-11-16 08:29:45 -05:00
Marco Hinz
ec847af48d Test: add functional/autocmd/termclose_spec.lua 2015-11-15 16:29:13 +01:00
Marco Hinz
9fcd444036 Add TermClose event
A terminal buffer now exits with: [Process exited <return value>]

You can hook into it. E.g.  :au TermClose * call feedkeys('<cr>')

Closes #2293.
2015-11-15 15:10:02 +01:00
Marco Hinz
947e356cda Test: improve functional/ex_cmds/oldfiles_spec.lua
- change approach for test 1: screen:expect() instead of assert()
- use execute() instead of command()
- 2 new tests that check none and wrong input for :oldfiles!

Helped-by: @fwalch
Helped-by: @tarruda
Helper-by: @justinmk
2015-11-11 17:12:02 +01:00
Marco Hinz
dc65c8a893 Add tests for :oldfiles 2015-11-10 03:13:31 +01:00
Marco Hinz
69085113b3 Add test/functional/ex_cmds/profile_spec.lua
This adds two new tests for:

    :profile dump
    :profile stop
2015-11-10 02:49:47 +01:00
Thiago de Arruda
df37aa6115 eval: Implement dictionary change notifications 2015-11-09 09:43:30 -03:00
John Szakmeister
9499432d7f Merge pull request #3616 from jszakmeister/sort-results-shada-test
Sort oldfiles in the marks_spec tests to avoid random ordering errors.
2015-11-06 06:47:58 -05:00
John Szakmeister
a6c45d15fd Sort oldfiles in the marks_spec tests to avoid random ordering errors.
According to @ZyX-I in #3594, ordering is not important so let's use
@tarruda's fix by sorting the results.
2015-11-06 06:02:41 -05:00
ZyX
96dc38b3c8 undo: Remove incorrect NONNULL_ALL attribute
Fixes #3605
2015-11-05 23:34:48 +03:00
John Szakmeister
690df9333a Ensure a session is running before attempting to do Python detection. 2015-11-04 05:01:22 -05:00
ZyX
ae0576a472 runtime: Add shada.vim syntax file 2015-11-01 21:27:28 +03:00
ZyX
9037a180de runtime: Add [ft]plugin/shada.vim files that automatically open .shada 2015-11-01 21:27:28 +03:00
ZyX
8d9063bb2a runtime: Add autoload/shada.vim helper file
Contains most of the logic
2015-11-01 21:27:28 +03:00
ZyX
136c560023 functests: Do not run some tests if there is no -NaN 2015-11-01 21:27:27 +03:00
ZyX
00a638179d runtime: Add autoload/msgpack.vim helper file 2015-11-01 21:27:27 +03:00
Thiago de Arruda
7e8b431d3f tui: Fix abort when stdout and stderr are not tty.
The abort came from using libuv tty handle on non-tty fd. Use uv_pipe_t in these
cases. Also add simple test for this case.
2015-10-29 08:13:45 -03:00
Thiago de Arruda
e5165bae11 input: Remove CURSORHOLD key
Refactor input.c, normal.c and edit.c to use the K_EVENT special key to trigger
the CURSORHOLD event. In normal and edit mode, K_EVENT is treated as
K_CURSORHOLD, which enables better handling of arbitrary actions in those
states(eg: In normal mode the previous operator counts will be restored).

Also fix a test in vim_spec.lua. The test had a wrong assumption: cmdheight is
only used to determine when the press enter screen will be shown, not to limit
how many lines or control pagination.
2015-10-26 10:52:01 -03:00
Thiago de Arruda
e596234fc2 test: Add more TUI tests and increase timeout 2015-10-26 10:52:01 -03:00
Justin M. Keyes
0f9dea2a0e vim-patch:7.4.849
Problem:    Moving the cursor in Insert mode starts new undo sequence.
Solution:   Add CTRL-G U to keep the undo sequence for the following
            cursor movement command. (Christian Brabandt)

8b5f65a527

Closes #3492
2015-10-26 02:23:59 -04:00
Justin M. Keyes
1ca5646bb5 Merge pull request #3470 from ZyX-I/pr-3198
XDG base directory specification support
2015-10-25 22:38:23 -04:00
ZyX
e5537a935f functests: Fix tests 2015-10-23 15:56:51 +03:00
ZyX
6b17d35ff1 functests: Use . for various folder defaults in tests 2015-10-23 15:56:51 +03:00
ZyX
ec1ca54d59 functests: Do not forget about -i argument
Target: make all tests run with chmod -x ~/.config/nvim ~/.local/share/nvim.
2015-10-23 15:56:51 +03:00
ZyX
b7732cceca functests: Fix 078_swapfile_recover test 2015-10-23 14:54:11 +03:00
ZyX
ea2fe52552 functests: Add test to check expected behaviour (failing) 2015-10-23 14:47:59 +03:00
ZyX
3a4a941885 shada: Fix memory leak and double free when setting both &vi and &sd 2015-10-08 22:01:12 +03:00
ZyX
1162962d8b functests: Refactor tests:
- Remove unused variables.
- Do not use helpers.nvim_feed in most cases.
- Do not use helpers.nvim and helpers.nvim_eval at all.
- Add helpers.funcs and helpers.\*meths special tables. Indexing such table 
  creates functions which call helpers.call or helpers.nvim (and similar) with 
  first argument equal to table index.
2015-10-08 22:01:12 +03:00
ZyX
2dd8e05f9f shada: Fix jump/change list merging code
Errors happens under following conditions:

1. Jump/change list is full.
2. New jump/change list item should go between some of the old ones.
2015-10-08 22:01:11 +03:00
ZyX
b8e7915596 shada: Make sure that shada-r option correctly ignores case 2015-10-08 22:01:10 +03:00