aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| * | fix(startup): stop TUI properly when quitting at swap dialog (#25337)zeertzjq2023-09-24
| | |
| * | fix(api, lua): handle setting v: variables properly (#25325)zeertzjq2023-09-24
| | |
| * | fix(ui): always use stl/stlnc fillchars when drawing statusline (#25267)tj-moody2023-09-24
| | |
| * | Merge pull request #25330 from bfredl/no_shm_fbfredl2023-09-23
| |\ \ | | | | | | | | refactor(options)!: graduate shortmess+=f flag
| | * | refactor(options)!: graduate shortmess+=f flagbfredl2023-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Not everything needs to be crazy overconfigurable. Also fixes a warning in latest clang which didn't approve of the funky math switch statement in append_arg_number
| * | | Merge pull request #25268 from bfredl/grid_linebfredl2023-09-23
| |\ \ \ | | | | | | | | | | refactor(grid): properly namespace and separate stateful grid functions
| | * | | refactor(grid): properly namespace and separate stateful grid functionsbfredl2023-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a step in an ongoing refactor where the "grid_puts" and "grid_put_linebuf" code paths will share more of the implementation (in particular for delta calculation, doublewidth and 'arabicshape' handling). But it also makes sense by its own as a cleanup, and is thus committed separately. Before this change many of the low level grid functions grid_puts, grid_fill etc could both be used in a standalone fashion but also as part of a batched line update which would be finally transmitted as a single grid_line call (via ui_line() ). This was initially useful to quickly refactor pre-existing vim code to use batched logic safely. However, this pattern is not really helpful for maintainable and newly written code, where the "grid" and "row" arguments are just needlessly repeated. This simplifies these calls to just use grid and row as specified in the initial grid_line_start(grid, row) call. This also makes the intent clear whether any grid_puts() call is actually part of a batch or not, which is better in the long run when more things get refactored to use effective (properly batched) updates.
| * | | | fix(float): fix some other crashes with :unhide or :all (#25328)zeertzjq2023-09-23
| | |/ / | |/| |
| * | | fix(lua): show error message when failing to set variable (#25321)zeertzjq2023-09-23
| | | |
| * | | fix(unhide): close floating windows first (#25318)zeertzjq2023-09-23
| | | |
| * | | vim-patch:8.2.4609: :unhide does not check for failing to close a window ↵zeertzjq2023-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#25317) Problem: :unhide does not check for failing to close a window. Solution: When closing a window fails continue with the next one. Do not try closing the autocmd window. (closes vim/vim#9984) https://github.com/vim/vim/commit/6f2465d336a9d4afe392db4084ef7e9db17e67c1 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * | | fix(tui): make :cquit work properly with remote TUI (#25313)zeertzjq2023-09-23
| |/ /
| * | fix(api): get virtual text with multiple hl properly (#25307)zeertzjq2023-09-22
| | |
| * | fix(ui): handle virtual text with multiple hl in more cases (#25304)zeertzjq2023-09-22
| | |
| * | fix(extmarks): inline virt_text support multiple hl groups (#25303)zeertzjq2023-09-22
| | |
| * | vim-patch:9.0.1923: curswant wrong on click with 've' and 'nowrap' set (#25293)zeertzjq2023-09-22
| | | | | | | | | | | | | | | | | | | | | | | | Problem: curswant wrong on click with 've' and 'nowrap' set Solution: Add w_leftcol to mouse click column. closes: vim/vim#13142 https://github.com/vim/vim/commit/db54e989b5cff3cc6442dfc500e3962cc1c0b6d0
| * | build: actually export symbols on macdundargoc2023-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If `-export_dynamic` is not passed to the linker, then Link Time Optimization may inline and remove global functions even though ENABLE_EXPORTS is set to true. Closes https://github.com/neovim/neovim/issues/25295. Closes https://github.com/kevinhwang91/nvim-ufo/issues/162. Closes https://github.com/neovim/neovim/issues/25295. Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
| * | fix(tui): don't overwrite an assertion faliure message on exitbfredl2023-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If nvim exited with nonzero status this is for one of the two reasons - `:cquit` was invoked. This is used by users and plugins to communicate a result, like a nonzero status will fail a `git commit` operation - There was an internal error or deadly signal. in this case an error message was likely written to stderr or to the screen. In the latter case, the error message was often hidden by the TUI exiting altscreen mode, which erases all visible terminal text. This change prevents this in the latter case, while still cleaning up the terminal properly when `:cquit` was deliberatily invoked. Other cleanup like exiting mouse mode and raw mode is still done.
| * | fix(mouse): click on empty line with 'foldcolumn'zeertzjq2023-09-21
| | |
| * | vim-patch:9.0.1919: Wrong curswant when clicking on empty line or with vsplitszeertzjq2023-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Wrong curswant when clicking on empty line or with vsplits. Solution: Don't check for ScreenCols[] before the start of the window and handle empty line properly. closes: vim/vim#13132 https://github.com/vim/vim/commit/03cd697d635f1b0e7ffe21cf8244a8fb755f2ddb
| * | vim-patch:9.0.1921: not possible to use the jumplist like a stack (#25278)zeertzjq2023-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: not possible to use the jumplist like a stack Solution: Add the 'jumpoptions' setting to make the jumplist a stack. Add an option for using jumplist like tag stack related: vim/vim#7738 closes: vim/vim#13134 ported from NeoVim: - https://neovim.io/doc/user/motion.html#jumplist-stack - neovim/neovim@39094b3 - https://vi.stackexchange.com/questions/18344/how-to-change-jumplist-behavior Based on the feedback in the previous PR, it looks like many people like this option. https://github.com/vim/vim/commit/87018255e3ad0f4dfa03e20318836d24af721caf Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com> Co-authored-by: butwerenotthereyet <58348703+butwerenotthereyet@users.noreply.github.com>
| * | fix(statuscolumn): update number hl for each screen line (#25277)zeertzjq2023-09-21
| | |
| * | fix(extmarks): account for rightleft when drawing virt text (#25262)Ibby2023-09-20
| | | | | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * | fix(extmarks): fix win_col virt_text drawn on wrong screen line (#25264)zeertzjq2023-09-20
| | |
| * | fix(build): better deps for docLewis Russell2023-09-20
| | |
| * | docs: misc #24561Justin M. Keyes2023-09-20
| | | | | | | | | | | | fix #24699 fix #25253
| * | Merge pull request #25261 from bfredl/nolinewrapbfredl2023-09-20
| |\ \ | | | | | | | | refactor(grid): unused grid->line_wraps delenda est
| | * | refactor(grid): unused grid->line_wraps delenda estbfredl2023-09-20
| | | | | | | | | | | | | | | | | | | | | | | | This is not used as part of the logic to actually implement TUI line wrapping In vim (especially gvim) it is used to emulate terminal-style text selection. But in nvim we don't do that, and have no plans to reintroduce it.
| * | | Merge pull request #25244 from jedrzejboczar/fix-cursor-jump-win-separatorsbfredl2023-09-20
| |\ \ \ | | |/ / | |/| | fix: avoid ui_grid_cursor_goto when drawing window separators
| | * | fix: avoid ui_grid_cursor_goto when drawing window separatorsJędrzej Boczar2023-09-19
| | | |
| * | | Merge pull request #25096 from glepnir/float_winnewbfredl2023-09-20
| |\ \ \ | | | | | | | | | | fix(float): trigger winnew event when float window create
| | * | | fix(float): trigger winnew event when float window createglepnir2023-09-19
| | | |/ | | |/|
| * | | Merge pull request #25155 from glepnir/fix_winhlbfredl2023-09-20
| |\ \ \ | | | | | | | | | | fix(highlight): winhl receive wrong argument
| | * | | fix(highlight): winhl receive wrong argumentglepnir2023-09-19
| | | | |
| * | | | vim-patch:9.0.1915: r_CTRL-C works differently in visual mode (#25248)zeertzjq2023-09-20
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: r_CTRL-C works differently in visual mode Solution: Make r_CTRL-C behave consistent in visual mode in terminal and Windows GUI in visual mode, r CTRL-C behaves strange in Unix like environments. It seems to end visual mode, but still is waiting for few more chars, however it never seems to replace it by any characters and eventually just returns back into normal mode. In contrast in Windows GUI mode, r_CTRL-C replaces in the selected area all characters by a literal CTRL-C. Not sure why it behaves like this. It seems in the Windows GUI, got_int is not set and therefore behaves as if any other normal character has been pressed. So remove the special casing of what happens when got_int is set and make it always behave like in Windows GUI mode. Add a test to verify it always behaves like replacing in the selected area each selected character by a literal CTRL-C. closes: vim/vim#13091 closes: vim/vim#13112 https://github.com/vim/vim/commit/476733f3d06876c7ac105e064108c973a57984d3 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | | fix(float): make "fixed" work with relative=win (#25243)zeertzjq2023-09-19
| | | |
| * | | Merge pull request #25214 from bfredl/glyphcachebfredl2023-09-19
| |\ \ \ | | | | | | | | | | refactor(grid): change schar_T representation to be more compact
| | * | | refactor(grid): change schar_T representation to be more compactbfredl2023-09-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, a screen cell would occupy 28+4=32 bytes per cell as we always made space for up to MAX_MCO+1 codepoints in a cell. As an example, even a pretty modest 50*80 screen would consume 50*80*2*32 = 256000, i e a quarter megabyte With the factor of two due to the TUI side buffer, and even more when using msg_grid and/or ext_multigrid. This instead stores a 4-byte union of either: - a valid UTF-8 sequence up to 4 bytes - an escape char which is invalid UTF-8 (0xFF) plus a 24-bit index to a glyph cache This avoids allocating space for huge composed glyphs _upfront_, while still keeping rendering such glyphs reasonably fast (1 hash table lookup + one plain index lookup). If the same large glyphs are using repeatedly on the screen, this is still a net reduction of memory/cache consumption. The only case which really gets worse is if you blast the screen full with crazy emojis and zalgo text and even this case only leads to 4 extra bytes per char. When only <= 4-byte glyphs are used, plus the 4-byte attribute code, i e 8 bytes in total there is a factor of four reduction of memory use. Memory which will be quite hot in cache as the screen buffer is scanned over in win_line() buffer text drawing A slight complication is that the representation depends on host byte order. I've tested this manually by compling and running this in qemu-s390x and it works fine. We might add a qemu based solution to CI at some point.
| * | | | Merge pull request #25148 from glepnir/fixed_optbfredl2023-09-19
| |\ \ \ \ | | | | | | | | | | | | fix(float): add fixed option
| | * | | | fix(float): add fixd optionglepnir2023-09-18
| | | |/ / | | |/| |
| * | | | vim-patch:9.0.1908: undefined behaviour upper/lower function ptrs (#25238)zeertzjq2023-09-19
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: undefined behaviour upper/lower function ptrs Solution: Fix UBSAN error in regexp and simplify upper/lowercase modifier code The implementation of \u / \U / \l / \L modifiers in the substitute command relies on remembering the state by setting function pointers on func_all/func_one in the code. The code signature of `fptr_T` is supposed to return void* (due to C function signatures not being able to return itself due to type recursion), and the definition of the functions (e.g. to_Upper) didn't follow this rule, and so the code tries to cast functions of different signatures, resulting in undefined behavior error under UBSAN in Clang 17. See vim/vim#12745. We could just fix `do_Upper`/etc to just return void*, which would fix the problem. However, these functions actually do not need to return anything at all. It used to be the case that there was only one pointer "func" to store the pointer, which is why the function needs to either return itself or NULL to indicate whether it's a one time or ongoing modification. However, c2c355df6f094cdb9e599fd395a78c14486ec697 (7.3.873) already made that obsolete by introducing `func_one` and `func_all` to store one-time and ongoing operations separately, so these functions don't actually need to return anything anymore because it's implicit whether it's a one-time or ongoing operation. Simplify the code to reflect that. closes: vim/vim#13117 https://github.com/vim/vim/commit/d25021cf036c63d539f845a1ee05b03ea21d61ff Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
| * | | fix(job-control): fix use after free (#25223)sid-65812023-09-18
| | | |
| * | | vim-patch:8.2.4173: cannot use an import in 'foldexpr' (#25215)zeertzjq2023-09-17
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Problem: Cannot use an import in 'foldexpr'. Solution: Set the script context to where 'foldexpr' was set. (closes vim/vim#9584) Fix that the script context was not set for all buffers. https://github.com/vim/vim/commit/e70dd11ef41f69bd5e94f630194e6b3c4f3f2102 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * | feat(folds): support virtual text format for 'foldtext' (#25209)zeertzjq2023-09-17
| | | | | | | | | Co-authored-by: Lewis Russell <lewis6991@gmail.com>
| * | Merge pull request #25190 from glepnir/echo_hlbfredl2023-09-17
| |\ \ | | | | | | | | fix(highlight): correct hi command output
| | * | fix(highlight): correct hi command outputglepnir2023-09-17
| | |/
| * | vim-patch:9.0.1633: duplicate code for converting float to stringzeertzjq2023-09-17
| | | | | | | | | | | | | | | | | | | | | Problem: Duplicate code for converting float to string. Solution: Use tv_get_string(). (closes vim/vim#12521) https://github.com/vim/vim/commit/19dfa276c37dcf657922c6f9b48cf2954191e8b6
| * | vim-patch:8.2.2356: Vim9: ":put =expr" does not handle a list properlyzeertzjq2023-09-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: ":put =expr" does not handle a list properly. Solution: Use the same logic as eval_to_string_eap(). (closes vim/vim#7684) https://github.com/vim/vim/commit/883cf97f109d2ff281cf77f7b2e3bb44aced7cb3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * | fix(typing): vim.fn.executeLewis Russell2023-09-16
| | |
| * | Merge pull request #25186 from llllvvuu/fix/preserve_marktree_orderinhbfredl2023-09-16
| |\ \ | | | | | | | | fix(marktree): preserve ordering in `marktree_move`