Commit Graph

4445 Commits

Author SHA1 Message Date
Marco Hinz
4afd386276 test/benchmark: clean up according to luacheck 2015-11-23 13:57:21 +01:00
Marco Hinz
818f926eb0 Tests: add luacheck for linting tests
Source: https://github.com/mpeterv/luacheck
Docs:   http://luacheck.readthedocs.org/en/0.12.0/index.html

Run via "make testlint".
2015-11-23 13:57:21 +01:00
Marco Hinz
4680b4f3b1 Remove outdated comment from BuildLuarocks.cmake 2015-11-23 13:27:21 +01:00
Marco Hinz
97cee2c2e3 Merge PR #3715 'Enable focus events in cmdline and terminal modes' 2015-11-23 13:19:00 +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
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
Shougo Matsushita
1fbb56795d Update version.c to latest Vim
NA patches list:

652: xxd changes  xxd is not included in neovim
744: if_ruby and if_perl legacy tests
750: if_perl build problem
751: compile options
756: if_perl support
757: term.c changes
759: if_lua support
761: term.c changes
762: term.c changes
763: if_lua support
766: term.c changes
770: term.c changes
772: if_mzsch support
802: duplicated test
809: revert of 802
829: GUI
837: Windows with if_sniff
840: GUI
846: CONTRIBUTING.md
850: CONTRIBUTING.md
851: Win32 console
852: Win32 console
855: GTK GUI
861: GTK GUI
862: GTK GUI
867: Windows Fix
869: Windows GUI
872: CI service
874: Windows GUI
875: README.md
876: Windows GUI
880: CI service
884: CI service
886: Windows GUI
890: if_python3
894: vimrun.exe
899: README.md
900: README.md
902: Win32 console
906: Windows problem
907: Dynamic loading
908: Windows build error
910: if_python
911: terminal
913: hangul input GUI only
917: hangulin.c changes
918: if_python
919: if_lua, if_python, if_python3
920: ruby stuff
921: Windows

Reviewed-by: Michael Reed <Pyrohh@users.noreply.github.com>
2015-11-20 13:44:07 -05:00
Marco Hinz
959f2601f9 Merge PR #3488 'Implement handling of terminal focus events' 2015-11-18 13:41:54 +01:00
Joe Hermaszewski
f480b38a2f Add tests for focus events 2015-11-17 22:36:28 +00:00
Joe Hermaszewski
33eb33bb62 Implement handling of terminal focus events
Two new keys have been added to key_name_entry in keymap.c:
`FocusGained` and `FocusLost`.

Two cases have been added to the key handing switch in edit.c each
applying their respective autocmds.

In normal.c two functions have been added alongside nv_cursorhold doing
a similar job of applying the autocmd for the appropriate key.

tui/input.c has a new function `handle_focus_event` which eats either of
the control sequences for focus gained or lost. This function is checked
before handle_bracketed_paste and handle_forced_escape.

tui.c registers neovim as able to receive these control sequences in
terminfo_start and undoes that in terminfo_stop.

Closes #2302
2015-11-17 22:36:28 +00:00
John Szakmeister
ed06071f1f Merge pull request #3680 from jszakmeister/fix-ordering-oldfiles-spec
Workaround the unstable ordering of v:oldfiles in some more tests.
2015-11-16 09:27:39 -05: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
Michael Reed
86ce65ebe9 Merge pull request #3678 from Pyrohh/ex_ni
[RFC] ex_cmds.lua: Use ex_ni directly
2015-11-15 18:35:38 -05:00
Michael Reed
3f7a465535 ex_cmds.lua: Use ex_ni directly
As can be seen in [1], the ifdefs are leftovers from Vim, where tons of
features are optional.  This is not the case in Nvim, so the macros are
of little use.  Besides, ex_ni is already used in a bunch of places,
just not consistently.

The ex_language macro was left untouched as the inclusion of
``:language'' actually is determined at compile time, unlike the other
commands which _always_ print "this command is not available in this
version".

[1]: https://github.com/vim/vim/blob/master/src/ex_docmd.c#L18-L497

Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
2015-11-15 18:34:18 -05:00
Justin M. Keyes
91c5135f71 Merge pull request #3339 from war1025/dev/clean_build_stl_str_hl
Clean up buffer.c build_stl_str_hl
2015-11-15 16:48:13 -05:00
Michael Reed
9b8ac827b4 Merge pull request #3672 from Pyrohh/macro-cleanup
[RFC] Remove unused TERMINAL_OPTIONS_INIT() macro
2015-11-15 13:02:53 -05:00
Marco Hinz
660f12f5b3 Merge PR #3653 'Add TermClose event' 2015-11-15 16:58:34 +01: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
ac4db4b814 TermEnter -> TermOpen 2015-11-15 15:09:47 +01:00
Michael Reed
be72048a8e Remove unused TERMINAL_OPTIONS_INIT() macro
It's not used after aa9cb48
2015-11-14 17:33:49 -05:00
Michael Reed
46cb0ffc91 Merge pull request #3671 from kyrias/vim_diff-typo
vim_diff: Fix incorrect ShaDa path
2015-11-14 14:18:32 -05:00
Johannes Löthberg
2975e66af4 vim_diff: Fix incorrect ShaDa path
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2015-11-14 19:50:45 +01:00
Justin M. Keyes
4cfda1ff7d Merge pull request #3630 from oni-link/fix.issue.3588
normal.c: No garbage collection while handling an event in normal mode
2015-11-13 11:40:13 -05:00
oni-link
1c43452afc memory.c: Prevent garbage collection when running out of memory.
When running out of memory, garbage collection would free lists and
dictionaries that are not yet referenced. This would later on lead to
a use-after-free for these objects.

