Commit Graph

3318 Commits

Author SHA1 Message Date
Thomas Vigouroux
a8f71676a1 fix(bufupdates): avoid sending empty updates 2020-09-11 14:48:10 +02:00
Thomas Vigouroux
f0e258cf85 fix(bytetrack): send correct events when opening lines
a bit of test cleanup

ärrår

feeel

SPLIT

fix: sned correct updates on <CR>
2020-09-11 14:38:58 +02:00
Björn Linse
f239134fee tests: disable hl glitch test for now, will be fixed in luahl (next PR) 2020-09-10 06:50:04 +02:00
Thomas Vigouroux
82fb6a8818 fix lints 2020-09-09 21:22:21 +02:00
Björn Linse
bc86f76c0a api/buffer: add "on_bytes" callback to nvim_buf_attach
This implements byte-resolution updates of buffer changes.
Note: there is no promise that the buffer state is valid inside
the callback!
2020-09-09 21:22:21 +02:00
Thomas Vigouroux
1ff064126d treesitter: revert wrong optimization in highlights 2020-09-09 16:00:19 +02:00
Justin M. Keyes
59712f6dbe
win: avoid duplicate separators in $PATH #12869
Seems like redundant env var separators (";" on Windows) in $PATH can
cause weird behavior. From #7377:

> After some time, system(['win32yank', '-o']) and system('win32yank -o')
> start returning different results: specifically first returns an
> empty string.
>
> 1. $PATH weirdly contains double semicolon followed by path to the
>    “installation directory” (unpacked directory from archive).
> 2. If I run `let $PATH=substitute($PATH, ';;', ';', 'g')` the problem is fixed.

close #7377
ref 224f99b85d
2020-09-08 20:47:22 -07:00
erw7
aa45579206
win/env: fix stdpath()/XDG_* initialization, parsing #12829
- Windows environment variables are semicolon-separated, but some logic
  was assuming colon (:). This broke initialization and parsing of
  XDG_CONFIG_DIRS, XDG_DATA_DIRS, 'runtimepath', stdpath(), etc.
- test/defaults_spec: enable tests on Windows

ref #12793
2020-09-07 22:40:12 -07:00
Justin M. Keyes
c1d395a6d6
UI: forward 'mousefocus' option #12863
close #12849
ref eb4aab7173
2020-09-06 11:40:07 -07:00
James McCoy
d6b280799f
Merge pull request #12802 from jamessan/travis-ubuntu-bump 2020-09-06 12:52:37 -04:00
James McCoy
83a7b1b5db
test/helpers: Run $SYMBOLIZER to decode sanitizer logs, if it is set 2020-09-06 12:09:36 -04:00
Björn Linse
b397f31ede tests: update query.list_predicates() test 2020-09-06 10:33:13 +02:00
Thomas Vigouroux
dc579c420b treesitter: Use excplicit names in tests 2020-09-06 10:30:40 +02:00
Justin M. Keyes
bedab7e87b
provider: align all foo#Detect() functions #12839
Problem: ruby#Detect() and node#Detect() don't return a [prog, err] pair
which means callers must special-case them.

