Commit Graph

19437 Commits

Author SHA1 Message Date
Björn Linse
206f4429c6
Merge pull request #15945 from bfredl/emptydelete
fix(buffer_updates): handle :delete of the very last line in buffer
2021-10-07 20:13:15 +02:00
Björn Linse
413bb6b7a4 refactor(api): cleanup modify_keymap and parse_keymap_opts 2021-10-07 19:45:30 +02:00
Björn Linse
8335e26b2d fix(buffer_updates): handle :delete of the very last line in buffer 2021-10-07 19:35:49 +02:00
Björn Linse
b9a35ec7a4
Merge pull request #15934 from kylo252/replacement-size
fix(lint): remove redundant ternary operator
2021-10-07 18:57:48 +02:00
Björn Linse
684299ed4c
Merge pull request #15941 from dundargoc/refactor/remove-redundant-casts
refactor: remove redundant casts
2021-10-07 18:39:27 +02:00
Sean Dewar
b55944e8af
feat(diagnostic): update jumplist on goto_next/prev (#15942) 2021-10-07 08:46:17 -07:00
Björn Linse
cbc60524f1
Merge pull request #15932 from erw7/fix-nvim-buf-set-extmark
fix(api): fix nvim_buf_set_extmark
2021-10-07 17:31:56 +02:00
Björn Linse
7356d3cdbd
Merge pull request #15316 from vigoux/ts-fix-captures
fix(treesitter): run predicates more often in iter_matches
2021-10-07 16:00:36 +02:00
Dundar Göc
6d9dea4201 refactor: remove redundant casts 2021-10-07 13:16:55 +02:00
erw7
23383451b0 fix(api): fix nvim_buf_set_extmark
Fix the problem of calling clear_virttext on undefined variables.
2021-10-07 19:03:54 +09:00
Björn Linse
83778ce567 refactor(api): remove duplicated handle mpack encode/decode functions 2021-10-07 08:00:28 +02:00
Yorick Peterse
c61a3865ee
fix: set cursorlineopt=number in terminal mode (#15493)
When entering terminal mode, cursorlineopt is no longer entirely
disabled. Instead, it's set to `number`. Doing so ensures that users
using `set cursorline` combined with `set cursorlineopt=number` have
consistent highlighting of the line numbers, instead of this being
disabled when entering terminal mode.

Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
2021-10-06 16:31:14 -06:00
Tony Chen
e06936125a
fix(extmarks): splice extmarks on nv_Undo #15920 2021-10-06 09:35:44 -07:00
kylo252
47dd6c4f47 fix(lint): remove redundant ternary operator
The value of `new_len` will never be '0' since `replacement.size`
is checked against that early on.
2021-10-06 18:21:43 +02:00
dundargoc
d0c0878b3e
fix(PVS/V1048): "variable was assigned the same value" #15870 2021-10-06 07:47:31 -07:00
dundargoc
45b9815fc1
refactor: remove superfluous function-like macros #15918
Remove following macros:
CONVERTED
HMLL_ITER_BACK
PACK_STRUCT
IGNORE_BUF
find_shada_parameter
path_try_shorten_fname
2021-10-06 06:27:27 -07:00
dundargoc
1034f7d7b1
vim-patch:8.2.0017: OS/2 and MS-DOS are still mentioned #15928
Problem:    OS/2 and MS-DOS are still mentioned, even though support was
            removed long ago.
Solution:   Update documentation. (Yegappan Lakshmanan, closes vim/vim#5368)
6f345a1458
2021-10-06 06:14:56 -07:00
erw7
a161559a00
fix(tui): remove dead code #15929
Before #15889, we used our fork of libuv which supports Windows 7/8.
After #15889, we use upstream libuv, which does not support Windows 7 and lacks
mouse/altbuf support for Windows 8 console.
2021-10-06 05:13:34 -07:00
Dundar Göc
0c7d7fb45d vim-patch:8.1.2379: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
217e1b8359
2021-10-06 11:50:10 +02:00
Dundar Göc
3b3e2244db vim-patch:8.1.2388: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
4ba37b5833
2021-10-06 11:50:10 +02:00
Dundar Göc
86f32dfcdd vim-patch:8.1.2368: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
c667da5185
2021-10-06 11:50:10 +02:00
Dundar Göc
b4acae2c4a vim-patch:8.1.2392: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
6e0ce171e1
2021-10-06 11:50:10 +02:00
Dundar Göc
41d3b98deb vim-patch:8.1.2394: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
63d9e730f7
2021-10-06 11:50:10 +02:00
Dundar Göc
e8f87f15d7 vim-patch:8.1.2395: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
0d6f5d9740
2021-10-06 11:50:10 +02:00
Dundar Göc
d6c789a571 vim-patch:8.1.2396: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
e38eab22c1
2021-10-06 11:49:42 +02:00
Javier Lopez
acd5e831b6
fix(checkhealth): mitigate issues with duplicate healthchecks #15919
* fix(runtime/health): mitigate issues with duplicate healthchecks
  Previously if a healthcheck was found as Lua and Vim it was executed
  both times.
  This new implementations prefers Lua, therefore if two are found It only
  runs the Lua one, this way a plugin can mantain both implementations the
  Lua one with the method `check()` and the autoload function `#check()`
  (for none HEAD nvim versions).
  **Note: This will require plugins to use `check()` as the function name,
  since the autoload function that wraps the lua implementation won't be
  called**
* docs(health): use spaces and don't overuse backtics

followup to #15259
2021-10-05 15:37:39 -07:00
Jan Edmund Lazo
6a930a9dc4
vim-patch:8.2.0155: MinGW warnings; tests without +float #15908
Problem:    Warnings from MinGW compiler. (John Marriott) Json test fails when
            building without +float feature.
Solution:   Init variables. Fix Json parsing. Skip a few tests that require
            the +float feature.
a5d5953d59

Omit vim9 changes.
vim9 internal implementation is N/A,
similar to the `vimscript-*` features.

N/A patches for version.c:

vim-patch:8.1.0737: compiler warning for uninitialized variable

Problem:    Compiler warning for uninitialized variable.
Solution:   Add initialization. (John Marriott)
e519dfd713

vim-patch:8.1.1385: signed/unsigned compiler warning

Problem:    Signed/unsigned compiler warning.
Solution:   Use STRLEN() instead of strlen().
71de720c2c

vim-patch:8.2.0165: Coverity warning for using NULL pointer

Problem:    Coverity warning for using NULL pointer.
Solution:   Add missing "else".
5b18c248d3

vim-patch:8.2.0166: Coverity warning for using uninitialized variable

Problem:    Coverity warning for using uninitialized variable.
Solution:   Check for failure.
07da94b0f0

vim-patch:8.2.0167: Coverity warning for ignoring return value

Problem:    Coverity warning for ignoring return value.
Solution:   Check the return value and jump if failed.
58ceca5cae

"src/testdir/test_vim9*.vim" files are N/A
because vim9 code is currently unsupported.

vim-patch:8.2.0168: Coverity warning for assigning NULL to an option

Problem:    Coverity warning for assigning NULL to an option.
Solution:   Use empty string instead of NULL.
97a2af39cd

vim-patch:8.2.0169: Coverity warning for dead code

Problem:    Coverity warning for dead code.
Solution:   Check if inside try-finally.
8cbd6dfc0c

vim-patch:8.2.0170: Coverity warning for ignoring return value

Problem:    Coverity warning for ignoring return value.
Solution:   Check the return value and return if failed.
a6d536829a

vim-patch:8.2.0172: Coverity warning for not restoring character

Problem:    Coverity warning for not restoring character.
Solution:   Restore the character also in case of failure.
4549ece47c

vim-patch:8.2.0254: compiler warning for checking size_t to be negative

Problem:    Compiler warning for checking size_t to be negative.
Solution:   Only check for zero. (Zoltan Arpadffy)
ae8d2de3a9

vim-patch:8.2.0326: compiler warning for using uninitialized variable

Problem:    Compiler warning for using uninitialized variable. (Yegappan
            Lakshmanan)
Solution:   Do not jump to failed but return.
d5aec0ced1

vim-patch:8.2.3387: compiler warning for non-static function

Problem:    Compiler warning for non-static function.
Solution:   Make the function static. (Dominique Pellé, closes vim/vim#8816)
de05ae7158
2021-10-05 10:58:06 -07:00
github-actions[bot]
59edd377d3
docs: regenerate #15545 2021-10-05 10:48:48 -07:00
Justin M. Keyes
dd7812ec66 fix(docs): add win_config.c 2021-10-05 09:56:22 -07:00
Justin M. Keyes
38ef66f4c1 fix(docs): duplicate tag, wrong formatting
Fixes build error:
    cd /usr/home/build/neovim/build/runtime && /usr/local/bin/cmake -E remove doc/* && /usr/local/bin/cmake -E copy_directory /usr/home/build/neovim/runtime/doc doc && /usr/home/build/neovim/build/bin/nvim -u NONE -i NONE -e --headless -c helptags\ ++t\ doc -c quit
    Error detected while processing command line:
    E154: Duplicate tag "vim.register_keystroke_callback()" in file doc/lua.txt
2021-10-05 09:45:25 -07:00
Javier Lopez
49fdc62114
feat(api): named marks set, get, delete #15346
Adds the following API functions.

- nvim_buf_set_mark(buf, name, line, col)
  * Set marks in a buffer.
- nvim_buf_del_mark(buf, name)
  * Delete a mark that belongs to buffer.
- nvim_del_mark(name)
  * Delete a global mark.
- nvim_get_mark(name)
  * Get a global mark.

Tests:

- Adds test to all the new api functions, and adds more for the existing
  nvim_buf_get_mark.
    * Tests include failure cases.

Documentation:

- Adds documentation for all the new functions, and improves the
  existing fucntion docs.
2021-10-05 08:49:20 -07:00
Michael Lingelbach
912a6e5a9c
feat(lsp): improve json deserialization performance (#15854)
* Add optional second table argument to vim.json.decode which takes
  a table 'luanil' which can include the 'object' and/or 'array' keys. These
  options use luanil when converting NULL in json objects and arrays
  respectively. The default behavior matches the original lua-cjson.
* Remove recursive_convert_NIL function from rpc.lua, use
  vim.json.decode with luanil = { object = true } instead. This removes a hotpath
  in the json deserialization pipeline by dropping keys with json NULL
  values throughout the deserialized table.
2021-10-05 08:37:20 -07:00
Christian Clason
f6c0a37b02
build(deps)!: use libuv 1.42.0 upstream for WIN32 (#15889)
Switch libuv from https://github.com/neovim/libuv fork to upstream for WIN32.
Upstream at 1.42.0 is now used for all platforms.

BREAKING CHANGE: removes Windows 7 support
BREAKING CHANGE: removes support for mouse and alternate buffers in TUI for
Windows 8 and 8.1
2021-10-05 17:23:42 +02:00
Christian Clason
3b531d50a8
docs(contrib): recommend nvim --clean #15917 2021-10-05 08:01:09 -07:00
Christian Clason
f6a9f0bfca
fix(vim-patch): add missing nginx runtime files (#15916)
Followup to incomplete runtime update https://github.com/neovim/neovim/pull/15911
2021-10-05 15:19:16 +02:00
zeertzjq
17f7c83f29
docs(intro.txt): change vimhelp.appspot.com to vimhelp.org (#15915)
Ref 6c1e1570b1 (diff-644ad027e3580bc940a6b7b4aaf1869bae267f7ff30e359e523d5de70e317106)
2021-10-05 06:49:15 -06:00
Christian Clason
0c2a7aa5f7
vim-patch:6e649224926b (#15911)
Update runtime files
6e64922492
2021-10-05 14:12:16 +02:00
Javier Lopez
0a7a215aa6
fix(healthcheck): update builtins to the new convention #15914
Adjust some builtin healthchecks to use Lua, after #15259
2021-10-05 05:05:33 -07:00
dundargoc
6d8cafed40
ci: exclude lua-cjson from PVS report #15859 2021-10-05 05:02:49 -07:00
Christian Clason
a2734efdc2
vim-patch:8.2.3473: some tcl files are not recognized #15912
Problem:    Some files with tcl syntax are not recognized.
Solution:   Add a few file patterns. (Doug Kearns)
78aa5ffe31
2021-10-05 04:21:52 -07:00
Matthieu Coudron
93a7571fab
Merge pull request #15259 from muniter/muniter/checkhealth-from-lua
feat(checkhealth): support Lua healthchecks
2021-10-05 11:27:07 +02:00
zeertzjq
655e489e90
docs(develop.txt): nvim_open_win is now in win_config.c (#15909) 2021-10-04 20:10:07 -06:00
Javier López
8b43b07333 feat(ex_checkhealth): provide function for command line completion
Move away from providing completion with ExpandRTDir to ExpandGeneric
providing the function get_healthcheck_name which caches the results for
the current command line prompt.

It does the almost the same thing the Vim function 'get_healthcheck'
implemented in 'runtime/autoload/health.vim' does.
2021-10-04 16:51:54 -05:00
Björn Linse
b60e6448eb
Merge pull request #15813 from bfredl/neomouse
fix(mouse): correct dragged position in composed layout
2021-10-04 23:08:39 +02:00
Javier López
8f2a8b50da docs(runtime/health): update with new lua support
- describe how the lua support works
- explain new behavior of :checkhealth *
- fixed formatting to use tab instead of spaces
2021-10-04 14:28:54 -05:00
Javier López
c65f956015 test(runtime/health): cover lua healthchecks
- Add tests for lua healthchecks (failure, success and submodules).
- Reword some of the test naming for improved logs readability.
- Modify render test to accomodate the changes of the health autoload function.
- Add test for :checkhealth completion of Lua healtchecks.
2021-10-04 14:28:54 -05:00
Javier López
9249dcdda1 feat(runtime/health): support lua healthchecks
- Refactor health.vim to discover lua healthcheck in the runtime
  directories lua/**/health{/init}.lua
- Support healthchecks for lua submodules e.g :checkhealth vim.lsp and
  also support wildcard "*" at the end for all submodules
  :checkhealth vim*
- Refactor health.vim to use variable scope instead of output capturing
- Create health.lua module to wrap report functions and future
  extensibility.
- Move away from searching just in the runtimepath, use
  `nvim_get_runtime_file` due to #15632

Example:
Plugin linter in rtp can declare it's checkhealts in lua module
`lua/linter/health{/init}.lua` that returns a table with a method
"check" that when executed calls the report functions provided by the
builtin lua module require("health").

The plugin also has a submodule `/lua/linter/providers` in which it
defines `/lua/linter/providers/health{/init}.lua`

This plugin healthcheck can now be run by the ex command:
  `:checkhealth linter linter.providers`

Also calling all submodules can be done by:
  `:checkhealth linter*

And "linter" and "linter.provider" would be discovered when:
  `:checkhealth`
2021-10-04 14:28:54 -05:00
Aditya Kurdunkar
83fa8956c3
docs: fix typo 2021-10-04 13:09:32 -06:00
Björn Linse
810da1a702 fix(mouse): correct dragged position in composed layout 2021-10-04 21:00:42 +02:00
Björn Linse
253a012469
Merge pull request #15901 from bfredl/apiorg
refactor(api): re-organanize public and private API functions
2021-10-04 20:06:41 +02:00