Commit Graph

3329 Commits

Author SHA1 Message Date
Thomas Vigouroux
6dc815530b
buf_updates: fix updates for empty buffers (#12926)
On empty buffers, when editing the first line, the line is buffered, causing offset to be < 0. While the buffer is not actually empty, the buffered line has not been flushed (and should not be) yet, so the call is valid but an edge case.
2020-09-17 23:34:28 +02:00
Thomas Vigouroux
cecc45efb1 api(extmarks): allow extrange past final newline 2020-09-17 21:23:52 +02:00
Thomas Vigouroux
9a7f111db6 treesitter: filter updates on <CR>
This fixes an error when fo=ro, when hitting <CR> to insert a new
comment line.
2020-09-16 16:35:17 +02:00
Björn Linse
34c0f7af04 buf_attach: fix buffer updates with setline() 2020-09-16 13:50:16 +02:00
Björn Linse
ead2fcf4ee api: add nvim_buf_call to call function with curbuf changed to buffer 2020-09-13 09:11:38 +02:00
Thomas Vigouroux
e4b5efa51e fix: use luahl in treesitter 2020-09-13 07:46:39 +02:00
erw7
397be5d380 UI: fix cursor not displayed after hiding and un-hiding #12811
- TUI: Fix a case where the cursor was not displayed after hiding the
  cursor and then setting it to be displayed again.
- Change to reset everything before setting guicursor.

fixes #12800
close #12811

Steps to reproduce:

    nvim -u NORC
    :set termguicolors
    :hi nCursor guifg=red guibg=red
    :hi iCursor guifg=green guibg=green
    :hi cCursor guifg=blue guibg=blue
    :set guicursor=n:block-nCursor,i:hor25-iCursor,c:ver25-cCursor
    :set guicursor-=c:ver25-cCursor

Actual behaviour: Cursor is a blue vertical.
Expected behaviour: Cursor should be the default color block.
2020-09-12 11:42:42 -07:00
Jan Edmund Lazo
b23907e7ce
Merge pull request #12721 from aufarg/vim-8.1.0265
[RDY] vim-patch:8.1.{265,271,273,274,275,277,278,279,280,281,282,284,286,291,295,296,320,321,339,351,392,399,552}
2020-09-12 10:51:59 -04:00
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
Aufar Gilbran
77bb48e740 vim-patch:8.1.0295: no 'incsearch' highlighting for :vimgrep and similar
Problem:    No 'incsearch' highlighting for :vimgrep and similar commands.
Solution:   Parse the :vimgrep command and similar ones to locate the search
            pattern. (Hirohito Higashi, closes vim/vim#3344)
264cf5cfaf
2020-09-11 10:33:20 +08:00
Aufar Gilbran
ab7e101540 vim-patch:8.1.0291: 'incsearch' highlighting not used for :sort
Problem:    'incsearch' highlighting not used for :sort.
Solution:   Handle pattern in :sort command.
81f56536b1
2020-09-11 10:33:20 +08:00
Aufar Gilbran
e8a8b9ed08 vim-patch:8.1.0271: 'incsearch' doesn't work for :s, :g or :v
Problem:    'incsearch' doesn't work for :s, :g or :v.
Solution:   Also use 'incsearch' for other commands that use a pattern.
b0acacd767
2020-09-11 10:31:41 +08: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