Commit Graph

1139 Commits

Author SHA1 Message Date
Jaehwang Jung
52669b5c69 fix(diff): filler lines for hunks bigger than linematch limit
Apply linematch filler computation only if the hunk is actually
linematched.

Fixes #24580

(cherry picked from commit ed1da3ac24)
2023-08-12 09:14:54 +00:00
zeertzjq
06ec1a49d7 fix(inccommand): don't set an invalid 'undolevels' value
Problem:    Cannot break undo by setting 'undolevels' to itself in
            'inccommand' preview callback.
Solution:   Don't set an invalid 'undolevels' value.

Co-authored-by: Michael Henry <drmikehenry@drmikehenry.com>
(cherry picked from commit 7c5e7d831a)
2023-08-05 14:42:55 +00:00
zeertzjq
f33d49a7a7 fix(inccommand): don't save information of a buffer twice
Problem:    'inccommand' doesn't restore 'undolevels' properly for a
            buffer shown in multiple windows.
Solution:   Don't save information of a buffer twice.
2023-07-28 16:09:15 +08:00
zeertzjq
1fdb41969f test(inccommand): add a test for #20248 2023-07-28 15:21:37 +08:00
Alexandre Teoi
1e905c52ca fix(inccommand): restrict cmdpreview undo calls
Problem:
The cmdpreview saved undo nodes on cmdpreview_prepare() from ex_getln.c may
become invalid (free) if the preview function makes undo operations, causing
heap-use-after-free errors.

Solution:
Save the buffer undo list on cmdpreview_prepare)_ and start a new empty one. On
cmdpreview_restore_state(), undo all the entries in the new undo list and
restore the original one. With this approach, the preview function will be
allowed to undo only its own changes.

Fix #20036
Fix #20248
2023-07-28 15:20:58 +08:00
zeertzjq
d6733abc69 fix(ui-ext): backport win_viewport fixes to release-0.9 2023-07-25 22:56:02 +08:00
zeertzjq
ada9443999 fix(mouse): handle folded lines with virt_lines attached to line above 2023-07-25 22:56:02 +08:00
zeertzjq
69f11f6d26 fix(plines): folded lines with virt_lines attached to line above 2023-07-25 22:56:02 +08:00
zeertzjq
16e690d595 fix(mouse): drag vsep of window with 'statuscolumn'
Problem:    Cannot drag a vertical separator to the right of a window
            whose 'statuscolumn' is wider than itself.
Solution:   Never treat a click on a vertical separator as a click on
            'statuscolumn'.
(cherry picked from commit c0007e6300)
2023-07-24 10:17:14 +00:00
zeertzjq
48d5eaffcd fix(statuscolumn): don't update clicks if current width is 0
(cherry picked from commit f46241d8a8)
2023-07-24 07:18:44 +00:00
zeertzjq
e2d14926d7 fix(highlight): make CurSearch work properly with 'winhl'
(cherry picked from commit 56d7627e1a)
2023-07-23 13:37:43 +00:00
zeertzjq
e8ff921ed3 fix(events): trigger VimResume on next UI request
(cherry picked from commit cdd076d6c1)
2023-07-22 23:17:02 +00:00
zeertzjq
7253cb3905 fix(mouse): copy the line before syntax matching
(cherry picked from commit 32e726e626)
2023-07-12 00:50:53 +00:00
zeertzjq
f36433f83a fix(column): fix wrong cursor with 'statuscolumn' and cpo+=n
(cherry picked from commit 38bceb6269)
2023-07-06 03:07:43 +00:00
zeertzjq
072d0b796e fix(statusline): fill for double-width char after moving items
(cherry picked from commit 55fa460c0a)
2023-06-30 00:36:28 +00:00
zeertzjq
a830373860 fix(column): handle unprintable chars in 'statuscolumn'
(cherry picked from commit 4e206a6a41)
2023-06-29 03:38:15 +00:00
zeertzjq
54294140d7 fix(charset): fix wrong display of 0xffff
(cherry picked from commit fe3493679d)
2023-06-26 03:53:14 +00:00
zeertzjq
74c8878e9f fix(cmdline): don't redraw 'tabline' in Ex mode
Redrawing of 'statusline' and 'winbar' are actually already inhibited by
RedawingDisabled in Ex mode.

In Vim there is a check for `msg_scrolled == 0` (which is false in Ex
mode) since Vim doesn't have msgsep. Add a `!exmode_active` check here
in Nvim instead.

(cherry picked from commit e056777a88)
2023-06-22 22:40:44 +00:00
zeertzjq
7e7fc4885f fix(statusline): redraw when VIsual_mode changes
(cherry picked from commit 397d861566)
2023-06-06 11:25:03 +00:00
zeertzjq
06d0985722 fix(ui): don't send empty grid_line with redrawdebug=compositor
(cherry picked from commit 12f2e47f2a)
2023-06-04 02:49:20 +00:00
zeertzjq
022b5ba45d
test(ui/decorations_spec): add local variable assert_alive 2023-06-01 16:34:18 +08:00
zeertzjq
56c35faf8b fix(column): don't overflow sign column with extmark signs
(cherry picked from commit 24a6804528)
2023-06-01 08:20:53 +00:00
Luuk van Baal
126a757c55 fix(column): corrupted screen with minwid sign item in 'statuscolumn'
(cherry picked from commit 2016ff6f37)
2023-05-30 12:56:36 +00:00
zeertzjq
a2bfe4e524 fix(substitute): properly check if preview is needed
(cherry picked from commit c8004af17d)
2023-05-29 00:45:14 +00:00
zeertzjq
edf2a5aa25 fix(extmarks): don't show virt lines for end mark
(cherry picked from commit ffbf0cecb6)
2023-05-28 09:22:44 +00:00
zeertzjq
86a1e79ee2 fix(ui-ext): send title to newly-attached UI
(cherry picked from commit 43d66c0ebb)
2023-05-26 09:30:18 +00:00
zeertzjq
ceba495e88 fix(redraw): overwrite double-width char with virt_text properly
(cherry picked from commit e998bada7c)
2023-05-22 10:23:08 +00:00
Luuk van Baal
cbe9351f8b fix(highlight): remove unnecessary assignment to char_attr for 'spell'
(cherry picked from commit 889e0df9dc)
2023-05-22 09:08:16 +00:00
Luuk van Baal
a01f8de1f0 fix(redraw): multibyte characters are wrapped at the end of a line
Problem:    Multibyte characters may be wrapped at the end of a line
            when 'statuscolumn' and 'spell' are set.
