Commit Graph

61 Commits

Author SHA1 Message Date
b90c2395b2 patch 9.1.1485: missing Wayland clipboard support
Problem:  missing Wayland clipboard support
Solution: make it work (Foxe Chen)

fixes: #5157
closes: #17097

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-27 21:10:35 +02:00
7e93d4c617 patch 9.1.1322: small delete register cannot paste multi-line correctly
Problem:  small delete register cannot paste multi-line correctly
          (after v8.2.2189)
Solution: caused by 032a2d050b, so make
          this logic handle charwise only (phanium)

closes: #17151

Signed-off-by: phanium <91544758+phanen@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-18 18:32:52 +02:00
a95085e0fc patch 9.1.1171: tests: wrong arguments passed to assert_equal()
Problem:  tests: wrong arguments passed to assert_equal()
          (after v9.1.1167).
Solution: Swap arguments in the assert_equal() call (zeertzjq).

closes: #16782

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-04 21:33:57 +01:00
360a39ae6c patch 9.1.1167: mark '] wrong after copying text object
Problem:  mark '] wrong after copying text object (ubaldot)
Solution: Adjust position of '] for non-linewise, exclusive motions
          (Jim Zhou)

related: #16679
closes: #16772

Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-03 19:58:25 +01:00
4be1ab80be patch 9.1.1156: tests: No test for what patch 9.1.1152 fixes
Problem:  No test for what patch 9.1.1152 fixes.
Solution: Add a test (zeertzjq).

closes: #16742

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-27 19:22:26 +01:00
e0029daa35 patch 9.1.1143: illegal memory access when putting a register
Problem:  illegal memory access when putting a register
Solution: make sure cursor column doesn't become negative

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 20:01:54 +01:00
44c1c04ddb patch 9.1.1120: tests: Test_registers fails
Problem:  tests: Test_registers fails
          (T.J. Townsend, after v9.1.1115)
Solution: require clipboard feature

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-17 22:27:45 +01:00
c0f0e2380e patch 9.1.1115: [security]: use-after-free in str_to_reg()
Problem:  [security]: use-after-free in str_to_reg()
          (fizz-is-on-the-way)
Solution: when redirecting the :display command, check that one
          does not output to the register being displayed

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-63p5-mwg2-787v

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:06:38 +01:00
a17f8bfb28 patch 9.1.1083: setreg() doesn't correctly handle mbyte chars in blockwise mode
Problem:  setreg() doesn't correctly handle mbyte chars in blockwise
          mode
Solution: use mb_ptr2len_len function pointer (Yee Cheng Chin)

setreg() will automatically calculate the width when a blockwise mode is
specified, but it does not properly calculate the line widths of mbyte
characters when value is passed as newline-terminated string. It does
work when value is passed as a list of lines though.

Fix this by properly using the mbyte function pointer to increment the
loop counter.

closes: #16596

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-08 18:19:15 +01:00
b2a8df35e8 patch 9.1.0944: tests: test_registers fails when not run under X11
Problem:  tests: test_registers fails when not run under X11
Solution: filter out warning message

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-18 20:40:48 +01:00
a15dfc2d41 patch 9.1.0872: No test for W23 message
Problem:  No test for W23 message
Solution: Check for W23 message when accessing the clipboard fails
          (after v9.1.0868)

closes: #16076

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-18 21:20:54 +01:00
8b94afc207 patch 9.1.0868: the warning about missing clipboard can be improved
Problem:  the warning about missing clipboard can be improved
          (after v9.1.0852)
Solution: use different warnings depending on whether or not clipboard
          support is included in Vim, update related documentation

Improve the Warnings about missing clipboard registers

- Make it translatable
- Use a different warning, when clipboard support was not compiled in
- add a reference to :h W24
- explain in more detail the error message

closes: #16069

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-17 16:07:50 +01:00
45e0704d96 patch 9.1.0852: No warning when X11 registers are not available
Problem:  No warning when X11 registers are not available
          (delvh)
Solution: Output W23 once when connection to X11 clipboard/selection
          is not possible, mention in the documentation, that register 0
          will be used instead

Vim silently uses the 0 register, when clipboard or selection register * or +
are not available. This might be a bit unexpected for the user.

So let's just warn once when this happens.

fixes: #14768
closes: #16013

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-11 20:52:55 +01:00
6b13e3d4e4 patch 9.1.0365: Crash when typing many keys with D- modifier
Problem:  Crash when typing many keys with D- modifier (after 9.1.0227).
Solution: Don't treat a 0x80 byte inside a special sequence as the start
          of a special sequence (zeertzjq).

