Commit Graph

3652 Commits

Author SHA1 Message Date
Björn Linse
0cd1430316
Merge pull request #14468 from bfredl/zindex
[WIP] z-index!
2021-05-15 14:44:22 +02:00
Björn Linse
edb5864a29 floats: z-index 2021-05-15 13:56:27 +02:00
Jan Edmund Lazo
c57a85d534
Merge pull request #14532 from janlazo/vim-8.1.1433
vim-patch:8.0.1394,8.1.1967,8.2.{23,1000,1059,2354,2419,2433,2473,2850}
2021-05-14 18:50:44 -04:00
Raymond W. Ko
7c95697026
treesitter: add predicate "any-of?" (#14344)
For the case of Clojure and other Lisp syntax highlighting, it is
necessary to create huge regexps consisting of hundreds of symbols with
the pipe (|) character. To make things more difficult, these Lisp
symbols sometimes consists of special characters that are themselves
part of special regexp characters like '*'. In addition to being
difficult to maintain, it's performance is suboptimal.

This patch introduces a new predicate to perform 'source' matching in
amortized constant time. This is accomplished by compiling a hash table
on the first use.
2021-05-14 17:41:20 +02:00
Jan Edmund Lazo
dad725d5e5
vim-patch:8.1.1967: line() only works for the current window
Problem:    Line() only works for the current window.
Solution:   Add an optional argument for the window to use.
8e0a8e7eb7
2021-05-12 19:13:28 -04:00
Marco Hinz
4ba3d059bf
Revert "vim-patch:8.1.1378: delete() can not handle a file name that looks like a pattern (#12784)"
This reverts commit 4be0e92db0.

Unfortunately, that commit stalled the Windows builds on GHA and likely requires
other patches to work properly.
2021-05-12 00:47:21 +02:00
Björn Linse
7d82ea0102
Merge pull request #14243 from shadmansaleh/Allow_cterm_colors_nvim_set_hl
API: Adding cterm support to nvim_set_hl
2021-05-11 15:07:00 +02:00
Stephan Seitz
5c9b4948d4
treesitter: do not escape in match? (#14382) 2021-05-11 11:52:47 +02:00
chentau
13a9bd006f make get_region_bytecount end-exclusive 2021-05-09 16:23:01 -07:00
chentau
a847abc21b refactor nvim_buf_set_lines to use extmark_splice 2021-05-09 16:22:20 -07:00
Jan Edmund Lazo
d2be261e8d
Merge pull request #14403 from seandewar/vim-8.2.1933
vim-patch:8.2.{0174,1933,1935,1946,2286,2287}
2021-05-09 17:08:21 -04:00
Jan Edmund Lazo
5165513198
Merge pull request #13664 from ivechan/win_exectute
vim-patch:8.1.{1418,1425,1832,2124},8.2.{0137, 2340}
2021-05-07 08:34:28 -04:00
Shougo
4be0e92db0
vim-patch:8.1.1378: delete() can not handle a file name that looks like a pattern (#12784)
Problem:    Delete() can not handle a file name that looks like a pattern.
Solution:   Use readdir() instead of appending "/*" and expanding wildcards.
            (Ken Takata, closes vim/vim#4424, closes vim/vim#696)
701ff0a3e5
2021-05-07 08:07:13 -04:00
Björn Linse
8c9f0f1da1
Merge pull request #14502 from chentau/extmark_paste
Splice extmarks on every line for block visual paste
2021-05-07 10:52:36 +02:00
chentau
37c8067226 splice extmarks on every line for block visual paste 2021-05-06 20:40:26 -07:00
James McCoy
21035cff9f
Merge pull request #14500 from jamessan/coverity-fixes
Various Coverity fixes
2021-05-06 19:28:36 -04:00
James McCoy
833a6fcb60
coverity/331378: Fix inserting new decor provider
Since the providers are ordered by ns_id, inserting a new provider may
require shifting existing providers around to maintain this ordering.

When this happens, we need to allocate a new element at the end of the
vector and then shift the larger elements to the right.  Rather than
iterating (incorrectly) with a loop and copying each item, use memmove
to copy the entire block.
2021-05-06 18:56:56 -04:00
francisco souza
9149fe48a9 lsp: add a test for the jump_to_location + jump list fix 2021-05-06 17:56:24 -04:00
jing
f6518e5516 vim-patch:8.1.1418: win_execute() is not implemented yet
Problem:    Win_execute() is not implemented yet.
Solution:   Implement it.
868b7b6712
2021-05-06 23:44:47 +08:00
Björn Linse
7fcc596557
Merge pull request #14483 from mjlbach/floating_window_border_fix
window.c: fix floating window border width calculation
2021-05-05 07:09:04 +02:00
Jan Edmund Lazo
4ad30f775e
Merge pull request #14424 from janlazo/vim-8.1.1726
vim-patch:8.1.1726,8.2.{296,860,1827,2388,2788,2790,2801}
2021-05-04 19:18:16 -04:00
Michael Lingelbach
ca058082ae tests: floating windows terminate border on edge of viewport when window extends past viewport 2021-05-04 15:43:53 -07:00
Thomas Vigouroux
3fc71ea228
Merge pull request #14418 from DerekStride/treesitter-set-directive
[RDY] tree-sitter ensure there is a nested table allocated for `#set!`
2021-05-03 21:41:39 +02:00
Björn Linse
0865f1238f decorations: right_align and win_col 2021-05-01 11:48:04 +02:00
derekstride
44d4526e18
Ensure there is a nested table allocated for #set!
Fixes the following bug:
```
test/functional/helpers.lua:107: Error executing lua:
vim/treesitter/query.lua:256: attempt to index a nil value
```
2021-04-27 12:29:37 -02:30
Jan Edmund Lazo
278ca5f456
vim-patch:ebdf3c964a90
Update runtime files.
ebdf3c964a

Omit vim9.
2021-04-27 09:21:35 -04:00
Björn Linse
eeb1099bc4 ui_compositior: handle multiple displayed floats in the same tick
problem: the order of non-focuesed float opened before focused float is wrong (sunjon)
solution: check curwin and correct the order (bfredl)
2021-04-26 12:59:51 +02:00
Gabriel Sanches
8885ea7f24
lsp: make tagstack smarter motion-wise (#12262)
This commit prevents two things regarding the tagstack and jumping to
locations:

  - Pushing the same item twice in a row

  - Pushing an item where the destination is the same as the source

Both prevent having to press CTRL-T additional times just to pop items
that don't make the cursor move.
2021-04-23 14:50:35 -07:00
shadmansaleh
0559d3f9c6 Improvements to tests 2021-04-22 17:09:18 +06:00
Shadman
01493e7990
api: fix nvim_exec() silencing behaviour (#14413)
Previously nvim_exec would silent output no matter whether output
is true or false.
Now output is only silent and captured when output is true.
2021-04-21 10:41:37 +02:00
Sean Dewar
96f62394cf
vim-patch:8.2.0174: various commands not completely tested
Problem:    Various commands not completely tested.
Solution:   Add more test cases. (Yegappan Lakshmanan, closes vim/vim#5551)
5d98dc2a48
2021-04-20 01:50:56 +01:00
Matthieu Coudron
e343437bb6
Merge pull request #12323 from da-x/orphaned-signs
Handle 'orphaned signs' on line deletion for signcolumn >= 2
2021-04-18 17:12:41 +02:00
Björn Linse
63b64ebab0
Merge pull request #14385 from chentau/extmark_delete
Extmarks: remove `curbuf->deleted_bytes2` from `op_delete`
2021-04-17 09:25:44 +02:00
Dan Aloni
f2ed7605da Handle 'orphaned signs' on line deletion for signcolumn >= 2 2021-04-17 10:11:17 +03:00
Björn Linse
7de75f0993
Merge pull request #14365 from chentau/extmark_delbytes_move
Extmarks: flush curbuf->deleted_bytes2 after calling do_move
2021-04-17 08:58:00 +02:00
chentau
e32eaf6538 extmarks: remove curbuf->deleted_bytes2 from op_delete 2021-04-16 23:42:53 -07:00
chentau
5a36d413fb flush curbuf->deleted_bytes2 after calling do_move 2021-04-14 21:47:21 -07:00
Raymond W. Ko
e915ec47f3
tests/functional: delete temp file created during test run (#14363) 2021-04-14 20:42:34 -04:00
Björn Linse
3b01e37d09
Merge pull request #14358 from bfredl/decodeco
decoration: Clean up duplicate Decoration attributes + bonus hl_eol flag
2021-04-15 01:12:36 +02:00
Mathias Fussenegger
046991e4d5 lsp: Remove vim.NIL handling from apply_text_document_edit
The rpc layer normalizes `vim.NIL` to `nil`, so the scenario tested
should never happen.
2021-04-14 21:42:03 +02:00
Mathias Fussenegger
b67f689e4c lsp: Accept text document edits with version zero
There were a couple of reports of "Buffer X newer than edits" problems.
We first assumed that it is incorrect for a server to send 0 as a
version - and stated that they should send a `null` instead, given that
in the specification the `textDocument` of a `TextDocumentEdit` is a
`OptionalVersionedTextDocumentIdentifier`.

But it turns out that this was a change in 3.16, and in 3.15 and earlier
versions of the specification it was a `VersionedTextDocumentIdentifier`
and language servers didn't have a better option than sending `0` if
they don't keep track of the version numbers.

So this changes the version check to always accept `0` values.

See

- https://github.com/neovim/neovim/issues/12970
- https://github.com/neovim/neovim/issues/14256
- https://github.com/haskell/haskell-language-server/pull/1727
2021-04-14 21:29:32 +02:00
Björn Linse
7b488314d0 decoration: Clean up duplicate Decoration attributes + bonus hl_eol flag 2021-04-14 13:04:33 +02:00
Thomas Vigouroux
e652b2987a
Merge pull request #14046 from nvim-treesitter/feature/language-tree-directive-config
feat(treesitter): allow injections to be configured through directives
2021-04-14 05:36:05 +02:00
Björn Linse
c9817603cf
Merge pull request #14318 from chentau/extmark_luado
extmark: splice extmarks on :luado
2021-04-13 15:00:42 +02:00
Marco Hinz
4a36ec6da0
float: add "solid" border style (#14310)
It looks solid with the default `FloatBorder` group.

If you set the bgcolor of FloatBorder to the same color as for FloatNormal, you
effectively get an "1-cell padding".
2021-04-12 20:51:05 +02:00
chentau
ff43d9597e extmark: splice extmarks on :luado 2021-04-12 11:33:50 -07:00
Jan Edmund Lazo
062c64e24c
test/ui/cmdline: set notimeout to remove indeterminism (#14338) 2021-04-10 12:36:54 -04:00
Björn Linse
6435b46b48
Merge pull request #14317 from chentau/extmark_sub
extmark: correct extmark_splice call with substitute and inccommand when replacing with escaped backslashes
2021-04-10 18:14:42 +02:00
James McCoy
e3d0fb0d3c
Merge pull request #14321 from jamessan/ci-fixes
Some small cleanups/diagnostic improvements
2021-04-09 09:48:35 -04:00
chentau
343ee2d254 extmark: correct extmark_splice call with inccommand 2021-04-09 00:34:02 -07:00