aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/fold_spec.lua
Commit message (Collapse)AuthorAge
* refactor(grid): make screen rendering more multibyte than ever beforebfredl2023-11-17
| | | | | | | | | | | | | | | | | | Problem: buffer text with composing chars are converted from UTF-8 to an array of up to seven UTF-32 values and then converted back to UTF-8 strings. Solution: Convert buffer text directly to UTF-8 based schar_T values. The limit of the text size is now in schar_T bytes, which is currently 31+1 but easily could be raised as it no longer multiplies the size of the entire screen grid when not used, the full size is only required for temporary scratch buffers. Also does some general cleanup to win_line text handling, which was unnecessarily complicated due to multibyte rendering being an "opt-in" feature long ago. Nowadays, a char is just a char, regardless if it consists of one ASCII byte or multiple bytes.
* vim-patch:9.0.2032: cannot get mouse click pos for tab or virt text (#25653)zeertzjq2023-10-15
| | | | | | | | | Problem: Cannot accurately get mouse clicking position when clicking on a TAB or with virtual text. Solution: Add a "coladd" field to getmousepos() result. closes: vim/vim#13335 https://github.com/vim/vim/commit/f5a94d5165bb9e390797da50a1fa7a87df3fbee4
* vim-patch:8.1.0822: peeking and flushing output slows down execution (#25629)zeertzjq2023-10-14
| | | | | | | Problem: Peeking and flushing output slows down execution. Solution: Do not update the mode message when global_busy is set. Do not flush when only peeking for a character. (Ken Takata) https://github.com/vim/vim/commit/cb574f415486adff645ce384979bfecf27f5be8c
* refactor(grid): do arabic shaping in one placebfredl2023-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | The 'arabicshape' feature of vim is a transformation of unicode text to make arabic and some related scripts look better at display time. In particular the content of a cell will be adjusted depending on the (original) content of the cells just before and after it. This is implemented by the arabic_shape() function in nvim. Before this commit, shaping was invoked in four different contexts: - when rendering buffer text in win_line() - in line_putchar() for rendering virtual text - as part of grid_line_puts, used by messages and statuslines and similar - as part of draw_cmdline() for drawing the cmdline This replaces all these with a post-processing step in grid_put_linebuf(), which has become the entry point for all text rendering after recent refactors. An aim of this is to make the handling of multibyte text yet simpler. One of the main reasons multibyte chars needs to be "parsed" into codepoint arrays of composing chars is so that these could be inspected for the purpose of shaping. This can likely be vastly simplified in many contexts where only the total length (in bytes) and width of composed char is needed.
* fix(ui): handle virtual text with multiple hl in more cases (#25304)zeertzjq2023-09-22
|
* fix(extmarks): account for rightleft when drawing virt text (#25262)Ibby2023-09-20
| | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* test(ui/fold_spec): more testing for clicking on 'foldcolumn' (#25225)zeertzjq2023-09-18
|
* test(ui/fold_spec): click on multibyte "foldclosed" (#25216)zeertzjq2023-09-17
|
* feat(folds): support virtual text format for 'foldtext' (#25209)zeertzjq2023-09-17
| | | Co-authored-by: Lewis Russell <lewis6991@gmail.com>
* fix(drawline): fix missing Visual hl on double-width fold char (#24308)zeertzjq2023-07-11
|
* fix(folds): fix missing virt_lines above when fold is hidden (#24274)zeertzjq2023-07-07
|
* fix(ui-ext): "scroll_delta" handle topfill and skipcol (#24249)zeertzjq2023-07-04
|
* fix(folds): don't show search or match highlighting on fold (#24084)zeertzjq2023-06-21
|
* fix(mouse): handle folded lines with virt_lines attached to line above (#23912)zeertzjq2023-06-05
|
* fix(plines): folded lines with virt_lines attached to line abovezeertzjq2023-06-05
|
* fix(folds): combined Folded and Visual highlights (#23752)zeertzjq2023-05-25
| | | Also combine high-priority CursorLine with Folded.
* fix(folds): show Folded highlight in Visual selection (#23741)zeertzjq2023-05-24
| | | Note: CursorLine highlight is now combined with Folded.
* 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>
* test: improve editor/fold_spec.lua and editor/put_spec.lua (#22916)zeertzjq2023-04-07
| | | | | - Close and open a new window each time so that window options have their default values in each test. - Change feed_command() to command() as the latter is faster.
* refactor(defaults)!: change default 'commentstring' value to empty (#22862)zeertzjq2023-04-02
|
* test: make expect_unchanged() less confusing (#22255)zeertzjq2023-02-15
| | | | | | | | Problem: The sleep before collecting the initial screen state is confusing and may lead to unexpected success if it comes after a blocking RPC call. Solution: Remove that sleep and add an "intermediate" argument.
* fix(folds): cursorline highlight is not always applied on closed folds (#22242)luukvbaal2023-02-14
| | | | | | | Problem: The cursorline highlight logic checks for `w_cursor.lnum` which may be different from the line number passed to `win_line()` even when the cursor is actually on that line. Solution: Update cursor line highlight logic to check for the line number of the start of a closed fold if necessary.
* fix(extmarks): problems with folded virtual lines (#21930)luukvbaal2023-01-23
| | | | | | | | | | | | | | Problem: When a folded line has virtual lines attached, the following problems occur: - The virtual lines are drawn empty. - The 'foldtext' line is drawn empty. - The cursor is drawn incorrectly. Solution: Check whether virtual lines belong to a folded line. Fix #17027 Fix #19557 Fix #21837 Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* vim-patch:8.2.2684: not enough folding code is testedzeertzjq2022-11-25
| | | | | | | | | | | | Problem: Not enough folding code is tested. Solution: Add more test cases. (Yegappan Lakshmanan, closes vim/vim#8046) https://github.com/vim/vim/commit/5c504f680e63120fea36becfabb8d939d4449e34 Reorder test_fold.vim to match upstream. Cherry-pick Test_fold_expr_error() from patch 8.2.0633. Cherry-pick syntax feature check from patch 8.2.1432. Cherry-pick a delete() call from patch 8.2.2112.
* fix(folds): fix fold marker multibyte comparison (#20439)zeertzjq2022-10-02
|
* fix(folds): fix fold remains when :delete makes buffer empty (#19673)zeertzjq2022-08-08
|
* fix(screen): check for col instead of vcol when drawing fold (#19572)zeertzjq2022-07-29
|
* fix(folds): fix fold regression with :move (#18685)zeertzjq2022-05-22
|
* refactor(ui)!: link `VertSplit` to `Normal` by defaultFamiu Haque2022-05-15
| | | | | Avoids using `gui=reverse` on `VertSplit` and makes window separators look much nicer by default.
* chore: fix typos (#17755)dundargoc2022-03-25
| | | | Co-authored-by: Jordan Haine <jhaine@securitycompass.com>
* test(fold): add test for CursorLineFoldGregory Anders2021-12-08
|
* vim-patch:8.1.2117: CursorLine highlight used while 'cursorline' is offzeertzjq2021-08-02
| | | | | | Problem: CursorLine highlight used while 'cursorline' is off. Solution: Check 'cursorline' is set. (cloes vim/vim#5017) https://github.com/vim/vim/commit/49474ca12236776bb56aeb9d39bd6592e28157c7
* Fix click on foldcolumn with vsplit (#14127)tk-shirasaka2021-03-13
|
* [RDY] Fix click on foldcolumn if it has tabline (#13982)tk-shirasaka2021-03-04
| | | | | | | * Fix click on foldcolumn if it has tabline * Fixes to correctly determine if tablie was clicked when multigrid is enabled * Separate foldcolumn checks into functions * Add test case for click on foldcolumn with split window * Fix foldcolumn click used nvim_input() on multigrid enabled
* foldcolumn: support "auto" (#13571)Jan Edmund Lazo2020-12-20
| | | | | | "set foldcolumn=auto" is documented but not supported. Support it by making it behave as "auto:1", similar to "signcolumn". Close https://github.com/neovim/neovim/pull/13561
* folds: use Folded highlight even with spell on (#13393)Matthieu Coudron2020-11-29
| | | | the highlight was not used with spell enabled on folded lines. Thanks to lervag for the nice report.
* fix(fold): use Folded highlight even with spell onMatthieu Coudron2020-11-23
| | | | | Partially addresses https://github.com/neovim/neovim/issues/12982. It's more a quickfix while reworking folds.
* Add test case for fold on multigridshirasaka2020-11-09
|
* screen.c: fix buffer overflow due to foldingerw72020-10-01
| | | | fixes #12988.
* screen: more work on fold_line replacementBjörn Linse2020-09-24
|
* screen.c: remove fold_lineMatthieu Coudron2020-09-24
| | | | | | | | | as well as copy_text_attr, text_to_screenline. Display of folded line is now done via win_line, which reduces code deduplication. As fold_line was a trimmed down version of win_line, this change brings new features such CursorLineNr highighting even on folded line, as well as CursorLine highlighting.
* foldcolumn: allow auto:XMatthieu Coudron2020-02-29
| | | | | | | | Similar to signcolumn, allow foldcolumn to adapt itself to the number of folds. Regression: vim supports a maximum fdc of 12, this limits it to 9.
* mouse.c: can click on multibyte foldopen/foldclose (#11863)Matthieu Coudron2020-02-14
| | | | | would previously only work with ascii fillchars. Added a test.
* fillchars: adding foldopen, foldsep, foldcloseMatthieu Coudron2019-12-25
| | | | | You can try it with set fillchars+=foldopen:▾,foldsep:│,foldclose:▸
* tests/ui: remove unnecessary screen:detach()Björn Linse2019-10-13
| | | | | | | | | | | | | It is perfectly fine and expected to detach from the screen just by the UI disconnecting from nvim or exiting nvim. Just keep detach() in screen_basic_spec, to get some coverage of the detach method itself. This avoids hang on failure in many situations (though one could argue that detach() should be "fast", or at least "as fast as resize", which works in press-return already). Never use detach() just to change the size of the screen, try_resize() method exists for that specifically.
* screen: Adjust buffer sizes for multiple sign columns #10314oni-link2019-06-24
| | | | | | | | * screen: Fix to draw signs with combining characters. The buffer size for signs can be too small, because the upper length limit of a sign can be 56 bytes. If combining characters are only two bytes in size, this reduces to 32 bytes. * screen: Adjust buffer size to maximal sign column count
* vim-patch:8.1.1072: extending sign and foldcolumn below the text is ↵Marco Hinz2019-04-03
| | | | | | | | | | | | confusing (#9816) Problem: Extending sign and foldcolumn below the text is confusing. Solution: Let the sign and foldcolumn stop at the last text line, just like the line number column. Also stop the command line window leader. (Christian Brabandt) https://github.com/vim/vim/commit/8ee4c01b8c79a29065c1af05e5d9c0721069765f Closes https://github.com/neovim/neovim/issues/9613
* vim-patch:8.1.0449: fix display of 'rnu' with folded lines #9481Michael Vilim2019-01-11
| | | | | | | | | | | | | | | | | | | | | | | | Problem: When 'rnu' is set folded lines are not displayed correctly. (Vitaly Yashin) Solution: When only redrawing line numbers do draw folded lines. (closes vim/vim#3484) https://github.com/vim/vim/commit/7701f308565fdc7b5096a6597d9c3b63de0bbcec --- Explanation: Before this patch, relative line numbers would update on a cursor movement and overwrite fold highlighting in the line number columns. Other operations can cause the fold highlighting to overwrite the line number styles. Together, this causes the highlighting in the line number columns to flicker back and forth while editing. Test case: create `t.vim` with these contents: set fdm=marker rnu foldcolumn=2 call setline(1, ["{{{1", "nline 1", "{{{1", "line 2"]) and then call `nvim -u NORC -S t.vim` and press `j`; observe that the fold highlighting disappears.
* ui: disable clearing almost everywhereBjörn Linse2018-10-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid clearing the screen in most situations. NOT_VALID should be equivalent to CLEAR unless some external force messed up the terminal, for these situations <c-l> and :mode will still clear the screen. Also eliminate some obsolete code in screen.c, that dealt with that in vim drawing window 1 can mess up window 2, but this never happens in nvim. But what about slow terminals? There is two common meanings in which a terminal is said to be "slow": Most commonly (and in the sense of vim:s nottyfast) it means low bandwidth for sending bytes from nvim to the terminal. If the screen is very similar before and after the update_screen(CLEAR) this change should reduce bandwidth. If the screen is quite different, but there is no new regions of contiguous whitespace, clearing doesn't reduce bandwidth significantly. If the new screen contains a lot of whitespace, it will depend of if vsplits are used or not: as long as there is no vsplits, ce is used to cheaply clear the rest of the line, so full-screen clear is not needed to reduce bandwith. However a left vsplit currently needs to be padded with whitespace all the way to the separator. It is possible ec (clear N chars) can be used to reduce bandwidth here if this is a problem. (All of this assumes that one doesn't set Normal guibg=... on a non-BCE terminal, if you do you are doomed regardless of this change). Slow can also mean that drawing pixels on the screen is slow. E-ink screens is a recent example. Avoiding clearing and redrawing the unchanged part of the screen will always improve performance in these cases.
* options: remove 'maxcombine` option (always use 6)Björn Linse2018-06-13
|