| Commit message (Collapse) | Author | Age |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
runtime(doc): Add a missing '<' to the help of strutf16len() (vim/vim#13168)
https://github.com/vim/vim/commit/790f9a890ceeb9539776265cba0f026fb2c96790
Co-authored-by: a5ob7r <12132068+a5ob7r@users.noreply.github.com>
|
|/ / |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Not everything needs to be crazy overconfigurable.
Also fixes a warning in latest clang which didn't approve of
the funky math switch statement in append_arg_number
|
|\ \
| | |
| | | |
docs: add more context to vim.schedule_wrap
|
| | |
| | |
| | |
| | |
| | | |
Per https://github.com/neovim/neovim/pull/25286#discussion_r1332861721
and https://github.com/neovim/neovim/pull/25286#discussion_r1334318352
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: not possible to use the jumplist like a stack
Solution: Add the 'jumpoptions' setting to make the jumplist
a stack.
Add an option for using jumplist like tag stack
related: vim/vim#7738
closes: vim/vim#13134
ported from NeoVim:
- https://neovim.io/doc/user/motion.html#jumplist-stack
- neovim/neovim@39094b3
- https://vi.stackexchange.com/questions/18344/how-to-change-jumplist-behavior
Based on the feedback in the previous PR, it looks like many people like
this option.
https://github.com/vim/vim/commit/87018255e3ad0f4dfa03e20318836d24af721caf
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Co-authored-by: butwerenotthereyet <58348703+butwerenotthereyet@users.noreply.github.com>
|
| |
| |
| |
| | |
fix #24699
fix #25253
|
|\ \
| | |
| | | |
refactor(grid): change schar_T representation to be more compact
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, a screen cell would occupy 28+4=32 bytes per cell
as we always made space for up to MAX_MCO+1 codepoints in a cell.
As an example, even a pretty modest 50*80 screen would consume
50*80*2*32 = 256000, i e a quarter megabyte
With the factor of two due to the TUI side buffer, and even more when
using msg_grid and/or ext_multigrid.
This instead stores a 4-byte union of either:
- a valid UTF-8 sequence up to 4 bytes
- an escape char which is invalid UTF-8 (0xFF) plus a 24-bit index to a
glyph cache
This avoids allocating space for huge composed glyphs _upfront_, while
still keeping rendering such glyphs reasonably fast (1 hash table lookup
+ one plain index lookup). If the same large glyphs are using repeatedly
on the screen, this is still a net reduction of memory/cache
consumption. The only case which really gets worse is if you blast
the screen full with crazy emojis and zalgo text and even this case
only leads to 4 extra bytes per char.
When only <= 4-byte glyphs are used, plus the 4-byte attribute code,
i e 8 bytes in total there is a factor of four reduction of memory use.
Memory which will be quite hot in cache as the screen buffer is scanned
over in win_line() buffer text drawing
A slight complication is that the representation depends on host byte
order. I've tested this manually by compling and running this
in qemu-s390x and it works fine. We might add a qemu based solution
to CI at some point.
|
|\ \
| |/
|/| |
fix(float): add fixed option
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
| |
Co-authored-by: nuid64 <lvkuzvesov@proton.me>
Co-authored-by: Mike Smith <10135646+mikesmithgh@users.noreply.github.com>
Co-authored-by: XTY <xty@xty.io>
Co-authored-by: Empa <emanuel@empa.xyz>
Co-authored-by: kyu08 <49891479+kyu08@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The removes the previous restriction that nvim_buf_set_extmark()
could not be used to highlight arbitrary multi-line regions
The problem can be summarized as follows: let's assume an extmark with a
hl_group is placed covering the region (5,0) to (50,0) Now, consider
what happens if nvim needs to redraw a window covering the lines 20-30.
It needs to be able to ask the marktree what extmarks cover this region,
even if they don't begin or end here.
Therefore the marktree needs to be augmented with the information covers
a point, not just what marks begin or end there. To do this, we augment
each node with a field "intersect" which is a set the ids of the
marks which overlap this node, but only if it is not part of the set of
any parent. This ensures the number of nodes that need to be explicitly
marked grows only logarithmically with the total number of explicitly
nodes (and thus the number of of overlapping marks).
Thus we can quickly iterate all marks which overlaps any query position
by looking up what leaf node contains that position. Then we only need
to consider all "start" marks within that leaf node, and the "intersect"
set of that node and all its parents.
Now, and the major source of complexity is that the tree restructuring
operations (to ensure that each node has T-1 <= size <= 2*T-1) also need
to update these sets. If a full inner node is split in two, one of the
new parents might start to completely overlap some ranges and its ids
will need to be moved from its children's sets to its own set.
Similarly, if two undersized nodes gets joined into one, it might no
longer completely overlap some ranges, and now the children which do
needs to have the have the ids in its set instead. And then there are
the pivots! Yes the pivot operations when a child gets moved from one
parent to another.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
* The guessed botline might be smaller than the actual botline e.g. when
there are folds and the user is typing in insert mode. This may result
in incorrect treesitter highlights for injections.
* botline can be larger than the last line number of the buffer, which
results in errors when placing extmarks.
Solution:
* Take a more conservative approximation. I am not sure if it is
sufficient to guarantee correctness, but it seems to be good enough
for the case mentioned above.
* Clamp it to the last line number.
Co-authored-by: Lewis Russell <me@lewisr.dev>
|
|
|
|
| |
Fixes #22526
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: issues with formatting positional arguments
Solution: fix them, add tests and documentation
closes: vim/vim#12140
closes: vim/vim#12985
Tentatively fix message_test. Check NULL ptr.
https://github.com/vim/vim/commit/aa90d4f031f73a34aaef5746931ea746849a2231
Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
|
|
|
|
| |
The field `icon` is not a mandatory field.
|
| |
|
|
|
|
|
| |
* fix(types): add some return/parameter type annotations
* fix(types): narrow stdpath parameter further
|
|
|
|
|
|
| |
Problem: No clear separation of floating title and footer highlighting.
Solution: Add new `FloatFooter` highlight group.
|
|
|
|
|
|
|
|
| |
Problem: Now way to show text at the bottom part of floating window
border (a.k.a. "footer").
Solution: Allows `footer` and `footer_pos` config fields similar to
`title` and `title_pos`.
|
| |
|
| |
|
|
|
|
| |
Also make gen_eval_files.lua render vimdoc helpExamples properly if the line
begins with the `>` marker.
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem: append() reports failure when not appending anything.
Solution: Only report failure when appending something. (closes vim/vim#11498)
https://github.com/vim/vim/commit/cd9c8d400c1eb9cbb4ff6a33be02f91a30ab13b2
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
| |
Runtime file updates
https://github.com/vim/vim/commit/e46a4405056276b4cbdacee76b11f85c8ea1830b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
| |
Updte runtime files
https://github.com/vim/vim/commit/589edb340454e7f1b19358f129287a636d53d0e1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: SafeStateAgain not triggered if callback uses feedkeys().
Solution: Check for safe state in the input loop. Make log messages easier
to find. Add 'S' flag to state().
https://github.com/vim/vim/commit/d103ee78432f9036d243b18dd5aac1263d3b7dc9
Include misc1.c change from patch 8.1.2062.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Cannot check the current state.
Solution: Add the state() function.
https://github.com/vim/vim/commit/0e57dd859ecb1e8a3b91509d2f4343e839340eb8
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: no support for custom cmdline completion
Solution: Add new vimscript functions
Add the following two functions:
- getcmdcompltype() returns custom and customlist functions
- getcompletion() supports both custom and customlist
closes: vim/vim#12228
https://github.com/vim/vim/commit/92997dda789ad8061841128cbc99b15ec0374411
Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: reverse() does not work for a String.
Solution: Implement reverse() for a String. (Yegappan Lakshmanan,
closes vim/vim#12179)
https://github.com/vim/vim/commit/03ff1c2dde7f15eca5c9baa6dafbda9b49bedc3b
vim-patch:9.0.1738: Duplicate code to reverse a string
Problem: Duplicate code to reverse a string
Solution: Move reverse_text() to strings.c and remove string_reverse().
closes: vim/vim#12847
https://github.com/vim/vim/commit/4dd266cb66d901cf5324f09405cfea3f004bd29f
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: missing winid argument for virtcol()
Solution: Add a {winid} argument to virtcol()
Other functions col(), charcol() and virtcol2col() support a {winid}
argument, so it makes sense for virtcol() to also support than.
Also add test for virtcol2col() with 'showbreak' and {winid}.
closes: vim/vim#12633
https://github.com/vim/vim/commit/825cf813fa0fddf085fcbd3194781e875320ff63
|
|
|
|
| |
Some things got chopped off in the PR that removed method syntax examples.
These were all that I found.
|
|
|
|
|
|
|
|
|
| |
Problem: Accepting one and zero for the second sort() argument is strange.
Solution: Disallow using one and zero in Vim9 script.
https://github.com/vim/vim/commit/2007dd49f5cb36f944cab1cfbceb0f864e625f74
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Functions implementing reduce and map are too long.
Solution: Use a function for each type of value. Add a few more test cases
and add to the help. (Yegappan Lakshmanan, closes vim/vim#9370)
https://github.com/vim/vim/commit/389b72196e6aaeafe3f907c73d271f2c6b931140
Partial port as this doesn't include handling for non-materialized List.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Cannot use reduce() for a string.
Solution: Make reduce() work with a string. (Naruhiko Nishino, closes vim/vim#9366)
https://github.com/vim/vim/commit/0ccb5842f5fb103763d106c7aa364d758343c35a
Omit tv_get_first_char() as it doesn't really save much code.
Co-authored-by: rbtnn <naru123456789@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Problem: Cannot filter or map characters in a string.
Solution: Make filter() and map() work on a string. (Naruhiko Nishino,
closes vim/vim#9327)
https://github.com/vim/vim/commit/c479ce032f5d4d14bab9e479acbf42d758879893
Co-authored-by: rbtnn <naru123456789@gmail.com>
|
|
|
|
|
|
|
|
| |
Update runtime files.
https://github.com/vim/vim/commit/1b884a0053982335f644eec6c71027706bf3c522
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: map() may change the list or dict item type.
Solution: Add mapnew().
https://github.com/vim/vim/commit/ea696852e7abcdebaf7f17a7f23dc90df1f5e2ed
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: virtcol2col returns last byte of a multi-byte char
Solution: Make it return the first byte for a multi-byte char
closes: vim/vim#12786
closes: vim/vim#12799
https://github.com/vim/vim/commit/b209b86e6636a16088ccacdac98213416c065bf2
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
|
| |
Problem: Cannot use positional arguments for printf()
Solution: Support positional arguments in string formatting
closes: vim/vim#12140
https://github.com/vim/vim/commit/0c6181fec4c362eb9682d5af583341eb20cb1af5
Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Problem: cannot store custom data in quickfix list
Solution: add `user_data` field for the quickfix list
closes: vim/vim#11818
https://github.com/vim/vim/commit/ca6ac99077d2e6d020a34267aa5e0fbc4d23dc38
Co-authored-by: Tom Praschan <13141438+tom-anders@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: undotree() only works for the current buffer
Solution: Add an optional "buffer number" parameter to undotree(). If
omitted, use the current buffer for backwards compatibility.
closes: vim/vim#4001
closes: vim/vim#12292
https://github.com/vim/vim/commit/5fee11114975b7405b7ccd3ee8758e54bf559760
Co-authored-by: Devin J. Pohly <djpohly@gmail.com>
|
|
|
|
|
|
|
|
| |
Problem:
Nvim docs use "•" as a list item prefix but `gw{motion}` doesn't format
such lists by default.
Solution:
Change the 'comments' option to include "fb:•" by default.
|