Commit Graph

18618 Commits

Author SHA1 Message Date
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
Sean Dewar
003c8acc8a
vim-patch:8.1.1807: more functions can be used as a method
Problem:    More functions can be used as a method.
Solution:   Add append(), appendbufline(), assert_equal(), etc.
            Also add the :eval command.
25e42231d3

:eval is already ported.
2021-08-12 22:35:20 +01:00
Sean Dewar
e6be6c307a
vim-patch:8.1.1803: all builtin functions are global
Problem:    All builtin functions are global.
Solution:   Add the method call operator ->.  Implemented for a limited number
            of functions.
ac92e25a33

- Note that to *exactly* port hunk @@ -7376,18 +7444,19 from
  handle_subscript(), we need the :scriptversion patches (I have an open
  PR for those, but this patch works fine without them anyway).
- Port call_internal_func() from v7.4.2058.
- Adjust some error messages in tests, as they rely on the Blob patches.
- Add a modeline to test_method.vim.

Ignore the global_functions and base_method tables and prefer the
current GPerf implementation. Instead, add an extra base_arg field to
VimLFuncDef that holds the number of the argument to use as the base
(1-indexed, so that 0 may be used to refer to functions that cannot be
used as methods).

This also means we support using any argument as a base from the get-go,
rather than just the first (Vim includes this ability in future patches,
however).

To mark a function as usable as a method, use the "base" key as
described in eval.lua.
2021-08-12 22:35:19 +01:00
Sean Dewar
4042ae5a2b
vim-patch:8.1.1800: function call functions have too many arguments
Problem:    Function call functions have too many arguments.
Solution:   Pass values in a funcexe_T struct.
c6538bcc1c

Use FUNCEXE_INIT to initialize funcexe_T instances.

