| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
buffer (#27819)
Problem: Internal error with blockwise getregion() in another buffer
Solution: Also change curwin->w_buffer when changing curbuf (zeertzjq)
closes: vim/vim#14179
https://github.com/vim/vim/commit/5406eb8722bddb6a04876956f9a53c1752994851
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
getregion() (#27805)
Problem: Internal error or crash when passing invalid position to
getregion().
Solution: Give an error for invalid position (zeertzjq).
closes: vim/vim#14172
https://github.com/vim/vim/commit/26dd09ad5e86f4e2179be0181421bfab9a6b3b75
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Duplicate assignment in f_getregion().
Solution: Remove the duplicate assignment. Also improve getregion()
docs wording and fix an unrelated typo (zeertzjq)
closes: vim/vim#14154
https://github.com/vim/vim/commit/0df8f93bdaea77a1afb9f4eca94fe67ec73e6df2
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: can only call getregion() for current buffer
Solution: Allow to retrieve selections from different buffers
(Shougo Matsushita)
closes: vim/vim#14131
https://github.com/vim/vim/commit/84bf6e658da51126bdd2e50af1f40cabd149343f
Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
|
| |
| |
| |
| | |
Problem: has('pythonx') always returns 1.
Solution: Make it the same as has('python3').
|
| |
| |
| |
| |
| | |
Currently returns 0 on failure, but should return an empty list (or blob).
Regressed in the big blob port of '21 (#15211).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: getregion() can be improved (after v9.1.120)
Solution: change getregion() implementation to use pos as lists and
one optional {opt} dictionary (Shougo Matsushita)
Note: The following is a breaking change!
Currently, the getregion() function (included as of patch v9.1.120) takes
3 arguments: the first 2 arguments are strings, describing a position,
arg3 is the type string.
However, that is slightly inflexible, there is no way to specify
additional arguments. So let's instead change the function signature to:
getregion(pos1, pos2 [, {Dict}]) where both pos1 and pos2 are lists.
This is slightly cleaner, and gives us the flexibility to specify
additional arguments as key/value pairs to the optional Dict arg.
Now it supports the "type" key to specify the selection type
(characterwise, blockwise or linewise) and now in addition one can also
define the selection type, independently of what the 'selection' option
actually is.
Technically, this is a breaking change, but since the getregion()
Vimscript function is still quite new, this should be fine.
closes: vim/vim#14090
https://github.com/vim/vim/commit/19b718828d8d5fab52d94c6cdba694641879ab38
Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Then we can just load metadata in C as a single msgpack blob. Which also
can be used directly as binarly data, instead of first unpacking all the
functions and ui_events metadata to immediately pack it again, which was
a bit of a silly walk (and one extra usecase of `msgpack_rpc_from_object`
which will get yak shaved in the next PR)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Naming a non-pointer variable "oap" is strange.
Solution: Rename it to "oa". Also prevent using freed memory in case of
memory allocation failure. (zeertzjq)
closes: vim/vim#14075
https://github.com/vim/vim/commit/5e3674b42da10b7e7c72d1f20f9a15379af1b60a
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Internal error when passing mark in another buffer to
getregion().
Solution: Don't allow marks in another buffer (zeertzjq)
closes: vim/vim#14076
Internal error when passing mark in another buffer to getregion()
https://github.com/vim/vim/commit/421b597470c118871c7081de00dd065e0e000b7e
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: hard to get visual region using Vim script
Solution: Add getregion() Vim script function
(Shougo Matsushita, Jakub Łuczyński)
closes: vim/vim#13998
closes: vim/vim#11579
https://github.com/vim/vim/commit/3f905ab3c4f66562f4a224bf00f49d98a0b0da91
Cherry-pick changes from patch 9.1.0122, with :echom instead of :echow.
Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As only a few API functions make use of explicit freeing of the return
value, make it opt-in instead. The arena is always present under the
hood, so `Arena *arena` arg now doesn't mean anything other than getting
access to this arena. Also it is in principle possible to return an
allocated value while still using the arena as scratch space for other
stuff (unlikely, but there no reason to not allow it).
|
| |\
| | |
| | | |
refactor(api): use arena for mappings, autocmd, channel info
|
| | | |
|
| |/
| |
| |
| | |
Problem: Error when parsing v:lua in a ternary expression.
Solution: Set rettv->v_type for v:lua even if not evaluating.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Note: this contains two _temporary_ changes which can be reverted
once the Arena vs no-Arena distinction in API wrappers has been removed.
Both nlua_push_Object and object_to_vim_take_luaref() has been changed
to take the object argument as a pointer. This is not going to be
necessary once these are only used with arena (or not at all) allocated
Objects.
The object_to_vim() variant which leaves luaref untouched might need to
stay for a little longer.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
and for return value of nlua_exec/nlua_call_ref, as this uses
the same family of functions.
NB: the handling of luaref:s is a bit of a mess.
add api_luarefs_free_XX functions as a stop-gap as refactoring
luarefs is a can of worms for another PR:s.
as a minor feature/bug-fix, nvim_buf_call and nvim_win_call now preserves
arbitrary return values.
|
| |
| |
| |
| |
| | |
In the context a String inside an Object/Dictionary etc is consumed,
it is considered to be read-only.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Code is indented too much.
Solution: Use an early return. (Yegappan Lakshmanan, closes vim/vim#11756)
https://github.com/vim/vim/commit/87c1cbbe984e60582f2536e4d3c2ce88cd474bb7
Omit free_eval_tofree_later(): Vim9 script only.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Cannot easily get the list of matches
Solution: Add the matchstrlist() and matchbufline() Vim script
functions (Yegappan Lakshmanan)
closes: vim/vim#13766
Omit CHECK_LIST_MATERIALIZE(): it populates a List with numbers only,
and there is a check for strings below.
https://github.com/vim/vim/commit/f93b1c881a99fa847a1bafa71877d7e16f18e6ef
vim-patch:eb3475df0d92
runtime(doc): Replace non-breaking space with normal space (vim/vim#13868)
https://github.com/vim/vim/commit/eb3475df0d927a178789cf8e7fc4983932e1cdbe
Co-authored-by: Yegappan Lakshmanan <4298407+yegappan@users.noreply.github.com>
|
| |
| |
| |
| |
| |
| | |
Remove `export` pramgas from defs headers as it causes IWYU to believe
that the definitions from the defs headers comes from main header, which
is not what we really want.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A bit big, but practically it was a lot simpler to change over all
fillchars and all listchars at once, to not need to maintain two
parallel implementations.
This is mostly an internal refactor, but it also removes an arbitrary
limitation: that 'fillchars' and 'listchars' values can only be
single-codepoint characters. Now any character which fits into a single
screen cell can be used.
|
| | |
|
| |
| |
| |
| | |
Reference: https://github.com/neovim/neovim/issues/6371.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Specifically, specify that each initialization should be done on a
separate line.
|
| | |
|
| |
| |
| |
| | |
Problem: Vimscript function exists() can't check v:lua functions.
Solution: Add support for v:lua functions to exists().
|
| |
| |
| |
| |
| |
| | |
Problem: Many places in the code use `findoption()` to access an option using its name, even if the option index is available. This is very slow because it requires looping through the options array over and over.
Solution: Use option index instead of name wherever possible. Also introduce an `OptIndex` enum which contains the index for every option as enum constants, this eliminates the need to pass static option names as strings.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Since the parent commit, object_to_vim() can't fail, so callers don't
need to check its result.
|
| |
| |
| |
| | |
If $COLORTERM is "truecolor" but the user sets 'notermguicolors',
propagating $COLORTERM to :terminal usually doesn't work well.
|
| |
| |
| |
| |
| |
| | |
FUNC_ATTR_* should only be used in .c files with generated headers.
Defining FUNC_ATTR_* as empty in headers causes misuses of them to be
silently ignored. Instead don't define them by default, and only define
them as empty after a .c file has included its generated header.
|
|\| |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Create mapping to most of the C spec and some POSIX specific functions.
This is more robust than relying files shipped with IWYU.
|
| |
| |
| |
| |
| |
| | |
This requires removing the "Inner expression should be aligned" rule
from clint as it prevents essentially any formatting regarding ternary
operators.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: buffer text with composing chars are converted from UTF-8
to an array of up to seven UTF-32 values and then converted back
to UTF-8 strings.
Solution: Convert buffer text directly to UTF-8 based schar_T values.
The limit of the text size is now in schar_T bytes, which is currently
31+1 but easily could be raised as it no longer multiplies the size
of the entire screen grid when not used, the full size is only required
for temporary scratch buffers.
Also does some general cleanup to win_line text handling, which was
unnecessarily complicated due to multibyte rendering being an "opt-in"
feature long ago. Nowadays, a char is just a char, regardless if it consists
of one ASCII byte or multiple bytes.
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Note: The crash happens in the second test case when using uninitialized
memory, and therefore doesn't happen with ASAN.
|
| | |
|