Solution:   Update line pointerdiff "v" before fetching the line pointer
            after evaluating 'statuscolumn'.
(cherry picked from commit 5fa5fff184)
2023-05-21 11:00:55 +00:00
zeertzjq
ae7db749b5 test: move most title tests to a separate file
This avoids running title tests twice unnecessarily.

(cherry picked from commit b6199f667b)
2023-05-11 02:58:36 +00:00
zeertzjq
e019371554 fix(api): don't change title when setting buffer in a window
(cherry picked from commit f2d97a3842)
2023-05-11 02:38:43 +00:00
zeertzjq
4e0cfe3805 fix(highlight): apply 'winblend' to NormalNC
(cherry picked from commit e33790d0f6)
2023-05-10 15:50:26 +00:00
zeertzjq
152c07249e fix(statusline): bail out properly on negative row
(cherry picked from commit 89274f9221)
2023-05-08 08:25:22 +00:00
zeertzjq
56e0b425ea fix(mouse): fix popup menu position check with winbar
(cherry picked from commit e37fb2515d)
2023-05-03 02:29:39 +00:00
zeertzjq
61351adee8 fix(pum): don't position too far with resized parent grid
(cherry picked from commit 1fa6482faf)
2023-05-02 22:18:12 +00:00
zeertzjq
5fbe8409b5 fix(pum): fix missing scrollbar with 'rightleft'
(cherry picked from commit 3d1a9eeb1b)
2023-05-02 17:13:23 +00:00
zeertzjq
bbf600b7b5 fix(pum): fix missing rightmost column with 'rightleft'
(cherry picked from commit 97ac7e10c6)
2023-05-02 15:55:42 +00:00
zeertzjq
5267e7b07a fix(mouse): fix popup_setpos position check with ext_multigrid
(cherry picked from commit 50f6609032)
2023-05-02 07:25:59 +00:00
zeertzjq
20f5f4e916 fix(normal): make "g$" work properly with resized grid
(cherry picked from commit 088cdf69e3)
2023-05-02 04:28:44 +00:00
zeertzjq
5b158b9375 fix(drawline): make cursorlineopt=screenline work with resized grid
(cherry picked from commit 37b73cf14b)
2023-05-02 04:28:43 +00:00
zeertzjq
c693df02b3 fix(float): make bufpos work properly with resized parent grid
(cherry picked from commit 03e8b5fc91)
2023-05-02 04:28:43 +00:00
zeertzjq
11a0fc9644 vim-patch:9.0.1493: popup menu position wrong in window with toolbar
Problem:    Popup menu position wrong in window with toolbar.
Solution:   Take the window toolbar into account when positioning the popup
            menu. (closes vim/vim#12308)

4e1ca0d9a6

Fixed in the previous commit. Test only.

(cherry picked from commit aca226d728)
2023-05-02 03:59:44 +00:00
zeertzjq
756b74758d fix(pum): make :popup position correctly with float border
(cherry picked from commit fbaa278773)
2023-05-02 03:59:44 +00:00
zeertzjq
f5cf033314 fix(pum): position properly with ext_multigrid
(cherry picked from commit 239d19d908)
2023-05-02 03:46:37 +00:00
zeertzjq
5c30930fec fix(pum): show right-click menu above cmdline area
(cherry picked from commit 1d7172e925)
2023-05-02 03:36:07 +00:00
zeertzjq
b8b1221e58 vim-patch:9.0.1476: lines put in non-current window are not displayed
Problem:    Lines put in non-current window are not displayed. (Marius
            Gedminas)
Solution:   Don't increment the topline when inserting just above it.
            (closes vim/vim#12212)

e7f05a8780

Co-authored-by: Bram Moolenaar <Bram@vim.org>
(cherry picked from commit 60f21d96c6)
2023-05-02 03:21:00 +00:00
zeertzjq
b8d0a2d2b2 fix(spell): extmark with spell=false should disable spell
(cherry picked from commit 6d47d77449)
2023-05-01 04:31:14 +00:00
Luuk van Baal
f24449d35c fix(statusline): also allow right click when 'mousemodel' is "popup*"
Problem:    The 'statusline'-format ui elements do not receive right
            click events when "mousemodel" is "popup*"
Solution:   Do not draw popupmenu and handle click event instead.
(cherry picked from commit 6b5b6e5e07)
2023-04-25 03:05:22 +00:00
Luuk van Baal
a5d8024b24 fix(column): rebuild status column when sign column is invalid
(cherry picked from commit 44d4f03573)
2023-04-21 10:46:50 +00:00
Luuk van Baal
2d3c825ada test(column): statuscolumn is rebuild when signs are (un)placed
(cherry picked from commit d799456a6b)
2023-04-21 10:46:50 +00:00