| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| |
| | |
Counterintuitively, snprintf returns the number of characters it _should
have written_ if it had not encoutered the length bound, thus leading to
a potential buffer overflow.
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
| |
| | |
This treats extmark conceal more like matchadd() conceal.
|
| |
| |
| | |
They were removed from Vim in patch 9.0.0638.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Wrong cursor position when clicking after concealed text
with 'virtualedit'.
Solution: Store virtual columns in ScreenCols[] instead of text
columns, and always use coladvance() when clicking.
This also fixes incorrect curswant when clicking on a TAB, so now
Test_normal_click_on_ctrl_char() asserts the same results as the ones
before patch 9.0.0048.
closes: vim/vim#12808
https://github.com/vim/vim/commit/e500ae8e29ad921378085f5d70ee5c0c537be1ba
Remove the mouse_adjust_click() function.
There is a difference in behavior with the old mouse_adjust_click()
approach: when clicking on the character immediately after concealed
text that is completely hidden, cursor is put on the clicked character
rather than at the start of the concealed text. The new behavior is
better, but it causes unnecessary scrolling in a functional test (which
is an existing issue unrelated to these patches), so adjust the test.
Now fully merged:
vim-patch:9.0.0177: cursor position wrong with 'virtualedit' and mouse click
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#24779)
Problem: blockwise Visual highlight not working with virtual text
Solution: Reset the correct variable at the end of virtual selection and
Check for double-width char inside virtual text.
closes: vim/vim#12606
https://github.com/vim/vim/commit/6e940d9a1d4ff122aad1b0821c784a60b507d45c
Need to remove area_active and use wlv.fromcol and wlv.tocol directly.
|
| |
| |
| |
| |
| |
| |
| | |
Problem: A double-width char in a floating window causes an extra
space to be drawn to the left of its boundary.
Solution: Only reset skipstart at the first column.
Fix #24775
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: screenpos() wrong result with w_skipcol and cpoptions+=n
Solution: Use adjust_plines_for_skipcol() instead of subtracting
w_skipcol.
closes: vim/vim#12625
https://github.com/vim/vim/commit/bfe377b8f2d080e5f85c8cbecf3533456e1d6312
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: passing multiple patterns to runtime not working
Solution: prepend prefix to each argument separately
closes: vim/vim#12617
https://github.com/vim/vim/commit/008c91537b55835aa91cd8fbe1a139256581da31
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Rename completion specific findex var
Solution: Move "findex" static variable to xp_selected in expand_T
closes: vim/vim#12548
https://github.com/vim/vim/commit/e9ef347c137aca6c2592beb19da45a8aece65e11
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: :runtime completion fails for multiple args
Solution: Make it work
closes: vim/vim#12616
https://github.com/vim/vim/commit/be5cdd1d634c2dfc7e415499fb18f4d246a8721c
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: incorrect heights in win_size_restore()
Solution: avoid restoring incorrect heights in win_size_restore()
https://github.com/vim/vim/commit/876f5fb570d8401aa4c58af4a5da91f10520aa9d
I already merged this prior, so just replace the new test with the old one,
but add a test case for the global statusline.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Fix regression in {func} argument of reduce()
Solution: pass function name as string again
Before patch 9.0.0548, passing a string as {func} argument of reduce()
is treated as a function name, but after patch 9.0.0548 it is treated as
an expression instead, which is useless as reduce() doesn't set any v:
variables. This PR restores the behavior of {func} before that patch.
Also correct an emsg() call, as e_string_list_or_blob_required doesn't
contain format specifiers.
closes: vim/vim#12824
https://github.com/vim/vim/commit/ad0c442f1fcc6fe9c433777ee3e5b9e6addc6d69
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: wrong error messages when passing wrong types to count()
Solution: fix it
This fixes two problems:
1. When passing wrong type to {ic} argument of count(), two error
messages are given, the second of which is misleading.
2. When passing wrong type to {comp} argument of count(), the error
message doesn't mention that {comp} may be a String.
closes: vim/vim#12825
https://github.com/vim/vim/commit/4f389e7c0fe7dfeccfa512a72fa36f9028d57159
|
| |
| |
| |
| | |
Some things got chopped off in the PR that removed method syntax examples.
These were all that I found.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#24757)
Problem: Implementation of some list functions too complicated.
Solution: Refactor do_sort_uniq(), f_count() and extend() (Yegappan
Lakshmanan, closes vim/vim#9378)
https://github.com/vim/vim/commit/d92813a59877c707e4b64bea6d786aad152acb45
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Crash when collection is modified when using filter().
Solution: Lock the list/dict/blob. (Ernie Rael, closes vim/vim#12183)
https://github.com/vim/vim/commit/e6d40dcdc7227594935d2db01eca29f0e575dcee
Co-authored-by: Ernie Rael <errael@raelity.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: reduce() with a compiled lambda could be faster.
Solution: Call eval_expr_typval() instead of call_func() directly.
https://github.com/vim/vim/commit/f1c60d4bf10794265b828afd9c5f7eddacada10b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Error message for wrong argument type is not specific.
Solution: Include more information in the error. (Yegappan Lakshmanan,
closes vim/vim#11037)
https://github.com/vim/vim/commit/8deb2b30c77035bb682ccf80b781455ac1d6038b
Cherry-pick test_listdict.vim changes from patch 8.2.4809.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 use a script-local function for 'foldtext'.
Solution: Expand "s:" and "<SID>". (Yegappan Lakshmanan, closes vim/vim#9411)
https://github.com/vim/vim/commit/27708e6c7b6f444fd599f3dc5015336b002b874d
Cherry-pick test_filter_map.vim change from patch 8.2.3871.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Leaking memory in map() and filter(), cannot use a string argument
in Vim9 script.
Solution: Fix the leak, adjust the argument check, also run the tests as
Vim9 script. (Yegappan Lakshmanan, closes vim/vim#9354)
https://github.com/vim/vim/commit/2d877599ee1cede063ef4abe3a2272e67c116238
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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: Error for const argument to mapnew().
Solution: Don't give an error. (closes vim/vim#7400)
https://github.com/vim/vim/commit/57cf4973a283941c92744554474b2c52ce892fd1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Memory leak when map() fails.
Solution: Clear the typval.
https://github.com/vim/vim/commit/c56936e2ba4fd219f56aab616fcb283132455697
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>
|
| |
| |
| |
| | |
A command typed in the cmdwin and executed with `<CR>` is expected to be
executed in the context of the old curwin/buf, so it shouldn't be changed.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: dict-completion does not respect region
Solution: respect selected region in dict completion
Set do_region to zero as we don't want a complete dump of the matching
words, we want the code to filter them according to the user's selected
region.
closes: vim/vim#12792
closes: vim/vim#7025
https://github.com/vim/vim/commit/e98fb643ec5f84f9088c8b1434a0bd6ff988dc2d
Co-authored-by: LemonBoy <thatlemon@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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: getcompletion() "cmdline" fails after :autocmd
Solution: Use set_cmd_context() instead of set_one_cmd_context().
closes: vim/vim#12804
https://github.com/vim/vim/commit/e4c79d36150431ffb97cb8952ec482af2e57f228
|
| |
| |
| | |
Fixes: https://github.com/neovim/neovim/issues/23184
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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: dead code in charset.c
Solution: remove it
linetabsize_col() calls init_chartabsize_arg() with 0 as "lnum", so
cts.cts_has_prop_with_text is always FALSE.
closes: #PR
https://github.com/vim/vim/commit/d3515a1e88cf25c1d5eae8faa965b587a124e687
N/A patches for version.c:
vim-patch:9.0.1702: Undo test is flaky
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: getcompletion() failes for user-defined commands
Solution: set context for completion function
closes: vim/vim#12681
closes: vim/vim#12680
https://github.com/vim/vim/commit/8ef1fbc0c3ca8dca32c352f3cf30e7a4b3096a94
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
| |
| |
| | |
Problem: The result of keytrans() sometimes can't be translated back.
Solution: Recognize <t_xx> as a key.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Farewell to Bram and dedicate upcoming Vim 9.1 to him (vim/vim#12749)
https://github.com/vim/vim/commit/e978b4534a5e10471108259118c0ef791106fd92
Also update the header for the following files that were converted to Vim9
script upstream:
- autoload/ccomplete.lua (vim9jitted)
- ftplugin.vim
- ftplugof.vim
- indent.vim
- indent/vim.vim
- makemenu.vim
This also updates the "Last Change" dates, even if some changes (due to rewrites
to Vim9 script) were not ported.
There's still a few other places where Bram is still mentioned as a maintainer
in the files we and Vim have:
- ftplugin/bash.vim
- indent/bash.vim
- indent/html.vim
- indent/mail.vim
- macros/accents.vim
- macros/editexisting.vim
- syntax/bash.vim
- syntax/shared/typescriptcommon.vim
- syntax/tar.vim
- syntax/typescript.vim
- syntax/typescriptreact.vim
- syntax/zimbu.vim
Maybe future patches will address that.
Also exclude changes to .po files that didn't apply automatically (the
`:messages` maintainer string isn't used in Nvim anyway).
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Apply linematch filler computation only if the hunk is actually
linematched.
Fixes #24580
|
| |
| |
| |
| |
| |
| | |
Problem: Temporarily changing current window in a script causes
CursorMoved to be triggerd.
Solution: Don't trigger CursorMoved if neither curwin nor cursor
changed between two checks.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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: wrong mapping applied when replaying a char search
Solution: Store a NOP after the ESC
closes: vim/vim#12708
closes: vim/vim#6350
https://github.com/vim/vim/commit/bacc83009bc38c9ba0247aaa22b76d1993d57993
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Ctrl-Q not handled like Ctrl-V in replace mode
Solution: Handle Ctrl-Q like Ctrl-V
closes: vim/vim#12686
closes: vim/vim#12684
https://github.com/vim/vim/commit/2d63e4b3ccc0bb34db21a3c1d024cb114f8c4071
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#24667)
Problem: wrong viewport restored for incsearch and smoothscroll
Solution: Save and restore skipcol as well
closes: vim/vim#12713
https://github.com/vim/vim/commit/7b7b4cb6f274e7bace127107b0d2752133c4020b
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: mapset() not properly handling script ID
Solution: replace_termcodes() may accept a script ID
closes: vim/vim#12699
closes: vim/vim#12697
https://github.com/vim/vim/commit/7e0bae024d4c1673cff31763227ad52b936fa56f
|