Björn Linse
c265fd31ab
refactor(api): remove unneccesary indirection around handles
...
These things are just maps to pointers, no need to perform
a huge song and dance around it.
2021-08-22 11:28:47 +02:00
Björn Linse
b888018aed
refactor(marktree): embed the keymap in the MarkTree struct
2021-08-22 10:46:04 +02:00
Björn Linse
b2277a4279
refactor(map): get rid of spurious subsystem_init() functions due to maps
2021-08-22 10:46:04 +02:00
Björn Linse
6d23a58b7d
refactor(extmark): remove pointer indirection for extmark use of maps
2021-08-22 10:46:01 +02:00
Björn Linse
4500253f60
refactor(syntax): don't use pointer indirected maps for no reason
2021-08-22 10:10:15 +02:00
Björn Linse
9e651a9d09
perf(map): reduce double pointer indirection to single pointer indirection
...
the only field of Map(...) was a pointer to a khash_t. make it contain
the struct by value instead.
2021-08-22 09:54:21 +02:00
Justin M. Keyes
8331cd13c4
docs #15447
...
- update ":help 'hidden'" #15410
- update ":help K" #15398
- try to capture some of the debug steps from #12036 (bpftrace, USDT probes)
2021-08-21 18:26:33 -07:00
Gregory Anders
a90513c24b
feat(keywordprg): use :terminal for external commands #15398
...
Open external 'keywordprg' commands in a :terminal in a new tab. <Esc> is
mapped to stop the job and close the buffer.
Closes #2995
Closes #2761
2021-08-21 17:23:10 -07:00
Gregory Anders
50b30de200
feat(terminal): TermClose: set exit code in v:event.status #15406
...
Closes #4713
2021-08-20 10:45:28 -07:00
Dylan Kendal
140084180e
feat(treesitter): add next, prev sibling method
...
Add tsnode methods to change to the next, previous, named or unnamed
nodes.
2021-08-20 11:58:15 -04:00
Björn Linse
599af74514
Merge pull request #15295 from gpanders/ftdetect
...
fix: only source package ftdetect files once
2021-08-20 11:30:43 +02:00
Björn Linse
d088066fa1
Merge pull request #15422 from bfredl/syn_name2id_go_brr
...
feat(highlights): some improvements and perf fixes
2021-08-19 15:48:22 +02:00
Justin M. Keyes
19a0d90bb3
Merge #15410 defaults: 'hidden', 'nojoinspaces'
...
ref #6289
2021-08-19 06:13:08 -07:00
Björn Linse
bb4b4d79a8
perf(highlight): use a hashtable for highlight group names
...
syn_name2id and syn_check_group go brr.
Note: this has impact mostly when using multiple filetypes,
as the old syn_name2id was optimized to return latest
added groups quickly (which will be the latest filetype)
2021-08-19 15:08:50 +02:00
Björn Linse
fca52f5f32
feat(match): allow hl group to be defined after :match command
2021-08-19 15:08:50 +02:00
Gregory Anders
d8ab8cccd0
test: update tests to work with 'hidden'
2021-08-18 12:17:12 -06:00
Björn Linse
a9f563ab62
refactor(highlight): make syn_check_group alloc free for existing group
2021-08-18 14:19:01 +02:00
Björn Linse
7bff642169
Merge pull request #15249 from dundargoc/refactor/a-song-of-true-and-false
...
refactor: replace TRUE/FALSE with true/false
2021-08-18 10:10:42 +02:00
Gregory Anders
d417e67e59
feat(defaults): set nojoinspaces
2021-08-17 16:39:04 -06:00
Gregory Anders
f6c72b745c
feat(defaults): set hidden
2021-08-17 16:38:39 -06:00
Gregory Anders
8e926a0984
refactor(options): remove vi/vim default value distinction
2021-08-17 08:07:41 -06:00
Gregory Anders
2cb8db34e3
feat: defaults: set undo points in <C-U> and <C-W> ( #15400 )
2021-08-16 18:28:52 -07:00
Gregory Anders
3954537b9e
feat(defaults): remove 'options' from viewoptions #15397
...
ref #6289
2021-08-16 13:05:24 -07:00
Gregory Anders
4ba74953b5
feat(defaults): switchbuf=uselast #15394
2021-08-16 11:20:46 -07:00
Gregory Anders
7215d35694
feat: defaults: inccommand=nosplit #15395
2021-08-16 10:39:17 -07:00
Gregory Anders
0aa8128aaa
feat(defaults): map CTRL-L to search highlights, update diffs #15385
2021-08-16 08:31:14 -07:00
dundargoc
7146103be2
ci: increase clint line length limit to 100 characters ( #15252 )
2021-08-16 15:32:36 +02:00
gmntroll
29712aef60
fix(autocmd.c): fix conditions in block_autocmds, unblock_autocmds #15372
...
Logic got swapped in 7574918dc7 .
We didn't notice it since v:termresponse isn't really used yet. #6279
2021-08-16 00:43:21 -07:00
zeertzjq
e9dd640897
vim-patch:8.2.3295: 'cursorline' should not apply to 'breakindent' #15281
...
Problem: 'cursorline' should not apply to 'breakindent'.
Solution: Make 'cursorline' apply to 'breakindent' and 'showbreak'
consistently. (closes vim/vim#8684 )
4f33bc20d7
2021-08-16 00:27:04 -07:00
Justin M. Keyes
54726e8bb9
fix(defaults): do not map Y in visual-mode #15387
...
Y in visual-mode is unrelated to the normal-mode behavior.
reverts part of #13268
2021-08-16 00:13:25 -07:00
Matthieu Coudron
5a111c1b02
feat(defaults): map Y to y$ #13268
...
rationale:
- consistent with D and Y
- long recommended by Vim's own ":help Y"
close #13268
close #416
ref #6289
2021-08-15 21:24:59 -07:00
Christian Clason
0dc4bec69e
vim-patch:8.2.3283: Julia filetype is not recognized
...
Problem: Julia filetype is not recognized
Solution: Add filetype detection. (Christian Clason, closes #8700 )
issue: vim/vim#7498
vim-patch: vim/vim@0eec851
2021-08-15 11:02:12 +02:00
Sean Dewar
b2994e35c9
feat(v:lua): support calling v:lua as a method
2021-08-13 01:11:36 +01:00
Sean Dewar
da9005af79
fix(v:lua): fix emsg when calling v:lua directly
...
v:lua expressions are represented using vvlua_partial. As v:lua isn't
intended to be called directly, it's given an empty pt_name.
Because of this, calling v:lua directly like "v:lua()" will cause "E117:
Unknown function: ", with an empty name.
Instead, have call_func() show the name "v:lua" in the emsg.
2021-08-12 22:35:25 +01:00
Sean Dewar
5503d8e28b
fix(eval_lambda): cherry-pick leak fix from v8.1.2107
...
That patch also includes a test using test_refcount() for lambdas, but
such test functions are N/A for Nvim.
2021-08-12 22:35:25 +01:00
Sean Dewar
5d88349817
feat(eval): partially port v8.1.1915
...
Cannot be fully ported as chdir() hasn't been ported yet.
2021-08-12 22:35:25 +01:00
Sean Dewar
56b56a76e8
vim-patch:8.1.1911: more functions can be used as methods
...
Problem: More functions can be used as methods.
Solution: Make a few more functions usable as a method.
64b4d73524
Note that the old-style version of Test_byteidx() was already translated
to a Lua test in 069_multibyte_formatting_spec.lua. Keep both versions,
using Test_byteidx() to mainly test the method call syntax for byteidx()
and byteidxcomp().
2021-08-12 22:35:24 +01:00
Sean Dewar
7925f0b633
vim-patch:8.1.1909: more functions can be used as methods
...
Problem: More functions can be used as methods.
Solution: Make a few more functions usable as a method.
e49fbff384
2021-08-12 22:35:24 +01:00
Sean Dewar
5fbc1a49c7
vim-patch:8.1.1888: more functions can be used as methods
...
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
073e4b92e6
test_popup.vim already has the changes from this patch (they're N/A
anyway).
2021-08-12 22:35:24 +01:00
Sean Dewar
41dbd3a2e0
vim-patch:8.1.1879: more functions can be used as methods
...
Problem: More functions can be used as methods.
Solution: Make float functions usable as a method.
93cf85f9ef
Fix atan2() doc typo (patch referred to it as atan()).
Adjust Test_fmod() method test to expect "str2float('nan')".
2021-08-12 22:35:23 +01:00
Sean Dewar
7474db98af
vim-patch:8.1.1878: negative float before method not parsed correctly
...
Problem: Negative float before method not parsed correctly.
Solution: Apply "!" and "-" in front of expression before using ->.
9cfe8f6e68
2021-08-12 22:35:23 +01:00
Sean Dewar
98dfe4adc4
vim-patch:8.1.1863: confusing error when using a builtin function as method
...
Problem: Confusing error when using a builtin function as method while it
does not support that.
Solution: Add a specific error message.
9174639a82
2021-08-12 22:35:23 +01:00
Sean Dewar
287a77ef51
vim-patch:8.1.1861: only some assert functions can be used as a method
...
Problem: Only some assert functions can be used as a method.
Solution: Allow using most assert functions as a method.
24278d2407
Port tests to assert_spec.lua.
2021-08-12 22:35:22 +01:00
Sean Dewar
f03dd22f0d
vim-patch:8.1.1835: cannot use printf() as a method
...
Problem: Cannot use printf() as a method.
Solution: Pass the base as the second argument to printf().
fd8ca21b3f
2021-08-12 22:35:22 +01:00
Sean Dewar
5811390f82
vim-patch:8.1.1834: cannot use a lambda as a method
...
Problem: Cannot use a lambda as a method.
Solution: Implement ->{lambda}(). (closes vim/vim#4768 )
22a0c0c4ec
Add an additional lua_funcname argument to call_func_rettv() to maintain
support for v:lua.
A memory leak was introduced with this patch that was fixed in
v8.1.2107.
2021-08-12 22:35:22 +01:00
Sean Dewar
32589341a4
vim-patch:8.1.1828: not strict enough checking syntax of method invocation
...
Problem: Not strict enough checking syntax of method invocation.
Solution: Check there is no white space inside ->method(.
5184132ec0
2021-08-12 22:35:21 +01:00
Sean Dewar
daedbd9312
vim-patch:8.1.1821: no test for wrong number of method arguments
...
Problem: No test for wrong number of method arguments.
Solution: Add a test.
f97d46f816
2021-08-12 22:35:21 +01:00
Sean Dewar
d41b87e070
vim-patch:8.1.1820: using expr->FuncRef() does not work
...
Problem: Using expr->FuncRef() does not work.
Solution: Make FuncRef work as a method.
761fdf01c6
2021-08-12 22:35:21 +01:00
Sean Dewar
8d1ca37d1f
vim-patch:8.1.1816: cannot use a user defined function as a method
...
Problem: Cannot use a user defined function as a method.
Solution: Pass the base as the first argument to the user defined function
after "->". (partly by FUJIWARA Takuya)
fcfe1a9b89
2021-08-12 22:35:20 +01:00
Sean Dewar
aa2dc8b7b4
vim-patch:8.1.1809: more functions can be used as a method
...
Problem: More functions can be used as a method.
Solution: Add has_key(), split(), str2list(), etc.
a74e4946de
2021-08-12 22:35:20 +01:00