Commit Graph

25946 Commits

Author SHA1 Message Date
zeertzjq
241d649c23 build(deps): bump libvterm to 0.3.3
Fix #21106
2023-08-04 10:34:22 +08:00
zeertzjq
f237c92076
Merge pull request #24551 from neovim/backport-24549-to-release-0.9
[Backport release-0.9] fix(terminal): include modifiers when forwarding mouse
2023-08-04 10:15:58 +08:00
zeertzjq
90b1a3250a fix(terminal): include modifiers when forwarding mouse
(cherry picked from commit d7da156929)
2023-08-04 01:34:34 +00:00
zeertzjq
ff689ed1a9
Merge pull request #24505 from zeertzjq/backport
Backport to release-0.9
2023-07-28 16:28:04 +08: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
d0a6c1437d test: reduce flakiness
Avoid consecutive RPC requests involving :startinsert or :stopinsert,
because consecutive RPC requests may be processed together, before the
:startinsert or :stopinsert takes effect.

Also change some feed_command() to command() to make tests faster.
2023-07-28 15:57:57 +08:00
zeertzjq
9f6fc24bcb test: check that TextChangedT cannot delete terminal buffer 2023-07-28 15:57:57 +08:00
zeertzjq
c03d38c51d test: check real cursor position in Terminal mode 2023-07-28 15:57:57 +08:00
zeertzjq
bde56f4e37
Merge pull request #24503 from zeertzjq/backport
Backport of #24289 and #24489 to release-0.9
2023-07-28 15:40:27 +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
b31b01cac2
Merge pull request #24486 from zeertzjq/backport
Backport to release-0.9
2023-07-26 03:09:27 +08:00
Brandon Simmons
46301281f7 fix(folds): update folds in Insert mode with fdm=indent
Previously, when using foldmethod=indent, inserting an unindented line
would inadvertently open closed folds below it.
As a performance improvement, folds were only updated once, across all
lines, after Insert mode was exited.

