aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/screen.c
Commit message (Collapse)AuthorAge
* Merge branch 'aucmd_textputpost' into 20230125_mix20230125_mixJosh Rahm2023-02-02
|\
| * 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.
* | Merge branch 'colorcolchar' into 20230125_mixJosh Rahm2023-01-31
|\ \
| * | feat(colorcolchar): remove existing colorcolumnchar in the fillchars. Make ↵Josh Rahm2023-01-31
| | | | | | | | | | | | way for more flexibility
* | | Merge branch 'colorcolchar' into 20230125_mixJosh Rahm2023-01-25
|\| |
| * | Merge remote-tracking branch 'upstream/master' into colorcolcharJosh Rahm2023-01-25
| |\|
| * | Merge remote-tracking branch 'upstream/master' into colorcolcharJosh Rahm2022-10-11
| |\ \
| * | | feat(colorcolchar): revert "feat: rename colorcol in fillchars to colorc"Josh Rahm2022-08-27
| | | | | | | | | | | | | | | | | | | | This reverts commit 234959abbfcf075cb09304b00fc391780580056d and renames the option 'colorc' -> 'colorcol' again.
| * | | feat(colorcolchar): rename colorcol in fillchars to colorcJosh Rahm2022-08-27
| | | | | | | | | | | | | | | | Rename the colorcol option in fillchars to the more terse colorc.
| * | | feat(colorcolchar): add the option "colorcol" to the fillchars settingJosh Rahm2022-08-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This option will let neovim draw a character in the colorcolumn when there is no other character occupying that spot. For example, I'm someone who likes the elegance of seeing a 1px wide line at the 80 character mark, rather than a rectangle the width of a cell at that mark. To accomplish this, I run :set colorcol=80 :set fillchars=colorcol:│ of course ':' and '.' are good ASCII alteratives.
* | | | Merge remote-tracking branch 'upstream/master' into userregJosh Rahm2023-01-25
|\ \ \ \ | | |_|/ | |/| |
| * | | vim-patch:partial:9.0.1237: code is indented more than necessary (#21971)zeertzjq2023-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes vim/vim#11858) https://github.com/vim/vim/commit/6ec66660476562e643deceb7c325cd0e8c903663 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * | | refactor: replace char_u with char 22 (#21786)dundargoc2023-01-17
| | | | | | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * | | 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: 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
| * | | feat(ui): add 'statuscolumn' optionluukvbaal2023-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Unable to customize the column next to a window ('gutter'). Solution: Add 'statuscolumn' option that follows the 'statusline' syntax, allowing to customize the status column. Also supporting the %@ click execute function label. Adds new items @C and @s which will print the fold and sign columns. Line numbers and signs can be clicked, highlighted, aligned, transformed, margined etc.
| * | | refactor: replace char_u with char 18 (#21237)dundargoc2023-01-09
| | | | | | | | | | | | | | | | | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
| * | | refactor: replace char_u with char 17 - remove STRLCPY (#21235)dundargoc2023-01-09
| | | | | | | | | | | | | | | | | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
| * | | refactor: replace char_u with chardundargoc2022-11-28
| | | | | | | | | | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * | | build: allow IWYU to fix includes for all .c filesdundargoc2022-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers.
| * | | vim-patch:9.0.0867: wildmenu redrawing code is spread out (#21035)zeertzjq2022-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Wildmenu redrawing code is spread out. Solution: Refactor to move code together. (closes vim/vim#11528) https://github.com/vim/vim/commit/d6e91385f0f7256aec8f70373c9e3399770d22e5 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * | | vim-patch:8.2.1919: assert_fails() setting emsg_silent changes normal ↵zeertzjq2022-11-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | execution (#20998) Problem: Assert_fails() setting emsg_silent changes normal execution. Solution: Use a separate flag in_assert_fails. https://github.com/vim/vim/commit/28ee892ac4197421b3317f195512ca64cc56a5b4 Cherry-pick no_wait_return from patch 9.0.0846. Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * | | refactor: move tabline code to statusline.c (#21008)luukvbaal2022-11-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor: move tabline code to statusline.c Problem: Tabline code is closely related to statusline, but still left over in drawscreen.c and screen.c. Solution: Move it to statusline.c. * refactor: add statusline_defs.h
| * | | vim-patch:9.0.0844: handling 'statusline' errors is spread out (#20992)luukvbaal2022-11-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Handling 'statusline' errors is spread out. Solution: Pass the option name to the lower levels so the option can be reset there when an error is encountered. (Luuk van Baal, closes vim/vim#11467) https://github.com/vim/vim/commit/7b224fdf4a29f115567d4fc8629c1cef92d8444a
| * | | refactor: click definition functions #20923luukvbaal2022-11-06
| | | | | | | | | | | | | | | | Need this part of `win_redr_custom()` in `drawline.c` for #20621. Another refactor is pending in https://github.com/vim/vim/pull/11467
| * | | refactor: replace char_u with charDundar Göc2022-10-15
| | | | | | | | | | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * | | vim-patch:9.0.0747: too many #ifdefs (#20641)zeertzjq2022-10-14
| | |/ | |/| | | | | | | | | | | | | Problem: Too many #ifdefs. Solution: Gradudate the +cmdline_info feature. (Martin Tournoij, closes vim/vim#11330) https://github.com/vim/vim/commit/ba43e76fcd5b2da57dbaa4d9a555793fe8ac344e
* | | Merge remote-tracking branch 'upstream/master' into userregJosh Rahm2022-10-11
|\| |
| * | vim-patch:9.0.0656: cannot specify another character to use instead of '@'zeertzjq2022-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot specify another character to use instead of '@' at the end of the window. Solution: Add "lastline" to 'fillchars'. (Martin Tournoij, closes vim/vim#11264, closes vim/vim#10963) https://github.com/vim/vim/commit/4ba5f1dab656103e8f4a4505452d1816b9e83c1e Use latest code in drawscreen.c instead.
| * | fix(redraw): make redrawdebug=nodelta handle all the casesbfredl2022-09-22
| | | | | | | | | | | | | | | | | | Before only win_line lines were considered. this applies nodelta to all screen elements. Causes some failures, which might indeed indicate excessive redraws.
| * | feat(ui): use msg_grid based implementation for cmdheight=0bfredl2022-09-15
| | |
| * | refactor: replace char_u with charDundar Göc2022-09-11
| | | | | | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * | refactor: replace char_u with charDundar Göc2022-09-06
| | | | | | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * | refactor: replace char_u with char 4 (#19987)dundargoc2022-08-30
| | | | | | | | | | | | | | | | | | | | | * refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
| * | refactor: replace char_u with charDundar Göc2022-08-29
| | | | | | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * | refactor: replace char_u with charDundar Göc2022-08-27
| |/ | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * refactor: replace char_u with charDundar Göc2022-08-26
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * refactor: set_chars_option()zeertzjq2022-08-26
| | | | | | | | Rename "set" to "apply" and tidy up variable scopes.
| * refactor: replace char_u with charDundar Goc2022-08-25
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * refactor: pre-incr to post-incrLewis Russell2022-08-25
| |
| * refactor(arena): use a shared block freelistbfredl2022-08-24
| | | | | | | | | | This is both simpler in client code and more effective (always reuse block hottest in cache)
* | feat(userreg) fix 'recording' message to handle multibyte charsJosh Rahm2022-08-21
|/
* vim-patch:8.1.1886: command line expansion code is spread out (#19861)zeertzjq2022-08-21
| | | | | Problem: Command line expansion code is spread out. Solution: Move the code to cmdexpand.c. (Yegappan Lakshmanan, closes vim/vim#4831) https://github.com/vim/vim/commit/66b51420e0c8d49bcf6786b792c938d6099e3393
* vim-patch:8.1.2045: the option.c file is too big (#19854)zeertzjq2022-08-20
| | | | | | | | | | | Problem: The option.c file is too big. Solution: Split off the code dealing with strings. (Yegappan Lakshmanan, closes vim/vim#4937) https://github.com/vim/vim/commit/dac1347b4d9c1a1aef6aa73fdea08a9d1077d6ea Cherry-pick set_string_option_direct_in_win() from patch 8.1.1405. Cherry-pick shift_line() comment change from patch 8.1.2096. Move 'clipboard' default parsing to didset_string_options(). Reorder option flags to put Nvim-only flags at the end.
* refactor: move statusline code from buffer.c and [draw]screen.c to new filebfredl2022-08-19
| | | | | | | | | problem: code for drawing statusline is arbitrarily spreadout between drawscreen.c, screen.c and buffer.c solution: move it to a new file statusline.c - rename archaic internal name "status match" to public name "wildmenu" - showruler() does not show the ruler. it show anything which displays info about the cursor. Rename it accordingy.
* vim-patch:8.1.1966: some code in options.c fits better elsewhere (#19840)zeertzjq2022-08-19
| | | | | | Problem: Some code in options.c fits better elsewhere. Solution: Move functions from options.c to other files. (Yegappan Lakshmanan, closes vim/vim#4889) https://github.com/vim/vim/commit/e677df8d93772a705f40a94f3c871aee78fe4d99
* vim-patch:8.1.2057: the screen.c file is much too bigLewis Russell2022-08-19
| | | | | | | | | | | | | | | Problem: The screen.c file is much too big. Solution: Split it in three parts. (Yegappan Lakshmanan, closes vim/vim#4943) https://github.com/vim/vim/commit/7528d1f6b5422750eb778dfb550cfd0b0e540964 This is an approximation vim-patch 8.1.2057. Applying the patch directly isn't feasible since our version of screen.c has diverged too much, however we still introduce drawscreen.c and drawline.c: - screen.c is now a much smaller file used for low level screen functions - drawline.c contains everything needed for win_line() - drawscreen.c contains everything needed for update_screen() Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* vim-patch:8.1.2082: rename popupmnu.* to popupmenu.* (#19829)zeertzjq2022-08-18
| | | | | | | vim-patch:8.1.2082: some files have a weird name to fit in 8.3 characters Problem: Some files have a weird name to fit in 8.3 characters. Solution: Use a nicer names. https://github.com/vim/vim/commit/30e8e73506e4522ef4aebf7d525c0e6ffe8805fd
* feat(ui): allow to set the highlight namespace per windowbfredl2022-08-17
| | | | | - reimplement 'winhl' in terms of highlight namespaces - check for EOF in screen tests (to indicate a likely crash)
* refactor: remove some unused includes (#19820)zeertzjq2022-08-17
| | | Replace grid.h in screen.h and screen.h in buffer.h with grid_defs.h