Commit Graph

22308 Commits

Author SHA1 Message Date
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
zeertzjq
8e03d42ec8 vim-patch:8.2.4221: some functions in normal.c are very long
Problem:    Some functions in normal.c are very long.
Solution:   Move code to separate functions. (Yegappan Lakshmanan,
            closes vim/vim#9628)
a827bf3ea8
2022-07-06 19:58:44 +08:00
zeertzjq
ff111b615a vim-patch:8.2.4165: the nv_g_cmd() function is too long
Problem:    The nv_g_cmd() function is too long.
Solution:   Move code to separate functions. (Yegappan Lakshmanan,
            closes vim/vim#9576)
05386ca1d4
2022-07-06 19:58:44 +08:00
zeertzjq
1b5f53ca95 vim-patch:7.4.212
Problem:    Now that the +visual feature is always enabled the #ifdefs for it
            are not useful.
Solution:   Remove the checks for FEAT_VISUAL.
f7ff6e85e8
2022-07-06 19:58:44 +08:00
Jay
93c8fe77cb
feat: add 'mousescroll' option (#12355)
Add 'mousescroll' option to control how many lines to scroll by when a
mouse wheel keycode is received. The mousescroll option controls both
horizontal and vertical scrolling. The option is a string in the format:

    set mousescroll=direction:count,direction:count

Where direction is either "ver" or "hor", and count is a non negative
integer. If a direction is omitted, a default value is used. The default
values remain unchanged, that is 3 for vertical scrolling, and 6 for
horizontal scrolling. As such, the mousescroll default is "ver:3,hor:6".

Add mousescroll documentation
 - Add option documentation in options.txt
 - Add brief summary in quickref.txt

Update :help scroll-mouse-wheel
 - Mention mousescroll option as a means of controlling scrolling.
 - Remove obsolete suggestion to map scroll wheel keys to <C-U> to
   scroll by a single line -- users should prefer the mousescroll option.
 - Add some information about the consequences of remapping scroll wheel
   keys (they lose their magic ability to affect inactive windows).

Update :help vim-differences
 - Add brief mousescroll summary under Options

Add mousescroll tests
 - Test option validation
 - Test default mousescroll value and behavior
 - Test fallback to default values
 - Test mouse vertical and horizontal scrolling in normal mode
 - Test mouse vertical and horizontal scrolling in insert mode
2022-07-06 19:34:24 +08:00
zeertzjq
9ced054134
fix(mark): fix unexpected cursor movements (#19253) 2022-07-06 19:01:44 +08:00
Christian Clason
c68f1d7263
Merge pull request #19242 from smjonas/vim-9.0.0042
vim-patch:9.0.{0041,0042}: filetype patterns
2022-07-06 08:14:08 +02:00
zeertzjq
606af7887b
vim-patch:8.2.5162: reading before the start of the line with BS in Replace mode (#19241)
Problem:    Reading before the start of the line with BS in Replace mode.
Solution:   Check the cursor column is more than zero.
0971c7a4e5
2022-07-06 07:36:36 +08:00
smjonas
78300a1587 vim-patch:9.0.0042: missing change for filetype detection
Problem:    Missing change for filetype detection.
Solution:   Include change to detect guile from shebang line.
3244780379
2022-07-06 01:33:45 +02:00
smjonas
8b7399782e vim-patch:9.0.0041: a couple of filetype patterns do not have "*" before "/etc"
Problem:    A couple of filetype patterns do not have "*" before "/etc".
Solution:   Add the star. (Jonas Strittmatter, closes vim/vim#10662)
704988f0c3
2022-07-06 01:25:21 +02:00
James McCoy
41785b1b0c
Merge pull request #19223 from lewis6991/ghaction
build: add github action annotations for clint
2022-07-05 09:53:41 -04:00
zeertzjq
a4801b8034
vim-patch:8.0.1562: the terminal debugger can't set a breakpoint with the mouse (#19234)
Problem:    The terminal debugger can't set a breakpoint with the mouse.
Solution:   Add popup menu entries.
71137fed4d

This ports missing popup menu code to termdebug plugin.
Despite the commit message, the code is copied from latest Vim.
WinBar code is commented out and WinBar docs is not ported.
2022-07-05 20:57:01 +08:00
zeertzjq
2536bde6c9
Merge pull request #19232 from zeertzjq/vim-8.2.2904
vim-patch:8.2.{2904,3644.3980,3990}: three Normal mode fixes
2022-07-05 18:48:26 +08:00
zeertzjq
785422ad54 vim-patch:8.2.3990: testing wrong operator
Problem:    Testing wrong operator.
Solution:   Test "g@" instead of "r_". (Naohiro Ono, closes vim/vim#9463)
5c75eed758
2022-07-05 17:32:42 +08:00
zeertzjq
5fcf701ba1 vim-patch:8.2.3980: if 'operatorfunc' invokes an operator Visual mode is changed
Problem:    If 'operatorfunc' invokes an operator the remembered Visual mode
            may be changed. (Naohiro Ono)
Solution:   Save and restore the information for redoing the Visual area.
            (closes vim/vim#9455)
b3bd1d39e6
2022-07-05 17:32:42 +08:00
zeertzjq
dd5fce2f5d vim-patch:8.2.3644: count for 'operatorfunc' in Visual mode is not redone
Problem:    Count for 'operatorfunc' in Visual mode is not redone.
Solution:   Add the count to the redo buffer. (closes vim/vim#9174)
2228cd72cf

Cherry-pick a line from patch 8.2.0522.
2022-07-05 17:32:42 +08:00
zeertzjq
f42657cbcf vim-patch:8.2.2904: "g$" causes scroll if half a double width char is visible
Problem:    "g$" causes scroll if half a double width char is visible.
Solution:   Advance to the last fully visible character. (closes vim/vim#8254)
74ede80aeb
2022-07-05 17:32:42 +08:00
Justin M. Keyes
d0835617fa
fix(terminal): crash if TermClose deletes own buffer #19222
- Partially fixes #10386 except for the case where the alternate buffer
  is the default, empty, first buffer created on startup. #vimlife
- TODO: port patches related to `can_unload_buffer`, maybe that fully
  fixes #10386?

vim-patch:8.0.1732: crash when terminal API call deletes the buffer
2022-07-05 02:31:49 -07:00
zeertzjq
eb814bdca0
Merge pull request #19231 from zeertzjq/vim-8.2.3615
vim-patch:8.2.{3615,3754,5122}: indent fixes
2022-07-05 15:39:50 +08:00
zeertzjq
d9e5737fdc vim-patch:8.2.5122: lisp indenting my run over the end of the line
Problem:    Lisp indenting my run over the end of the line.
Solution:   Check for NUL earlier.
0e8e938d49
2022-07-05 15:10:46 +08:00
zeertzjq
04ba37773e vim-patch:8.2.3754: undesired changing of the indent of the first formatted line
Problem:    Undesired changing of the indent of the first formatted line.
Solution:   Do not indent the first formatted line.
ecabb51107
2022-07-05 15:08:41 +08:00
zeertzjq
42863634dd vim-patch:8.2.3615: wrong indent in first line if re-formatting with indent expr
Problem:    When re-formatting with an indent expression the first line of a
            paragraph may get the wrong indent. (Martin F. Krafft)
Solution:   Apply the correct indenting function for the first line.
            (Christian Brabandt, closes vim/vim#9150, closes vim/vim#9056)
818ff25cd1
2022-07-05 15:04:37 +08:00
zeertzjq
6e2d23ac43
Merge pull request #19229 from zeertzjq/vim-8.2.0363
vim-patch:8.2.{0363,0416}: some Normal mode commands not tested
2022-07-05 14:57:48 +08:00
zeertzjq
24db6c1e57 vim-patch:8.2.0416: test leaves file behind
Problem:    Test leaves file behind.
Solution:   Delete the file.
95e59a355b
2022-07-05 14:33:36 +08:00
zeertzjq
a01905eb35 vim-patch:8.2.0363: some Normal mode commands not tested
Problem:    Some Normal mode commands not tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5746)
f5f1e10d0d

Omit Test_edit_forbidden(): change reverted in patch 8.2.0369.
Cherry-pick Test_normal_yank_with_excmd() from patch 8.2.0293.
Skip Test_normal_cursorhold_with_count().
Cherry-pick Test_star_register() from patch 8.2.0270.
2022-07-05 14:22:58 +08:00
zeertzjq
936c11f9c8 test(old): use Q -> gQ mapping instead of changing test when possible 2022-07-05 13:54:11 +08:00
zeertzjq
d07a39c54b
vim-patch:9.0.0035: spell dump may go beyond end of an array (#19228)
Problem:    Spell dump may go beyond end of an array.
Solution:   Limit the word length.
54e5fed6d2
2022-07-05 06:47:58 +08:00
zeertzjq
826fe56f5c
fix(mark): mark without a view restores at topline #19224
For a local mark without a view, currently trying to restore its view
will put the cursor at topline, which is not the correct behavior.
Initialize `topline_offset` to `MAXLNUM` instead to fix this.
2022-07-04 13:28:14 -07:00
Javier Lopez
1803b0ffd7
fix(tui): resize at startup #17795
* fix(test): screen.lua nil index
  When actual_rows and expected_rows are different avoid a nil index.
* fix(tui): resize at startup
  The deleted code is not needed after 402b4e8.
  It caused the condition to false positive when the function was called
  more than once before startup (first normal mode). Being itself what
  set the dimension and not the user, locking the size of the screen to
  an incorrect size.
  Make got_winch an int to mitigate: tui_grid_resize changing the size
  of the host terminal between the signal handler and the call to
  sigwinch_cb. Since the actual signal handler uv__signal_handle doesn't
  directly call the callback, the event loop does.

Fixes #17285
Fixes #15044
Fixes #11330
2022-07-04 13:09:47 -07:00
zeertzjq
03c9cf3feb test: add tests for keypad keys from kitty keyboard protocol 2022-07-04 22:37:45 +08:00
Lewis Russell
5b609bbefb build: add github action annotations for clint 2022-07-04 14:20:10 +01:00
erw7
33ed85a2f6 feat(tui): recognize keypad keys when using kitty keyboard protocol 2022-07-04 21:09:33 +08:00
zeertzjq
ab5929e1b0
Merge pull request #19221 from zeertzjq/vim-8.2.1808
vim-patch:8.2.{1808,5098},9.0.0034
2022-07-04 18:59:27 +08:00
zeertzjq
a4160dd105 vim-patch:9.0.0034: spell tests do not always clear the word list
Problem:    Spell tests do not always clear the word list.
Solution:   Clear the word list in TearDown(). (closes vim/vim#10659)
288ed23e39
2022-07-04 18:38:39 +08:00
zeertzjq
08aba02ad7 vim-patch:8.2.5098: spelldump test sometimes hangs
Problem:    Spelldump test sometimes hangs.
Solution:   Catch the problem of the spell file not being found to avoid
            hanging in the download dialog.
fc9f0fd6d1
2022-07-04 18:37:46 +08:00
zeertzjq
d9c63507f8 vim-patch:8.2.1808: no test coverage for ":spelldump!"
Problem:    No test coverage for ":spelldump!".
Solution:   Add a test. (Dominique Pellé, closes vim/vim#7089)
f12f0022e6
2022-07-04 18:37:36 +08:00
erw7
436747752b
refactor: remove unnecessary volatile #19210
libuv does not call callback functions(uv_signal_cb) directly from signal
handlers. Therefore, there is no need to use volatile.

Ref. 1a91b51976/src/unix/signal.c (L183)
2022-07-04 03:28:59 -07:00
zeertzjq
f075feee32
Merge pull request #19220 from zeertzjq/vim-8.2.1470
vim-patch:8.2.{1470,1493,1522,1523,1770,5072,5074}: spell patches
2022-07-04 11:13:19 +08:00
zeertzjq
6b474d0237 vim-patch:8.2.5074: spell test fails on MS-Windows
Problem:    Spell test fails on MS-Windows.
Solution:   Do not change 'encoding'
ad73cc2ff2
2022-07-04 10:02:35 +08:00
zeertzjq
a4215a0a21 vim-patch:8.2.5072: using uninitialized value and freed memory in spell command
Problem:    Using uninitialized value and freed memory in spell command.
Solution:   Initialize "attr".  Check for empty line early.
2813f38e02
2022-07-04 10:02:35 +08:00
zeertzjq
1ff86aa634 vim-patch:8.2.1770: invalid memory use when using SpellFileMissing autocmd
Problem:    Invalid memory use when using SpellFileMissing autocmd.
Solution:   Add test case. (Dominique Pellé, closes vim/vim#7036)  Fix using a window
            that was closed.
d569a9e746

Skip an assert because of #3027.
2022-07-04 09:37:45 +08:00
zeertzjq
7648a8524c vim-patch:8.2.1523: still not enough test coverage for the spell file handling
Problem:    Still not enough test coverage for the spell file handling.
Solution:   Add spell file tests. (Yegappan Lakshmanan, closes vim/vim#6790)
b9fc192f92
2022-07-04 09:18:35 +08:00
zeertzjq
a2d8d5e1f5 vim-patch:8.2.1522: not enough test coverage for the spell file handling
Problem:    Not enough test coverage for the spell file handling.
Solution:   Add spell file tests. (Yegappan Lakshmanan, closes vim/vim#6763)
c8ec5fe56f

Add missing whitespace in message.
2022-07-04 09:15:03 +08:00
zeertzjq
ed64c8f683 vim-patch:8.2.1493: not enough test coverage for the spell file handling
Problem:    Not enough test coverage for the spell file handling.
Solution:   Add spell file tests. (Yegappan Lakshmanan, closes vim/vim#6728)
fc2a47ffc4
2022-07-04 09:09:42 +08:00