Now, the performance improvement is no longer being used when
foldmethod=indent, so folds are updated multiple times during Insert
mode, but only across the lines that are changing, which preserves the
folds (and their open/close states) instead of recreating them.
2023-07-25 22:56:02 +08:00
zeertzjq
d6733abc69 fix(ui-ext): backport win_viewport fixes to release-0.9 2023-07-25 22:56:02 +08:00
zeertzjq
42a735e524 fix(startup): don't truncate when printing with -l 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
badb6f4bc3 vim-patch:9.0.1607: screenpos() returns wrong row with diff filler lines
Problem:    screenpos() returns wrong row with diff filler lines.
Solution:   Only add filler lines when appropriate.  Also don't add the
            'smoothscroll' marker when w_skipcol is zero. (closes vim/vim#12485,
            closes vim/vim#12484)

55daae3921
2023-07-25 22:56:02 +08:00
zeertzjq
0afec352da vim-patch:9.0.1600: screenpos() does not take w_skipcol into account
Problem:    screenpos() does not take w_skipcol into account.
Solution:   Subtract w_skipcol from column. (closes vim/vim#12486, closes vim/vim#12476)

f0e68c0e2a
2023-07-25 22:56:01 +08:00
zeertzjq
1da1e5a4f3
Merge pull request #24484 from neovim/backport-24481-to-release-0.9
[Backport release-0.9] test(core/startup_spec): use retry() instead of jobwait()
2023-07-25 20:48:04 +08:00
fredizzimo
dfed74188d
[Backport release-0.9] fix(ui): delay win_viewport until screen update #24182 (#24480)
fix(ui): delay win_viewport until screen update #24182

Problem:
Sometimes, when nvim sends the `win_viewport` event, for example when scrolling
with visible folds on the screen, it reports the `scroll_delta` value one batch
into "future". So when the client application is trying to show the new viewport
it's not yet updated, resulting in temporary corruption / screen flickering.

For more details see #23609, and starting from [this comment](
https://github.com/neovide/neovide/pull/1790#issuecomment-1518697747) in
https://github.com/neovide/neovide/pull/1790,, where the issue was first
detected. Note that some of the conclusions in those are not fully accurate, but
the general observations are.

Solution:
When there are pending updates to a Window, delay the `win_viewport` UI event
until the updates are sent. This ensures that there's no flush between sending
the viewport and updating of the lines corresponding to the new viewport.

Document the existing viewport behaviour (for cases where there are no
extra flushes), give a hint about how applications can deal with the slightly
surprising behaviour of the viewport event being sent after the updates.

Fixes https://github.com/neovim/neovim/issues/23609
2023-07-25 05:37:07 -07:00
zeertzjq
d1a7aaa7f2 test(core/startup_spec): use retry() instead of jobwait()
This should work on Windows.

(cherry picked from commit 9ade0702b6)
2023-07-25 12:33:21 +00:00
zeertzjq
76bbfb3cfd
Merge pull request #24479 from neovim/backport-24477-to-release-0.9
[Backport release-0.9] fix(startup): make recovery mode work without --headless
2023-07-25 19:46:52 +08:00
zeertzjq
11e90126ba fix(startup): make recovery mode work without --headless
(cherry picked from commit e483d95289)
2023-07-25 11:28:42 +00:00
zeertzjq
aefacff567
Merge pull request #24478 from neovim/backport-23910-to-release-0.9
[Backport release-0.9] test(core/startup_spec): add a test for #13720
2023-07-25 19:23:32 +08:00
zeertzjq
cba4362d85 test(core/startup_spec): add a test for #13720
(cherry picked from commit 3cd69055de)
2023-07-25 11:11:31 +00:00
zeertzjq
8dd4a2bdd1
Merge pull request #24476 from neovim/backport-24425-to-release-0.9
[Backport release-0.9] fix(terminal): call validate_cursor to update the viewport
2023-07-25 11:44:24 +08:00
Fred Sundvik
dc2860d821 fix(terminal): call validate_cursor to update the viewport
(cherry picked from commit 0f5f0dd07b)
2023-07-25 03:26:05 +00:00
zeertzjq
78b39d510a
Merge pull request #24463 from neovim/backport-24462-to-release-0.9
[Backport release-0.9] fix(mouse): drag vsep of window with 'statuscolumn'
2023-07-24 18:29:12 +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
740cb0c7dd
Merge pull request #24460 from neovim/backport-24459-to-release-0.9
[Backport release-0.9] fix(statuscolumn): don't update clicks if current width is 0
2023-07-24 15:32:33 +08: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
af1da51d11
Merge pull request #24449 from neovim/backport-24448-to-release-0.9
[Backport release-0.9] fix(highlight): make CurSearch work properly with 'winhl'
2023-07-23 21:56:01 +08: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
a3889e743f
Merge pull request #24439 from neovim/backport-24438-to-release-0.9
[Backport release-0.9] test: fix VimResume test flakiness
2023-07-23 10:14:06 +08:00
zeertzjq
8ac7491685 test: fix VimResume test flakiness
(cherry picked from commit 95c3f8be68)
2023-07-23 02:03:28 +00:00
zeertzjq
776a9b59b6
Merge pull request #24434 from neovim/backport-24426-to-release-0.9
[Backport release-0.9] fix(events): trigger VimResume on next UI request
2023-07-23 07:31:07 +08: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
d82f386201
Merge pull request #24419 from neovim/backport-24418-to-release-0.9
[Backport release-0.9] fix(terminal): send Shift-Home Shift-End Ctrl-Home Ctrl-End
2023-07-22 08:12:45 +08:00
zeertzjq
cf4b89f16b fix(terminal): send Shift-Home Shift-End Ctrl-Home Ctrl-End
(cherry picked from commit fa898b6f92)
2023-07-22 00:01:01 +00:00
zeertzjq
953904c006
Merge pull request #24384 from neovim/backport-23753-to-release-0.9
[Backport release-0.9] fix(fs.lua): normalize slash truncation
2023-07-18 14:46:07 +08:00
Mike
c0c6294123 fix(fs.lua): normalize slash truncation
Preserve last slash in windows' root drive directories

(cherry picked from commit 886996ff74)
2023-07-18 06:36:24 +00:00
zeertzjq
b0abe426d6
Merge pull request #24379 from neovim/backport-24378-to-release-0.9
[Backport release-0.9] fix(terminal): don't send unknown special keys to terminal
2023-07-17 21:53:33 +08:00
zeertzjq
115fe762b4 fix(terminal): don't send unknown special keys to terminal
Special keys are negative integers, so sending them to terminal leads to
strange behavior.

(cherry picked from commit 6b76fd9109)
2023-07-17 13:43:14 +00:00
zeertzjq
f0e4d284fd
Merge pull request #24370 from neovim/backport-23378-to-release-0.9
[Backport release-0.9] fix(clipboard): suppression exit warning if exit code is >= 128
2023-07-16 22:42:57 +08:00
Kai Ting
65d9407835 clipboard: suppression exit warning if exit code is >= 128
This is a matching change to 939d9053bd

Fixes: 7054
(cherry picked from commit 62b5d66e43)
2023-07-16 14:24:57 +00:00
zeertzjq
d3ac249806
Merge pull request #24358 from neovim/backport-24357-to-release-0.9
[Backport release-0.9] feat(tui): support Super and Meta modifiers
2023-07-15 15:13:46 +08:00
zeertzjq
344bcb5f30 feat(tui): support Super and Meta modifiers
(cherry picked from commit 881835000d)
2023-07-15 07:03:21 +00:00
zeertzjq
0bc272d0ea
Merge pull request #24321 from neovim/backport-24320-to-release-0.9
[Backport release-0.9] fix(mouse): copy the line before syntax matching
2023-07-12 09:04:35 +08:00
zeertzjq
7253cb3905 fix(mouse): copy the line before syntax matching
(cherry picked from commit 32e726e626)
2023-07-12 00:50:53 +00:00