closes: #14613

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-22 21:04:29 +02:00
757f32141b patch 9.1.0332: tests: some assert_equal() calls have wrong order of args
Problem:  tests: some assert_equal() calls have wrong order of args
Solution: Correct the order (zeertzjq).

closes: #14555

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-15 19:01:04 +02:00
ea95f1a5ad patch 9.1.0227: Recording may still be wrong in Select mode
Problem:  Recording may still be wrong in Select mode (after 8.2.3993).
Solution: Make sure a character isn't split between two buffer blocks.
          (zeertzjq)

closes: #14326

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-29 10:11:42 +01:00
bf321806bf patch 9.1.0060: Recorded register cannot be translated using keytrans()
Problem:  Recorded register cannot be translated using keytrans() when
          it involves character search (iddqd505)
Solution: Record a K_IGNORE instead of a K_NOP (zeertzjq)

related: #13916
closes: #13925

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-28 19:03:00 +01:00
424ec1f235 patch 9.1.0021: i_CTRL-R- doesn't work for multibyte chars in Replace mode
Problem:  i_CTRL-R- doesn't work for multibyte chars in Replace mode,
          Coverity complains missing return value for u_save_cursor()
Solution: Use mb_charlen() and del_chars() instead, handle failure mode
          for u_save_cursor() correctly (@zeertzjq)

closes: #13846

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-12 17:43:05 +01:00
5d5cbb2b9a patch 9.1.0015: i_CTRL-R- no longer works in replace mode
Problem:  i_CTRL-R- no longer works in replace mode
Solution: delete characters in replace mode before putting, add a test,
          add a bit warning into the documentation, that i_CTRL-R-P/O
          is not supported in Replace mode for now

fixes: #13792
closes: #13816

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-05 18:19:52 +01:00
615202bd0e patch 9.0.2178: reg_executing() wrong for :normal with range
Problem:  reg_executing() returns wrong result in :normal with range
          when 'showcmd' is set (after 8.2.4705).
Solution: Reset "pending_end_reg_executing" when executing a register.

closes: #13707

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:35:40 +01:00
bacc83009b patch 9.0.1694: wrong mapping applied when replaying a char search
Problem: wrong mapping applied when replaying a char search
Solution: Store a NOP after the ESC