Releated to vim-patch:7.4.916, so also updating version.c.

Patch by @ZyX-I
2015-11-13 15:59:46 +01:00
oni-link
1d9ae27e38 normal.c: No garbage collection while handling an event in normal mode
Patch by @tarruda

Fixes #3588
2015-11-13 15:59:46 +01:00
Bohr Shaw
08a1eb7ae1 Doc: minor fix for ":ls u"
This fixes a typo that was already contained in the original Vim patch:

d51cb706a4
2015-11-12 17:36:02 +01:00
Justin M. Keyes
3f7f14c0c7 Merge pull request #3663 from ming-codes/patch-1
Update backer URL
2015-11-12 09:49:41 -05:00
Ming Liu
846fe25111 Update backer URL 2015-11-11 19:50:33 -08:00
Wayne Rowcliffe
eed4df33f9 Cleanup from review 2015-11-11 21:21:19 -06:00
Wayne Rowcliffe
81f32bd153 Switch comments to match style guide 2015-11-11 21:19:52 -06:00
Wayne Rowcliffe
6cfb81eaa7 Updates from review 2015-11-11 21:19:52 -06:00
Wayne Rowcliffe
70f6b0f338 Start adding unit tests 2015-11-11 21:19:52 -06:00
Wayne Rowcliffe
a9dfcb7e02 Fix shadowed variable in build_stl_str_hl 2015-11-11 21:19:52 -06:00
Wayne Rowcliffe
d12f328b60 Add documentation about what TABPAGENR and TABCLOSENR do 2015-11-11 21:19:51 -06:00
Wayne Rowcliffe
7c32d86f7d Fix lint 2015-11-11 21:19:51 -06:00
Wayne Rowcliffe
12e53ca95c Add out_end_p to mark last valid character in statusline buffer 2015-11-11 21:19:51 -06:00
Wayne Rowcliffe
9e5a7d3751 Rename build_stl_str_hl input and output buffer pointers 2015-11-11 21:19:51 -06:00
Wayne Rowcliffe
cde2259a6b Add comments to build_stl_str_hl 2015-11-11 21:19:51 -06:00
Wayne Rowcliffe
bf8038702d Clean up buffer.c build_stl_str_hl variable declarations 2015-11-11 21:19:51 -06:00
Justin M. Keyes
5434a05457 Merge pull request #3651 from mhinz/remove-nvimrc-refs
Remove all invalid nvimrc references
2015-11-11 17:37:07 -05:00
Marco Hinz
85b1052c3c Remove all invalid nvimrc and ngvimrc references
"vimrc" refers to all files that are used to configure Neovim. The main
configuration file is init.vim nowadays.

All nvimrc references that are left refer to a local ".nvimrc" which is read
if 'exrc' is set. ".ngvimrc" references were completely wiped.

Closes #3552.
2015-11-11 22:50:14 +01:00
Marco Hinz
bb43d9b9a2 vim-patch:7.4.791 #3078
Problem:  The buffer list can be very long.
Solution: Add an argument to ":ls" to specify the type of buffer to list.
          (Marcin Szamotulski)

d51cb706a4
2015-11-11 21:46:46 +01:00
Michael Reed
632408af4a Merge pull request #3652 from Pyrohh/rm-os-mac
[RDY] Remove os_mac.txt
2015-11-11 12:33:18 -05:00
Michael Reed
150d08801c doc: Nuke os_mac.txt
Pretty much all of this stuff is outdated.

Reviewed-by: @justinmk
2015-11-11 12:31:53 -05:00
Michael Reed
1ee6a6e7d4 Merge pull request #3641 from Pyrohh/X11
[RFC] Be more explicit about the lack of X11 integration

Reviewed-by: @justinmk
2015-11-11 12:19:40 -05: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
Michael Reed
2fbcc9ab76 Be more explicit about the lack of X11 integration
I don't want anyone getting the idea that the `-X` flag they might have
used has anything to do with why the `+` is working for them
2015-11-10 20:10:55 -05:00
Shougo Matsushita
3b615980c8 vim-patch:7.4.651 #3644
Problem:    Can't match "%>80v" properly for multi-byte characters.
Solution:   Multiply the character number by the maximum number of bytes in a
            character. (Yasuhiro Matsumoto)

4f36dc3bf7
2015-11-10 18:26:35 +01:00