Matthieu Coudron
1920ba4b55
Merge pull request #12491 from vigoux/treesitter-set-ranges
...
[RDY] Treesitter set ranges
2020-06-30 00:02:46 +02:00
Thomas Vigouroux
69816f5e13
treesitter: use single nodes in set_ranges
...
fixup! treesitter: fix lint
2020-06-29 23:32:49 +02:00
Thomas Vigouroux
35cc8b6e83
treesitter: fix lint
2020-06-29 22:21:06 +02:00
Thomas Vigouroux
b652f74ca3
treesitter: use nodes to mark ranges
2020-06-29 22:21:06 +02:00
Thomas Vigouroux
75a1239eb5
treesitter: fix some clint errors
...
Also fixes some mismatches on the name of the function
2020-06-29 22:21:06 +02:00
Thomas Vigouroux
ac18403d6e
treesitter: test newly added set_included_ranges
2020-06-29 22:21:06 +02:00
Thomas Vigouroux
333f3f19db
treesitter: add set_included_ranges to the parser
...
This is the first step towards language injection using treesitter.
2020-06-29 22:21:06 +02:00
James McCoy
225f0bcd98
Merge pull request #12133 from bradking/syntax-fold
2020-06-24 13:09:30 -04:00
Jan Edmund Lazo
352831229f
vim-patch:8.2.1044: not all systemd file types are recognized ( #12527 )
...
Problem: Not all systemd file types are recognized.
Solution: Match several more files. (Guido Cella, closes vim/vim#6319 )
ef6d86c173
2020-06-24 10:18:06 +02:00
Brad King
357c16515c
vim-patch:8.2.0865 syntax: Add command to control how foldlevel is computed
...
Problem: Syntax foldlevel is taken from the start of the line.
Solution: Add ":syn foldlevel" to be able to use the minimal foldlevel in the line.
e35a52aee7
With `foldmethod=syntax` the foldlevel of a line is computed based
on syntax items on the line. Previously we always used the level
of the syntax item containing the start of the line. This works
well in cases such as:
if (...) {
...
}
else if (...) {
...
}
else {
...
}
which folds like this:
+--- 3 lines: if (...) {---------------------------
+--- 3 lines: else if (...) {----------------------
+--- 3 lines: else {-------------------------------
However, the code:
if (...) {
...
} else if (...) {
...
} else {
...
}
folds like this:
+--- 7 lines: if (...) {---------------------------
We can make the latter case fold like this:
+--- 2 lines: if (...) {---------------------------
+--- 2 lines: } else if (...) {--------------------
+--- 3 lines: } else {-----------------------------
by choosing on each line the lowest fold level that is followed
by a higher fold level.
Add a syntax command
:syntax foldlevel [start | minimum]
to choose between these two methods of computing the foldlevel of
a line.
2020-06-23 19:07:33 -04:00
Jan Edmund Lazo
30b02a1bee
vim-patch:8.2.1041: test summary is missing executed count ( #12519 )
...
Problem: Test summary is missing executed count.
Solution: Adjust pattern used for counting.
7eaafe65ee
2020-06-23 17:55:56 +02:00
Brad King
ee3605aed4
syntax: Factor out duplicate E390 strings
2020-06-23 09:20:17 -04:00
Brad King
ae5651942e
syntax: factor out helper to compute the syntax-based foldlevel
2020-06-23 09:20:17 -04:00
Thomas Vigouroux
36d71e775a
treesitter: simplify puhstree call process
2020-06-23 09:11:41 +02:00
Ghjuvan Lacambre
721f69c4af
terminal: preserve mode when using <Cmd>wincmd in terminal mode ( #12254 )
2020-06-22 23:22:58 +02:00
erw7
1619410a05
main.c: fix hang issue with recoverymode ( #12496 )
...
In the case of recoverymode, the headlessmode was true, causing the UI
to hang without starting. Fix this problem by setting headlessmode to
true for List swap files only.
2020-06-22 23:04:34 +02:00
Matthieu Coudron
8f30753aa1
Merge pull request #12455 from janlazo/vim-8.0.1554
...
[RDY]vim-patch:8.0.1554,8.1.1977,8.2.{927,930,932,938,954,963,964,966,980,983,998,999}
2020-06-22 22:40:33 +02:00
erw7
21453e8f09
eval: fix assertion failure in garbage collection ( #12436 )
...
* eval: fix assertion failure in garbage collection
fixes #12387 , #12430
Lists with CopyID+1 linked only from previous_funccal may be removed in
the garbage collection. Therefore, the terms of the assertions are not
correct. This can be confirmed by the following (The l:x with CopyID+1 of
the first function call needs to be removed by garbage collection):
func! s:f()
let l:x = [1]
let g:x = l:
endfunc
for _ in range(2)
call s:f()
endfor
call garbagecollect()
" press any key
* test: add test for #12387 , #12430
2020-06-22 10:17:20 -04:00
Marvim the Paranoid Android
4496628c18
version.c: update [ci skip] ( #12391 )
2020-06-21 21:32:56 +02:00
Jan Edmund Lazo
b198225361
vim-patch:8.2.0999: moving to next sentence gets stuck on quote
...
Problem: Moving to next sentence gets stuck on quote.
Solution: When moving to the next sentence doesn't result in moving, advance
a character and try again. (closes vim/vim#6291 )
2f03e5a0a9
2020-06-18 20:35:06 -04:00
Jan Edmund Lazo
749429693d
vim-patch:8.2.0998: not all tag code is tested
...
Problem: Not all tag code is tested.
Solution: Add a few more test cases. (Yegappan Lakshmanan, closes vim/vim#6284 )
3d9207ad2f
2020-06-18 18:01:44 -04:00
Jan Edmund Lazo
b4e4c2ad95
vim-patch:8.2.0983: SConstruct file type not recognized
...
Problem: SConstruct file type not recognized.
Solution: Use python for SConstruct files. (Roland Hieber)
ad72350360
2020-06-18 18:01:44 -04:00
Jan Edmund Lazo
954aed886e
vim-patch:8.2.0980: raku file extension not recognized
...
Problem: Raku file extension not recognized. (Steven Penny)
Solution: Recognize .raku and .rakumod. (closes vim/vim#6255 )
a65d8b5bb9
2020-06-18 18:01:44 -04:00
Jan Edmund Lazo
e681a317fe
vim-patch:8.2.0964: TextYankPost does not provide info about Visual selection
...
Problem: TextYankPost does not provide info about Visual selection.
Solution: Add the 'visual' key in v:event. (closes vim/vim#6249 )
37d1673ce0
2020-06-18 18:01:43 -04:00
Jan Edmund Lazo
833a5d16a2
vim-patch:8.2.0963: number increment/decrement does not work with 'virtualedit'
...
Problem: Number increment/decrement does not work with 'virtualedit'.
Solution: Handle coladd changing. (Christian Brabandt, closes vim/vim#6240 ,
closes vim/vim#923 )
6c6be9e88d
2020-06-18 18:01:43 -04:00
Jan Edmund Lazo
3c9ec83395
vim-patch:8.2.0966: 'shortmess' flag "n" not used in two places
...
Problem: 'shortmess' flag "n" not used in two places.
Solution: Make use of the "n" flag consistent. (Nick Jensen, closes vim/vim#6245 ,
closes vim/vim#6244 )
722e505d1a
2020-06-18 18:01:43 -04:00
Jan Edmund Lazo
abadb687fb
vim-patch:8.2.0954: not all desktop files are recognized
...
Problem: Not all desktop files are recognized.
Solution: Add the *.directory pattern. (Eisuke Kawashima, closes vim/vim#3317 )
f1f0ff9557
2020-06-18 18:01:43 -04:00
Jan Edmund Lazo
33985a3a15
vim-patch:8.2.0938: NFA regexp uses tolower ()to compare ignore-case
...
Problem: NFA regexp uses tolower() to compare ignore-case. (Thayne McCombs)
Solution: Use utf_fold() when possible. (ref. neovim vim/vim#12456 )
59de417b90
2020-06-18 18:01:42 -04:00
Jan Edmund Lazo
b7cae2bca3
option: fix pvs/v547
2020-06-18 18:01:42 -04:00
Jan Edmund Lazo
e34a7bca68
eval: fix pvs/v547
2020-06-18 18:01:42 -04:00
Jan Edmund Lazo
ee4265285d
vim-patch:8.2.0932: missspelling spelllang
...
Problem: Missspelling spelllang.
Solution: Add an "l". (Dominique Pelle)
f154f3ab2c
2020-06-18 18:01:42 -04:00
Jan Edmund Lazo
9d565c5ba3
vim-patch:8.2.0930: script filetype detection trips over env -S argument
...
Problem: Script filetype detection trips over env -S argument.
Solution: Remove "-S" and "--ignore-environment". (closes vim/vim#5013 )
Add tests.
b5e18f29fa
2020-06-18 18:01:42 -04:00
Jan Edmund Lazo
150168b881
vim-patch:8.2.0927: some sshconfig and ssdhconfig files are not recognized
...
Problem: Some sshconfig and ssdhconfig files are not recognized.
Solution: Add filetype patterns.
da84ac2a6f
2020-06-18 18:01:41 -04:00
Jan Edmund Lazo
a5bde56b37
vim-patch:8.0.1554: custom plugins loaded with --clean
...
Problem: Custom plugins loaded with --clean.
Solution: Do not include the home directory in 'runtimepath'.
0726870326
2020-06-18 18:01:41 -04:00
Hirokazu Hata
e628a05b51
Merge pull request #12342 from h-michael/fix-doc
2020-06-15 18:08:34 +09:00
Hirokazu Hata
52cd8bf507
doc: fix vim.api.nvim_buf_attach callback arguments
2020-06-15 12:30:13 +09:00
erw7
d17e38e482
Add overlapped option to jobstart
...
When UV_OVERLAPPED_PIPE was used for the pipe passed to the child process, a
problem occurred with the standard input of the .Net Framework application
(#11809 ). Therefore, add the overlapped option to jobstart() and change it so
that it is set only when necessary
2020-06-10 22:21:14 +09:00
erw7
f1cbd39f7b
vim-patch:8.2.0920: writing viminfo fails with a circular reference
...
Problem: Writing viminfo fails with a circular reference.
Solution: Use copyID to detect the cycle. (closes vim/vim#6217 )
5b157fe2ed
2020-06-09 23:54:07 +09:00
Matthieu Coudron
d8c5d122f1
Merge pull request #12376 from erw7/fix-stack-overflow-on-input-enqueue
...
input: fix stack overflow
2020-06-08 16:52:56 +02:00
erw7
9fc3949841
shada: fix write E5004 error on exit
...
Fix the problem of failing to write shada when the global variable contains
Funcref or Partial.
2020-06-08 23:15:10 +09:00
Billy Su
22f6da9514
vim-patch:8.2.0629: setting a boolean option to v:false does not work
...
Problem: Setting a boolean option to v:false does not work.
Solution: Do not use the string representation of the value. (Christian
Brabandt, closes vim/vim#5974 )
65d032c779
2020-06-06 23:25:07 +08:00
Billy Su
1805fb469a
vim-patch:8.2.0111: VAR_SPECIAL is also used for booleans
...
Problem: VAR_SPECIAL is also used for booleans.
Solution: Add VAR_BOOL for better type checking.
9b4a15d5db
2020-06-06 23:24:58 +08:00
Matthieu Coudron
dbc8ec9446
Merge pull request #12321 from vigoux/treesitter-runtime
...
treesitter: update runtime
2020-06-06 15:37:51 +02:00
Jan Edmund Lazo
9538a7895c
vim-patch:8.2.0905: test coverage could be better
...
Problem: Test coverage could be better.
Solution: Add a couple of tests. (Dominique Pelle, closes vim/vim#6202 )
e0c3c3d6cb
2020-06-04 21:21:10 -04:00
Jan Edmund Lazo
0fa2aefb61
vim-patch:8.2.0892: ubsan warns for undefined behavior
...
Problem: Ubsan warns for undefined behavior.
Solution: Use unsigned instead of signed variable. (Dominique Pelle,
closes vim/vim#6193 )
c5acc0f7fe
2020-06-04 20:52:53 -04:00
Jan Edmund Lazo
ed85d68123
vim-patch:8.1.2335: error message for function arguments may use NULL pointer
...
Problem: Error message for function arguments may use NULL pointer.
(Coverity)
Solution: Use the original function name.
2118a30295
2020-06-04 20:52:53 -04:00
Jan Edmund Lazo
909af2f3f1
vim-patch:8.2.0491: cannot recognize a <script> mapping using maparg()
...
Problem: Cannot recognize a <script> mapping using maparg().
Solution: Add the "script" key. (closes vim/vim#5873 )
2da0f0c445
2020-06-04 20:52:53 -04:00
Jan Edmund Lazo
f85bf6ec37
vim-patch:8.2.0873: a .jl file can be sawfish (lisp) or Julia
...
Problem: A .jl file can be sawfish (lisp) or Julia.
Solution: Do not recognize *.jl as lisp, since it might be Julia.
(closes vim/vim#6178 )
2891459b81
2020-06-04 20:52:52 -04:00
Jan Edmund Lazo
44531928b3
vim-patch:8.1.2018: using freed memory when out of memory and displaying message
...
Problem: Using freed memory when out of memory and displaying message.
Solution: Make a copy of the message first.
e5fbd73930
2020-06-04 20:52:52 -04:00
Jan Edmund Lazo
310a56d0a0
vim-patch:8.1.1895: using NULL pointer when out of memory
...
Problem: Using NULL pointer when out of memory.
Solution: Bail out or skip the code using the pointer. (Zu-Ming Jiang,
closes vim/vim#4805 , closes vim/vim#4843 , closes vim/vim#4939 , closes vim/vim#4844 )
6f10c70b59
2020-06-04 20:52:52 -04:00