aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_meta
Commit message (Collapse)AuthorAge
...
* | | vim-patch:790f9a890ceezeertzjq2023-09-25
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | feat(meta): add types for vim.lpegMaria José Solano2023-09-24
|/ /
* | fix(ui): always use stl/stlnc fillchars when drawing statusline (#25267)tj-moody2023-09-24
| |
* | refactor(options)!: graduate shortmess+=f flagbfredl2023-09-23
| | | | | | | | | | | | | | 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
* | Merge pull request #25286 from rktjmp/doc-vim-schedule-wrapzeertzjq2023-09-23
|\ \ | | | | | | docs: add more context to vim.schedule_wrap
| * | docs: update vim.schedule param name and typeOliver Marriott2023-09-23
| | | | | | | | | | | | | | | Per https://github.com/neovim/neovim/pull/25286#discussion_r1332861721 and https://github.com/neovim/neovim/pull/25286#discussion_r1334318352
* | | fix(meta): include vim.jsonMaria José Solano2023-09-22
|/ /
* | vim-patch:9.0.1921: not possible to use the jumplist like a stack (#25278)zeertzjq2023-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | docs: misc #24561Justin M. Keyes2023-09-20
| | | | | | | | fix #24699 fix #25253
* | Merge pull request #25214 from bfredl/glyphcachebfredl2023-09-19
|\ \ | | | | | | refactor(grid): change schar_T representation to be more compact
| * | refactor(grid): change schar_T representation to be more compactbfredl2023-09-19
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #25148 from glepnir/fixed_optbfredl2023-09-19
|\ \ | |/ |/| fix(float): add fixed option
| * fix(float): add fixd optionglepnir2023-09-18
| |
* | fix(typing): vim.fn.executeLewis Russell2023-09-16
| |
* | docs: replace <pre> with ``` (#25136)Gregory Anders2023-09-14
|/
* docs: fix typos and other small fixes (#25005)dundargoc2023-09-14
| | | | | | | 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>
* feat(extmark): support proper multiline rangesbfredl2023-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* fix(decorations): better approximation of botline #24794Jaehwang Jung2023-09-11
| | | | | | | | | | | | | | | | 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>
* fix(api): more intuitive cursor updates in nvim_buf_set_textSergey Slipchenko2023-09-11
| | | | Fixes #22526
* fix(highlight): add create param in nvim_get_hlglepnir2023-09-09
|
* vim-patch:9.0.1856: issues with formatting positional arguments (#25013)zeertzjq2023-09-04
| | | | | | | | | | | | | 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>
* fix(builtin): fix incorrect optional fields for fn.sign_defineJongwook Choi2023-08-30
| | | | The field `icon` is not a mandatory field.
* feat(builtin): improve typesLewis Russell2023-08-27
|
* fix(types): add some return/parameter type annotations (#24867)Maria José Solano2023-08-27
| | | | | * fix(types): add some return/parameter type annotations * fix(types): narrow stdpath parameter further
* feat(highlight): add `FloatFooter` highlight groupEvgeni Chasnovski2023-08-26
| | | | | | Problem: No clear separation of floating title and footer highlighting. Solution: Add new `FloatFooter` highlight group.
* feat(float): implement footerEvgeni Chasnovski2023-08-26
| | | | | | | | 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`.
* docs(msgpack_rpc): add "msgpack-rpc" client typeAlisue2023-08-26
|
* docs: various clarifications (#24876)zeertzjq2023-08-26
|
* docs(builtin): small fixes (#24861)Sean Dewar2023-08-24
| | | | Also make gen_eval_files.lua render vimdoc helpExamples properly if the line begins with the `>` marker.
* fix(types): add more annotations to eval.luaLewis Russell2023-08-23
|
* vim-patch:9.0.0837: append() reports failure when not appending anythingzeertzjq2023-08-22
| | | | | | | | | 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>
* vim-patch:e46a44050562zeertzjq2023-08-21
| | | | | | | | Runtime file updates https://github.com/vim/vim/commit/e46a4405056276b4cbdacee76b11f85c8ea1830b Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:589edb340454zeertzjq2023-08-21
| | | | | | | | Updte runtime files https://github.com/vim/vim/commit/589edb340454e7f1b19358f129287a636d53d0e1 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.1.2053: SafeStateAgain not triggered if callback uses feedkeys()zeertzjq2023-08-21
| | | | | | | | | | | | 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>
* vim-patch:8.1.2047: cannot check the current statezeertzjq2023-08-21
| | | | | | | | | 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>
* vim-patch:9.0.1774: no support for custom cmdline completion (#24808)zeertzjq2023-08-21
| | | | | | | | | | | | | | | 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>
* vim-patch:9.0.1515: reverse() does not work for a Stringzeertzjq2023-08-19
| | | | | | | | | | | | | | | | | | | 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>
* vim-patch:9.0.1728: missing winid argument for virtcol() (#24770)zeertzjq2023-08-18
| | | | | | | | | | | | | 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
* docs(builtin): fix some missing lines (#24759)Sean Dewar2023-08-17
| | | | Some things got chopped off in the PR that removed method syntax examples. These were all that I found.
* vim-patch:8.2.4455: accepting one and zero for second sort() argument is strangezeertzjq2023-08-17
| | | | | | | | | 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>
* vim-patch:partial:8.2.3849: functions implementing reduce and map are too longzeertzjq2023-08-17
| | | | | | | | | | | | 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>
* vim-patch:8.2.3848: cannot use reduce() for a stringzeertzjq2023-08-17
| | | | | | | | | | | 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>
* vim-patch:8.2.3818: cannot filter or map characters in a stringzeertzjq2023-08-17
| | | | | | | | | | 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>
* vim-patch:1b884a005398zeertzjq2023-08-17
| | | | | | | | Update runtime files. https://github.com/vim/vim/commit/1b884a0053982335f644eec6c71027706bf3c522 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.1969: Vim9: map() may change the list or dict item typezeertzjq2023-08-17
| | | | | | | | | 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>
* vim-patch:9.0.1717: virtcol2col returns last byte of a multi-byte char (#24729)zeertzjq2023-08-16
| | | | | | | | | | | 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>
* vim-patch:9.0.1704: Cannot use positional arguments for printf() (#24719)zeertzjq2023-08-15
| | | | | | | | | | 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>
* vim-patch:9.0.1688: cannot store custom data in quickfix list (#24673)zeertzjq2023-08-12
| | | | | | | | | | 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>
* vim-patch:9.0.1686: undotree() only works for the current buffer (#24665)zeertzjq2023-08-12
| | | | | | | | | | | | 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>
* feat(defaults): treat "•" as a list item prefix #24623Justin M. Keyes2023-08-09
| | | | | | | | 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.