Commit Graph

3902 Commits

Author SHA1 Message Date
Lucas Hoffmann
6571c84d54 tests: Migrate legacy test 80. #2989
The test is also split in several blocks and heavily modernized.  This was
done to prevent the following quoting and escaping problems during migration:
- the vim command `put =...` treats double quotes as the start of a comment so
  they have to be escaped with a backslash
- when inserting control characters on the command line they have to be
  escaped with <C-V>

The parts one and two of the test are functional identical so they are wrapped
in a local function. The only difference was which letters where used to test
the same feature.

Part six did test a flag in 'cpoptions' that has been removed in neovim.  It
has therefore been removed as well.

Reviewed-by: Michael Reed <Pyrohh@users.noreply.github.com>
2015-07-21 19:56:15 -04:00
crondog
d6c97a85ff tui: Unconditionally enable bracketed paste mode #3060
There are more terminals which have bracketed paste support and it
doesnt seem to do any harm with terminals that dont support it eg screen

Reviewed-by: Marco Hinz <mh.codebro@gmail.com>
Reviewed-by: Michael Reed <Pyrohh@users.noreply.github.com>
"+1 Let's see what happens" Justin M. Keyes <justinkz@gmail.com>
2015-07-21 19:36:21 -04:00
Wander Nauta
bf9f50942d eval.c: Only inline float_op_wrapper on non-i386 #3072
glibc on i386 seems to have an optimization that makes it harder to call
some math functions indirectly from inside an inlined function, causing
compile-time errors with some versions of gcc.  This removes inlining on
that platform.

Closes #3071
2015-07-21 18:49:16 -04:00
Marco Hinz
43f7eec0cd Uncomment merged patches in version.c
7.4.774 -> https://github.com/neovim/neovim/pull/2563
7.4.775 -> https://github.com/neovim/neovim/pull/2564
7.4.784 -> https://github.com/neovim/neovim/pull/2792
2015-07-21 13:48:36 +02:00
Thiago de Arruda
23cdebd559 rstream: Fix read_cb invocation
- Add missing call when the stream is a file
- NULL check because it is possible to call rstream_start with the callback set
  to NULL.
2015-07-21 07:00:38 -03:00
Marco Hinz
fd740a383a Doc: add bracketed-paste-mode #3028
Reviewed-by: Felipe Morales <hel.sheep@gmail.com>
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
Reviewed-by: Michael Reed <Pyrohh@users.noreply.github.com>
2015-07-21 09:38:18 +02:00
Michael Reed
4455fc3f05 Remove ':Print' command #3049
There's no way this isn't some long-running joke:

  "Just as ':print'.  Was apparently added to Vi for
  people that keep the shift key pressed too long..."
  Note: A user command can overrule this command.

Regarding ':X': the command has been removed for a while, but the
documentation must have been missed, so remove it here.

Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
Helped-by: @jusga
2015-07-20 20:43:09 -04:00
Justin M. Keyes
bd753bdacc Merge #3014 'clipboard: handle middle-click paste correctly.'. 2015-07-20 20:24:28 -04:00
Björn Linse
8047570b70 clipboard: add tests for error fallback and middleclick paste 2015-07-20 20:24:28 -04:00
Björn Linse
c30f2ac25d clipboard: handle middle-click paste correctly.
Also handle clipboard errors more like vim: paste from unnamed register
if clipboard provider fails.
2015-07-20 20:24:27 -04:00
Justin M. Keyes
0e39b2c936 Merge #3056 'Test: fix functional/ex_cmds/recover_spec.lua'. 2015-07-20 18:21:29 -04:00
Marco Hinz
2b2cea38a9 Test: fix functional/ex_cmds/recover_spec.lua
os.remove() wasn't removing the temporary swap directory which leads to
problems when the test is run a second time.

That's also the reason why the CI never caught this.

os.remove() got replaced by helpers.rmdir().
2015-07-20 22:19:16 +02:00
Marco Hinz
0f34b256aa Test: add new helper function: rmdir()
- lfs.rmdir() only removes empty directories

- os.remove() supercedes lfs.rmdir(); removes files and empty directories

- helpers.rmdir() first removes all files within a directory, then the
  directory itself
