Commit Graph

19560 Commits

Author SHA1 Message Date
zeertzjq
f4359b5dbd
vim-patch:8.2.3461: distinguish Normal and Terminal-Normal mode #15878
Problem:    Cannot distinguish Normal and Terminal-Normal mode.
Solution:   Make mode() return "nt" for Terminal-Normal mode. (issue vim/vim#8856)
72406a4bd2
2021-10-09 18:15:46 -07:00
Jan Edmund Lazo
65b8232260
vim-patch:8.2.{210,424,436,...} #15976
* vim-patch:8.2.1082: Coverity complains about ignoring dict_add() return value

Problem:    Coverity complains about ignoring dict_add() return value.
Solution:   Add (void).
91639195ef

N/A patches for version.c:

vim-patch:8.2.0210: Coverity complains about uninitialized field

Problem:    Coverity complains about uninitialized field.
Solution:   Initialize the field.
eed3571fe0

vim-patch:8.2.0424: checking for wrong return value

Problem:    Checking for wrong return value. (Tom)
Solution:   Invert the check and fix the test.
97acfc781b

vim-patch:8.2.0436: no warnings for incorrect printf arguments

Problem:    No warnings for incorrect printf arguments.
Solution:   Fix attribute in declaration.  Fix uncovered mistakes. (Dominique
            Pelle, closes vim/vim#5834)
db99f9f29a

vim-patch:8.2.0498: Coverity complains about uninitialized field

Problem:    Coverity complains about uninitialized field.
Solution:   Initialize the whole typval_T.
4227c789ff

vim-patch:8.2.0668: compiler warning for int/size_t usage

Problem:    Compiler warning for int/size_t usage.
Solution:   Change "int" to "size_t". (Mike Williams)
7f6f56f43c

vim-patch:8.2.1034: compiler warning for uninitialized variables

Problem:    Compiler warning for uninitialized variables.
Solution:   Add initializations. (John Marriott)
38041da1c2

vim-patch:8.2.1117: Coverity warns for unsing unitialized field

Problem:    Coverity warns for unsing unitialized field.
Solution:   Initialize v_lock.
a9a8e5f0dc

vim-patch:8.2.1148: warning for using int instead of size_t

Problem:    Warning for using int instead of size_t.
Solution:   Change "len" argument to size_t. (Mike Williams)
cbb6bdcd89

vim-patch:8.2.1251: Vim9: warning for pointer usage, test failure undetected

Problem:    Vim9: warning for pointer usage, test failure undetected.
Solution:   Fix pointer indirection.  Give error when executing function
            failed for any reason.  Fix instruction names.
682d0a1546

printable_func_name() is applicable but the vim9 changes are N/A.
Compilers can detect misuse of static functions.

vim-patch:8.2.1275: Vim9: compiler warning for buffer size

Problem:    Vim9: compiler warning for buffer size.
Solution:   Change the offset from 10 to 15. (Dominique Pellé, closes vim/vim#6518)
5a67c37a55

vim-patch:8.2.1443: Vim9: crash when interrupting a nested :def function

Problem:    Vim9: crash when interrupting a nested :def function.
Solution:   Push a dummy return value onto the stack. (closes vim/vim#6701)
cdd70f09a5

vim-patch:8.2.1818: SE Linux: deprecation warning for security_context_t

Problem:    SE Linux: deprecation warning for security_context_t.
Solution:   Use "char *" instead. (James McCoy, closes vim/vim#7093)
8956023920

SELINUX support was removed in commit 1de77bbcec

vim-patch:8.2.2004: compiler warning for uninitialized variable

Problem:    Compiler warning for uninitialized variable.
Solution:   Initialize "ufunc". (John Marriott)
b3a01946b3

vim-patch:8.2.2051: Vim9: crash when aborting a user function call

Problem:    Vim9: crash when aborting a user function call.
Solution:   Do not use the return value when aboring. (closes vim/vim#7372)
34c54eb6cb

vim-patch:8.2.2270: warning for size_t to int conversion

Problem:    Warning for size_t to int conversion. (Randall W. Morris)
Solution:   Add a type cast.
38a434f7ba

vim-patch:8.2.2333: Vim9: warning for uninitialized variable

Problem:    Vim9: warning for uninitialized variable. (Tony Mechelynck)
Solution:   Initialize "res".
cb6cbf29e9

vim-patch:8.2.2460: Coverity warns for unused value

Problem:    Coverity warns for unused value.
Solution:   Do not reset the return value to OK.
fc1dafa91c

vim-patch:8.2.2461: Coverity warns for unchecked return value

Problem:    Coverity warns for unchecked return value.
Solution:   Add "(void)" to avoid the warning.
fef8064b54

vim-patch:8.2.2557: compiler warning for shadowd variable

Problem:    Compiler warning for shadowd variable.
Solution:   Declare "p" only once.
087b5ff35d

vim-patch:8.2.2730: Coverity complains about not restoring character

Problem:    Coverity complains about not restoring character.
Solution:   Also restore the character in case of an error.
c9605f0595

vim-patch:8.2.2795: Coverity warns for not using return value

Problem:    Coverity warns for not using return value.
Solution:   Check the return value of compiling the substitute expression.
169502fb0b

vim-patch:8.2.2995: linker errors with dynamic Python 3.10

Problem:    Linker errors with dynamic Python 3.10.
Solution:   Add a couple of library entries. (Zdenek Dohnal, closes vim/vim#8381,
            closes vim/vim#8356)
90478f35a8

vim-patch:8.2.3000: Vim9: warning for uninitialized variable

Problem:    Vim9: warning for uninitialized variable.
Solution:   Add initialization. (John Marriott)
3b814af7e1

vim-patch:8.2.3014: Coverity warns for freeing static string

Problem:    Coverity warns for freeing static string.
Solution:   Do not assign static string to pointer. (Dominique Pellé,
            closes vim/vim#8397)
6e9695525e

vim-patch:8.2.3205: Coverity reports a null pointer dereference

Problem:    Coverity reports a null pointer dereference.
Solution:   Change the logic to avoid Coverity gets confused.
1b862c466b

vim-patch:8.2.3294: Lua: memory leak when adding dict item fails

Problem:    Lua: memory leak when adding dict item fails.
Solution:   Free the typval and the dict item.
1b6acf02b7

vim-patch:8.2.3302: Coverity is not run from github

Problem:    Coverity is not run from github.
Solution:   Add a coverity script. (James McCoy, closes vim/vim#8714)
d57a6bd98c

vim-patch:8.2.3319: Coverity action on github does not work

Problem:    Coverity action on github does not work.
Solution:   Remove undefined $SRCDIR. (James McCoy, closes vim/vim#8739)
eed9616120

* vim-patch:8.2.1085: Coverity complains about ignoring dict_add() return value

Problem:    Coverity complains about ignoring dict_add() return value.
Solution:   Add (void).
6d90c61c5a
2021-10-09 16:40:11 -07:00
dundargoc
5940a3415b
vim-patch:8.2.3490: superfluous return statements #15978
Problem:    Superfluous return statements.
Solution:   Remove superfluous return statements from void functions.
            (closes vim/vim#8977)
3826c0513b
2021-10-09 16:38:50 -07:00
dundargoc
0fc8597f01
refactor: format header files with uncrustify #15877
* refactor: format header files with uncrustify
* fixup(justin): skip formatting of terminfo_defs.h
* fixup: force winsock2 to be included first
* fixup: simplify disable/enable directive to "uncrustify:off/on"
2021-10-09 05:20:16 -07:00
Jakub Łuczyński
a36c6e5df9
fix(checkhealth): duplicate checks if module name has "-" #15935
Problem:    Some plugins have structure `lua/nvim-someplugin/..`
            Since `-` is not allowed in vim function names, healthcheck names in
            lua and in vim can not have the same name (typically vim will use `_`
            instead of `-`).
Solution:   Normalize the names before checking for duplicates.
2021-10-08 17:36:35 -07:00
dundargoc
f620008e59
ci: disable commit-lint on draft PRs #15958 2021-10-08 17:08:47 -07:00
dundargoc
2f50c7b5a3
ci(squash_typos.py): credit authors #15967 2021-10-08 16:37:45 -07:00
dundargoc
1e876bd9a8
fix(mpack): clang warning: unused variable #15968 2021-10-08 16:05:26 -07:00
Michael Lingelbach
4f4dbfe81c
fix(lsp): update tests using 0.5.0 handler calls (#15969)
Fixes test regression introduced in https://github.com/neovim/neovim/pull/15262
2021-10-08 14:01:55 -07:00
francisco souza
fcc11d5942
fix(lsp): add textDocument/prepareRename to capability map (#15961)
This is a simple fix for #15899, as it should at least stop calling
`prepareRename` on servers that don't support renaming.

I imagine a better fix would be to inspect the actual value for, but
that requires some plumbing changes on how capabilities are evaluated
before sending requests out.

Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
2021-10-08 11:30:18 -07:00
Gregory Anders
d5dd0aa1e6
fix(diagnostic): error on invalid severity value (#15965)
Users can pass string values for severities that match with the enum
names (e.g. "Warn" or "Info") which are converted to the corresponding
numerical value in `to_severity`. Invalid strings were simply left
as-is, which caused confusing errors later on. Instead, report an
invalid severity string right up front to make the problem clear.
2021-10-08 12:28:02 -06:00
Rishikesh Vaishnav
3f09732195
fix(lsp): expose ContentModified error code to callbacks (#15262) 2021-10-08 11:19:33 -07:00
Björn Linse
5cbd0fba00
Merge pull request #15962 from bfredl/nosort
fix(buffer_updates): handle :sort of already sorted buffer
2021-10-08 18:19:18 +02:00
Mathias Fußenegger
e9d6f7ca6c
feat(lsp): utilize textEdit.range for startbyte in omnifunc (#15957)
Closes https://github.com/neovim/neovim/issues/15784
2021-10-08 08:47:59 -07:00
Björn Linse
ef687d3218 fix(buffer_updates): handle :sort of already sorted buffer 2021-10-08 16:15:35 +02:00
Björn Linse
93d33ed02e
Merge pull request #15954 from virchau13/fix-table-validation
fix(api): check type in nlua_pop_keydict (fixes #15940)
2021-10-08 13:50:29 +02:00
virchau13
6064376f6d
fix(api): check type in nlua_pop_keydict (#15940) 2021-10-08 18:22:33 +08:00
Gregory Anders
7f93b2ab01
fix: support severity_sort option for show_diagnostic functions (#15948)
Support the severity_sort option for show_{line,position}_diagnostics.
2021-10-07 19:19:30 -06:00
Tejasvi S. Tomar
e16adbf238
fix(provider): compare versions as number, not string #15937
"3.10" < "3.3" but v3.10 > v3.3
Fixes #14586
2021-10-07 14:27:40 -07:00
Björn Linse
2d206d5ab2
Merge pull request #15946 from bfredl/issue-12861
fix(buffer_updates): make lockmarks not affect extmarks and buffer updates
2021-10-07 20:52:10 +02:00
Björn Linse
fe608750a9
Merge pull request #15839 from bfredl/encgrugg
refactor(api): some cleanup
2021-10-07 20:29:53 +02:00
Björn Linse
54b2c6800e fix(buffer_updates): cleanup test behavior 2021-10-07 20:22:10 +02:00
Anton Adamansky
7d171b1c48 fix(buffer_updates): make lockmarks not affect extmarks and buffer updates. fixes #12861
Now mark_adjust() will trigger appropriate buf_updates_send_splice() called by extmark_adjust()
2021-10-07 20:21:23 +02:00
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