aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/drawline.c
Commit message (Collapse)AuthorAge
...
* vim-patch:9.0.0679: tests failing with 'smoothscroll', 'number' and "n" in 'cpo'Luuk van Baal2023-05-02
| | | | | | | | | Problem: Tests failing with 'smoothscroll', 'number' and "n" in 'cpo'. Solution: Do not count number column in topline if columns are skipped. https://github.com/vim/vim/commit/35b251d2c2c9d415887d334473669ea886117356 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0677: breakindent test accepts wrong resultLuuk van Baal2023-05-02
| | | | | | | | | Problem: Breakindent test accepts wrong result. Solution: Fix the number column and adjust the expected text. https://github.com/vim/vim/commit/06618f94f1c9ed73a84ad5d6a8e1933b0b8da846 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0652: 'smoothscroll' not tested with 'number' and "n" in 'cpo'Luuk van Baal2023-05-02
| | | | | | | | | Problem: 'smoothscroll' not tested with 'number' and "n" in 'cpo'. Solution: Add tests, fix uncovered problem. https://github.com/vim/vim/commit/b6aab8f44beb8c5d99393abdc2c9faab085c72aa Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0642: breakindent test failsLuuk van Baal2023-05-02
| | | | | | | | | Problem: Breakindent test fails. Solution: Correct logic for resetting need_showbreak. https://github.com/vim/vim/commit/693729ae58bd30fc1a4c08042ebe9923b45f5763 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0640: cannot scroll by screen line if a line wrapsLuuk van Baal2023-05-02
| | | | | | | | | | | | | | | | | Problem: Cannot scroll by screen line if a line wraps. Solution: Add the 'smoothscroll' option. Only works for CTRL-E and CTRL-Y so far. https://github.com/vim/vim/commit/f6196f424474e2a9c160f2a995fc2691f82b58f9 vim-patch:9.0.0641: missing part of the new option code Problem: Missing part of the new option code. Solution: Add missing WV_SMS. https://github.com/vim/vim/commit/bbbda8fd81f6d720962b67ae885825bad9be4456 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix(drawline): make cursorlineopt=screenline work with resized gridzeertzjq2023-05-02
|
* refactor: uncrustifydundargoc2023-04-26
| | | | Notable changes: replace all infinite loops to `while(true)` and remove `int` from `unsigned int`.
* fix(drawline): initialize variableAndreas Schneider2023-04-21
| | | | | | | src/nvim/drawline.c: In function ‘win_line’: src/nvim/drawline.c:1418:16: warning: ‘charsize’ may be used uninitialized [-Wmaybe-uninitialized] 1418 | wlv.vcol -= charsize; | ^~
* fix(drawline): initialize variableAndreas Schneider2023-04-21
| | | | | | | src/nvim/drawline.c: In function ‘draw_virt_text’: src/nvim/drawline.c:298:28: warning: ‘col’ may be used uninitialized [-Wmaybe-uninitialized] 298 | state->eol_col = col + 1; | ~~~~^~~
* vim-patch:9.0.1141: 'cursorcolumn' and 'colorcolumn' wrong after concealingzeertzjq2023-04-19
| | | | | | | | | | | | | Problem: 'cursorcolumn' and 'colorcolumn' wrong after concealing and wrapping line. Solution: Reset "wlv.vcol_off" after each screen line. (Alexey Radkov, closes vim/vim#11777) https://github.com/vim/vim/commit/aaa16b09180080284c4a5049fe16bdaccbb13b74 Cherry-pick test_conceal.vim changes from patches 8.2.4339, 9.0.0418. Co-authored-by: Alexey Radkov <alexey.radkov@gmail.com>
* fix(column): add truncated width during estimation for 'statuscolumn'luukvbaal2023-04-12
| | | | | | Problem: Estimated 'statuscolumn' width estimated is not properly used, executing the `w_redr_statuscol` path unnecessarily. Solution: Adjust `w_nrwidth` and 'statuscolumn' width before anything is actually drawn in a `win_update()`.
* fix(highlight): combine ColorColumn with low-priority CursorLine (#23017)zeertzjq2023-04-11
|
* fix(column): 'statuscolumn' not drawn after virt_lines with "n" in 'cpo' ↵luukvbaal2023-04-10
| | | | | | | | (#22967) Problem: The 'statuscolumn' is not drawn and the line itself is drawn at an offset to the rest of the buffer after virt_lines if 'cpoptions' includes "n". Solution: Make sure 'statuscolumn' is drawn.
* feat(api): evaluate 'statuscolumn' with nvim_eval_statusline()Luuk van Baal2023-04-05
|
* refactor: remove char_u (#22829)dundargoc2023-04-02
| | | Closes https://github.com/neovim/neovim/issues/459
* refactor(extmarks): some minor internal API changesbfredl2023-03-16
| | | | | | | | | extranges and a bunch of other improvements are coming for 0.10 This gets in some minor surrounding API changes to avoid rebase conflicts until then. - decorations will be able to be specific to windows - adjust deletion API to fit with extranges
* refactor(screen): screen.c delenda estbfredl2023-03-14
| | | | | | | | | | | | | drawscreen.c vs screen.c makes absolutely no sense. The screen exists only to draw upon it, therefore helper functions are distributed randomly between screen.c and the file that does the redrawing. In addition screen.c does a lot of drawing on the screen. It made more sense for vim/vim as our grid.c is their screen.c Not sure if we want to dump all the code for option chars into optionstr.c, so keep these in a optionchar.c for now.
* fix(redraw): get the line again after evaluating somethingzeertzjq2023-03-04
|
* vim-patch:9.0.0527: long sign text may overflow buffer (#22496)zeertzjq2023-03-03
| | | | | | | | | | | | | | Problem: Long sign text may overflow buffer. Solution: Use a larger buffer. Prevent for overflow. https://github.com/vim/vim/commit/2b1ddf19f8f14365d0b998b4ac12ca85c0923475 Don't change the size of extra[] as it's already large enough. N/A patches for version.c: vim-patch:9.0.0523: more compiler warnings for arguments in small version Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0533: the win_line() function is much too longzeertzjq2023-03-03
| | | | | | | | | Problem: The win_line() function is much too long. Solution: Move code to separate functions. https://github.com/vim/vim/commit/e49f9acecc03755db850410b2590ad7312c5224b Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:partial:9.0.0531: the win_line() function is much too longzeertzjq2023-03-03
| | | | | | | | | | | Problem: The win_line() function is much too long. Solution: Move code to separate functions. https://github.com/vim/vim/commit/c20a41972c61ab4bc211327d535c73c9b30cc166 Partial port as this depends on patch 9.0.0148. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor(drawline.c): move number column helpers function togetherzeertzjq2023-03-03
|
* vim-patch:9.0.0519: the win_line() function is much too long (#22491)zeertzjq2023-03-03
| | | | | | | | | | | | Problem: The win_line() function is much too long. Solution: Move the code to draw the line number to a separate function. https://github.com/vim/vim/commit/d7657e95b21f660a202a5118af059aa17ad37120 N/A patches for version.c: vim-patch:9.0.0521: compiler warns for unused argument in small version Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor(win_line): move some variables into a struct (#22490)zeertzjq2023-03-03
| | | | | | | | | This reduces the number of arguments to helpers functions. N/A patches for version.c: vim-patch:9.0.0152: warning for unused argument in small build Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.1373: wrong text displayed when using both 'linebreak' and 'list'zeertzjq2023-03-03
| | | | | | | | | | | | Problem: Wrong text displayed when using both 'linebreak' and 'list'. Solution: Only set "c_extra" to NUL when "p_extra" is not empty. (Hirohito Higashi, closes vim/vim#12065) https://github.com/vim/vim/commit/194555c001f2b8576483ef34511450b6e9b5e3fd Cherry-pick a change from patch 9.0.0153. Co-authored-by: h-east <h.east.727@gmail.com>
* vim-patch:9.0.0991: crash when reading help index with various options setzeertzjq2023-03-03
| | | | | | | | | | | Problem: Crash when reading help index with various options set. (Marius Gedminas) Solution: Do not set wlv.c_extra to NUL when wlv.p_extra is NULL. (closes vim/vim#11651) https://github.com/vim/vim/commit/c67c89c7589253215d57bad588edcf83a9403560 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0691: lalloc(0) error in listchars testzeertzjq2023-03-03
| | | | | | | | | Problem: lalloc(0) error in listchars test. Solution: Skip generating text for tab if tab_len is zero. https://github.com/vim/vim/commit/2b7b4f7670f607704307f7715ce56752757c22e3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0690: buffer size for expanding tab not correctly computedzeertzjq2023-03-03
| | | | | | | | | Problem: Buffer size for expanding tab not correctly computed. Solution: Correctly use size of end character. https://github.com/vim/vim/commit/a0789478f6ebbb823670b7e14ce13ea3fd3b0217 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix(column): cmdwin cursor is offset with 'statuscolumn' (#22445)luukvbaal2023-02-28
|
* refactor(PVS/V581): merge identical if statements (#22390)Mark Naughton2023-02-24
|
* refactor(drawline.c): leadcol/trailcolLewis Russell2023-02-16
|
* Merge pull request #22113 from luukvbaal/nrwidthLewis Russell2023-02-14
|\ | | | | fix(column): no longer reset nrwidth_line_count for 'statuscolumn'
| * refactor(column): remove unused build_statuscol_str() argumentsLuuk van Baal2023-02-04
| | | | | | | | | | | | | | Problem: `build_statuscol_str()` still has arguments that were necessary for building a status column string in `number_width()`, which was abandoned in #22094. Solution: Remove unused arguments.
* | Merge pull request #22108 from luukvbaal/statuscolumnLewis Russell2023-02-14
|\ \ | | | | | | perf(column): only build fold/sign column when present in 'statuscolumn'
| * | perf(column): only build fold/sign column when present in 'statuscolumn'Luuk van Baal2023-02-04
| |/ | | | | | | | | | | | | | | Problem: The fold and sign column is built and stored regardless of whether the corresponding item is present in 'statuscolumn'. Solution: Since the 'statuscolumn' parses itself, we can defer building the columns until the corresponding item is actually encountered.
* | 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.
* | refactor: reduce scope of locals as per the style guide 3 (#22221)dundargoc2023-02-12
| | | | | | refactor: reduce scope of locals as per the style guide
* | build: enable MSVC level 3 warnings (#21934)dundargoc2023-02-11
|/ | | | | | MSVC has 4 different warning levels: 1 (severe), 2 (significant), 3 (production quality) and 4 (informational). Enabling level 3 warnings mostly revealed conversion problems, similar to GCC/clang -Wconversion flag.
* fix(column): estimate 'statuscolumn' width appropriatelyluukvbaal2023-02-02
| | | | | | | | | | | Problem: The 'statuscolumn' width is being estimated without the proper context. In particular, this resulted in the fact that a custom fold column could be included in the estimated `number_width()`, and doubly added when actually drawing the statuscolumn due to `win_col_off()` also adding the `'foldcolumn'` width. Resulting in a status column that is `'foldcolumn'` cells wider than necessary. Solution: Estimate 'statuscolumn' width in `get_statuscol_str()` when a buffer's line count has changed.
* 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>
* refactor: replace char_u with char 24 (#21823)dundargoc2023-01-18
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor(PVS): suppress false positive V547 in drawline.c (#21875)Lucas Merritt2023-01-18
| | | | | | This is a false positive as "did_emsg" can be set by get_syntax_attr() Example: get_syntax_attr() -> syn_current_attr() -> syn_getcurline() -> ml_get_buf() -> siemsg() -> semsgv() -> emsg() -> emsg_multiline()
* refactor: replace char_u with char 22 (#21786)dundargoc2023-01-17
| | | Work on https://github.com/neovim/neovim/issues/459
* fix(column): avoid drawing columns for virt_lines_leftcolLuuk van Baal2023-01-16
| | | | | | | | Problem: The default fold column, as well as the 'statuscolumn', were drawn unnecessarily/unexpectedly for virtual lines placed with `virt_lines_leftcol` set. Solution: Skip the column states if a virtual line with `virt_lines_leftcol` set will be drawn.
* fix(column)!: ensure 'statuscolumn' works with virtual and wrapped linesLuuk van Baal2023-01-16
| | | | | | | | | | Problem: The `'statuscolumn'` was not re-evaluated for wrapped lines, when preceded by virtual/filler lines. There was also no way to distinguish virtual and wrapped lines in the status column. Solution: Make sure to rebuild the statuscolumn, and replace variable `v:wrap` with `v:virtnum`. `v:virtnum` is negative when drawing virtual lines, zero when drawing the actual buffer line, and positive when drawing the wrapped part of a buffer line.
* refactor: fix IWYU mapping file and use IWYU (#21802)dundargoc2023-01-15
| | | Also add the EXITFREE definition to main_lib rather than the nvim target, as the header generation needs the EXITFREE flag to work properly.
* refactor: replace char_u with char 21 (#21779)dundargoc2023-01-14
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 20 (#21714)dundargoc2023-01-13
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* fix(statuscolumn): fix sign column highlights (#21727)luukvbaal2023-01-11
| | | Resolve #21726.
* fix(statuscolumn): fix crashes and clang/PVS warnings (#21725)zeertzjq2023-01-10
|