Solution: align their return signatures with the perl/pythonx providers.
2020-09-05 15:02:46 -07:00
Justin M. Keyes
858c056133
Support for :perl, :perlfile, :perldo and perleval() (#12809)
* support for :perl, :perlfile, :perldo and perleval()

* document that the perl provider doesn't currently work on Windows

* document that the perl legacy interface is now also supported

* added perleval() documentation

* import legacy perl interface tests

* only perl 5.22+ is supported

* healtcheck: use g:perl_host_prog if its set instead

using just 'perl' isn't correct as it may not be the version requested.
ditto for 'cpanm', rather go through 'App::cpanminus' to find the latest
perl version
2020-09-05 13:55:06 -07:00
Jacques Germishuys
8705fbf77c healtcheck: use g:perl_host_prog if its set instead
using just 'perl' isn't correct as it may not be the version requested.
ditto for 'cpanm', rather go through 'App::cpanminus' to find the latest
perl version
2020-09-05 13:09:15 +01:00
Björn Linse
866308c3de API: be less breaking in the christmas tree decorations 2020-09-04 19:11:26 +02:00
Björn Linse
1e14dacd08
Merge pull request #12847 from nvim-treesitter/ts-list-predicates
treesitter: allow to list supported predicates
2020-09-04 17:01:49 +02:00
Thomas Vigouroux
3fd6e3b923 treesitter: allow to list supported predicates 2020-09-04 15:24:23 +02:00
Björn Linse
49f5b57587 decor: sketch new decorations API
return decorations back

lol no nvim_buf_get_virtual_text

share decorations that are hl only to avoid alloc avalanche
2020-09-03 15:40:24 +02:00
Björn Linse
d3302573ba extmark: move id to dict in nvim_buf_set_extmark 2020-09-03 10:23:52 +02:00
Thomas Vigouroux
4bcf54478a
Merge pull request #12814 from theHamsta/escape-queries
treesitter: avoid escaping complete query strings
2020-09-01 12:50:21 +02:00
Björn Linse
04ab26b885
Merge pull request #12736 from vigoux/ts-iter-children
treesitter: allow to iterate over node children
2020-09-01 10:52:55 +02:00
DDoSolitary
c14a9f6fcc
g📋 allow command given as a list #12775
fixes #12768
2020-09-01 00:27:38 -07:00
Thomas Vigouroux
18217b987f treesitter: add node:field() to get field children 2020-09-01 08:57:55 +02:00
Stephan Seitz
b058c671d2 treesitter: avoid escaping complete query strings
Escape "\\" only for `vim-match?` not for `match?`
Fixes #12595
2020-08-31 17:24:38 +02:00
Thomas Vigouroux
e123fd0a5d treesitter: allow to iterate over node children 2020-08-31 13:42:30 +02:00
Thomas Vigouroux
24b5f69a49
fix(win): ignore closing wins in win_findbuf #12798
This caused segfaults when calling win_findbuf in an `on_detach`
callback, when the callback was triggered when closing the last window
containing the buffer.
2020-08-31 00:53:10 -07:00
Justin M. Keyes
c2662210b5
docs, remove 'guifontset' #11708
- remove redundant autocmd list
  This "grouped" list is useless, it only gets in the way when searching
  for event names.
- intro.txt: cleanup
- starting.txt: update, revisit
- doc: `:help bisect`
- mbyte.txt: update aliases 1656367b90. closes #11960
- options: remove 'guifontset'. Why:
  - It is complicated and is used by almost no one.
  - It is unlikely to be implemented by Nvim GUIs (complicated to parse,
    specific to Xorg...).
2020-08-31 00:51:35 -07:00
Anmol Sethi
3229ba0cde
lsp: Fix bad sortText comparison (#12485)
The spec indicates we have to fallback to comparing by label
if sortText is falsy.

Closes #12431
2020-08-30 22:29:47 -07:00
Jacques Germishuys
9bef25314e support for :perl, :perlfile, :perldo and perleval() 2020-08-30 17:19:05 +01:00
Jan Edmund Lazo
45615cedd1
vim-patch:8.2.1472: ":argdel" does not work like ":.argdel" as documented
Problem:    ":argdel" does not work like ":.argdel" as documented. (Alexey
            Demin)
Solution:   Make ":argdel" work like ":.argdel". (closes vim/vim#6727)
            Also fix giving the error "0 more files to edit".
7b22117c4e
2020-08-17 23:34:39 -04:00
TJ DeVries
3ccdbc570d
lua: add vim.register_keystroke_callback (#12536)
* feat: Add vim.register_keystroke_callback

* fixup: Forgot to remove mention of old option

* fixup: Answer jamessan comments

* fixup: Answer norcalli comments

* fixup: portability

* Update runtime/doc/lua.txt

Co-authored-by: Ashkan Kiani <ashkan.k.kiani@gmail.com>
2020-08-14 10:03:17 -04:00
TJ DeVries
aa48c1c724
Merge pull request #12739 from vigoux/ts-refactor-predicates
treesitter: refactor
2020-08-14 08:33:50 -04:00
Thomas Vigouroux
d7b12e58df treesitter: add and test vim-match? predicate 2020-08-13 20:30:15 +02:00
Thomas Vigouroux
58e37d7df8 treesitter: add contains? predicate 2020-08-13 20:30:15 +02:00
Thomas Vigouroux
613068071e treesitter: refactor and use lua regexes 2020-08-13 20:30:15 +02:00
TJ DeVries
e797d0658c fix: runtimepath always updates lua package.path 2020-08-10 16:48:35 -04:00
Jan Edmund Lazo
0393eec3ea
tests/terminal/tui: wait 1ms to avoid data race in FreeBSD 2020-08-02 12:00:02 -04:00
Jan Edmund Lazo
ed41ac08cf
vim-patch:8.2.1004: line numbers below filler lines not always updated
Problem:    Line numbers below filler lines not always updated.
Solution:   Don't break out of the win_line() loop too early. (Christian
            Brabandt, closes vim/vim#6294, closes vim/vim#6138)
511feec6f0
2020-08-02 12:00:00 -04:00
Jan Edmund Lazo
1e6bf6f17a
vim-patch:8.2.0072: memory test still fails on Cirrus CI
Problem:    Memory test still fails on Cirrus CI.
Solution:   Allow for a tiny bit more tolerance in the upper limit.
bb062c1588

Check memory usage after  Neovim sourced the Vimscript files.
https://github.com/neovim/neovim/pull/12679

N/A patches for version.c:

vim-patch:8.2.0062: memory test is flaky on FreeBSD

Problem:    Memory test is flaky on FreeBSD.
Solution:   Add a short sleep before getting the first size.
e7538ae997

vim-patch:8.2.0071: memory test often fails on Cirrus CI

Problem:    Memory test often fails on Cirrus CI.
Solution:   Allow for more tolerance in the upper limit.  Remove sleep.
1832d12aea
2020-08-02 12:00:00 -04:00
Jan Edmund Lazo
c207886bdf
vim-patch:8.1.2172: spell highlight is wrong at start of the line
Problem:    Spell highlight is wrong at start of the line.
Solution:   Fix setting the "v" variable. (closes vim/vim#5078)
7751d1d1a3

Skip spell tests in OpenBSD.

Nvim or screen likely crashed.
Revist once issue #12104 is fixed.
Skip the test for the following reasons:
- unknown regression caused by https://github.com/neovim/neovim/issues/12104
- cannot revert failing test from ed0d135247
2020-08-02 12:00:00 -04:00
James McCoy
1153ac9036
Merge pull request #12699 from jamessan/getn 2020-07-31 10:27:57 -04:00
erw7
a4fe8bdc97
shada: fix failed assertion on exit (#12692)
If set the number of history saves is 0, assertions fail when inserting an entry on exit.
Dont insert an entry when the number of saves is 0 fixes the issue.

fixes #11497
2020-07-31 16:08:34 +02:00
James McCoy
55a885c179
lua: Use #var instead of deprecated table.getn(var) 2020-07-31 01:33:42 -04:00
Andreas Johansson
82bfdbfe5c
Revert "lsp: Fix text edits with the same start position (#12434)" (#12564)
This reverts commit 44fe8828f0.
2020-07-30 13:37:19 -04:00
erw7
b6b270b28f terminal: fix terminal attribute overflow
fixes #11548
2020-07-29 02:16:50 +09:00
Thomas Vigouroux
2c34780c32 buffer_updates: emit valid old_byte_size
Test this using treesitter highlighting, which is based on this
old_byte_size.
2020-07-21 19:18:04 +02:00
erw7
950ca6abcd
eval: improve ex_execute (#12445) 2020-07-20 11:01:14 +02:00
TJ DeVries
398201cfab
lua: Fix crash on unprotected lua errors (#12658)
Can be reproduced with a script like this:

-- in some lua file
vim.fn.timer_start(10, function() error("uh....") end)

-- will cause neovim to crash with the following error.
PANIC: unprotected error in call to Lua API
        (nlua_CFunction_func_call failed.)

After this, it will instead print the error message
from the top of the stack, like so.

tmp/error_nvim.lua:10: uh...

Also added an example test. Previously this test
caused the embedded nvim to panic.
2020-07-19 17:16:48 -04:00