Commit Graph

5504 Commits

Author SHA1 Message Date
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
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
11e90126ba fix(startup): make recovery mode work without --headless
(cherry picked from commit e483d95289)
2023-07-25 11:28:42 +00: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
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
8ac7491685 test: fix VimResume test flakiness
(cherry picked from commit 95c3f8be68)
2023-07-23 02:03:28 +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
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
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
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
344bcb5f30 feat(tui): support Super and Meta modifiers
(cherry picked from commit 881835000d)
2023-07-15 07:03:21 +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
84086283ac fix(completion): don't add backslash in runtime completion
Problem:    Bashslashes added as regexp in runtime completion may be
            treated as path separator with some 'isfname' value.
Solution:   Make curly braces work for runtime completion and use it.
(cherry picked from commit 895cb173d2)
2023-07-08 15:29:44 +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
1234861183 fix(edit): fix K_EVENT interfering with 'digraph'
(cherry picked from commit b08549eb69)
2023-07-05 04:06:37 +00:00
zeertzjq
617c6014ea fix(api, lua): make blank lines in a message work properly
(cherry picked from commit e6bb22e691)
2023-07-03 23:19:26 +00:00
Mike
38af92ce39 fix: always set arg0 to lua scripts
Sets script's basename when no extra arguments are given

(cherry picked from commit bb9ee80a39)
2023-07-01 00:18:15 +00:00
zeertzjq
1f9c2cfa91 test(lua/runtime_spec): add test for ftplugin ordering
(cherry picked from commit 6cceef6d4c)
2023-06-30 10:22:24 +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
github-actions[bot]
c8bd1d131f
[Backport release-0.9] fix(api): nvim_cmd{cmd="win_getid"} parsed as :winsize (#24189)
fix(api): nvim_cmd{cmd="win_getid"} parsed as :winsize

Problem:
`:lua vim.cmd.win_getid(30,10)` is interpreted as `:win[size] 30 10`.
User intention was to call `vim.fn.win_getid(30,10)`.

Solution:
Check that the `cmd` actually matches the resolved command.

(cherry picked from commit 629f8d1e46)

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2023-06-28 05:34:55 -07: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
github-actions[bot]
b9a513ae11
[Backport release-0.9] fix(fs): make normalize() work with '/' path (#24060)
fix(fs): make `normalize()` work with '/' path

Problem: Current implementation of "remove trailing /" doesn't
account for the case of literal '/' as path.
Solution: Remove trailing / only if it preceded by something else.

(cherry picked from commit 80ff66118a)

Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
2023-06-19 02:01:12 -07:00
zeertzjq
6ed84f8571 vim-patch:9.0.1636: expanding a pattern interferes with cmdline completion
Problem:    Expanding a pattern interferes with command line completion.
Solution:   Set the file index only when appropriate. (closes vim/vim#12519)

094dd152fe
(cherry picked from commit a81b2b72c2)
2023-06-15 23:02:40 +00:00
zeertzjq
abed0acf56 fix(remote): restore previous --remote-expr output formatting
- Use tostring() as that's what print() uses internally.
- Do not append trailing new line.

(cherry picked from commit b6d89de60e)
2023-06-11 14:12:51 +00:00
zeertzjq
4dafd5341a fix(remote): make --remote-expr print to stdout
(cherry picked from commit 54a05558e6)
2023-06-11 07:30:08 +00:00
zeertzjq
135cdd5ac0 fix(helptags): make multibyte help tags work properly
(cherry picked from commit 9b6702c370)
2023-06-11 04:23:32 +00:00
zeertzjq
5825aec7ae vim-patch:9.0.1616: quickfix text field is truncated
Problem:    Quickfix text field is truncated.
Solution:   Fix output of text field after pattern field in quickfix buffer.
            (Shane Harper, closes vim/vim#12498)

5bf042810b

Co-authored-by: Shane Harper <shane@shaneharper.net>
(cherry picked from commit 8fe24cc428)
2023-06-07 23:03:42 +00:00
zeertzjq
27c3e1d18f fix(events): don't expand non-file as file name
(cherry picked from commit dd24ea8195)
2023-06-07 02:17:40 +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
79c8df7e97 fix(spell): splice extmarks on :spellrepall
(cherry picked from commit 22241639eb)
2023-06-06 02:32:51 +00:00
Gregory Anders
d7212c10e2 fix(editorconfig): check that buffer is valid
Fixes: https://github.com/neovim/neovim/issues/23921
(cherry picked from commit 1cf3184f95)
2023-06-05 16:53:33 +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
0e39b334c0 vim-patch:9.0.1597: cursor ends up below the window after a put
Problem:    Cursor ends up below the window after a put.
Solution:   Mark w_crow and w_botline invalid when changing the cursor line.
            (closes vim/vim#12465)

8509014add

Co-authored-by: Bram Moolenaar <Bram@vim.org>
(cherry picked from commit 7a0726caee)
2023-06-02 00:49:10 +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
eaacdd059e vim-patch:9.0.1582: :stopinsert may not work in a popup close handler
Problem:    :stopinsert may not work in a popup close handler. (Ben Jackson)
Solution:   Restore stop_insert_mode when appropriate. (closes vim/vim#12452,
            closes vim/vim#12434)

a40c0bcc83
(cherry picked from commit a9d6bc7082)
2023-05-27 14:15:41 +00:00
zeertzjq
7556850724 fix(colorscheme): try .lua files in 'rtp' before .vim files in 'pp'
This ensures that colorschemes in 'rtp' are tried before ones in 'pp',
because some colorschemes in 'pp' may not work if not added to 'rtp'.

This also match the current documentation better.

(cherry picked from commit 237a6ed2ff)
2023-05-27 03:03:56 +00:00