Problem: Wrong display when typing in diff mode with 'smoothscroll'.
Solution: Use adjust_plines_for_skipcol() (zeertzjq).
closes: vim/vim#1577647f8584a80
Problem: filetype: bun and deno history files not recognized
Solution: detect '.bun_repl_history' and 'deno_history.txt' as
javascript filetype (Wu, Zhenyu)
closes: vim/vim#157618a2aea8a62
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Problem: Test_halfpage_longline() fails on large terminals
(lazypingu)
Solution: Use a window with known width (zeertzjq).
fixes: vim/vim#15755closes: vim/vim#15756fa117387ee
Problem: diff mode does not handle overlapping diffs correctly
Solution: correct the logic to handle overlapping blocks
(Yukihiro Nakadaira)
Vim merges overlapped diff blocks and it doesn't work expectedly
in some situation.
closes: vim/vim#1573506fe70c183
Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
Problem: getcmdprompt() implementation can be improved
Solution: Improve and simplify it (h-east)
closes: vim/vim#1574325876a6cdd
Co-authored-by: h-east <h.east.727@gmail.com>
Problem: No way to get prompt for input()/confirm()
Solution: add getcmdprompt() function (Shougo Matsushita)
(Shougo Matsushita)
closes: vim/vim#156676908428560
Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Problem: incorrect internal diff with an empty file
Solution: Set pointer to NULL, instead of using an empty line file
(Yukihiro Nakadaira)
When using internal diff, empty file is read as one empty line file.
So result differs from external diff.
closes: vim/vim#15719f1694b439b
Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
Problem: filetype: salt files are not recognized
Solution: Detect '*.sls' files as filetype salt,
include a syntax script (Gregory Anders)
closes: vim/vim#1568989b9bb4ac8
Co-authored-by: Gregory Anders <greg@gpanders.com>
Problem: inconsistent case sensitive extension matching
Solution: unify case sensitive extension matching (Evgeni Chasnovski).
There are different approaches of how extensions are matched with
respect to case sensitivity. In particular, '\c' flag is used in pattern
whereas in most places case sensitive matching is guarded behind
`has("fname_case")` condition.
Replace all instances of '\c' with an explicit case sensitive pattern
variants guarded by `has("fname_case")`. Strictly speaking, this is a
breaking change because only two (most common and prevailingly tested)
variants are now matched: upper first letter and upper all letters.
closes: vim/vim#1567259b089c9df
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Problem: heap-use-after-free in garbage collection with location list
user data.
Solution: Mark user data as in use when no other window is referencing
the location list (zeertzjq)
fixes: neovim/neovim#30371closes: vim/vim#15683be4bd189d2
Problem: Crash with cursor-screenline and narrow window
(elig0n)
Solution: Don't set right_col when width2 is 0 (zeertzjq).
fixes: vim/vim#15677closes: vim/vim#1567859149f0269
Problem: Wrong cursor-screenline when resizing window
Solution: Invalidate saved left_col and right_col when width1 or width2
change.
closes: vim/vim#1567986dc4f8b43
Problem: filetype: swiftinterface files are not recognized
Solution: Detect '*.swiftinterface' files as swift filetype
(LosFarmosCTL)
closes: vim/vim#1565803cac4b70d
Co-authored-by: LosFarmosCTL <80157503+LosFarmosCTL@users.noreply.github.com>
Problem: Wrong breakindentopt=list:-1 with multibyte chars or TABs in
text matched by 'formatlistpat' (John M Devin)
Solution: Use the width of the match text (zeertzjq)
fixes: vim/vim#15634closes: vim/vim#1563561a6ac4d00
Problem: Resetting cell widths can make 'listchars' or 'fillchars'
invalid.
Solution: Check for conflicts when resetting cell widths (zeertzjq).
closes: vim/vim#1562966f65a46c5
Problem: Newline causes E749 in Ex mode (after 9.1.0573).
Solution: Don't execute empty command followed by a newline.
closes: vim/vim#156142432b4a753
Cherry-pick code change from patch 8.2.3405.
Problem: Window is updated with potentially invalid skipcol in recursive
window update path. I.e. cursor outside of visible range in
large line that does not fit.
Solution: Make sure it is valid (Luuk van Baal).
3d5065fc75
Problem: completion is inserted on Enter with "noselect"
(Carman Fu)
Solution: check noselect before update compl_shown_match
(glepnir)
fixes: vim/vim#15526closes: vim/vim#15530753794bae8
Use the grapheme break algorithm from utf8proc to support grapheme
clusters from recent unicode versions.
Handle variant selector VS16 turning some codepoints into double-width
emoji. This means we need to use ptr2cells rather than char2cells when
possible.
Problem: "dvgo" is not always an inclusive motion
(Iain King-Speir)
Solution: initialize the inclusive flag to false
fixes: vim/vim#15580closes: vim/vim#15582f8702aeb8f
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: The matchparen plugin is slow on a long line.
Solution: Don't use a regexp to get char at and before cursor.
(zeertzjq)
Example:
```vim
call setline(1, repeat(' foobar', 100000))
runtime plugin/matchparen.vim
normal! $hhhhhhhh
```
closes: vim/vim#1556881e7513c86
Problem: Wrong patlen value in ex_substitute() (after 9.1.0426).
Solution: Compute patlen after finding end separator.
(zeertzjq)
Add a more explicit test. The test already passes as the only case
where a overlarge patlen value matters was fixed by patch 9.1.0689.
closes: vim/vim#15565d1c8d2de4b
Problem: cannot set special highlight kind in popupmenu
Solution: add kind_hlgroup item to complete function
(glepnir)
closes: vim/vim#1556138f99a1f0d
Co-authored-by: glepnir <glephunter@gmail.com>
Problem: mode() returns wrong value with <Cmd> mapping
Solution: Change decision priority of VIsual_active and move
visual mode a bit further down (kuuote)
closes: vim/vim#155330fd1cb1b1f
Co-authored-by: kuuote <znmxodq1@gmail.com>
Problem: zip-plugin has problems with special characters
(user202729)
Solution: escape '*?[\' on Unix and handle those chars
a bit differently on MS-Windows, add a test, check
before overwriting files
runtime(zip): small fixes for zip plugin
This does the following:
- verify the unzip plugin is executable when loading the autoload plugin
- handle extracting file names with '[*?\' in its name correctly by
escaping those characters for the unzip command (and handle those
characters a bit differently on MS-Windows, since the quoting is different)
- verify, that the extract plugin is not overwriting a file (could cause
a hang, because unzip asking for confirmation)
- add a test zip file which contains those special file names
fixes: vim/vim#15505closes: vim/vim#155197790ea0c68
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: :keeppatterns does not retain the substitute pattern
for a :s command
Solution: preserve the last substitute pattern when used with the
:keeppatterns command modifier (Gregory Anders)
closes: vim/vim#154973b59be4ed8
Co-authored-by: Gregory Anders <greg@gpanders.com>
Problem: [security]: use-after-free in alist_add()
(SuyueGuo)
Solution: Lock the current window, so that the reference to
the argument list remains valid.
This fixes CVE-2024-43374
0a6e57b09b
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: marker folds may get corrupted on undo (Yousef Mohammed)
Solution: when adjusting folds, make sure that line1 is the lower limit
and line2 is the upper line limit. In particular, line2 should
not be able to get smaller than line1.
fixes: vim/vim#15455closes: vim/vim#154668d02e5cf96
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: Some other options reset curswant unnecessarily when set.
(Andrew Haust)
Solution: Don't reset curswant when setting 'comments', 'commentstring'
or 'define' (zeertzjq)
fixes: vim/vim#15462closes: vim/vim#15467b026a293b1
Problem: Renaming a buffer on startup may cause using freed memory.
Solution: Check if the buffer is used in a window. (closesvim/vim#8955)
d3710cf01e
Cherry-pick Test_echo_true_in_cmd() from Vim.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: tests: zip test still resets 'shellslash' option
Solution: Remove resetting the 'shellslash' option, the zip
plugin should now be able to handle this options
closes: vim/vim#1543491efcd115e
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: the zip plugin is not tested.
Solution: include tests (Damien)
closes: vim/vim#15411d7af21e746
Co-authored-by: Damien <141588647+xrandomname@users.noreply.github.com>
Problem: [security] double-free in dialog_changed()
(SuyueGuo)
Solution: Only clear pointer b_sfname pointer, if it is different
than the b_ffname pointer. Don't try to free b_fname,
set it to NULL instead.
fixes: vim/vim#15403
Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-46pw-v7qw-xc2fb29f4abcd4
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: goaccess config file not recognized
Solution: detect 'goaccess.conf' as goaccess filetype, also
include a basic syntax and ftplugin (Adam Monsen)
Add syntax highlighting for GoAccess configuration file.
GoAccess is a real-time web log analyzer and interactive viewer that
runs in a terminal in *nix systems or through your browser.
GoAccess home page: https://goaccess.iocloses: vim/vim#154140aa65b48fb
Co-authored-by: Adam Monsen <haircut@gmail.com>
Problem: Calling a function from an "expr" option has too much overhead.
Solution: Add call_simple_func() and use it for 'foldexpr'
87b4e5c5db
Cherry-pick a call_func() change from patch 8.2.1343.
Add expr-option-function docs to options.txt.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: using a script-local function requires using "s:" when
setting 'completefunc'.
Solution: Do not require "s:" in Vim9 script. (closesvim/vim#9796)
1fca5f3e86
vim-patch:8.2.4417: using NULL pointer
Problem: Using NULL pointer.
Solution: Set offset after checking for NULL pointer.
e89bfd212b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: ex: trailing dot is optional for :g and :insert/:append
Solution: don't break out early, when the next command is empty.
(Mohamed Akram)
The terminating period is optional for the last command in a global
command list.
closes: vim/vim#154070214680a8e
Co-authored-by: Mohamed Akram <mohd.akram@outlook.com>