| Commit message (Collapse) | Author | Age |
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(#26207)
Problem: When a swap file is found for a popup there is no dialog and the
buffer is loaded anyway.
Solution: Silently load the buffer read-only. (closes vim/vim#10073)
https://github.com/vim/vim/commit/188639d75c363dffaf813e8e2209f7350ad1e871
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
| |
Enable all clang-tidy warnings by default instead of disabling them.
This ensures that we don't miss useful warnings on each clang-tidy
version upgrade. A drawback of this is that it will force us to either
fix or adjust the warnings as soon as possible.
|
|
|
|
|
|
| |
This requires removing the "Inner expression should be aligned" rule
from clint as it prevents essentially any formatting regarding ternary
operators.
|
|\
| |
| | |
refactor(sign): move legacy signs to extmarks
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: The legacy signlist data structures and associated functions are
redundant since the introduction of extmark signs.
Solution: Store signs defined through the legacy commands in a hashmap, placed
signs in the extmark tree. Replace signlist associated functions.
Usage of the legacy sign commands should yield no change in behavior with the
exception of:
- "orphaned signs" are now always removed when the line it is placed on is
deleted. This used to depend on the value of 'signcolumn'.
- It is no longer possible to place multiple signs with the same identifier
in a single group on multiple lines. This will now move the sign instead.
Moreover, both signs placed through the legacy sign commands and through
|nvim_buf_set_extmark()|:
- Will show up in both |sign-place| and |nvim_buf_get_extmarks()|.
- Are displayed by increasing sign identifier, left to right.
Extmark signs used to be ordered decreasingly as opposed to legacy signs.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: [security]: overflow with count for :s command
Solution: Abort the :s command if the count is too large
If the count after the :s command is larger than what fits into a
(signed) long variable, abort with e_value_too_large.
Adds a test with INT_MAX as count and verify it correctly fails.
It seems the return value on Windows using mingw compiler wraps around,
so the initial test using :s/./b/9999999999999999999999999990 doesn't
fail there, since the count is wrapping around several times and finally
is no longer larger than 2147483647. So let's just use 2147483647 in the
test, which hopefully will always cause a failure
https://github.com/vim/vim/commit/ac63787734fda2e294e477af52b3bd601517fa78
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
|
|
|
| |
It is less error-prone than manually defining header guards. Pretty much
all compilers support it even if it's not part of the C standard.
|
|
|
|
|
|
|
| |
We already have an extensive suite of static analysis tools we use,
which causes a fair bit of redundancy as we get duplicate warnings. PVS
is also prone to give false warnings which creates a lot of work to
identify and disable.
|
|
|
|
|
| |
Uncrustify is the source of truth where possible.
Remove any redundant checks from clint.py.
|
| |
|
|
|
|
|
|
| |
long is 32 bits on windows, while it is 64 bits on other architectures.
This makes the type suboptimal for a codebase meant to be
cross-platform. Replace it with more appropriate integer types.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Disallow closing the previous window from `nvim_win_close`, as this will cause
issues.
Again, no telling how safe this is. It also requires exposing old_curwin. :/
Also note that it's possible for the `&cmdheight` to change if, for example,
there are 2 tabpages and `nvim_win_close` is used to close the last window in
the other tabpage while `&stal` is 1. This is addressed in a later commit.
|
|
|
|
|
| |
long is 32-bits even on 64-bit windows which makes the type suboptimal
for a codebase meant to be cross-platform.
|
|
|
|
|
|
|
|
|
|
|
| |
times (#23965)
Problem: FILETYPE_FILE is defined to the same value multiple times. Same
for a few similar macros.
Solution: Define FILETYPE_FILE and others in feature.h only
https://github.com/vim/vim/commit/c81dfaa69ceec9f6b88caf1dcdf2f859d4fcae47
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
| |
This reverts commit 82cd0be2eaf71c0476e15c66ba3e83c76896d407.
|
|
|
|
|
|
|
|
| |
Removes the `getoption_T` struct and also introduces the `OptVal` struct
to unify the methods of getting/setting different option value types.
This is the first of many PRs to reduce code duplication in the Vim
option code as well as to make options easier to maintain. It also
increases the flexibility and extensibility of options. Which opens the
door for things like Array and Dictionary options.
|
|
|
|
|
|
| |
Problem: Some error messages are not marked for translation.
Solution: Surround the messages in _(). (closes vim/vim#12356)
https://github.com/vim/vim/commit/276410e78f0b82e3123059383994d2f4c578dfbd
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Making a mapping work in all modes is complicated.
Solution: Add the <Cmd> special key. (Yegappan Lakshmanan, closes vim/vim#7282,
closes 4784, based on patch by Bjorn Linse)
https://github.com/vim/vim/commit/957cf67d50516ba98716f59c9e1cb6412ec1535d
Change docs to match Vim if it's wording is better.
Change error numbers to match Vim.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Slightly inconsistent error messages.
Solution: Make it "Using a Float". (closes vim/vim#10959)
https://github.com/vim/vim/commit/dde77a7c4d72622284dc5fb72557bde42c314fa6
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Inconsistent capitalization in error messages.
Solution: Make capitalization consistent. (Doug Kearns)
https://github.com/vim/vim/commit/cf030578b26460643dca4a40e7f2e3bc19c749aa
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Functions for string manipulation are spread out.
Solution: Move string related functions to a new source file. (Yegappan
Lakshmanan, closes vim/vim#8470)
https://github.com/vim/vim/commit/a2438132a675be4dde3acbdf03ba1fdb2f09427c
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: The :defer command does not check the function argument count and
types.
Solution: Check the function arguments when adding a deferred function.
https://github.com/vim/vim/commit/169003289fb4b2ad18fd7f5807e0d05efff0be85
Cherry-pick check_internal_func() from Vim, but use EvalFuncDef pointer
as first argument.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
| |
Problem: Vim9: exception in ISN_INSTR caught at wrong level.
Solution: Set the starting trylevel in exec_instructions(). (closes vim/vim#8214)
https://github.com/vim/vim/commit/ff65288aa89dcd50760ad942d58baff70c6e93e6
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Cleaning up afterwards can make a function messy.
Solution: Add the :defer command.
https://github.com/vim/vim/commit/1d84f7608f1e41dad03b8cc7925895437775f7c0
Omit EX_EXPR_ARG: Vim9 script only.
Make :def throw E319 to avoid confusing behavior.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
| |
Problem: Confusing error for using a variable as a function.
Solution: If a function is not found but there is a variable, give a more
useful error. (issue vim/vim#9310)
https://github.com/vim/vim/commit/2ef9156b4284e4a52613c36e3d4667245273a28d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: String interpolation only works in heredoc.
Solution: Support interpolated strings. Use syntax for heredoc consistent
with strings, similar to C#. (closes vim/vim#10327)
https://github.com/vim/vim/commit/2eaef106e4a7fc9dc74a7e672b5f550ec1f9786e
Cherry-pick Test_Debugger_breakadd_expr() from Vim.
Co-authored-by: LemonBoy <thatlemon@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Problem: Using null object with execute() has strange effects.
Solution: Give an error message ofr Job and Channel.
https://github.com/vim/vim/commit/e2a8f0773e91685843c062b1e48259712d5f2213
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
| |
message.c functions now take const char * as a format. Error message
definitions can be made const.
|
| |
|
|
|
|
|
| |
- Also adjust the expr-mapping behaviour so normal commands and text
changes are allowed in internal dummy buffers.
|
| |
|
|
|
|
| |
The :version output is already crowded as is, the last thing we need is
extraneous messages about who compiled it.
|
|
|
|
|
| |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
| |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
|\
| |
| | |
feat(api): show more exception info
|
| |
| |
| |
| |
| |
| | |
Now with try_end() including more exception info, E5500 looks like
redundant information.
Adjust tests for more exception information.
|
|/
|
|
|
|
|
| |
- Use the correct fd to replace stdin on windows (CONIN)
- Don't start the TUI if there are no tty fd (not a regression,
but makes sense regardless)
- De-mythologize "global input fd". it is just STDIN.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix remaining clint errors and remove error suppression completely.
Rename the lint targets to align with the established naming convention:
- lintc-clint lints with clint.py.
- lintc-uncrustify lints with uncrustify.
- lintc runs both targets.
lintc is also provided as a make target for convenience.
After this change we can remove these files:
https://github.com/neovim/doc/tree/gh-pages/reports/clint
https://github.com/neovim/doc/blob/main/ci/clint-errors.sh
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Nvim has Lua but the "nvim" CLI can't easily be used to execute Lua
scripts, especially scripts that take arguments or produce output.
Solution:
- support "nvim -l [args...]" for running scripts. closes #15749
- exit without +q
- remove lua2dox_filter
- remove Doxyfile. This wasn't used anyway, because the doxygen config
is inlined in gen_vimdoc.py (`Doxyfile` variable).
- use "nvim -l" in docs-gen CI job
Examples:
$ nvim -l scripts/lua2dox.lua --help
Lua2DoX (0.2 20130128)
...
$ echo "print(vim.inspect(_G.arg))" | nvim -l - --arg1 --arg2
$ echo 'print(vim.inspect(vim.api.nvim_buf_get_text(1,0,0,-1,-1,{})))' | nvim +"put ='text'" -l -
TODO?
-e executes Lua code
-l loads a module
-i enters REPL _after running the other arguments_.
|
|
|
| |
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Problem: Unused global variable.
Solution: Remove the variable. (closes vim/vim#11752)
https://github.com/vim/vim/commit/b536540ab3c13db629432c411e92c05c4a3808ba
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem: ml_get error when using screenpos().
Solution: Give an error for the line number. (closes vim/vim#11661)
https://github.com/vim/vim/commit/99d19438cabaf13074229d9a32e3a4af9ce98744
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|