2015-07-20 22:19:07 +02:00
Marco Hinz
05bb841487 Source provider at start if &cb is set #3025
The main problem is that <c-c> is a default mapping but also sets got_int.

Because of the former, normal_cmd() is kicked off which eventually leads to
sourcing the clipboard provider. But due to the latter, do_source() throws an
error, because got_int is set.

This is a temporary workaround and sources the clipboard provider before
main_loop(), if &clipboard is set.

References #3023.
2015-07-20 18:18:59 +02:00
Felipe Morales
b4a5871809 defaults: set 'history' to 10000 by default. #2868
Note: the new history value is the max allowed.

Re: https://github.com/neovim/neovim/issues/2676
2015-07-20 03:48:33 -04:00
Michael Reed
259db27aef Merge pull request #2943 from Pyrohh/rm-posix
[RDY] Remove POSIX 'cpoptions'

Reviewed-by: Felipe Morales <hel.sheep@gmail.com>
Reviewed-by: Marco Hinz <mh.codebro@gmail.com>
2015-07-19 15:39:03 -04:00
Michael Reed
85b7ea9a87 Remove POSIX 'cpoptions': cleanup
- CPO_ALL and CPO_VI are identical, so merge them
- No longer check for the environment variable 'VIM_POSIX'
- In vim_diff.txt, mention the removal of 'cpoptions' flags
2015-07-19 15:14:23 -04:00
Michael Reed
4f444ae4f8 Remove POSIX 'cpoptions': '\' 2015-07-19 15:14:22 -04:00
Michael Reed
0661411bba Remove POSIX 'cpoptions': '.' 2015-07-19 15:14:22 -04:00
Michael Reed
3931a36340 Remove POSIX 'cpoptions': '/' 2015-07-19 15:14:22 -04:00
Michael Reed
b19afa52c4 Remove POSIX 'cpoptions': '&' 2015-07-19 15:14:22 -04:00
Michael Reed
d9b053d6a6 Remove POSIX 'cpoptions': '|'
It wasn't even hooked up to anything... must have been removed when
term.c was replaced.
2015-07-19 15:14:22 -04:00
Michael Reed
4a86122422 Remove POSIX 'cpoptions': '{' 2015-07-19 15:14:22 -04:00
Michael Reed
96c27692b8 Remove POSIX 'cpoptions': '#' 2015-07-19 15:14:22 -04:00
Sebastian Witte
fcb79ffc40 Implement API function to call functions #2979
Remove static modifier from func_call
Move MAX_FUNC_ARGS definnition from eval.c to eval.h
2015-07-19 17:18:31 +02:00
Felipe Morales
fb0ebb2a3a runtime/syntax/vim.vim: Update to version 7.4-33 2015-07-19 01:01:54 -03:00
Michael Reed
fcb051098a runtime/syntax/vim.vim: Update
Added: TermOpen autocmd

Added: terminal mode (un)map commands

Options and commands not available in neovim ('cp' and variants, termcap
options, :shell, :fixdel) are highlighted as errors. Previously deleted
entries were restored.

Co-authored-by: Felipe Morales <hel.sheep@gmail.com>
2015-07-19 01:01:54 -03:00
Michael Reed
87afee3e75 Merge pull request #2719 from lucc/test57
[RDY] tests: Migrate legacy test 57.
2015-07-18 22:29:43 -04:00
Lucas Hoffmann
42d38b363c tests: Split migrated test 57. 2015-07-19 04:06:45 +02:00
Lucas Hoffmann
1b2eb306f7 tests: Migrate legacy test 57. 2015-07-19 04:06:45 +02:00
Lucas Hoffmann
d71eb9db3c tests: Remove migrated legacy tests from makefile. #3009
Remove legacy tests from the old makefile that were forgotten after the test
migration.  The tests are:

- test 26 migrated in da3ade6a59 merged in #1420
- test 27 migrated in ac52d84f16 merged in #1328
- test 43 migrated in c9159586b8 merged in #1420
- test 46 migrated in 5ea94e14f0 merged in #1328
- test 63 migrated in a040aa95c1 merged in #1930

