| Commit message (Collapse) | Author | Age |
|\ |
|
| |
| |
| |
| |
| |
| | |
A user function can clobber the repeat_cmdline, which is used to build
the redo buffer, thus, if the redo buffer is saved when calling a
userfunc, so should the repeat_cmdline.
|
|\ \ |
|
| |\ \ |
|
| |\ \ \ |
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is accomplished with adding a few new parameters to th e float
config:
* title: The title as a string
* title_pos: The position of the title
is one of:
* kTitleLeft
* kTitleCenter
* kTitleRight
The title does support statusline-esque highlighting semantics.
|
|\ \ \ \ |
|
| |\ \ \ \
| | | |_|/
| | |/| | |
|
| |\ \ \ \
| | | |_|/
| | |/| | |
|
| | | | | |
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This change unlocks additional registers for Neovim by allowing a user
to define their own behavior for non-builtin registers.
This is accopmlished through a new option 'userregfunc'
The 'userregfunc' defines the function to call when handling a register
for which there is no builtin functionality.
The 'userregfunc' function should take 3 arguments:
action - Either "yank" or "put"
register - The character corresponding to the register
content - In the case of action == "yank", the dictionary describing
the yanked content, with the following keys:
{type} - Either "char", "line" or "block"
{lines} - The lines being yanked as a list
{width} - The width in case of "block" mode.
{additional_data} - Additional data (can be returned in
"put" mode)
In case of "put" this function should return the content to put. This
content can be either:
* A dictionary in the same template as content above.
* A list of strings. This will be assumed to be "line" mode.
* A string. This will be assumed to be "char" mode.
An example of a "null" 'userregfunc' that provides an implementation
identical to traditional vim registers would be:
let s:contents = {}
function! MyUserregFunction(action, register, content) abort
if a:action == "put"
return get(s:contents, a:register, "")
else
let s:contents[a:register] = a:content
endif
endfunction
set userregfun=MyUserregFunction
It is important to note that any valid unicode character can now be a
register, including something like @☺.
This change also addresses the multibyte parsing issues surrounding
let @a = 'xyz'
let @🔨 = 'hammer'
|
|\ \ \ \
| | |_|/
| |/| | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Error messages for setcmdline() could be better.
Solution: Use more specific error messages. (Yegappan Lakshmanan,
closes vim/vim#10995)
https://github.com/vim/vim/commit/25f1e5556259d536c8608185145b0769262873ff
Cherry-pick tv_check_for_opt_number_arg() from Vim.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: There is no way to get the byte index from a virtual column.
Solution: Add virtcol2col(). (Yegappan Lakshmanan, closes vim/vim#10477,
closes vim/vim#10098)
https://github.com/vim/vim/commit/5a6ec10cc80ab02eeff644ab19b82312630ea855
Cherry-pick tv_check_for_number_arg() from Vim.
Cherry-pick pathshorten() doc change.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Vim9: not enough function arguments checked for string.
Solution: Check in balloon functions. Refactor function arguments.
https://github.com/vim/vim/commit/32105ae88f3aa6a6af30336f0bc9f8eb81292cd7
Cherry-pick removal of useless check from patch 8.2.3840.
vim-patch:8.2.3083: crash when passing null string to charclass()
Problem: Crash when passing null string to charclass().
Solution: Bail out when string pointer is NULL. (Christian Brabandt,
closes vim/vim#8498, closes vim/vim#8260)
https://github.com/vim/vim/commit/72463f883cdfd08e29ab0018ef3889284848d5f1
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Vim9: error for not using string doesn't mention argument.
Solution: Add argument number.
https://github.com/vim/vim/commit/f28f2ac425600b88da0bdcc12a82cd620f575681
|
| | | |
| | | |
| | | |
| | | | |
Work on https://github.com/neovim/neovim/issues/459
|
| | | |
| | | |
| | | |
| | | | |
Work on https://github.com/neovim/neovim/issues/459
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
"cfuncs" was only ever used to wrap luarefs. As vim8script is
finished and will not be developed further, support for "cfuncs"
for other usecases are not planned. This abstraction was immediately
broken anyway in order to get luarefs out of userfuncs again.
Even if a new kind of userfunc needs to be invented in the future,
likely just extending the FC_... flag union directy, instead of
invoking unnecessary heap object and c function pointer indirection,
will be a more straightforward design pattern.
|
| | | |
| | | |
| | | |
| | | | |
Work on https://github.com/neovim/neovim/issues/459
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Done automatically using the following perl command:
perl -pi -0777pe 's#\n\K */\*\n(.+?)\s*\*/\n#join("\n", map { $_ =~ s:^\s*\K \*://:; $_ } split("\n", $1)) . "\n"#sge' src/nvim/**/*.c
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| | | |
| | | |
| | | |
| | | | |
Work on https://github.com/neovim/neovim/issues/459
|
| | | |
| | | |
| | | |
| | | | |
Work on https://github.com/neovim/neovim/issues/459
|
| | | |
| | | |
| | | |
| | | | |
Work on https://github.com/neovim/neovim/issues/459
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Insufficient testing for exception handling and the "attention"
prompt.
Solution: Add test cases. (Yegappan Lakshmanan, closes vim/vim#5681)
https://github.com/vim/vim/commit/b654103ad1e379348616f354272db86804ab4bdb
Fix memory leak from last char_u refactor.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Can call win_gotoid() in cmdline window.
Solution: Disallow switching windows. (Yasuhiro Matsumoto, closes vim/vim#4940)
https://github.com/vim/vim/commit/a046b37c22bcabdea5f0fd6d21ca4bd0aa4c768e
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
`!did_throw` doesn't exactly imply `!current_exception`, as `did_throw = false`
is sometimes used to defer exception handling for later (without forgetting the
exception). E.g: uncaught exception handling in `do_cmdline()` may be deferred
to a different call (e.g: when `try_level > 0`).
In #7881, `current_exception = NULL` in `do_cmdline()` is used as an analogue of
`did_throw = false`, but also causes the pending exception to be lost, which
also leaks as `discard_exception()` wasn't used.
It may be possible to fix this by saving/restoring `current_exception`, but
handling all of `did_throw`'s edge cases seems messier. Maybe not worth
diverging over.
This fix also uncovers a `man_spec.lua` bug on Windows: exceptions are thrown
due to Windows missing `man`, but they're lost; skip these tests if `man` isn't
executable.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Work on https://github.com/neovim/neovim/issues/459
|
| |\ \ \
| | | | |
| | | | | |
refactor: replace char_u with char 2: electric chaaralo
|
| | | | |
| | | | |
| | | | |
| | | | | |
Work on https://github.com/neovim/neovim/issues/459
|
| |\ \ \ \
| | | | | |
| | | | | | |
refactor(plines): use a struct for chartabsize state
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This is a refactor extracted from vim-patch 9.0.0067: cannot show virtual text
The logic for inline virtual text is going to be different in nvim than
text property based text in vim, but this refactor is still useful,
as calculation of displayed linesize is going to be stateful in a
similar way.
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
(#19979)
vim-patch:9.0.0285: it is not easy to change the command line from a plugin
Problem: It is not easy to change the command line from a plugin.
Solution: Add setcmdline(). (Shougo Matsushita, closes vim/vim#10869)
https://github.com/vim/vim/commit/07ea5f1509fe8dafe3262ed2702b4d0fc99e288b
|
| | | |
| | | |
| | | |
| | | | |
Work on https://github.com/neovim/neovim/issues/459
|
| | | |
| | | |
| | | |
| | | | |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| | | |
| | | |
| | | |
| | | | |
Work on https://github.com/neovim/neovim/issues/459
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Warning for uninitialized variable.
Solution: Initialize the variable.
https://github.com/vim/vim/commit/0fd797eacd569a0680a86452c18713eacf6608fe
|
| |\ \ \
| | | | |
| | | | | |
perf(api): allow to use an arena for return values
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Make the copy_object() family accept an optional arena. More than
half of the callsites should be refactored to use an arena later
anyway.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This is both simpler in client code and more effective (always reuse
block hottest in cache)
|
| | | |/
| | |/| |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In non-multigrid UI the only change is that the returned height now
excludes winbar, and this is compatible with Vim.
In multigrid UI this means the return value of these functions now
reflect the space available for buffer lines in a window.
No change in nvim_win_get_height() and nvim_win_get_width().
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Redraw flags are not named specifically.
Solution: Prefix "UPD_" to the flags, for UPDate_screen().
https://github.com/vim/vim/commit/a4d158b3c839e96ed98ff87c7b7124ff4518c4ff
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Empty string considered an error for expand() when 'verbose' is
set. (Christian Brabandt)
Solution: Do not give an error for an empty result. (closes vim/vim#10307)
https://github.com/vim/vim/commit/a96edb736d4274fc4aea460800780e06e1510812
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: When expand() fails there is no error message.
Solution: When 'verbose' is set give an error message.
https://github.com/vim/vim/commit/575445200bd35283191ecd7a0d596b37c5b477a4
|