aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy
Commit message (Collapse)AuthorAge
* vim-patch:9.0.2125: File info disappears when 'cmdheight' has decreased (#26180)zeertzjq2023-11-24
| | | | | | | | | | | Problem: File info disappears immediately when 'cmdheight' has just decreased due to switching tabpage and 'shortmess' doesn't contain 'o' or 'O'. Solution: Make sure msg_row isn't smaller than cmdline_row. fixes: vim/vim#13560 closes: vim/vim#13561 https://github.com/vim/vim/commit/40ed6711bd385051021691980e8ce16375b4b510
* vim-patch:9.0.1969: [security] buffer-overflow in trunc_string()zeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: buffer-overflow in trunc_string() Solution: Add NULL at end of buffer Currently trunc_string() assumes that when the string is too long, buf[e-1] will always be writeable. But that assumption may not always be true. The condition currently looks like this else if (e + 3 < buflen) [...] else { // can't fit in the "...", just truncate it buf[e - 1] = NUL; } but this means, we may run into the last else clause with e still being larger than buflen. So a buffer overflow occurs. So instead of using `buf[e - 1]`, let's just always truncate at `buf[buflen - 1]` which should always be writable. https://github.com/vim/vim/commit/3bd7fa12e146c6051490d048a4acbfba974eeb04 vim-patch:9.0.2004: Missing test file Problem: Missing test file Solution: git-add the file to the repo closes: vim/vim#13305 https://github.com/vim/vim/commit/d4afbdd0715c722cfc73d3a8ab9e578667615faa Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.0.2107: [security]: FPE in adjust_plines_for_skipcol (#26082)zeertzjq2023-11-17
| | | | | | | | | | | | | Problem: [security]: FPE in adjust_plines_for_skipcol Solution: don't divide by zero, return zero Prevent a floating point exception when calculating w_skipcol (which can happen with a small window when the number option is set and cpo+=n). Add a test to verify https://github.com/vim/vim/commit/cb0b99f0672d8446585d26e998343dceca17d1ce Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.0.2105: skipcol not reset when topline changed (#26042)luukvbaal2023-11-15
| | | | | | | | Problem: Skipcol is not reset when topline changed scrolling cursor to top Solution: reset skipcol closes: vim/vim#13528 https://github.com/vim/vim/commit/bb800a7907209f7d349f87b76b3b9ca30b416298
* vim-patch:9.0.2102: matchparen highlight not cleared in completion mode (#26019)zeertzjq2023-11-13
| | | | | | | | | | | | | | | | | Problem: matchparen highlight not cleared in completion mode Solution: Clear matchparen highlighting in completion mode Remove hard-coded hack in insexpand.c to clear the :3match before displaying the completion menu. Add a test for matchparen highlighting. While at it, move all test tests related to the matchparen plugin into a separate test file. closes: vim/vim#13493 closes: vim/vim#13524 https://github.com/vim/vim/commit/9588666360e94de3ff58d4bc79aa9148fbf5fc44 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:8.2.4809: various things no6 properly tested (#26017)zeertzjq2023-11-13
| | | | | | | | Problem: Various things no6 properly tested. Solution: Add various test cases. (Yegappan Lakshmanan, closes vim/vim#10259) https://github.com/vim/vim/commit/885de449c0c0ef4a8541ed1f5377351844384516 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* refactor(options)!: unify `set_option` and `set_string_option`Famiu Haque2023-10-30
| | | | | | | | While the interfaces for setting number and boolean options are now unified by #25394, there is still a separate `set_string_option` function that is used for setting a string option. This PR removes that function and merges it with set_option. BREAKING CHANGE: `v:option_old` is now the old global value for all global-local options, instead of just string global-local options. Local value for a global-local number/boolean option is now unset when the option is set (e.g. using `:set` or `nvim_set_option_value`) without a scope, which means they now behave the same way as string options. Ref: #25672
* docs: small fixes (#25585)dundargoc2023-10-29
| | | | Co-authored-by: tmummert <doczook@gmx.de> Co-authored-by: parikshit adhikari <parikshitadhikari@gmail.com>
* refactor(options)!: make OptionSet `v:` values use typvalFamiu Haque2023-10-17
| | | | BREAKING CHANGE: This breaks the OptionSet autocommand, as the `v:` values associated with it (`v:option_new`, `v:option_old`, `v:option_oldlocal` and `v:option_oldglobal`) are now the same type as the option, instead of all option values being converted to strings.
* refactor(message): simplify msg_puts_display and use batched grid updatesbfredl2023-10-03
| | | | | | | | | msg_puts_display was more complex than necessary in nvim, as in nvim, it no longer talks directly with a terminal. In particular we don't need to scroll the grid before emiting the last char. The TUI already takes care of things like that, for terminals where it matters.
* feat(extmark): support proper multiline rangesbfredl2023-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The removes the previous restriction that nvim_buf_set_extmark() could not be used to highlight arbitrary multi-line regions The problem can be summarized as follows: let's assume an extmark with a hl_group is placed covering the region (5,0) to (50,0) Now, consider what happens if nvim needs to redraw a window covering the lines 20-30. It needs to be able to ask the marktree what extmarks cover this region, even if they don't begin or end here. Therefore the marktree needs to be augmented with the information covers a point, not just what marks begin or end there. To do this, we augment each node with a field "intersect" which is a set the ids of the marks which overlap this node, but only if it is not part of the set of any parent. This ensures the number of nodes that need to be explicitly marked grows only logarithmically with the total number of explicitly nodes (and thus the number of of overlapping marks). Thus we can quickly iterate all marks which overlaps any query position by looking up what leaf node contains that position. Then we only need to consider all "start" marks within that leaf node, and the "intersect" set of that node and all its parents. Now, and the major source of complexity is that the tree restructuring operations (to ensure that each node has T-1 <= size <= 2*T-1) also need to update these sets. If a full inner node is split in two, one of the new parents might start to completely overlap some ranges and its ids will need to be moved from its children's sets to its own set. Similarly, if two undersized nodes gets joined into one, it might no longer completely overlap some ranges, and now the children which do needs to have the have the ids in its set instead. And then there are the pivots! Yes the pivot operations when a child gets moved from one parent to another.
* vim-patch:9.0.1840: [security] use-after-free in do_ecmd (#24993)zeertzjq2023-09-03
| | | | | | | | | | | Problem: use-after-free in do_ecmd Solution: Verify oldwin pointer after reset_VIsual() https://github.com/vim/vim/commit/e1dc9a627536304bc4f738c21e909ad9fcf3974c N/A patches for version.c: vim-patch:9.0.1841: style: trailing whitespace in ex_cmds.c Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(ui): wrong cursor position with left gravity inline virt text at eolzeertzjq2023-08-28
|
* vim-patch:9.0.1785: wrong cursor position with 'showbreak' and lcs-eol (#24852)zeertzjq2023-08-24
| | | | | | | | | | Problem: wrong cursor position with 'showbreak' and lcs-eol Solution: Add size of 'showbreak' before when 'listchars' "eol" is used. Also fix wrong cursor position with wrapping virtual text on empty line and 'showbreak'. closes: vim/vim#12891 https://github.com/vim/vim/commit/1193951bebcff50d88403ce17dec5d3be14f131d
* vim-patch:9.0.1772: Cursor may be adjusted in 'splitkeep'ed windows (#24811)zeertzjq2023-08-21
| | | | | | | | | | | | Problem: Cursor is adjusted in window that did not change in size by 'splitkeep'. Solution: Only check that cursor position is valid in a window that has changed in size. closes: vim/vim#12509 https://github.com/vim/vim/commit/16af913eeefb288ce968fb87e09a597413861900 Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
* vim-patch:9.0.1759: Visual highlight not working with cursor at end of ↵zeertzjq2023-08-21
| | | | | | | | | | | screen line (#24806) Problem: Visual highlight not working with cursor at end of screen line and 'showbreak'. Solution: Only update "vcol_prev" when drawing buffer text. closes: vim/vim#12865 https://github.com/vim/vim/commit/8fc6a1dae07aa63faa6bfe6ed93888635745830c
* vim-patch:9.0.1697: incsearch test not sufficient (#24683)zeertzjq2023-08-13
| | | | | | | | Problem: incsearch test not sufficient (after 9.0.1691) Solution: add an additional test https://github.com/vim/vim/commit/73b8209266f0cd5c6d4df77b3700172d9c26df31 Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
* vim-patch:9.0.1691: wrong viewport restored for incsearch and smoothscroll ↵zeertzjq2023-08-12
| | | | | | | | | | (#24667) Problem: wrong viewport restored for incsearch and smoothscroll Solution: Save and restore skipcol as well closes: vim/vim#12713 https://github.com/vim/vim/commit/7b7b4cb6f274e7bace127107b0d2752133c4020b
* feat(options)!: remove compatible behaviours for vim 5.0 and earlierLewis Russell2023-07-17
|
* fix(plines): don't return very large height on very long line (#24260)zeertzjq2023-07-05
|
* test: check for ASAN properly (#24224)zeertzjq2023-07-02
| | | Follow-up to #24195.
* vim-patch:9.0.1667: regression test doesn't fail when fix is revertedzeertzjq2023-06-27
| | | | | | | | Problem: Regression test doesn't fail when fix is reverted. Solution: Add "n" to 'cpoptions' instead of using :winsize. (closes vim/vim#12587, issue vim/vim#12528) https://github.com/vim/vim/commit/e42989374144a63d986b878618aeac328e35ac3b
* vim-patch:9.0.1664: divide by zero when scrolling with 'smoothscroll' setzeertzjq2023-06-27
| | | | | | | | | Problem: Divide by zero when scrolling with 'smoothscroll' set. Solution: Avoid using a negative width. (closes vim/vim#12540, closes vim/vim#12528) https://github.com/vim/vim/commit/8154e642aa476e1a5d3de66c34e8289845b2b797 Co-authored-by: fullwaywang <fullwaywang@tencent.com>
* vim-patch:9.0.1635: error message is cleared when removing mode messagezeertzjq2023-06-16
| | | | | | | | | Problem: Error message is cleared when removing mode message. Solution: Also reset flags when the message is further down. https://github.com/vim/vim/commit/da51ad51bf4fbd66619786d0e6a83fb3ca09930b Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.1634: message is cleared when removing mode messagezeertzjq2023-06-16
| | | | | | | | | Problem: Message is cleared when removing mode message (Gary Johnson). Solution: Do not clear the command line after displaying a message. https://github.com/vim/vim/commit/800cdbb7caeb5dd4379c6cb071bb12391f20bcf3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.2949: tests failing because no error for float to string ↵zeertzjq2023-06-12
| | | | | | | | | | | | | conversion Problem: Tests failing because there is no error for float to string conversion. Solution: Change the check for failure to check for correct result. Make some conversions strict in Vim9 script. https://github.com/vim/vim/commit/3cfa5b16b06bcc034f6de77070fa779d698ab5e9 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.1626: Visual area not shown when using 'showbreak' (#23978)zeertzjq2023-06-11
| | | | | | | | | | Problem: Visual area not shown when using 'showbreak' and start of line is not visible. (Jaehwang Jung) Solution: Adjust "fromcol" for the space taken by 'showbreak'. (closes vim/vim#12514) https://github.com/vim/vim/commit/f578ca2c8f36b61ac3301fe8b59a8473c964cdc2 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.1612: "skipcol" not reset when using multi-byte characters ↵zeertzjq2023-06-06
| | | | | | | | | | (#23928) Problem: "skipcol" not reset when using multi-byte characters. Solution: Compare with w_virtcol instead of w_cursor.col. (closes vim/vim#12457) https://github.com/vim/vim/commit/15d4747ffd197ffa5b5a41a852a1fe93b6cc35fd Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.1610: display is wrong when 'smoothscroll' is setzeertzjq2023-06-06
| | | | | | | | | Problem: Display is wrong when 'smoothscroll' is set and scrolling multiple lines. Solution: Redraw with UPD_NOT_VALID when "skipcol" is or was set. (closes vim/vim#12490, closes vim/vim#12468) https://github.com/vim/vim/commit/d9a92dc70b20c76cef9ca186676583c92c14311c
* vim-patch:9.0.1603: display wrong if scrolling multiple lines with ↵zeertzjq2023-06-06
| | | | | | | | | | 'smoothscroll' Problem: Display wrong when scrolling multiple lines with 'smoothscroll' set. Solution: Redraw when w_skipcol changed. (closes vim/vim#12477, closes vim/vim#12468) https://github.com/vim/vim/commit/3c802277604a6b21110e41bedfe4c937ba7c2b7d
* vim-patch:9.0.1602: stray character visible if marker on top of double-wide ↵zeertzjq2023-06-04
| | | | | | | | | | char (#23897) Problem: Stray character is visible if 'smoothscroll' marker is displayed on top of a double-wide character. Solution: When overwriting a double-width character with the 'smoothscroll' marker clear the second half. (closes vim/vim#12469) https://github.com/vim/vim/commit/ecb87dd7d3f7b9291092a7dd8fae1e59b9903252
* vim-patch:9.0.1597: cursor ends up below the window after a put (#23873)zeertzjq2023-06-02
| | | | | | | | | 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) https://github.com/vim/vim/commit/8509014adda188ee8bdf6a2e123fbf15a91b29d2 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* test: don't unnecessarily specify win/buf for `nvim_(get|set)_option_value`Famiu Haque2023-05-22
| | | | `nvim_(get|set)_option_value` pick the current buffer / window by default for buffer-local/window-local (but not global-local) options. So specifying `buf = 0` or `win = 0` in opts is unnecessary for those options. This PR removes those to reduce code clutter.
* refactor(options): deprecate nvim[_buf|_win]_[gs]et_optionLewis Russell2023-05-21
| | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: famiu <famiuhaque@protonmail.com>
* vim-patch:9.0.1568: with 'smoothscroll' cursor may move below botlineLuuk van Baal2023-05-19
| | | | | | | | Problem: With 'smoothscroll' cursor may move below botline. Solution: Call redraw_later() if needed, Compute cursor row with adjusted condition. (Luuk van Baal, closes vim/vim#12415) https://github.com/vim/vim/commit/d49f646bf56b29d44bbb16e79bc877b59aab38ac
* vim-patch:9.0.1564: display moves up and down with 'incsearch' and ↵Luuk van Baal2023-05-19
| | | | | | | | | | 'smoothscroll' Problem: Display moves up and down with 'incsearch' and 'smoothscroll'. Solution: Do not check if w_skipcol changed. (Luuk van Baal, closes vim/vim#12410, closes vim/vim#12409) https://github.com/vim/vim/commit/0222c2d103ad9298bec4dc8864cd80b4e7559db1
* vim-patch:9.0.1561: display wrong when moving cursor to above the top line ↵luukvbaal2023-05-16
| | | | | | | | | | (#23644) Problem: Display wrong when moving cursor to above the top line and 'smoothscroll' is set. Solution: Call adjust_skipcol() in more places and make it work better. (Luuk van Baal, closes vim/vim#12395) https://github.com/vim/vim/commit/798fa76dbf737f855e47b10bf326453866b429ab
* test(scroll_opt): fix typo in porting oldtest (#23593)luukvbaal2023-05-12
|
* vim-patch:9.0.1543: display errors when making topline shorterLuuk van Baal2023-05-11
| | | | | | | | | Problem: Display errors when making topline shorter and 'smoothscroll' is set. Solution: Reset w_skipcol when the topline becomes shorter than its current value. (Luuk van Baal, closes vim/vim#12367) https://github.com/vim/vim/commit/5d01f86d99bc3a3fd92d4f4e9338a9e78e9ebe16
* vim-patch:9.0.1542: line not fully displayed if it doesn't fit in the screenLuuk van Baal2023-05-11
| | | | | | | | Problem: Line not fully displayed if it doesn't fit in the screen. Solution: Do not reset s_skipcol if not needed. (Luuk van Baal, closes vim/vim#12376) https://github.com/vim/vim/commit/6c018680be0ec25d42614a93be1ea08df29a9e2a
* vim-patch:9.0.1533: test for 'smoothscroll' is ineffectiveLuuk van Baal2023-05-09
| | | | | | | | Problem: Test for 'smoothscroll' is ineffective. Solution: Change the order of testing "zb" and "zt". (Luuk van Baal, closes vim/vim#12366) https://github.com/vim/vim/commit/6f37e530d3e2d58ff055723047bf91d91af2632c
* vim-patch:9.0.1530: cursor moves to wrong line when 'foldmethod' is "diff"Luuk van Baal2023-05-09
| | | | | | | | | Problem: Cursor moves to wrong line when 'foldmethod' is "diff". (Rick Howe) Solution: Adjust logic for scrolling. (Luuk van Baal, closes vim/vim#12364, closes vim/vim#12218) https://github.com/vim/vim/commit/aa6ba308a1498dc8da04d1d30ec0470018bf782a
* vim-patch:9.0.1525: 'smoothscroll' does not always work properly (#23544)luukvbaal2023-05-09
| | | | | | | Problem: 'smoothscroll' does not always work properly. Solution: Do not reset w_skipcol after it was intentionally set. (Luuk van Baal, closes vim/vim#12360, closes vim/vim#12199, closes vim/vim#12323) https://github.com/vim/vim/commit/3ce8c389155fc1257082cdb0cef7801b49f6aaf9
* vim-patch:9.0.1518: search stats not always visible when searching backwards ↵zeertzjq2023-05-07
| | | | | | | | | | | (#23517) Problem: Search stats not always visible when searching backwards. Solution: Do not display the top/bot message on top of the search stats. (Christian Brabandt, closes vim/vim#12322, closes vim/vim#12222) https://github.com/vim/vim/commit/34a6a3617b5b6ce11372439f14762caddc4b0cea Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.0.1513: text scrolls unnecessarily when splittingLuuk van Baal2023-05-07
| | | | | | | | Problem: Text scrolls unnecessarily when splitting and 'splitkeep' is not "cursor". Solution: Avoid resetting w_skipcol. (Luuk van Baal, closes vim/vim#12334) https://github.com/vim/vim/commit/b926bf47d61360a4ec5e4867714a08d70fd49965
* vim-patch:9.0.1512: inserting lines when scrolling with 'smoothscroll' setLuuk van Baal2023-05-07
| | | | | | | | Problem: Inserting lines when scrolling with 'smoothscroll' set. Solution: Adjust line height computation for w_skipcol. (Luuk van Baal, closes vim/vim#12350) https://github.com/vim/vim/commit/c8502f9b880b6d23baa4f9d28b60e1ceb442e35f
* vim-patch:9.0.0250: slightly inconsistent error messageszeertzjq2023-05-05
| | | | | | | | | Problem: Slightly inconsistent error messages. Solution: Make it "Using a Float". (closes vim/vim#10959) https://github.com/vim/vim/commit/dde77a7c4d72622284dc5fb72557bde42c314fa6 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.4890: inconsistent capitalization in error messageszeertzjq2023-05-05
| | | | | | | | | Problem: Inconsistent capitalization in error messages. Solution: Make capitalization consistent. (Doug Kearns) https://github.com/vim/vim/commit/cf030578b26460643dca4a40e7f2e3bc19c749aa Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.3135: Vim9: builtin function arguments not checked at compile timezeertzjq2023-05-05
| | | | | | | | | Problem: Vim9: builtin function arguments not checked at compile time. Solution: Add more type checks. (Yegappan Lakshmanan, closes vim/vim#8539) https://github.com/vim/vim/commit/5b73992d8f82be7ac4b6f46c17f53ffb9640e5fa Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:9.0.0662: concealed characters do not work correctly (#23454)zeertzjq2023-05-03
| | | | | | | | | | Problem: Concealed characters do not work correctly. Solution: Subtract boguscols instead of adding them. (closes vim/vim#11273) https://github.com/vim/vim/commit/75008661821eee6989476908feaf64a9dea03e05 Code change is N/A as Nvim has a draw_col variable instead. Co-authored-by: Bram Moolenaar <Bram@vim.org>