Additionally the tests 71 and 72 where removed in
85338fe1d5 together with the +cryptv feature.
2015-07-18 21:15:26 -04:00
Björn Linse
c7bfbd4fd9 python3: remove decoding logic, as this is now done in plugin host #3026
DecodeHook isn't needed since neovim/python-client#53
rpc methods won't pass bytes anymore, ref neovim/python-client#129
2015-07-18 22:39:28 +02:00
Marco Hinz
1d4f68a2f5 vim-patch:7.4.667 #3043
Problem:  'colorcolumn' isn't drawn in a closed fold while 'cursorcolumn'
          is. (Carlos Pita)
Solution: Make it consistent. (Christian Brabandt)

Original patch:
  https://github.com/vim/vim/commit/v7-4-667

Discussion:
  https://groups.google.com/forum/#!topic/vim_dev/Lidb7s4xn3Q
2015-07-18 16:37:16 -04:00
Justin M. Keyes
6cfeea9922 Merge #2964 'deps: update busted: 2.0 rc8 -> rc10'. 2015-07-18 15:53:31 -04:00
Michael Reed
ff3175c4cd deps: Don't pin dependencies
This effectively reverts 585e5d32a3

The pinning was done at a time when `lua_cliargs` caused test failures,
so an older version which didn't was pinned.  We're now using the latest
version (2.5-1), so the cause of those failures were presumably fixed.
2015-07-18 15:52:15 -04:00
Michael Reed
b8bfc0c736 deps: Update busted: 2.0 rc8 -> 2.0 rc10
This removes the dependency on ansicolors, see [1]:

See [2] for a changelog between the two versions.

[1]: https://github.com/Olivine-Labs/busted/pull/373
[2]: https://github.com/Olivine-Labs/busted/compare/v2.0.rc8-0...a6233a277da4e118f663606d54da8df88a27c076
2015-07-18 15:52:15 -04:00
Marco Hinz
54195c829d Merge #3005 'synIDattr(): true color awareness' 2015-07-18 16:58:09 +02:00
Marco Hinz
9d876eb037 Test: synIDattr(): true color awareness 2015-07-18 16:55:25 +02:00
Marco Hinz
84ce97714b synIDattr(): true color awareness
In Vim, which doesn't true colors, synIDattr('Foo', 'fg') returns either
ctermfg or guifg depending on whether vim or gvim is running.

True colors naturally use GUI colors, so synIDattr() has to be adapted to
return guifg, if a TUI with enabled true colors is used.
2015-07-18 16:55:25 +02:00
Wander Nauta
7732bec9b8 eval: Fix duplicate code in trig/math functions #3035
The same error checking/recovery code was duplicated among the f_acos,
f_asin, f_atan, f_ceil, f_cos, f_cosh, f_exp, f_floor, f_log, f_log10,
f_round, f_sin, f_sinh, f_sqrt, f_tan, f_tanh and f_trunc functions.
This commit moves that code into a wrapper function.

`trunc` is not in C90, but it is in C99, which is what neovim targets,
so we use it here.
2015-07-18 10:33:22 -04:00
Justin M. Keyes
14ae3c0cbd Merge #2609 'Macro cleanup' 2015-07-17 22:13:20 -04:00
Hettomei
3b06ce200b Macro cleanup: FEAT_SHORTCUT, replace with WIN32 2015-07-17 21:40:40 -04:00
Hettomei
b69f1b85f5 Macro cleanup: FEAT_BEVAL_TIP 2015-07-17 21:40:40 -04:00
Hettomei
28d39db171 Macro cleanup: FEAT_GUI_MSWIN 2015-07-17 21:40:39 -04:00
Hettomei
9b58fc6986 Macro cleanup: FEAT_GUI_MAC 2015-07-17 21:40:39 -04:00
Hettomei
db9bcadb05 Macro cleanup: FEAT_GUI_X11 2015-07-17 21:40:39 -04:00
Hettomei
bd819aaed0 Macro cleanup: FEAT_GUI_GTK 2015-07-17 21:40:39 -04:00
Hettomei
5360324974 Macro cleanup: FEAT_TOOLBAR 2015-07-17 21:40:38 -04:00
Hettomei
343040f318 Macro cleanup: FEAT_BEVAL 2015-07-17 21:40:38 -04:00
Hettomei
848a5e2e87 Macro cleanup: USE_FILE_CHOOSER 2015-07-17 21:40:38 -04:00