Commit Graph

21722 Commits

Author SHA1 Message Date
Justin M. Keyes
b70856009d
Merge #18605 PVS fixes 2022-05-18 02:32:15 +02:00
zeertzjq
7ded303d68
vim-patch:8.2.4975: recursive command line loop may cause a crash (#18614)
Problem:    Recursive command line loop may cause a crash.
Solution:   Limit recursion of getcmdline().
51f0bfb88a

Cherry-pick e_command_too_recursive from patch 8.2.3957.
2022-05-18 08:21:24 +08:00
Dundar Goc
10868dbf89 fix(PVS/V1044): suppress warning 2022-05-17 22:26:25 +02:00
Dundar Goc
5084b6fb92 fix(PVS/V568): correct placement of ignore directive 2022-05-17 22:26:25 +02:00
Dundar Goc
65f585ce9b fix(PVS/V547): "expression is always false"
Suppress warning in loop.c, the expression can be true if EXITFREE isn't
defined.
2022-05-17 22:26:25 +02:00
Dundar Goc
e75ccc3b3a fix(PVS/V1028): prevent potential overflow 2022-05-17 22:26:25 +02:00
Noval Maulana
38cbca3eea
fix(health): handle non-existent log file #18610
Problem:
    vim.lsp: require("vim.lsp.health").check()
    ========================================================================
      - ERROR: Failed to run healthcheck for "vim.lsp" plugin. Exception:
        function health#check, line 20
        Vim(eval):E5108: Error executing lua ...m/HEAD-6613f58/share/nvim/runtime/lua/vim/lsp/health.lua:20: attempt to index a nil value
        stack traceback:
        ...m/HEAD-6613f58/share/nvim/runtime/lua/vim/lsp/health.lua:20: in function 'check'
        [string "luaeval()"]:1: in main chunk

Solution:
Check for nil.

fix #18602
2022-05-17 11:11:14 -07:00
Jonas Strittmatter
7ffa9073a3
refactor(runtime): convert more dist#ft functions to lua (#18430) 2022-05-17 19:48:45 +02:00
bfredl
8a39032fdd
Merge pull request #18554 from kevinhwang91/perf-timerstart
perf(_editor): no need to stop inside vim.defer_fn
2022-05-17 18:59:48 +02:00
Dundar Goc
a4c0c07043 revert: "ci: remove mingw job #18580"
This partially reverts commit f8af81445b.

The mingw parts of cmake was removed to see if it was still used
(ref: https://github.com/neovim/neovim/pull/18580). It turns out it is,
so this will fix that.

Closes: https://github.com/neovim/neovim/issues/18597
2022-05-17 17:07:45 +02:00
Lewis Russell
6219331c4d feat(api): add win and buf to nvim_set_option_value
Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
2022-05-17 14:48:10 +01:00
Lewis Russell
8a73e60eb9
fixup: update test/functional/lua/vim_spec.lua
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2022-05-17 14:25:56 +01:00
zeertzjq
f49699737c
fix(terminal): do not trim whitespace that is actually in the terminal (#16423) 2022-05-17 21:09:28 +08:00
zeertzjq
bbfc4567df
fix(health): correct shada file path #18603 2022-05-17 05:43:35 -07:00
dundargoc
b239db3cb5
feat(lintcommit): remove "chore", add "dist" #18594
"chore" is never necessary, choose "fix" or "feat" if nothing else applies.
2022-05-17 05:42:48 -07:00
Famiu Haque
54b5222fbb
docs(api): update v:errmsg behavior #18593 2022-05-17 05:27:33 -07:00
Lewis Russell
5c41165c8e feat(lua): allow some viml functions to run in fast
This change adds the necessary plumbing to annotate functions in funcs.c
as being allowed in run in luv fast events.
2022-05-17 10:29:33 +01:00
zeertzjq
6613f58ceb
Merge pull request #18598 from zeertzjq/vim-8.2.4968
vim-patch:8.2.{4121,4968,4969}: invalid memory access
2022-05-17 08:47:45 +08:00
zeertzjq
527e861cbb vim-patch:8.2.4969: changing text in Visual mode may cause invalid memory access
Problem:    Changing text in Visual mode may cause invalid memory access.
Solution:   Check the Visual position after making a change.
7ce5b2b590
2022-05-17 08:16:37 +08:00
zeertzjq
26c906f54d vim-patch:8.2.4968: reading past end of the line when C-indenting
Problem:    Reading past end of the line when C-indenting.
Solution:   Check for NUL.
60ae0e7149
2022-05-17 08:16:31 +08:00
zeertzjq
b8c0eeaa30 vim-patch:8.2.4121: Visual test fails on MS-Windows
Problem:    Visual test fails on MS-Windows.
Solution:   Set 'isprint' so that the character used is not printable.
262898ae43
2022-05-17 08:16:31 +08:00
Gregory Anders
07ade91f21
docs: vim.regex is case sensitive by default (#18595) 2022-05-16 13:30:00 -06:00
bfredl
b9b5577d6d
Merge pull request #18578 from dundargoc/refactor/remove-char_u
refactor: remove char_u
2022-05-16 14:24:29 +02:00
Joshua Cao
14d653b421
feat(man.vim): list command flags in "gO" outline #17558 2022-05-16 04:49:44 -07:00
Dundar Goc
f0148de790 refactor: replace char_u variables and functions with char
Work on https://github.com/neovim/neovim/issues/459
2022-05-16 13:27:06 +02:00
Justin M. Keyes
7adecbcd29
fix(version.c): mark N/A vim patches #18587
vim-patch:8.0.1119: quitting a split terminal window kills the job
N/A, or tracked in https://github.com/neovim/neovim/issues/5431

vim-patch:8.0.1307: compiler warning for ignoring return value
N/A

vim-patch:8.0.1335: writefile() using fsync() may give an error
N/A

vim-patch:8.0.1339: no test for what 8.0.1335 fixes
already merged in 5972ff0056

vim-patch:8.0.1367: terminal test hangs, executing abcde
N/A

vim-patch:8.0.1562: the terminal debugger can't set breakpoint with mouse
we have all :Termdebug changes

vim-patch:8.0.1609: shell commands in the GUI use a dumb terminal
tracked in https://github.com/neovim/neovim/issues/5431

vim-patch:8.0.1616: Win32: shell commands in the GUI open a new console (guioptions="!")
tracked in https://github.com/neovim/neovim/issues/1496

vim-patch:8.0.1706: cannot sent CTRL-\ to a terminal window
already possible via :call chansend()
2022-05-16 03:23:36 -07:00
zeertzjq
cd998f8804
ci(coverity): correct cron job time #18590
The comment says it should be run at 00:10 UTC, and in cron job format
minutes come before hours.
2022-05-16 03:21:55 -07:00
ii14
e501e4ed4b
feat(lua): add traceback to vim.deprecate #18575 2022-05-15 18:07:36 -07:00
Marco Hinz
b2799518c7
feat(terminfo): bump built-in terminfo entries (#18570)
Removes NOLINT, which is pointless for the generated terminfo_defs.h.

Adds `uncrustify:off`, so it is not uncrustify which complains about the same
things (too long lines, no space after comma) instead.
2022-05-16 01:45:34 +02:00
dundargoc
f8af81445b
ci: remove mingw job #18580
Unnecessary CI builds increase the change of spurious failures, which are costly
noise. Of course, we should fix all legitimate bugs, but we also cannot
micro-manage every platform, so there needs to be a clear motivation for the CI
builds that we maintain.

Reasons against maintaining a mingw CI job:
1. The windows mingw build is slow.
2. Failures:
    - https://github.com/neovim/neovim/issues/18494
    - https://github.com/neovim/neovim/issues/18495
3. The mingw artifact is 10x bigger than the windows MSVC artifact:
   https://github.com/neovim/neovim/issues/10560
4. Our releases publish the MSVC (not mingw) artifact for Windows users:
   https://github.com/neovim/neovim/releases
5. Non-MSVCRT has limitations documented by libuv: http://docs.libuv.org/en/v1.x/process.html
   > On Windows file descriptors greater than 2 are available to the child process only if the child processes uses the MSVCRT runtime.

Closes https://github.com/neovim/neovim/issues/18551
2022-05-15 15:59:58 -07:00
Marco Hinz
59ba66d1ab
ci(clint): remove checks for whitespace after comma/semicolon (#18584)
uncrustify is the source of truth where possible.
Remove any redundant checks from clint.py.
See also https://github.com/neovim/neovim/pull/18563
2022-05-16 00:14:31 +02:00
Oliver Marriott
5e3b16836a
docs(api): nvim_set_hl attributes #18558 2022-05-15 14:06:06 -07:00
deforde
0a3d615b1c
fix(api): nvim_eval_statusline should validate input #18347
Fix #18112

Make an exception for strings starting with "%!".
2022-05-15 13:06:23 -07:00
dundargoc
19da1071dc
ci(clint): remove clint.py line length check #18574
uncrustify is the source of truth where possible.
Remove any redundant checks from clint.py.
See also https://github.com/neovim/neovim/pull/18563
2022-05-15 12:01:29 -07:00
bfredl
717560d221
Merge pull request #18581 from famiu/refactor/ui/vertsplit
refactor(ui)!: link `VertSplit` to `Normal` by default
2022-05-15 20:01:17 +02:00
Famiu Haque
bbf58e6bbc refactor(ui)!: link VertSplit to Normal by default
Avoids using `gui=reverse` on `VertSplit` and makes window separators
look much nicer by default.
2022-05-15 22:37:35 +06:00
dundargoc
a098e304b0
ci: enable tests on drafts as well #18566
previous: https://github.com/neovim/neovim/pull/14123

CI tests were disabled on drafts #18566 to manage the
large number of incoming jobs. While this did help, it had the drawback
of making the purpose of the ready-for-review a bit fuzzier. It went
from a clear "my PR is ready" signal to maintainers to somewhere between
"my PR is ready but I need the tests to confirm" to "please don't merge
yet, I just need to see the test results". Worse is that the specific
case of wanting to see the test results but not wanting it merged is
that this needs to be actively conveyed to the maintainers with a [DNM]
or a comment to not merge the PR yet. All of this causes weird
workarounds and noises which I believe isn't necessary.

The reason why I don't think this workaround is needed anymore is that
our CI now aborts a job if a new job from the same pull requests is
created, which makes the "10 simultaneous jobs per PR" situations that
triggered this not possible.
2022-05-15 08:18:38 -07:00
dundargoc
793496aecc
fix PVS warnings (#18459)
* fix(PVS/V547): remove ifs that are always true or false

* fix(PVS/V560): remove partial conditions that are always true

* fix(PVS/V1044): suppress warning about loop break conditions

* fix(PVS/V1063): suppress "modulo by 1 operation is meaningless"

* fix(PVS/V568): suppress "operator evaluates the size of a pointer"

Also mark vim-patch:8.2.4958 as ported.
2022-05-15 21:04:56 +08:00
dundargoc
4c7462fdb3
build: enable EXITFREE on Debug builds (#17783)
This makes it more convenient to find memory leaks since you don't need
to remember to set the EXITFREE flag every time you use valgrind or a
sanitizer.
2022-05-15 11:41:17 +02:00
dundargoc
b1b5802009
build(gen_vimdoc): eliminate non-constant global variables (#17781) 2022-05-15 11:23:56 +02:00
dundargoc
0a66c4a72a
docs(nvim_set_keymap): specify that optional arguments defaults to false (#18177)
Closes: https://github.com/neovim/neovim/issues/16919
2022-05-15 16:44:48 +08:00
Christian Clason
bc45b5be1c
vim-patch:partial: 30ab04e16e1e (#18568)
Update runtime files, new color schemes
30ab04e16e

Skip: doc/* (in-progress rewrite of the user manual on creating vim(9)script plugins)
2022-05-15 10:25:02 +02:00
dundargoc
0adc66171a
refactor(uncrustify): enable formatting for regexp and indent files (#18549)
The formatting for these files were originally disabled as to signal
that "we don't own these files", meaning we intentionally want to
minimize the amount of work put in these files as the return will be
very little. This unfortunately conflicts with other refactoring efforts
that happen to touch these files, and it's easier to simply enable
formatting.
2022-05-14 20:35:39 +02:00
Marco Hinz
83da441d16
Merge pull request #18537 from dundargoc/ci/clint
ci(clint): remove check for include order
2022-05-14 19:09:33 +02:00
Dundar Goc
3bd7246f5a ci(clint): remove check for include order
Uncrustify and clang-format are already both excellent at ordering
includes; this isn't something we need to check for ourselves. Also
remove the section on include order in the dev-style documentation.
2022-05-14 15:09:02 +02:00
Dundar Goc
adf967331f ci(clint): fix all pyright warnings 2022-05-14 15:09:02 +02:00
zeertzjq
d547e21f9e
Merge pull request #18567 from zeertzjq/vim-8.2.4951
vim-patch:8.2.{4951,4953}: with 'si' inserting char after completion goes wrong
2022-05-14 20:48:05 +08:00
zeertzjq
dca0412d37 vim-patch:8.2.4953: with 'si' inserting '}' after completion goes wrong
Problem:    With 'smartindent' inserting '}' after completion goes wrong.
Solution:   Check the cursor is in indent.  (closes vim/vim#10420)
2e444bbef0
2022-05-14 20:05:39 +08:00
zeertzjq
24eb1af475 vim-patch:8.2.4951: smart indenting done when not enabled
Problem:    Smart indenting done when not enabled.
Solution:   Check option values before setting can_si. (closes vim/vim#10420)
de5cf28781
2022-05-14 20:05:39 +08:00
bfredl
99f3e74fc2
Merge pull request #18542 from famiu/feat/api/nvim_cmd/kvec_t
refactor(api/nvim_cmd): use `kvec_t` for constructing cmdline string
2022-05-14 11:20:13 +02:00