| Commit message (Collapse) | Author | Age |
... | |
| |
|
| |
|
|
|
|
| |
Move default mappings and autocommands into a separate module and add
comments and docstrings to document each of the defaults.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
Problem:
The next command after `silent !{cmd}` or `silent lua print('str')`
prints an empty line before printing a message, because these commands
set `msg_didout = true` despite not printing any messages.
Solution:
Set `msg_didout = true` only if `msg_silent == 0`
|
| |
|
|
|
|
|
|
| |
- Move vimoption_T to option.h
- option_defs.h is for option-related types
- option_vars.h corresponds to Vim's option.h
- option_defs.h and option_vars.h don't include each other
|
| |
|
|
|
|
|
| |
problem: there are too many different functions in message.c
solution: fold some of the functions into themselves
|
|
|
|
|
|
|
|
| |
Downloading the necessary files all at once instead of doing dependency
handling with luarocks speeds up installation immensely. We speed up the
process even more by using luv as a replacement for the C modules in the
busted dependencies, which allows us to skip costly compilation times.
Co-authored-by: bfredl <bjorn.linse@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ml_get_buf() takes a third parameters to indicate whether the
caller wants to mutate the memline data in place. However
the vast majority of the call sites is using this function
just to specify a buffer but without any mutation. This makes
it harder to grep for the places which actually perform mutation.
Solution: Remove the bool param from ml_get_buf(). it now works
like ml_get() except for a non-current buffer. Add a new
ml_get_buf_mut() function for the mutating use-case, which can
be grepped along with the other ml_replace() etc functions which
can modify the memline.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
followup to #24109
fix #16150
|
|
|
| |
Fixes #23914
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reduces the total number of khash_t instantiations from 22 to 8.
Make the khash internal functions take the size of values as a runtime
parameter. This is abstracted with typesafe Map containers which
are still specialized for both key, value type.
Introduce `Set(key)` type for when there is no value.
Refactor shada.c to use Map/Set instead of khash directly.
This requires `map_ref` operation to be more flexible.
Return pointers to both key and value, plus an indicator for new_item.
As a bonus, `map_key` is now redundant.
Instead of Map(cstr_t, FileMarks), use a pointer map as the FileMarks struct is
humongous.
Make `event_strings` actually work like an intern pool instead of wtf it
was doing before.
|
|
|
|
| |
Also do not crash when getting heredoc fails.
|
|
|
|
| |
Notable changes: replace all infinite loops to `while(true)` and remove
`int` from `unsigned int`.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
existing behavior of
:=
and
:[range]=
are unchanged. `|` is still allowed with this usage.
However,
:=p
and similar are changed in a way which could be construed as a breaking
change. Allowing |ex-flags| for := in the first place was a mistake as
any form of := DOES NOT MOVE THE CURSOR. So it would print one line number
and then print a completely different line contents after that.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
The function name `vim.pretty_print`:
1. is verbose, which partially defeats its purpose as sugar
2. does not draw from existing precedent or any sort of convention
(except external projects like penlight or python?), which reduces
discoverability, and degrades signaling about best practices.
Solution:
- Rename to `vim.print`.
- Change the behavior so that
1. strings are printed without quotes
2. each arg is printed on its own line
3. tables are indented with 2 instead of 4 spaces
- Example:
:lua ='a', 'b', 42, {a=3}
a
b
42
{
a = 3
}
Comparison of alternatives:
- `vim.print`:
- pro: consistent with Lua's `print()`
- pro: aligns with potential `nvim_print` API function which will
replace nvim_echo, nvim_notify, etc.
- con: behaves differently than Lua's `print()`, slightly misleading?
- `vim.echo`:
- pro: `:echo` has similar "pretty print" behavior.
- con: inconsistent with Lua idioms.
- `vim.p`:
- pro: very short, fits with `vim.o`, etc.
- con: not as discoverable as "echo"
- con: less opportunity for `local p = vim.p` because of potential shadowing.
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Autoload script sourced twice if sourced directly.
Solution: Do not source an autoload script again. (issue vim/vim#6644)
https://github.com/vim/vim/commit/daa2f36573db3e1df7eb1fdbc3a09a2815644048
Cherry-pick ret_sid changes from patch 8.2.0149.
Use do_in_runtimepath() as that's what source_runtime() calls in Nvim.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|\
| |
| | |
omnifunc for builtin lua
|
| |
| |
| |
| |
| |
| |
| | |
also make implicit submodules "uri" and "_inspector" work with completion
this is needed for `:lua=vim.uri_<tab>` wildmenu completion
to work even before uri or _inspector functions are used.
|
|/ |
|
| |
|
| |
|
|
|
|
|
| |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
1. Some calls to preserve_exit() don't put a message in IObuff, so the
IObuff printed by preserve_exit() contains unrelated information.
2. If a TUI client runs out of memory or receives a deadly signal, the
error message is shown on alternate screen and cannot be easily seen
because the TUI exits alternate screen soon afterwards.
Solution:
Pass error message to preserve_exit() and exit alternate screen before
printing it.
Note that this doesn't fix the problem that server error messages cannot
be easily seen on exit. This is tracked in #21608 and #21843.
|
| |
|
| |
|
|
|
|
|
| |
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
|
|
|
| |
Also add the EXITFREE definition to main_lib rather than the nvim target, as the header generation needs the EXITFREE flag to work properly.
|
|
|
|
|
| |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
| |
|
|
|
| |
fix(coverity): don't call kv_concat_len() when read_size is 0
|
| |
|
| |
|
| |
|