closes: #12708
closes: #6350

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-12 00:09:31 +02:00
eb43b7f053 patch 9.0.1596: :registers command does not work in sandbox
Problem:    :registers command does not work in sandbox.
Solution:   Add flag to the command. (closes #12473)
2023-06-01 12:45:22 +01:00
d1ae8366af patch 9.0.1531: crash when register contents ends up being invalid
Problem:    Crash when register contents ends up being invalid.
Solution:   Check "y_array" is not NULL.
2023-05-09 17:09:30 +01:00
82946e1439 patch 9.0.0936: wrong type for "isunnamed" returned by getreginfo()
Problem:    Wrong type for "isunnamed" returned by getreginfo().
Solution:   Use VAR_BOOL instead of VAR_SPECIAL. (closes #11598)
2022-11-24 11:31:29 +00:00
559f230fd6 patch 9.0.0078: star register is unexpectedly changed when deleting
Problem:    Star register is changed when deleting and both "unnamed" and
            "unnamedplus" are in 'clipboard'.
Solution:   Make the use of the star register work as documented. (Ernie Rael,
            closes #10669)
2022-07-26 14:44:36 +01:00
81b46a6ccd patch 8.2.4722: ending recording with mapping records too much
Problem:    When a recording is ended with a mapped key that key is also
            recorded.
Solution:   Remember the previous last_recorded_len. (closes #10122)
2022-04-09 17:58:49 +01:00
6d4e725a34 patch 8.2.4705: jump list marker disappears
Problem:    Jump list marker disappears.
Solution:   Reset reg_executing later. (closes #10111, closes #10100)
2022-04-07 13:58:04 +01:00
fbf4f1ca15 patch 8.2.4237: record buffer wrong if character in Select mode was not typed
Problem:    Record buffer wrong if character in Select mode was not typed.
Solution:   Only delete the tail from the record buffer if the character was
            typed. (closes #9650)
2022-01-28 12:50:43 +00:00
a4bc2dd7cc patch 8.2.4233: crash when recording and using Select mode
Problem:    Crash when recording and using Select mode.
Solution:   When deleting the last recorded character check there is something
            to delete.
2022-01-27 19:27:16 +00:00
c88e977862 patch 8.2.3993: when recording a change in Select mode char appears twice
Problem:    When recording a change in Select mode the first typed character
            appears twice.
Solution:   When putting the character back into typeahead remove it from
            recorded characters. (closes #9462)
2022-01-03 13:47:50 +00:00
78eb9cce91 patch 8.2.3439: deleted lines go to wrong yank register
Problem:    Deleted lines go to wrong yank register.
Solution:   Reset y_append when not calling get_yank_register(). (Christian
            Brabandt, closes #8872)
2021-09-14 18:55:51 +02:00
34fcb69724 patch 8.2.2886: various pieces of code not covered by tests
Problem:    Various pieces of code not covered by tests.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #8255)
2021-05-25 20:14:00 +02:00
f4fcedc59d patch 8.2.2608: character input not fully tested
Problem:    Character input not fully tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes #7963)
2021-03-15 18:36:20 +01:00
9f63a65f22 patch 8.2.2197: assert arguments order reversed
Problem:    Assert arguments order reversed.
Solution:   Swap the arguments. (Christian Brabandt, closes #7531)
2020-12-23 12:50:20 +01:00
032a2d050b patch 8.2.2189: cannot repeat a command that uses the small delete register
Problem:    Cannot repeat a command that uses the small delete register.
Solution:   Store the register name instead of the contents. (Christian
            Brabandt, closes #7527)
2020-12-22 17:59:35 +01:00
d1ad99b654 patch 8.2.1799: some Normal mode commands not fully tested
Problem:    Some Normal mode commands not fully tested.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #7073)
2020-10-04 16:16:54 +02:00
8a9bc95eae patch 8.2.1786: various Normal mode commands not fully tested
Problem:    Various Normal mode commands not fully tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes #7059)
2020-10-02 18:48:07 +02:00
6d91bcb4d2 patch 8.2.1432: various inconsistencies in test files
Problem:    Various inconsistencies in test files.
Solution:   Add modelines where they were missing.  Use Check commands instead
            of silently skipping over tests.  Adjust indents and comments.
            (Ken Takata, closes #6695)
2020-08-12 18:50:36 +02:00
11a5b19a8c patch 8.2.1174: no test for the "recording @x" message
Problem:    No test for the "recording @x" message.
Solution:   Add a test. (Dominique Pellé, closes #6427)
2020-07-10 21:17:51 +02:00
ef85a9b2d9 patch 8.2.1170: cursor off by one with block paste while 'virtualedit' "all"
Problem:    Cursor off by one with block paste while 'virtualedit' is "all".
Solution:   Adjust condition. (Hugo Gualandi, closes #6430)
2020-07-10 20:24:07 +02:00
25fd267287 patch 8.2.1039: cannot put NUL byte on clipboard
Problem:    Cannot put NUL byte on clipboard.
Solution:   Use the text length. (Christian Brabandt, closes #6312,
            closes #6149)
2020-06-22 20:30:27 +02:00
7633fe595e patch 8.2.1035: setreg() does not always clear the register
Problem:    setreg() does not always clear the register.
Solution:   Clear the register if the dict argument is empty. (Andy Massimino,
            closes #3370)
2020-06-22 19:10:56 +02:00
856c1110c1 patch 8.2.0997: cannot execute a register containing line continuation
Problem:    Cannot execute a register containing line continuation.
Solution:   Concatenate lines where needed. (Yegappan Lakshmanan,
            closes #6272)
2020-06-17 21:47:23 +02:00
cc613031b9 patch 8.2.0929: v:register is not cleared after an operator was executed
Problem:    v:register is not cleared after an operator was executed.
Solution:   Clear v:register after finishing an operator (Andy Massimino,
            closes #5305)
2020-06-07 21:31:18 +02:00
bb861e293e patch 8.2.0924: cannot save and restore a register properly
Problem:    Cannot save and restore a register properly.
Solution:   Add getreginfo() and make setreg() accept a dictionary. (Andy
            Massimino, closes #3370)
2020-06-07 18:16:36 +02:00
99fa721944 patch 8.2.0644: insufficient testing for invalid function arguments
Problem:    Insufficient testing for invalid function arguments.
Solution:   Add more tests. (Yegappan Lakshmanan, closes #5988)
2020-04-26 15:59:55 +02:00
0e05de4622 patch 8.2.0448: various functions not properly tested
Problem:    Various functions not properly tested.
Solution:   Add more tests, especially for failures. (Yegappan Lakshmanan,
            closes #5843)
2020-03-25 22:23:46 +01:00
1671f44881 patch 8.2.0369: various Normal mode commands not fully tested
Problem:    Various Normal mode commands not fully tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes #5751)
2020-03-10 07:48:13 +01:00
bc2b71d44a patch 8.2.0270: some code not covered by tests
Problem:    Some code not covered by tests.
Solution:   Add test cases. (Yegappan Lakshmanan, closes #5649)
2020-02-17 21:33:30 +01:00
4b96df5a01 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 #5532)
2020-01-26 22:00:26 +01:00