Commit Graph

4429 Commits

Author SHA1 Message Date
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
John Szakmeister
421da79d30 Merge pull request #3643 from jszakmeister/enable-verbose-builds
third-party: enable verbose builds of luajit and libuv
2015-11-10 08:08:04 -05:00
John Szakmeister
97bb24d4e5 third-party: enable verbose builds of luajit and libuv
Libuv and LuaJIT like to hide the actual compilation and linking
commands behind nice text.  This change makes them spit out the actual
command line to help us with debugging issues that people are seeing.
2015-11-10 06:19:08 -05:00
Marco Hinz
68255df9b9 Merge PR #3611 'Add file selection prompt on ":oldfiles!"' 2015-11-10 03:14:47 +01:00
Marco Hinz
3b12bb225a Add file selection prompt on ":oldfiles!"
:browse was removed for good, but some people miss ":browse oldfiles".

The same functionality is now provided by ":oldfiles!".

Helped-by: @Pyrohh
2015-11-10 03:13:31 +01:00
Marco Hinz
dc65c8a893 Add tests for :oldfiles 2015-11-10 03:13:31 +01:00
Marco Hinz
971e5c22bf Merge PR #2427 'Add ":profile dump" and ":profile stop"' 2015-11-10 03:09:38 +01:00
Marco Hinz
1902ee52ef Add ":profile stop"
This writes the logfile and stops profiling.
2015-11-10 02:49:47 +01:00
Marco Hinz
588bf76650 Add ":profile dump"
Currently the logfile (":profile start {logfile}") only gets written when Vim
exits. This new command allows to dump the log immediately without exiting.
2015-11-10 02:49:47 +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