Commit Graph

53 Commits

Author SHA1 Message Date
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
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
Gregory Anders
9e1ee9fb1d
refactor!: delete insertmode (#18547)
Neovim already removed `evim` (or any similar flags). The 'insertmode'
option is a weird remnant, so get rid of it.

The 'insertmode' option is replaced with a script that closely emulates
the option. This script is documented at :help 'insertmode'
2022-05-22 21:20:18 -06:00
zeertzjq
5193b17839
vim-patch:8.2.4993: smart/C/lisp indenting is optional (#18684)
Problem:    smart/C/lisp indenting is optional, which makes the code more
            complex, while it only reduces the executable size a bit.
Solution:   Graduate FEAT_CINDENT, FEAT_SMARTINDENT and FEAT_LISP.
8e145b8246
2022-05-22 07:52:11 +08:00
zeertzjq
84c031fade vim-patch:8.2.4922: mouse test fails on MS-Windows
Problem:    Mouse test fails on MS-Windows.
Solution:   Set 'mousemodel' to "extend".
b370771bff
2022-05-09 17:16:22 +08:00
zeertzjq
a501127899 vim-patch:8.2.4916: mouse in Insert mode test fails
Problem:    Mouse in Insert mode test fails.
Solution:   Fix the text and check relevant positions.
8e8dc9b323

Use nvim_input_mouse() to set mouse position, and discard mouse event
using getchar().
2022-05-09 17:16:22 +08:00
zeertzjq
38506553f7 vim-patch:8.2.4711: when 'insermode' is set :edit from <Cmd> mapping misbehaves
Problem:    When 'insermode' is set :edit from <Cmd> mapping misbehaves.
Solution:   Don't set "need_start_insertmode" when already in Insert mode.
            (closes vim/vim#10116)
3a56b6d405
2022-04-08 19:02:37 +08:00
zeertzjq
dcefd48c1b vim-patch:8.2.0156: various typos in source files and tests
Problem:    Various typos in source files and tests.
Solution:   Fix the typos. (Emir Sari, closes vim/vim#5532)
4b96df5a01
2022-02-14 18:56:30 +08:00
zeertzjq
fe621b4ac0 vim-patch:8.1.0711: test files still use function!
Problem:    Test files still use function!.
Solution:   Remove the exclamation mark.  Fix overwriting a function.
1e1153600c

Some of the changes were already applied previously.
2022-02-07 05:34:20 +08:00
zeertzjq
bba5003bdb vim-patch:8.2.4273: the EBCDIC support is outdated
Problem:    The EBCDIC support is outdated.
Solution:   Remove the EBCDIC support.
424bcae1fb

Also remove a comment in buf_init_chartab() as it is for enc_dbcs only.

Skip test_expr.vim: the check was already removed when patch 7.4.2265
was first ported.
2022-02-01 10:15:19 +08:00
zeertzjq
3d9ff675f8 vim-patch:8.2.4203: entering a character with CTRL-V may include modifiers
Problem:    Entering a character with CTRL-V may include modifiers.
Solution:   Reset "mod_mask" when entering a character with digits after
            CTRL-V. (closes vim/vim#9610)
502d8ae3e8

Commenting out test_override() as before.

Commenting out part of CheckNotFeature() because Vim patch 8.2.0427
cannot be ported without breaking a lot of oldtests that check for
removed features.
2022-01-25 08:21:20 +08:00
zeertzjq
f59f81c32e vim-patch:8.2.3825: various comments could be improved
Problem:    Various comments could be improved.
Solution:   Improve the comments.
52797bae17
2021-12-16 23:05:52 +08:00
Magnus Groß
980c68d036
vim-patch:8.2.3610: crash when ModeChanged triggered too early
Problem:    Crash when ModeChanged triggered too early.
Solution:   Trigger ModeChanged after setting VIsual.
a062006b9d
2021-11-18 14:23:33 +01:00
Magnus Groß
1fb101afe4
vim-patch:8.2.3609: internal error when ModeChanged is triggered recursively
Problem:    Internal error when ModeChanged is triggered when v:event is
            already in use.
Solution:   Save and restore v:event if needed.
3075a45592

In the vim codebase there is no occurrence of get_vim_var_dict(VV_EVENT)
after the above patch, so in order to hold the same invariant in the
neovim codebase we needed to replace more occurrences than the related
vim patch.
2021-11-18 14:23:33 +01:00
Magnus Groß
11683193f5
vim-patch:8.2.3555: ModeChanged is not triggered on every mode change
Problem:    ModeChanged is not triggered on every mode change.
Solution:   Also trigger on minor mode changes. (Maguns Gross, closes vim/vim#8999)
25def2c8b8
2021-11-18 11:23:18 +01:00
Magnus Groß
60c154687a
vim-patch:8.2.3463: pattern matching with ModeChanged not tested
Problem:    Pattern matching with ModeChanged not tested.
Solution:   Add a few more test lines. (issue vim/vim#8856)
72d2fa69e5
2021-11-18 11:23:18 +01:00
Magnus Groß
fc3e5caefd
vim-patch:8.2.3462: ModeChanged only uses one character for new_mode and old_mode
Problem:    The ModeChanged event only uses one character for the new_mode and
            old_mode values.
Solution:   Pass one as first argument to mode(). (issue vim/vim#8856)
d85931e673
2021-11-18 11:23:18 +01:00
Magnus Groß
69bd1e4e36
vim-patch:8.2.3430: no generic way to trigger an autocommand on mode change
Problem:    No generic way to trigger an autocommand on mode change.
Solution:   Add the ModeChanged autocommand event. (Magnus Gross, closes vim/vim#8856)
f1e8876fa2

N/A patches for version.c:

vim-patch:8.2.3434: function prototype for trigger_modechanged() is incomplete

Problem:    Function prototype for trigger_modechanged() is incomplete.
Solution:   Add "void".
28e591dd50

Fixes #4399.
Fixes #7416.
2021-11-18 11:23:18 +01:00
Matěj Cepl
2dc0af3a4f
vim-patch:8.2.3528: 'thesaurus' and 'thesaurusfunc' do not have the same scope
Problem:    'thesaurus' and 'thesaurusfunc' do not have the same scope.
Solution:   Make 'thesaurusfunc' global-local.
f4d8b76d30
2021-11-06 14:24:46 +01:00
Matěj Cepl
cbec765915
vim-patch:8.2.3520: cannot define a function for thesaurus completion
Problem:    Cannot define a function for thesaurus completion.
Solution:   Add 'thesaurusfunc'. (Yegappan Lakshmanan, closes vim/vim#8987,
            closes 8950)
160e994d76
2021-10-23 22:30:50 +02:00
Sean Dewar
3137c7d635
feat(eval/method): partially port v8.1.1925
Adds method call support for all functions in the patch, but it cannot
be fully ported due to missing tests for:

- getcwd(): requires chdir() and Test_chdir_func() from v8.1.1291.

Note that the method call tests for getreg() and getregtype() were
removed in v8.2.1547, which has already been ported, but doesn't seem to
have been replaced with a new test...

This patch also makes getchangelist()'s argument optional (defaults to
the current buffer).

eval.txt includes a typo for gettabwinvar(), which is fixed in
v8.1.1952.
2021-10-03 20:06:32 +01:00
Jan Edmund Lazo
b3ddc23507
test/old: partial port of patch 8.1.0711
Patch 8.1.0711 is too difficult to merge in 1 commit.
2020-11-30 01:18:33 -05:00
Jan Edmund Lazo
cb6b5e5540
vim-patch:8.2.1910: reading past the end of the command line
Problem:    Reading past the end of the command line.
Solution:   Check for NUL. (closes vim/vim#7204)
caf73dcfad

Cherry-pick undo_cmdmod() from patch 8.2.1137.

N/A patches for version.c:

vim-patch:8.1.2050: popup window test fails in some configurations

Problem:    Popup window test fails in some configurations. (James McCoy)
Solution:   Clear the command line.
7e0f462db5

vim-patch:8.2.0913: code for resetting v:register is duplicated

Problem:    Code for resetting v:register is duplicated.
Solution:   Add reset_reg_var().
439c036ed0

reset_reg_var() is not ported.
Use set_reg_var(get_default_register_name()) instead.

vim-patch:8.2.1913: GTK GUI: rounding for the cell height is too strict

Problem:    GTK GUI: rounding for the cell height is too strict.
Solution:   Round up above 15/16 of a pixel. (closes vim/vim#7203)
70cf45810c

vim-patch:8.2.1922: Win32: scrolling problems when part of window is off-screen

Problem:    Win32: scrolling doesn't work properly when part of window is
            off-screen.
Solution:   Fall back to GDI scrolling if part of the window is off-screen.
            Handle multi-monitor setup better. (Ken Takata, closes vim/vim#7219)
185577e47e
2020-10-29 18:36:05 -04:00
Jan Edmund Lazo
3f0850e9f0
vim-patch:8.2.1874: can't do something just before leaving Insert mode
Problem:    Can't do something just before leaving Insert mode.
Solution:   Add the InsertLeavePre autocommand event. (closes vim/vim#7177)
b53e13a91a

N/A patches for version.c:

vim-patch:8.1.1877: graduated features scattered

Problem:    Graduated features scattered.
Solution:   Put graduated and obsolete features together.
ffc0716af8

vim-patch:8.2.1875: warning when building GTK gui

Problem:    Warning when building GTK gui.
Solution:   Add missing function parameter.
3da855c8e2

vim-patch:8.2.1877: test for function list fails

Problem:    Test for function list fails.
Solution:   Move "obsolete" comments one line up.
b8f519e538

vim-patch:8.2.1878: GTK: error for redefining function

Problem:    GTK: error for redefining function. (Tony Mechelynck)
Solution:   Remove "gtk_" prefix from local functions and prepend "gui_" to
            global functions.
8a99e66b4f

vim-patch:8.2.1881: cannot build with GTK3

Problem:    Cannot build with GTK3.
Solution:   Adjust form functions.
692d1a51e7

vim-patch:8.2.1883: compiler warnings when using Python

Problem:    Compiler warnings when using Python.
Solution:   Adjust PyCFunction to also have the second argument.  Use "int"
            return type for some functions.  Insert "(void *)" to get rid of
            the remaining warnings.
4ce5fe4c87
2020-10-21 23:36:56 -04:00
Jan Edmund Lazo
b946bcbc3b
vim-patch:8.2.1842: crash when USE_FNAME_CASE is defined and using :browse
Problem:    Crash when USE_FNAME_CASE is defined and using :browse.
Solution:   Don't use read-only memory for ".". (Yegappan Lakshmanan,
            closes vim/vim#7123)
21cbe175ee
2020-10-14 08:54:00 -04:00
erw7
c043e806a5 fileio: fix "is a directory" warning on Windows
The porting of vim/vim@c8fe645 by #13040 on Windows was incomplete.
This fixes that and makes the "is a directory" warning appear properly
on Windows as well.
2020-10-06 10:31:50 +09:00
Shougo Matsushita
0f078bdde8 vim-patch:8.2.1793: not consistently giving the "is a directory" warning
Problem:    Not consistently giving the "is a directory" warning.
Solution:   Adjust check for illegal file name and directory. (Yasuhiro
            Matsumoto, closes vim/vim#7067)
c8fe645c19
2020-10-06 08:21:51 +09:00
Jan Edmund Lazo
e22c15682a
test/old: enable passing tests
Some TODO tests are passing now.

test_override('ALL', 1) clears previous overrides
so it's safe to comment out and execute the test.

Replace test_feedinput() with nvim_input().
Replace test_setmouse with nvim_input_mouse().
Note that test_setmouse is 1-based and nvim_input_mouse is 0-based.
2020-09-26 10:14:50 -04:00
Jan Edmund Lazo
df46f91977
vim-patch:8.1.2263: 'noesckeys' test fails in GUI
Problem:    'noesckeys' test fails in GUI.
Solution:   Skip the test in the GUI.
215ba3b636

Cherry-pick "CheckNotGui" command from patch 8.1.1826.
2020-09-19 10:57:57 -04:00
Jan Edmund Lazo
17106b96e9
vim-patch:8.1.2261: with modifyOtherKeys set 'noesckeys' doesn't work
Problem:    With modifyOtherKeys set 'noesckeys' doesn't work. (James McCoy)
Solution:   Disable modifyOtherKeys while in Insert mode when 'noesckeys' is
            set. (closes vim/vim#5180)
177c9f2f06
2020-09-19 10:57:57 -04:00
Jan Edmund Lazo
cf9887c838
vim-patch:8.2.0649: undo problem whn an InsertLeave autocommand resets undo
Problem:    Undo problem whn an InsertLeave autocommand resets undo. (Kutsan
            Kaplan)
Solution:   Do not create a new undo block when leaving Insert mode.
db93495d27
2020-05-03 13:16:37 -04:00
Jan Edmund Lazo
a96b3677c6
vim-patch:8.1.1988: :startinsert! does not work the same way as "A"
Problem:    :startinsert! does not work the same way as "A".
Solution:   Use the same code to move the cursor. (closes vim/vim#4896)
8d3b51084a
2019-09-06 23:27:14 -04:00
Jan Edmund Lazo
9358979d09
vim-patch:8.1.0037: cannot easily append lines to another buffer
Problem:    Cannot easily append lines to another buffer.
Solution:   Add appendbufline().
ca851593a6
2019-08-23 07:46:51 -04:00
Daniel Hahler
77729b0800 vim-patch:8.1.0811: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, the final chapter.
30276f2beb
2019-08-22 05:06:30 +02:00
Jan Edmund Lazo
ed2d651b50 vim-patch:8.0.1482: using feedkeys() does not work to test completion
Problem:    Using feedkeys() does not work to test Insert mode completion.
            (Lifepillar)
Solution:   Do not check for typed keys when executing :normal or feedkeys().
            Fix thesaurus completion not working when 'complete' is empty.
02ae9b4a93
2019-06-24 00:09:28 -04:00
Jan Edmund Lazo
f286af170d vim-patch:8.1.1348: running tests may cause the window to move
Problem:    Running tests may cause the window to move.
Solution:   Correct the reported window position for the offset with the
            position after ":winpos".  Works around an xterm bug.
f8191c5f07
2019-05-18 13:39:23 -04:00
Jan Edmund Lazo
f86f0a8bc7 vim-patch:8.1.1214: old style tests #9948
Problem:    Old style tests.
Solution:   Move tests from test14 to new style test files. (Yegappan
            Lakshmanan, closes vim/vim#4308)
c6b37db1ba
2019-04-27 21:45:53 +02:00
Jan Edmund Lazo
32998731bf vim-patch:8.1.1011: indent from autoindent not removed #9742
Problem:    Indent from autoindent not removed from blank line. (Daniel Hahler)
Solution:   Do not reset did_ai when text follows. (closes vim/vim#4119)
2ba4238818
2019-03-17 00:46:15 +01:00
Jan Edmund Lazo
a6661178aa vim-patch:8.1.0504: when CTRL-C is mapped it triggers InsertLeave (#9192)
Problem:    When CTRL-C is mapped it triggers InsertLeave.
Solution:   Make CTRL-C behave the same way when typed or used in a mapping.
4dbc262764
2018-11-03 12:04:33 +01:00
Jan Edmund Lazo
8a845ab3ef vim-patch:8.1.0219: expanding ## fails to escape backtick
Problem:    Expanding ## fails to escape backtick.
Solution:   Escape a backtick in a file name. (closes vim/vim#3257)
2c8c681bfc
2018-09-11 22:42:17 -04:00
Jan Edmund Lazo
a021b30ede vim-patch:8.1.0034: cursor not restored with ":edit #"
Problem:    Cursor not restored with ":edit #".
Solution:   Don't assume autocommands moved the cursor when it was moved to
            the first non-blank.
adb8fbec4f
2018-09-11 19:23:04 -04:00
Jan Edmund Lazo
61df24b998 vim-patch:8.0.1154: 'indentkeys' does not work properly (#8980)
Problem:    'indentkeys' does not work properly. (Gary Johnson)
Solution:   Get the cursor line again. (Christian Brabandt, closes vim/vim#2151)
1b38344e00
2018-09-11 19:55:46 +02:00
ckelsel
bbf00120f7 vim-patch:8.0.0545: edit test may fail on some systems
Problem:    Edit test may fail on some systems.
Solution:   If creating a directory with a very long path fails, bail out.
15ecbd6f3d
2018-06-16 19:43:01 +08:00
ckelsel
3ff1907593 vim-patch:8.0.0543: test_edit causes older xfce4-terminal to close
Problem:    Test_edit causes older xfce4-terminal to close. (Dominique Pelle)
Solution:   Reduce number of columns to 2000.  Try to restore the window
            position.
ba6ec18297
2018-06-16 19:41:58 +08:00
ckelsel
264725c25f vim-patch:8.0.0532: test with long directory name fails on Mac
Problem:    Test with long directory name fails on Mac.
Solution:   Skip the test on Mac systems.
c77d675747
2018-06-16 19:41:18 +08:00
ckelsel
9a1234e57f vim-patch:8.0.0531: test with long directory name fails on non-unix systems
Problem:    Test with long directory name fails on non-unix systems.
Solution:   Skip the test on non-unix systems.
9b81079ddd
2018-06-16 19:40:46 +08:00
ckelsel
ebc7f69d92 vim-patch:8.0.0530: buffer overflow when 'columns' is very big
Problem:    Buffer overflow when 'columns' is very big. (Nikolai Pavlov)
Solution:   Correctly compute where to truncate.  Fix translation.
            (closes vim/vim#1600)
658a3a2caf
2018-06-16 19:39:40 +08:00
Justin M. Keyes
04993f220a vim-patch:8.0.1205: it is possible to unload a changed buffer
Problem:    Using "1q" it is possible to unload a changed buffer. (Rick Howe)
Solution:   Check the right window for changes.

ff930cad8a
2018-02-11 22:50:54 +01:00
Justin M. Keyes
3ffeceb851 vim-patch:8.0.1226: edit and popup tests failing
Problem:    Edit and popup tests failing.
Solution:   Make the tests pass.

2a45d64d0a
2018-02-11 22:40:12 +01:00
Justin M. Keyes
163b2b241b vim-patch:8.0.1200: tests switch the bell off twice
Problem:    Tests switch the bell off twice.
Solution:   Don't set 'belloff' in individual tests. (Christian Brabandt)

67418d97b4
2018-02-11 19:03:28 +01:00