The needs:response label should only be added and removed manually, and
the action's behavior of removing the label on any activity (e.g. title
change, removing reviewers) is unwanted.
Allow Include What You Use to remove unnecessary includes and only
include what is necessary. This helps with reducing compilation times
and makes it easier to visualise which dependencies are actually
required.
Work on https://github.com/neovim/neovim/issues/549, but doesn't close
it since this only works fully for .c files and not headers.
Problem: Using freed memory after SpellFileMissing autocmd uses bwipe.
Solution: Bail out if the window no longer exists.
c3d27ada14
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: A silent mapping may cause dots on the command line.
Solution: Don't show dots for completion if they are not going to be removed
again. (closesvim/vim#11501)
698a00f55d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Coverity warns for dead code.
Solution: Remove the dead code.
b298fe6cba
Nvim has refactored this function and does not have the dead code.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Various code not used when features are disabled.
Solution: Add #ifdefs. (Dominique Pellé, closesvim/vim#9491)
748b308eeb
N/A patches for version.c:
vim-patch:8.2.2186: Vim9: error when using 'opfunc'
Problem: Vim9: error when using 'opfunc'.
Solution: Do not expect a return value from 'opfunc'. (closesvim/vim#7510)
5b3d1bb0f5
Problem: Insert complete code uses global variables.
Solution: Make variables local to the file and use accessor functions.
(Yegappan Lakshmanan, closesvim/vim#9470)
d94fbfc74a
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Code is indented more than needed.
Solution: Return early. (Yegappan Lakshmanan, closesvim/vim#11538)
623e94e138
Only port the first change to init_history() as Nvim has refactored it.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This is essentially a convenience wrapper around the `pending()`
function, similar to `skip_fragile()` but more general-purpose.
Also remove `pending_win32` function as it can be replaced by
`skip(iswin())`.
Problem: Duplicate arguments are not always detected.
Solution: Expand to full path before comparing arguments. (Nir Lichtman,
closesvim/vim#11505, closesvim/vim#9402)
b3052aa1b5
Co-authored-by: Nir Lichtman <nir@lichtman.org>
Problem: col() and charcol() only work for the current window.
Solution: Add an optional winid argument. (Yegappan Lakshmanan,
closesvim/vim#11466, closesvim/vim#11461)
4c8d2f02b3
Cherry-pick test_functions.vim change from patch 8.2.0633.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Bogus error when string used after :elseif.
Solution: Do not consider a double quote the start of a comment.
(closesvim/vim#11534)
28c56d5013
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Followup to #20883
Related: #18144
This patch changes the behavior of the default `vim.ui.input` when the user
aborts with `<C-c>`. Currently, it produces an error message + stack and causes
`on_confirm` to not be called. With this patch, `<C-c>` will cause `on_confirm`
to be called with `nil`, the same behavior as when the user aborts with `<Esc>`.
I can think of three good reasons why the behavior should be this way:
1. Easier for the user to understand** It's not intuitive for there to be two
ways to abort an input dialog that have _different_ outcomes. As a user,
I would expect any action that cancels the input to leave me in the same
state. As a plugin author, I see no value in having two possible outcomes for
aborting the input. I have to handle both cases, but I can't think of
a situation where I would want to treat one differently than the other.
2. Provides an API that can be overridden by other implementations** The current
contract of "throw an error upon `<C-c>`" cannot be replicated by async
implementations of `vim.ui.input`. If the callsite wants to handle the case
of the user hitting `<C-c>` they need to use `pcall(vim.ui.input, ...)`,
however an async implementation will instantly return and so there will be no
way for it to produce the same error-throwing behavior when the user inputs
`<C-c>`. This makes it impossible to be fully API-compatible with the
built-in `vim.ui.input`.
3. Provides a useful guarantee to the callsite** As a plugin author, I want the
guarantee that `on_confirm` will _always_ be called (only catastrophic errors
should prevent this). If I am in the middle of some async thread of logic,
I need some way to resume that logic after handing off control to
`vim.ui.input`. The only way to handle the `<C-c>` case is with `pcall`,
which as already mentioned, breaks down if you're using an alternative
implementation.
Problem: Shell command with just space gives strange error.
Solution: Skip white space at start of the argument. (Christian Brabandt,
Shane-XB-Qian, closesvim/vim#11515, closesvim/vim#11495)
4e7590ec00
Co-authored-by: shane.xb.qian <shane.qian@foxmail.com>
- If Nvim was just started, don't create a new tab.
- Name the buffer "health://".
- Use "help" syntax instead of "markdown". It fits better, and
eliminates various workarounds.
- Simplfy formatting, avoid visual noise.
- Don't print a "INFO" status, it is noisy.
- Drop the ":" after statuses, they are already UPPERCASE and highlighted.
Problem: Illegal memory access if popup menu items are changed while the
menu is visible. (Tomáš Janoušek)
Solution: Make a copy of the text. (closesvim/vim#7537)
38455a9213
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Solution for "!!sort" in closed fold is not optimal.
Solution: Use a different range instead of the subtle difference in handling
a range with an offset. (issue vim/vim#11487)
9954dc39ea
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Wrong argument for append() gives two error messages.
Solution: When getting an error for a number argument don't try using it as
a string. (closesvim/vim#11335)
801cd35e7e
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Assert_fails() setting emsg_silent changes normal execution.
Solution: Use a separate flag in_assert_fails.
28ee892ac4
Cherry-pick no_wait_return from patch 9.0.0846.
Co-authored-by: Bram Moolenaar <Bram@vim.org>