| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
| |
Problem: No test for mode() when executing Ex commands
Solution: Add some test cases and simplify several other test cases.
Also add a few more test cases for ModeChanged.
closes: vim/vim#13588
https://github.com/vim/vim/commit/fcaeb3d42b228e73c669b2fce78f1d3fe112769f
|
|\
| |
| | |
feat(decoration): allow conceal_char to be a composing char
|
| |
| |
| |
| |
| |
| |
| |
| | |
decor->text.str pointer must go. This removes it for conceal char,
in preparation for a larger PR which will also handle the sign case.
By actually allowing composing chars for a conceal chars, this
becomes a feature and not just a refactor, as a bonus.
|
| | |
|
|/
|
|
|
|
|
|
| |
Problem: Cannot detect overstrike mode in Cmdline mode
Solution: Make mode() return "cr" for overstrike
closes: vim/vim#13569
https://github.com/vim/vim/commit/d1c3ef1f47c87d1da056c56564e1985fe6f2931d
|
|
|
|
|
|
|
| |
`vim.wait()` cannot be called in a fast callback since the main loop
cannot be run in that context as it is not reentrant
Fixes #26122
|
|
|
|
|
|
|
|
|
|
| |
runtime(doc): Fix whitespace and formatting of some help files (vim/vim#13549)
https://github.com/vim/vim/commit/596a9f29c83af85ace1a2702c88591851ad14df8
N/A patch:
vim-patch:aabca259fa48
Co-authored-by: h_east <h.east.727@gmail.com>
|
|\
| |
| | |
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: 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.
|
|/ |
|
|
|
|
|
|
|
| |
The 'termsync' option enables a mode (provided the underlying terminal
supports it) where all screen updates during a redraw cycle are buffered
and drawn together when the redraw is complete. This eliminates tearing
or flickering in cases where Nvim redraws slower than the terminal
redraws the screen.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: recursive callback may cause issues on some archs
Solution: Decrease the limit drastically to 20
Recursive callback limit causes problems on some architectures
Since commit 47510f3d6598a1218958c03ed11337a43b73f48d we have a test
that causes a recursive popup callback function to be executed. However
it seems the current limit of 'maxfuncdepth' option value is still too
recursive for some 32bit architectures (e.g. 32bit ARM).
So instead of allowing a default limit of 100 (default value for
'maxfuncdepth'), let's reduce this limit to 20. I don't think there is a
use case where one would need such a high recursive callback limit and a
limit of 20 seems reasonable (although it is currently hard-coded).
closes: vim/vim#13495
closes: vim/vim#13502
https://github.com/vim/vim/commit/2076463e383901cef44685aaf4b63e4306444f9e
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
|
|
|
|
|
|
|
| |
runtime(doc): clarify when formatoptions applies
closes: vim/vim#13503
https://github.com/vim/vim/commit/1b08d2cd0789fd9aaae148a64ff46342730022d7
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Not easy to filter the output of maplist().
Solution: Add mode_bits to the dictionary. (Ernie Rael, closes vim/vim#10356)
https://github.com/vim/vim/commit/d8f5f766219273a8579947cc80b92580b6988a4b
Co-authored-by: Ernie Rael <errael@raelity.com>
|
|
|
|
|
|
|
|
|
| |
Problem: It is not easy to restore saved mappings.
Solution: Make mapset() accept a dict argument. (Ernie Rael, closes vim/vim#10295)
https://github.com/vim/vim/commit/51d04d16f21e19d6eded98f9530d84089102f925
Co-authored-by: Ernie Rael <errael@raelity.com>
|
|
|
|
|
|
|
|
|
|
| |
Problem: Can only get a list of mappings.
Solution: Add the optional {abbr} argument. (Ernie Rael, closes vim/vim#10277)
Rename to maplist(). Rename test file.
https://github.com/vim/vim/commit/09661203ecefbee6a6f09438afcff1843e9dbfb4
Co-authored-by: Ernie Rael <errael@raelity.com>
|
|
|
|
|
|
|
|
|
| |
Problem: Not simple programmatic way to find a specific mapping.
Solution: Add getmappings(). (Ernie Rael, closes vim/vim#10273)
https://github.com/vim/vim/commit/659c240cf769925ff432b88df8719e7ace4629b0
Co-authored-by: Ernie Rael <errael@raelity.com>
|
|
|
|
|
|
|
|
|
| |
Problem: maparg() does not indicate the type of script where it was defined.
Solution: Add "scriptversion".
https://github.com/vim/vim/commit/a9528b39a666dbaa026320f73bae4b1628a7fe51
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: statusline may look different than expected
Solution: do not check for highlighting of stl and stlnc characters
statusline fillchar may be different than expected
If the highlighting group for the statusline for the current window
|hl-StatusLine| or the non-current window |hl-StatusLineNC| are cleared
(or do not differ from each other), than Vim will use the hard-coded
fallback values '^' (for the non-current windows) or '=' (for the
current window). I believe this was done, to make sure the statusline
will always be visible and be distinguishable from the rest of the
window.
However, this may be unexpected, if a user explicitly defined those
fillchar characters just to notice that those values are then not used
by Vim.
So, let's assume users know what they are doing and just always return
the configured stl and stlnc values. And if they want the statusline to
be non-distinguishable from the rest of the window space, so be it. It
is their responsibility and Vim shall not know better what to use.
fixes: vim/vim#13366
closes: vim/vim#13488
https://github.com/vim/vim/commit/6a650bf696f1df3214b3d788947447c5bbf1a77d
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|\
| |
| | |
feat(extmarks): add 'invalidate' property
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: No way to have extmarks automatically removed when the range it
is attached to is deleted.
Solution: Add new 'invalidate' property that will hide a mark when the
entirety of its range is deleted. When "undo_restore" is set
to false, delete the mark from the buffer instead.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
When the terminal emulator sends an OSC sequence to Nvim (as a response
to another OSC sequence that was first sent by Nvim), populate the OSC
sequence in the v:termresponse variable and fire the TermResponse event.
The escape sequence is also included in the "data" field of the
autocommand callback when the autocommand is defined in Lua.
This makes use of the already documented but unimplemented TermResponse
event. This event exists in Vim but is only fired when Vim receives a
primary device attributes response.
Fixes: https://github.com/neovim/neovim/issues/25856
|
|
|
| |
Add base64 encode() and decode() functions to a vim.base64 module.
|
|
|
|
| |
Co-authored-by: tmummert <doczook@gmx.de>
Co-authored-by: parikshit adhikari <parikshitadhikari@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
runtime(doc): all secure options should note this restriction in the documentation (vim/vim#13448)
Problem: Not all secure options document their status
Solution: Describe secure context :set restrictions in each help entry
https://github.com/vim/vim/commit/8ebdbc9e6d80b707c2b2d923e702dc86bf902923
Co-authored-by: dkearns <dougkearns@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
runtime(doc): Fix typos in several documents (vim/vim#13420)
* Fix typos in several documents
* Update runtime/doc/terminal.txt
https://github.com/vim/vim/commit/5985879e3c36383155f84649fa42d06813a1893e
Skip runtime/doc/indent.txt: not ported yet
Co-authored-by: h_east <h.east.727@gmail.com>
Co-authored-by: K.Takata <kentkt@csc.jp>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: trim(): hard to use default mask (partly revert v9.0.2040)
Solution: use default mask when it is empty
The default 'mask' value is pretty complex, as it includes many
characters. Yet, if one needs to specify the trimming direction, the
third argument, 'trim()' currently requires the 'mask' value to be
provided explicitly.
Currently, an empty 'mask' will make 'trim()' call return 'text' value
that is passed in unmodified. It is unlikely that someone is using it,
so the chances of scripts being broken by this change are low.
Also, this reverts commit 9.0.2040 (which uses v:none for the default
and requires to use an empty string instead).
closes: vim/vim#13358
https://github.com/vim/vim/commit/8079917447e7436dccc2e4cd4a4a56ae0a4712f2
vim-patch:9.0.2040: trim(): hard to use default mask
Problem: trim(): hard to use default mask
Solution: Use default 'mask' when it is v:none
The default 'mask' value is pretty complex, as it includes many
characters. Yet, if one needs to specify the trimming direction, the
third argument, 'trim()' currently requires the 'mask' value to be
provided explicitly.
'v:none' is already used to mean "use the default argument value" in
user defined functions. See |none-function_argument| in help.
closes: vim/vim#13363
https://github.com/vim/vim/commit/6e6386716f9494ae86027c6d34f657fd03dfec42
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: [security] use-after-free with wildmenu
Solution: properly clean up the wildmenu when exiting
Fix wildchar/wildmenu/pum memory corruption with special wildchar's
Currently, using `wildchar=<Esc>` or `wildchar=<C-\>` can lead to a
memory corruption if using wildmenu+pum, or wrong states if only using
wildmenu. This is due to the code only using one single place inside the
cmdline process loop to perform wild menu clean up (by checking
`end_wildmenu`) but there are other odd situations where the loop could
have exited and we need a post-loop clean up just to be sure. If the
clean up was not done you would have a stale popup menu referring to
invalid memory, or if not using popup menu, incorrect status line (if
`laststatus=0`).
For example, if you hit `<Esc>` two times when it's wildchar, there's a
hard-coded behavior to exit command-line as a failsafe for user, and if
you hit `<C-\><C-\><C-N>` it will also exit command-line, but the clean
up code would not have hit because of specialized `<C-\>` handling.
Fix Ctrl-E / Ctrl-Y to not cancel/accept wildmenu if they are also
used for 'wildchar'/'wildcharm'. Currently they don't behave properly,
and also have potentially memory unsafe behavior as the logic is
currently not accounting for this situation and try to do both.
(Previous patch that addressed this: vim/vim#11677)
Also, correctly document Escape key behavior (double-hit it to escape)
in wildchar docs as it's previously undocumented.
In addition, block known invalid chars to be set in `wildchar` option,
such as Ctrl-C and `<CR>`. This is just to make it clear to the user
they shouldn't be set, and is not required for this bug fix.
closes: vim/vim#13361
https://github.com/vim/vim/commit/8f4fb007e4d472b09ff6bed9ffa485e0c3093699
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Problem: Cannot accurately get mouse clicking position when clicking on
a TAB or with virtual text.
Solution: Add a "coladd" field to getmousepos() result.
closes: vim/vim#13335
https://github.com/vim/vim/commit/f5a94d5165bb9e390797da50a1fa7a87df3fbee4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: no max callback recursion limit
Solution: bail out, if max call recursion for callback functions
has been reached.
This checks the 'maxfuncdepth' setting and throws E169 when a callback
function recursively calls itself.
closes: vim/vim#13337
closes: vim/vim#13339
https://github.com/vim/vim/commit/47510f3d6598a1218958c03ed11337a43b73f48d
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
runtime(doc): Improve command-line completion docs (vim/vim#13331)
* Improve command-line completion docs
Add more details about 'ignorecase' and its effect on cmdline
completion.
Make sure keys used in wildmenu are properly documented and linked in the
keys' documentation entries, and in `:h index` for proper
cross-referencing, as wildmenu popup is slightly different from
insert-mode popup menu.
* Fix docs typos
https://github.com/vim/vim/commit/2bbd0d30eebdea66c0da3895e83d999ed6ad83fb
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: When clicking in the middle of a TAB, getmousepos() returns
the column of the next char instead of the TAB.
Solution: Break out of the loop when the vcol to find is inside current
char. Fix invalid memory access when calling virtcol2col() on
an empty line.
closes: vim/vim#13321
https://github.com/vim/vim/commit/b583eda7031b1f6a3469a2537d0c10ca5fa5568e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#25569)
Problem: cmdline-completion for comma-separated options wrong
Solution: Fix command-line expansions for options with filenames with
commas
Fix command-line expansions for options with filenames with commas
Cmdline expansion for option values that take a comma-separated list
of file names is currently not handling file names with commas as the
commas are not escaped. For such options, the commas in file names need
to be escaped (to differentiate from a comma that delimit the list
items). The escaped comma is unescaped in `copy_option_part()` during
option parsing.
Fix as follows:
- Cmdline completion for option values with comma-separated file/folder
names will not start a new match when seeing `\\,` and will instead
consider it as one value.
- File/folder regex matching will strip the `\\` when seeing `\\,` to
make sure it can match the correct files/folders.
- The expanded value will escape `,` with `\\,`, similar to how spaces
are escaped to make sure the option value is correct on the cmdline.
This fix also takes into account the fact that Win32 Vim handles file
name escaping differently. Typing '\,' for a file name results in it
being handled literally but in other platforms '\,' is interpreted as a
simple ',' and commas need to be escaped using '\\,' instead.
Also, make sure this new logic only applies to comma-separated options
like 'path'. Non-list options like 'set makeprg=<Tab>' and regular ex
commands like `:edit <Tab>` do not require escaping and will continue to
work.
Also fix up documentation to be clearer. The original docs are slightly
misleading in how it discusses triple slashes for 'tags'.
closes: vim/vim#13303
related: vim/vim#13301
https://github.com/vim/vim/commit/54844857fd6933fa4f6678e47610c4b9c9f7a091
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
|
|
|
| |
Removing this behavior causes more inconsistencies and bugs.
|
| |
|
|
|
|
|
|
| |
runtime(doc): remove E1520 tag (vim/vim#13289)
https://github.com/vim/vim/commit/27e12c7669e36a8f60fefa9db9a08024efeb06e8
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: strange error number
Solution: change error number,
add doc tag for E1507
closes: vim/vim#13270
https://github.com/vim/vim/commit/ea746f9e862092aef3d4e95c64d116759b9fabe0
Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
The swapfile "E325: ATTENTION" dialog is displayed when editing a file
already open in another (running) Nvim. Usually this behavior is
annoying and irrelevant:
- "Recover" and the other options ("Open readonly", "Quit", "Abort") are
almost never wanted.
- swapfiles are less relevant for "multi-Nvim" since 'autoread' is
enabled by default.
- Even less relevant if user enables 'autowrite'.
Solution:
Define a default SwapExists handler which does the following:
1. If the swapfile is owned by a running Nvim process, automatically
chooses "(E)dit anyway" (caveat: this creates a new, extra swapfile,
which is mostly harmless and ignored except by `:recover` or `nvim -r`.
2. Shows a 1-line "ignoring swapfile..." message.
3. Users can disable the default SwapExists handler via `autocmd! nvim_swapfile`.
|
|
|
|
|
|
|
|
|
|
| |
runtime(doc): add missing error numbers in the help. (vim/vim#13241)
closes: vim/vim#13240
https://github.com/vim/vim/commit/cd39b69b0200005622db7291bbacff95bd03a3d0
Co-authored-by: Yegappan Lakshmanan <4298407+yegappan@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
runtime(doc): mention how to disable folding in diff mode (vim/vim#13242)
https://github.com/vim/vim/commit/20f48d5b2ddb9fdc29e83f0da6f31f895eaeab47
Co-authored-by: dundargoc <33953936+dundargoc@users.noreply.github.com>
|
|\
| |
| | |
feat(ui): allow to get the highlight namespace. closes #24390
|
| | |
|
|\ \
| |/
|/| |
feat(float): support toggle show float window
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: error codes spread out
Solution: group them together and reserve 100
more for future use
Reserve 100 error codes for future enhancements to the Vim9 class
support
closes: vim/vim#13207
https://github.com/vim/vim/commit/413f83990f15d5d59d27ab741670f527a7a3feb8
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|/
|
|
|
| |
runtime(doc): mention mouse scrolling in scrollbind-quickadj (vim/vim#13190)
https://github.com/vim/vim/commit/5277cfaf8afe847b7d4dcde6057fbecb001ab64e
|