Commit Graph

22150 Commits

Author SHA1 Message Date
zeertzjq
f7d6f472f7 fix(float): fix float window border drawing with winbar 2022-07-10 17:24:29 +08:00
Christian Clason
2966cfe21f
fix(lsp): pcall nvim_del_augroup_by_name (#19302)
fixup for #19283
2022-07-10 11:19:26 +02:00
zeertzjq
3d77ea2762
Merge pull request #19307 from zeertzjq/vim-8.2.1053
vim-patch:7.4.1724,8.2.1053: insufficient testing for 'statusline' and 'tabline'
2022-07-10 17:13:17 +08:00
zeertzjq
fe2b281292 vim-patch:8.2.1053: insufficient testing for 'statusline' and 'tabline'
Problem:    Insufficient testing for 'statusline' and 'tabline'.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#6333)
832adf9bb8
2022-07-10 16:15:17 +08:00
zeertzjq
59355653f6 vim-patch:7.4.1724
Problem:    Tabline test fails in GUI.
Solution:   Remove 'e' from 'guioptions'.
73cd8fb3e8

Add missing file header.
2022-07-10 16:12:58 +08:00
tomial
8f36e538cc
fix(l10n): add folded line indicator translations from vim (#19286) 2022-07-10 12:36:43 +08:00
Christian Clason
d606c39a9c
vim-patch:9.0.0049: csv and tsv files are not recognized (#19300)
Problem:    Csv and tsv files are not recognized.
Solution:   Add patterns fo csv and tsv files. (Leandro Lourenci,
            closes vim/vim#10680)
99af91e582
2022-07-10 01:14:07 +02:00
Justin M. Keyes
eb9155e557
Merge #19267 require() in --startuptime 2022-07-10 01:04:11 +02:00
zeertzjq
880de9a489
test(old): align defaults to Vim after every test (#19301)
This can avoid divergences from Vim in some small places.
2022-07-10 06:59:58 +08:00
Justin M. Keyes
797007997c test: --startuptime 2022-07-09 15:45:02 -07:00
zeertzjq
d6a1e71881
vim-patch:8.1.1038: Arabic support excludes Farsi (#19285)
Problem:    Arabic support excludes Farsi.
Solution:   Add Farsi support to the Arabic support. (Ali Gholami Rudi,
            Ameretat Reith)
dc4fa190e7

Omit Test_shape_final_to_medial(): removed in later patches.
2022-07-10 06:01:49 +08:00
ii14
2c739431e8 feat(lua): measure require in --startuptime 2022-07-09 22:12:06 +02:00
Gregory Anders
782f726136
refactor: remove functions marked for deprecation in 0.8 (#19299) 2022-07-09 18:42:49 +02:00
Raphael
6b1a8f23d7
refactor(lua): replace vim.cmd use with API calls (#19283)
Signed-off-by: Raphael <glephunter@gmail.com>
2022-07-09 18:40:32 +02:00
zeertzjq
7dbe6b1a46
Merge pull request #19296 from zeertzjq/vim-8.2.2902
vim-patch:8.2.{2902,2917}: spellfile functionality not fully tested
2022-07-09 20:59:49 +08:00
zeertzjq
7b72e61cf8 vim-patch:8.2.2917: spellfile functionality not fully tested
Problem:    Spellfile functionality not fully tested.
Solution:   Add tests for SFX with removal of characters, spelling
            suggestions with NOBREAK and others. (Dominique Pellé,
            closes vim/vim#8293)
bb162367ac
2022-07-09 20:33:00 +08:00
zeertzjq
eb60a9be97 vim-patch:8.2.2902: spellfile functionality not fully tested
Problem:    Spellfile functionality not fully tested.
Solution:   Add tests for CIRCUMFIX, NOBREAK and others. (Dominique Pellé,
            closes vim/vim#8283)
5a6cfb3ff2

Reorder test_spellfile.vim to match upstream.
2022-07-09 20:33:00 +08:00
zeertzjq
022e994ab8
Merge pull request #19294 from zeertzjq/vim-8.2.0332
vim-patch:8.2.{0332,0396}: insufficient tests for cmdline
2022-07-09 18:34:48 +08:00
zeertzjq
65359e5657 vim-patch:8.2.0396: cmdexpand.c insufficiently tested
Problem:    Cmdexpand.c insufficiently tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5789)
24ebd83e03

Map Q to gQ before every test since a test uses :mapclear.
2022-07-09 17:33:49 +08:00
zeertzjq
12f0ef669d vim-patch:8.2.0332: some code in ex_getln.c not covered by tests
Problem:    Some code in ex_getln.c not covered by tests.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#5710)
d30ae2fc4a
2022-07-09 16:31:19 +08:00
zeertzjq
798acbca1b
Merge pull request #19284 from zeertzjq/vim-8.2.0274
vim-patch:8.2.{0274,0325}
2022-07-09 16:25:16 +08:00
zeertzjq
cf4aa6095f vim-patch:8.2.0325: ex_getln.c code not covered by tests
Problem:    Ex_getln.c code not covered by tests.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#5702)
578fe947e3

Cherry-pick Test_Ex_global() from patch 8.2.0293.
Test_rightleftcmd() fails if incsearch is enabled, so disable it.
2022-07-08 23:11:12 +08:00
zeertzjq
0d0a6aff6b vim-patch:8.2.0274: hang with combination of feedkeys(), Ex mode and :global
Problem:    Hang with combination of feedkeys(), Ex mode and :global.
            (Yegappan Lakshmanan)
Solution:   Add the pending_exmode_active flag.
9e2bcb5d23
2022-07-08 23:11:12 +08:00
Nicolas Hillegeer
45ba2e147f
fix(tui): add fixups for hterm family #19078
Problem
-------

In #19040, I reported two things that started happening somewhen in the
last three months when using neovim in hterm (the Chrome Secure Shell
terminal):

 1. Under certain circumstances, the window title (set by nvim
    [i0]) would appear over the line I was typing, corrupting the screen.
 2. If I changed my $TERM from xterm-256color to the new hterm-256color
    (available since ncurses >=20210320), the window title corruption
    was gone, but pane scrolling was broken.

Both problems are due to changes in the termcap files, their source of
truth being the ncurses project. See "Timeline of ncurses changes" below
for details.

Cause: title corruption
-----------------------

The title corruption when using hterm + TERM=xterm-256color can be
explained by event #4 (ncurses 2022-03-12) in the ncurses timeline:

The xterm-256color termcap file gained status line termcodes in ncurses
2022-03-12. These termcodes are used by Neovim to set the title when.
hterm does not have a status line. Due to ncurses versions earlier than
2022-03-12 missing the xterm status line capability, Neovim manually
fixed up [t0] the terminfo file if $TERM was xterm-256color. So if
before Neovim manually added fsl/tsl capabilties, and after they were
in the termcap file, why did hterm suddenly start getting corruption?
The answer is that the termcodes for these capabilties are different
when Neovim fixes them up, versus the one in the new termcap database:

   fsl=\E[0$}                  // from xterm-256color
   tsl=\E[2$~\E[1$}\E[%i%p1%d` // from xterm-256color

   fsl=\x07                    // patched by Neovim
   tsl=\x1b]0;                 // patched by Neovim

hterm ignores the latter, but corrupts the screen with the former.

Solution: Make hterm users set hterm-256color, which lacks the new
fsl/tsl codes. Also, to reduce superfluous work, stop patching in this
capability when hterm is detected (even if hterm would ignore the
patched version).

Cause: pane corruption
----------------------

The pane corruption when using hterm + TERM=hterm-256color, but NOT when
using hterm + TERM=xterm-256color can be explained by:

 - Neovim uses DECSLRM when available [p1] for performant scrolling.
 - Both the hterm-256color and xterm-256color termcap databases
   advertise support for DECSLRM (ncurses timeline #1, #2 and #3).
 - hterm does not support DESCLRM [p2] (note: it does support DESCTBM for
   top/bottom scrolling, but it's broken [p3] and not used by Neovim)
 - xterm-alikes that are not real xterm generally don't support DECSLRM
   either, so Neovim patches it out [p4].

When using hterm-256color, hterm is no longer considered an xterm-alike
by Neovim. As a result, DECSLRM is not cleared. hterm does not support
it, so corruption ensues.

This is a problem with the hterm-256color termcap file, but we're stuck
with it so the best we can do is patch over it.

Timeline of ncurses changes
---------------------------

 1. 2019-05-19: Part of the DECSLRM capability (smglr AKA set_lr_margin)
    added to vt420+lrmm, which xterm-256color inherits [n1]
 2. 2021-03-20: hterm-256color added, inheriting xterm-256colors. [n2]
 3. 2021-09-25: The *parm versions of smglr (AKA set_lr_margin) were
    added to vt420+lrmm [n3]. Namely:
     1. smglp AKA set_left_margin_parm, and
     2. smgrp AKA set_right_margin_parm
 4. 2022-03-12: (new) codes for fsl, bsl and tsl added to xterm (add
    dec+sl to xterm-new, per patch #371 -TD) [n4]

Fixes #19040.

[i0]: 3a4fa22bad/src/nvim/tui/tui.c (L1377)
[t0]: 3a4fa22bad/src/nvim/tui/tui.c (L1728),L1729
[p1]: 3a4fa22bad/src/nvim/tui/tui.c (L1196)
[p2]: https://bugs.chromium.org/p/chromium/issues/detail?id=1175065&q=component%3APlatform%3EApps%3EDefault%3EHterm
[p3]: https://bugs.chromium.org/p/chromium/issues/detail?id=1298796&q=component%3APlatform%3EApps%3EDefault%3EHterm
[p4]: 3a4fa22bad/src/nvim/tui/tui.c (L1740-L1752)
[n1]: https://github.com/mirror/ncurses/commit/8f6d94b8d6211a2323caef53fa4c96c475ec9a6#diff-01544c577762d3308a1d232aa7afc79acf64b9a5057f88a004df82fda89549b7R2742
[n2]: c2650100f8 (diff-01544c577762d3308a1d232aa7afc79acf64b9a5057f88a004df82fda89549b7R5907)
[n3]: f6b436c4fb (diff-01544c577762d3308a1d232aa7afc79acf64b9a5057f88a004df82fda89549b7R2842)
[n4]: 8bf8c836fe (diff-01544c577762d3308a1d232aa7afc79acf64b9a5057f88a004df82fda89549b7R4828)

Signed-off-by: Nicolas Hillegeer <nicolas@hillegeer.com>
2022-07-08 06:06:27 -07:00
zeertzjq
b999de2eb0
Merge pull request #19278 from zeertzjq/vim-8.2.0132
vim-patch:8.2.{0132,0136,0151}: detecting a script was already sourced is unreliable
2022-07-08 20:12:58 +08:00
zeertzjq
a6803f3adf test: add a test for what Vim patch 8.2.0151 fixes 2022-07-08 14:18:16 +08:00
zeertzjq
159a0b651f vim-patch:8.2.0151: detecting a script was already sourced is unreliable
Problem:    Detecting a script was already sourced is unreliable.
Solution:   Do not use the inode number.
978d170bdc
2022-07-08 14:17:22 +08:00
zeertzjq
eafa09de7d vim-patch:8.2.0136: stray ch_logfile() call
Problem:    Stray ch_logfile() call.
Solution:   Remove it. (closes vim/vim#5503)
ed5adff1e6
2022-07-08 11:11:22 +08:00
zeertzjq
a890c019a3 vim-patch:8.2.0132: script may be re-used when deleting and creating a new one
Problem:    Script may be re-used when deleting and creating a new one.
Solution:   When the inode matches, also check the file name.
ca33eb256e
2022-07-08 11:11:22 +08:00
zeertzjq
ca64b589cd
vim-patch:8.1.{1524,1544}: tests are silently skipped (#19276)
This is a port of these two patches combined:

vim-patch:8.1.1524: tests are silently skipped

Problem:    Tests are silently skipped.
Solution:   Throw an exception for skipped tests in more places.
b0f94c1ff3

vim-patch:8.1.1544: some balloon tests don't run when they can

Problem:    Some balloon tests don't run when they can.
Solution:   Split GUI balloon tests off into a separate file. (Ozaki Kiichi,
            closes vim/vim#4538)  Change the feature check into a command for
            consistency.
b46fecd345

Omit test_lua.vim: previous patches are N/A
Omit test_memory_usage.vim: previous patches are N/A
Omit test_textprop.vim: previous patches are N/A
Omit test_winbar.vim: previous patches are N/A
Omit test_termcodes.vim: mostly N/A
Skip Test_mouse_positon() because it uses test_setmouse().
Cannot throw error in a Test_nocatch_ test.
Use latest `CheckFeature clipboard_working` for test_quotestar.vim
2022-07-08 08:26:25 +08:00
Christian Clason
72877bb17d
feat(runtime)!: enable filetype.lua by default (#19216)
* revert to filetype.vim by setting `g:do_legacy_filetype`
* skip either filetype.lua or filetype.vim via `g:did_load_filetypes`

(Running both is no longer required and therefore no longer supported.)
2022-07-07 18:53:47 +02:00
Christian Clason
0950275b8c
refactor(lua): git-blame-ignore stylua update PR (#19273)
https://github.com/neovim/neovim/pull/19264
2022-07-07 18:32:53 +02:00
Christian Clason
aa4f9c5341
refactor(lua): reformat with stylua 0.14.0 (#19264)
* reformat Lua runtime to make lint CI pass
* reduce max line length to 100
2022-07-07 18:27:18 +02:00
Wsevolod
34d41baf8a
feat(tui): try terminfo for [re]set_cursor_color OSC #19255 2022-07-07 02:09:11 -07:00
Christian Clason
55e81b0fe8
vim-patch:5ed11535e069 (#19256)
Update runtime files
5ed11535e0
2022-07-07 08:15:33 +02:00
zeertzjq
6b72ee1f15
Merge pull request #19263 from zeertzjq/vim-8.2.3674
vim-patch:8.2.{3674,4399}: problems after ml_get error
2022-07-07 08:35:29 +08:00
zeertzjq
8ce60ddd07 vim-patch:8.2.4399: crash after ml_get error
Problem:    Crash after ml_get error.
Solution:   When returning "???" flush the line and set ml_line_lnum.
f9435e49ef
2022-07-07 08:10:53 +08:00
zeertzjq
4bb01262ca vim-patch:8.2.3674: when ml_get_buf() fails it messes up IObuff
Problem:    When ml_get_buf() fails it messes up IObuff.
Solution:   Return a local pointer. (closes vim/vim#9214)
96e7a5928e
2022-07-07 08:10:00 +08:00
zeertzjq
4cded8cec1
Merge pull request #19180 from zeertzjq/tui-kitty-keypad
feat(tui): recognize keypad keys when using kitty keyboard protocol
2022-07-07 07:42:22 +08:00
zeertzjq
5e84db5c90
Merge pull request #19261 from zeertzjq/vim-8.2.5023
vim-patch:8.2.{5023,5043,5044}: substitute textlock fixes
2022-07-07 07:21:50 +08:00
zeertzjq
d4db87f493 vim-patch:8.2.5044: command line test fails
Problem:    Command line test fails.
Solution:   Also beep when cmdline win can't be opened because of locks.
            Make the test not beep.  Make the test pass on MS-Windows.
be99042b03
2022-07-07 07:00:11 +08:00
zeertzjq
0612101c92 vim-patch:8.2.5043: can open a cmdline window from a substitute expression
Problem:    Can open a cmdline window from a substitute expression.
Solution:   Disallow opening a command line window when text or buffer is
            locked.
71223e2db8
2022-07-07 07:00:11 +08:00
zeertzjq
df4c634d06 vim-patch:8.2.5023: substitute overwrites allocated buffer
Problem:    Substitute overwrites allocated buffer.
Solution:   Disallow undo when in a substitute command.
338f1fc0ee
2022-07-07 07:00:11 +08:00
zeertzjq
4ffe5d0189
vim-patch:8.2.5063: error for a command may go over the end of IObuff (#19260)
Problem:    Error for a command may go over the end of IObuff.
Solution:   Truncate the message.
44a3f3353e
2022-07-07 06:37:54 +08:00
zeertzjq
664efa497e
vim-patch:8.2.0614: get ml_get error when deleting a line in 'completefunc' (#19244)
Problem:    Get ml_get error when deleting a line in 'completefunc'. (Yegappan
            Lakshmanan)
Solution:   Lock the text while evaluating 'completefunc'.
ff06f283e3

Fix a mistake in the porting of patch 8.1.0098.
Cherry-pick Test_run_excmd_with_text_locked() from patch 8.2.0270.
Cherry-pick test_gf.vim changes from patch 8.2.0369.
Cherry-pick message change from later patches.
2022-07-07 04:47:18 +08:00
Christian Clason
1e03255646
Merge pull request #19218 from smjonas/fix_ft_patterns
fix(filetype): fix filetype patterns
fix(filetype): remove call to vim.fn.resolve and pass filename to match function
2022-07-06 16:57:44 +02:00
smjonas
f9683f2823 fix(filetype): remove call to vim.fn.resolve and pass filename to match function
For example on MacOS, /etc/hostname.file is symlinked to
/private/etc/hostname.file. We only care about the original file path though.
2022-07-06 16:25:51 +02:00
smjonas
f3c78a4465 fix(filetype): fix filetype patterns 2022-07-06 16:25:23 +02:00
zeertzjq
c84ae5706f
Merge pull request #19247 from zeertzjq/vim-8.2.4165
vim-patch:7.4.212,8.2.{4165,4221}: some functions in normal.c are too long
2022-07-06 20:44:41 +08:00
zeertzjq
1a490a5bc5 fix(normal): fix segfault with bracket command jumping to a mark
vim-patch:9.0.0043: insufficient testing for bracket commands

Problem:    Insufficient testing for bracket commands.
Solution:   Add a few more tests. (closes vim/vim#10668)
cf34434b5e

Cherry-pick a change from patch 8.2.0369.
2022-07-06 20:01:01 +08:00