call_callback() and other Vim listener related stuff is N/A.
2021-08-12 22:31:18 +01:00
Sean Dewar
60dd76c7e2
vim-patch:8.1.1638: running tests leaves some files behind
Problem:    Running tests leaves some files behind.
Solution:   Delete the files. (Ozaki Kiichi, closes vim/vim#4617)
3940ec6d41

Required for v8.1.1888.

N/A patches for version.c:

vim-patch:8.1.1912: more functions can be used as methods

Problem:    More functions can be used as methods.
Solution:   Make channel and job functions usable as a method.
vim/vim@570497a
2021-08-12 17:16:34 +01:00
Sean Dewar
1918638c67
test(oldtest): cherry-pick needed test functions from v8.1.1336
Cherry-pick Test_call() and Test_cindent_func().

Required for v8.1.1911 and v8.1.1915.
2021-08-12 17:16:34 +01:00
Sean Dewar
e0bdc9b89c
fix(eval): cherry-pick emsg changes from v8.1.0736
v8.1.0736 made some changes for making some emsgs more specific.
Includes the change for Test_lambda_fails() in test_lambda.vim.
Adjust relevant functionaltests to expect the new emsgs.

This patch has been fully ported in my Blob port PR, but it hasn't been
merged yet, so just use what we need from it for now.

Required for v8.1.1821.
2021-08-12 17:16:33 +01:00
Björn Linse
7d2233fad0
Merge pull request #15336 from bfredl/plines
refactor(plines): move "plines" (size of printed lines) family of function to own file
2021-08-11 17:38:36 +02:00
Björn Linse
28b5c73bf8 refactor(plines): move horizontal size functions to plines.c
fix style.
2021-08-11 17:10:52 +02:00
Thomas Vigouroux
2c60f7c991
Merge pull request #15335 from muniter/set_extmark_error_cleanup
refactor(api): remove redundant api_set_error
2021-08-11 10:38:21 +02:00
Björn Linse
8bf318dcde refactor(plines): what is basic compiler optimizations? 2021-08-10 23:22:25 +02:00
Björn Linse
ac56a27a10 refactor(plines): remove implicit curwin chartabsize() function 2021-08-10 23:18:12 +02:00
Björn Linse
b506643dfc refactor(plines): style of new plines.c file 2021-08-10 23:06:48 +02:00
Björn Linse
7f71e8a6b3 refactor(plines): move out plines related code from misc1.c 2021-08-10 22:59:29 +02:00
Javier López
d475955ed3 refactor(api): remove redundant api_set_error
This error is already handled by 'find_buffer_by_handle'
2021-08-10 15:55:03 -05:00
Björn Linse
0465341e16 refactor(plines): remove implicit curwin plines_nofill() function 2021-08-10 22:39:04 +02:00
Björn Linse
a177c7df09 refactor(plines): remove implicit curwin plines() function 2021-08-10 22:32:08 +02:00
Björn Linse
c479b90359
Merge pull request #15253 from spywhere/float-win-scl-fix
Fix sign column auto with minimum break floating window minimal style
2021-08-10 22:14:52 +02:00
Andrea Cappuccio
adebbebdd7
fix(lsp): properly handle nil lines when trimming empty lines (#15325) 2021-08-10 20:52:30 +02:00
Thomas Vigouroux
c5baba065c
Merge pull request #15329 from dundargoc/github/bug-template/make-behavior-mandatory
ci: make all questions mandatory in bug template
2021-08-10 14:35:36 +02:00
Dundar Göc
f43a8f0eda ci: make all questions mandatory in bug template 2021-08-10 12:18:55 +02:00
Hans Pinckaers
1a10acb997
fix(lsp): floating popup should take offset_x into account when positioning (#15297) 2021-08-09 23:56:58 +02:00
Cezary Drożak
33b4513b89
doc: Document -complete=lua option (#15102) 2021-08-09 21:21:14 +02:00
github-actions[bot]
3cacd108d0
docs: regenerate (#15324)
Co-authored-by: marvim <marvim@users.noreply.github.com>
2021-08-09 20:54:28 +02:00
Matthieu Coudron
0e9d97896a
Merge pull request #15307 from muniter/update-help.txt
docs(help.txt): Add a tag to the neovim api.
2021-08-09 19:51:47 +02:00
max397574
a3d5f391cf
docs: Add some references to LSP specification (#15321) 2021-08-09 19:45:00 +02:00
dundargoc
cad5f01cf3
docs: elaborate on commitlint rules (#15322)
linter requires lowercase at start and no period at end of description
2021-08-09 18:46:33 +02:00
Javier Lopez
109a417e21 docs(help.txt): add treesitter to the main help file 2021-08-09 09:17:02 -05:00
Javier Lopez
4667bfb732 docs(help.txt): add a tag to the neovim api 2021-08-09 09:16:56 -05:00
dundargoc
7dbbd5d8b1
ci: create GitHub Action that squashes all typo PRs into a single PR (#15041)
The action adds all pull-request authors (and Marvim) as a co-author to the
newly created PR and also links to the closed PRs.
2021-08-09 15:21:50 +02:00
Jan Edmund Lazo
9ef7003c38
Merge pull request #15312 from janlazo/vim-8.2.2639
vim-patch:8.1.{1818},8.2.{1464,2639,2814,2947,2976,2986,3114,3141,3160,3198}
2021-08-09 08:28:36 -04:00
Sirisak Lueangsaksri
0a43b4d51e refactor(sign): include longer sign column option 2021-08-09 11:09:22 +07:00
Sirisak Lueangsaksri
c8f57f6ded fix(sign): reset auto sign column with minimum in float win minimal style 2021-08-09 11:09:22 +07:00
Jan Edmund Lazo
292148b08b
vim-patch:8.2.3141: no error when using :complete for :command without -nargs
Problem:    No error when using :complete for :command without -nargs.
Solution:   Give an error. (Martin Tournoij, closes vim/vim#8544, closes vim/vim#8541)
de69a7353e

N/A patches for version.c:

vim-patch:8.1.1801: cannot build without the +eval feature

Problem:    Cannot build without the +eval feature.
Solution:   Always define funcexe_T.
505e43a20e

vim-patch:8.1.1818: unused variable

Problem:    Unused variable.
Solution:   Remove the variable. (Mike Williams)
b4a88a0441

vim-patch:8.2.1464: Vim9: build warning for unused variable

Problem:    Vim9: build warning for unused variable.
Solution:   Delete the variable declaration.
829ac868b7

vim-patch:8.2.2639: build failure when fsync() is not available

Problem:    Build failure when fsync() is not available.
Solution:   Add #ifdef.
5ea79a2599

vim-patch:8.2.2814: Vim9: unused variable

Problem:    Vim9: unused variable. (John Marriott)
Solution:   Adjust #ifdef.
b06b50dfa0

vim-patch:8.2.2947: build failure without the channel feature

Problem:    Build failure without the channel feature.
Solution:   Add back #ifdef. (John Marriott)
f5bfa8faa7

vim-patch:8.2.2976: build failure without the +eval feature

Problem:    Build failure without the +eval feature.
Solution:   Add #ifdefs.
8de901e1f1

vim-patch:8.2.2986: build failure without the profile feature

Problem:    Build failure without the profile feature.
Solution:   Add #ifdef.
d9f31c13d2

vim-patch:8.2.3114: Amiga-like systems: build error using stat()

Problem:    Amiga-like systems: build error using stat().
Solution:   Only build swapfile_process_running() on systems where it is
            actually used. (Ola Söder, closes vim/vim#8519)
599a6e5b36
2021-08-08 22:29:55 -04:00
Jan Edmund Lazo
43a874ab74
vim-patch:8.2.3198: cannot use 'formatlistpat' for breakindent
Problem:    Cannot use 'formatlistpat' for breakindent.
Solution:   Use a negative list indent. (Maxim Kim, closes vim/vim#8594)
f674b358fc

Port get_showbreak_value() from patch v8.1.2281
to avoid breaking changes when porting older patches.
2021-08-08 22:22:34 -04:00
Jan Edmund Lazo
f89a275e32
vim-patch:8.2.3160: 'breakindent' does not work well for bulleted lists
Problem:    'breakindent' does not work well for bulleted and numbered lists.
Solution:   Add the "list" entry to 'breakindentopt'. (Christian Brabandt,
            closes vim/vim#8564, closes vim/vim#1661)
4a0b85ad01
2021-08-08 22:22:34 -04:00
Gregory Anders
68f61b167e
vim-patch:8.2.3285: scdoc filetype is not recognized (#15294)
Problem:    Scdoc filetype is not recognized.
Solution:   Add filetype detection. (Gregory Anders, closes vim/vim#8701)
dd097bdc13
2021-08-08 18:27:34 -04:00
Jan Edmund Lazo
cdbd54972b
option: pvs/v557 (#14740)
Replace STRCAT with STRLCAT() to always NUL-terminate "errbuf" array.
2021-08-08 17:27:50 -04:00
dundargoc
a2909aa35f
ci(labeler): apply label tests if only files under test have changed (#15305) 2021-08-08 11:03:55 +02:00
Christian Clason
35041432bf
ci(forms): fix "vim" description in bug template
Make clear that the version should be specified in any case, including patch level
2021-08-07 18:14:03 +02:00
dundargoc
c9131ef9b5
docs: fix paragraph for BufEnter in the documentation (#15301) 2021-08-07 12:18:40 +02:00
Thomas Vigouroux
faa3007927
Merge pull request #14767 from theHamsta/no-treesitter-mapping-to-non-existent
fix(treesitter): do not map hl_group when no mapping is set
2021-08-07 11:44:41 +02:00
dundargoc
a1cc146405
ci(labeler): apply documentation label only for changes exclusively in runtime/doc/* (#15298) 2021-08-07 10:36:15 +02:00
Folke Lemaitre
e7bde44d6d
fix(lsp): prevent duplicate lines seperated by newlines (#15284) 2021-08-06 17:15:49 -04:00
Stephan Seitz
912152d635 chore: remove reference to nvim-treesitter in comment 2021-08-06 22:08:45 +02:00