aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| | * feat(msgpack-rpc): show actual request id in error messageAlisue2023-08-26
| | |
| * | fix(extmarks): wrong display when changing text with virt_lines (#24879)Ibby2023-08-26
| | |
| * | refactor(change): do API changes to buffer without curbuf switchbfredl2023-08-26
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the messy things when changing a non-current buffer is not about the buffer, it is about windows. In particular, it is about `curwin`. When editing a non-current buffer which is displayed in some other window in the current tabpage, one such window will be "borrowed" as the curwin. But this means if two or more non-current windows displayed the buffers, one of them will be treated differenty. this is not desirable. In particular, with nvim_buf_set_text, cursor _column_ position was only corrected for one single window. Two new tests are added: the test with just one non-current window passes, but the one with two didn't. Two corresponding such tests were also added for nvim_buf_set_lines. This already worked correctly on master, but make sure this is well-tested for future refactors. Also, nvim_create_buf no longer invokes autocmds just because you happened to use `scratch=true`. No option value was changed, therefore OptionSet must not be fired.
| * refactor: move some structs out of buffer_defs.h (#24878)zeertzjq2023-08-26
| |
| * docs: various clarifications (#24876)zeertzjq2023-08-26
| |
| * refactor(plines.c): deduplicate code for virtual text cursor offsetzeertzjq2023-08-25
| |
| * refactor: move virtcol functions to plines.czeertzjq2023-08-25
| | | | | | | | | | | | Problem: Functions for virtcol and chartabsize are similar (both compute horizontal size), but appear in two different source files. Solution: Move virtcol functions to plines.c.
| * refactor(plines.c): move vertical size functions to the bottomzeertzjq2023-08-25
| | | | | | | | | | | | Problem: It may be unclear what "below" in first comment refers to. Solution: Move vertical size functions to the bottom so that it can be changed to "above".
| * refactor(memline): distinguish mutating uses of ml_get_buf()bfredl2023-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ml_get_buf() takes a third parameters to indicate whether the caller wants to mutate the memline data in place. However the vast majority of the call sites is using this function just to specify a buffer but without any mutation. This makes it harder to grep for the places which actually perform mutation. Solution: Remove the bool param from ml_get_buf(). it now works like ml_get() except for a non-current buffer. Add a new ml_get_buf_mut() function for the mutating use-case, which can be grepped along with the other ml_replace() etc functions which can modify the memline.
| * docs(builtin): small fixes (#24861)Sean Dewar2023-08-24
| | | | | | | | Also make gen_eval_files.lua render vimdoc helpExamples properly if the line begins with the `>` marker.
| * fix(plines.c): initialize cts_max_head_vcol (#24855)zeertzjq2023-08-24
| |
| * fix(ui): wrong display with 0-width inline virt_text at eol (#24854)zeertzjq2023-08-24
| |
| * 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
| * docs(generators): bake into cmakeLewis Russell2023-08-23
| |
| * fix(types): add more annotations to eval.luaLewis Russell2023-08-23
| |
| * refactor(option.c): move paste_option_changed() into did_set_paste()zeertzjq2023-08-23
| |
| * vim-patch:9.0.1781: Problems when setting bin/paste optionzeertzjq2023-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Problems when setting bin/paste option Solution: When setting binary/paste, remember that this also affects depending options, so that :verbose set returns the right location. Mention if depending options for 'binary' or 'paste' have been reset indirectly. Add a test to verify it works. Also noticed as small bug, that the global option value for expandtab was not reset when paste option is set, so fix that while at it. closes: vim/vim#12837 closes: vim/vim#12879 https://github.com/vim/vim/commit/757593c07a4f4ac43eb6c6e52fc299abc9bc08bc Co-authored-by: Christian Brabandt <cb@256bit.org>
| * vim-patch:9.0.1710: scrolloff options work slightly differentzeertzjq2023-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: sidescrolloff and scrolloff options work slightly different than other global-local options Solution: Make it behave consistent for all global-local options It was noticed, that sidescrolloff and scrolloff options behave differently in comparison to other global-local window options like 'listchars' So make those two behave like other global-local options. Also add some extra documentation for a few special local-window options. Add a few tests to make sure all global-local window options behave similar closes: vim/vim#12956 closes: vim/vim#12643 https://github.com/vim/vim/commit/4a8eb6e7a9df10f79bf95301ced012f0d6a13088 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * fix(plines): count 'showbreak' for virtual text at eolzeertzjq2023-08-23
| |
| * vim-patch:9.0.1783: Display issues with virt text smoothscroll and showbreakzeertzjq2023-08-23
| | | | | | | | | | | | | | | | | | | | | | Problem: Wrong display with wrapping virtual text or unprintable chars, 'showbreak' and 'smoothscroll'. Solution: Don't skip cells taken by 'showbreak' in screen lines before "w_skipcol". Combined "n_skip" and "skip_cells". closes: vim/vim#12597 https://github.com/vim/vim/commit/b557f4898208105b674df605403cac1b1292707b
| * build(deps): bump luajit to HEAD - 03c31124cChristian Clason2023-08-23
| | | | | | | | | | | | Switch to a rolling release, so the `0-beta3` suffix is dropped in favor of the date. Remove the custom UNIX command as the symlink is now created by the LuaJIT Makefile.
| * vim-patch:9.0.0579: using freed memory when 'tagfunc' wipes out buffer (#24838)zeertzjq2023-08-22
| | | | | | | | | | | | | | | | | | | | | | Problem: Using freed memory when 'tagfunc' wipes out buffer that holds 'complete'. Solution: Make a copy of the option. Make sure cursor position is valid. https://github.com/vim/vim/commit/0ff01835a40f549c5c4a550502f62a2ac9ac447c Cherry-pick a cmdwin change from patch 9.0.0500. Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:9.0.0837: append() reports failure when not appending anythingzeertzjq2023-08-22
| | | | | | | | | | | | | | | | | | Problem: append() reports failure when not appending anything. Solution: Only report failure when appending something. (closes vim/vim#11498) https://github.com/vim/vim/commit/cd9c8d400c1eb9cbb4ff6a33be02f91a30ab13b2 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * version.c: update [skip ci] (#24830)github-actions[bot]2023-08-22
| | | | | | Co-authored-by: marvim <marvim@users.noreply.github.com>
| * fix(terminal): set $COLORTERM unconditionally in :terminal (#24763)Gregory Anders2023-08-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $COLORTERM is set in the terminal emulator based on the value of 'termguicolors' ("truecolor" if &tgc is set, 256 otherwise), but ONLY if $COLORTERM is also set in the parent terminal emulator. This is an unnecessary restriction that can cause issues in some cases. For instance, $COLORTERM is stripped by default by OpenSSH, so is not present in an SSH session. The terminal emulator still supports 24 bit color, so the lack of $COLORTERM is not a reliable indicator. When an application runs in Nvim's :terminal it thus has no way to know whether or not true color is supported. Instead, setting it unconditionally based on 'termguicolors' uses the user's own preferences to infer if 24-bit color is supported, rather than depending on the (unreliable) presence of $COLORTERM. If 'termguicolors' is set in a terminal that does not support true color then the colors in Nvim will already look bad. Enabling them for applications in the terminal emulator will not make it any worse. If 'termguicolors' is not set then the value of $COLORTERM from the parent terminal (if any) is forwarded to Nvim's :terminal. Fixes: https://github.com/neovim/neovim/issues/24717
| * fix(terminal): handle horizontal scrolling in another window (#24828)zeertzjq2023-08-21
| |
| * vim-patch:9.0.0423: "for" and "while" not recognized after :vim9cmd and ↵Gregory Anders2023-08-21
| | | | | | | | | | | | | | | | | | | | | | | | :legacy (#24825) Problem: "for" and "while" not recognized after :vim9cmd and :legacy. (Emanuele Torre) Solution: Recognize all the command modifiers. (closes vim/vim#11087) Add a test to check the list of modifiers. https://github.com/vim/vim/commit/9132426334a8c7e159db93ec1b08ed61ac600aae Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:9.0.0906: mouse scroll code is not optimalzeertzjq2023-08-21
| | | | | | | | | | | | | | | | | | | | Problem: Mouse scroll code is not optimal. Solution: Properly organise Normal mode, Insert mode and common code. (Christopher Plewright, closes vim/vim#11572) https://github.com/vim/vim/commit/ff95ce0930e6db0037fe8d1fc875a6522b054582 Co-authored-by: Christopher Plewright <chris@createng.com>
| * vim-patch:9.0.0902: some mouse scroll code is not in a good placezeertzjq2023-08-21
| | | | | | | | | | | | | | | | | | Problem: Some mouse scroll code is not in a good place. Solution: Refactor the code. (Christopher Plewright, closes vim/vim#11561) https://github.com/vim/vim/commit/696d0a86250636602d42e29e57d8923f538e0549 Co-authored-by: Christopher Plewright <chris@createng.com>
| * vim-patch:9.0.0886: horizontal mouse scroll only works in the GUIzeertzjq2023-08-21
| | | | | | | | | | | | | | | | | | | | Problem: Horizontal mouse scroll only works in the GUI. Solution: Make horizontal mouse scroll also work in a terminal. (Christopher Plewright, closes vim/vim#11448) https://github.com/vim/vim/commit/44c2209352d56d70b1fc0215e81f1822d55aa563 Co-authored-by: Christopher Plewright <chris@createng.com>
| * vim-patch:e46a44050562zeertzjq2023-08-21
| | | | | | | | | | | | | | | | Runtime file updates https://github.com/vim/vim/commit/e46a4405056276b4cbdacee76b11f85c8ea1830b Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:589edb340454zeertzjq2023-08-21
| | | | | | | | | | | | | | | | Updte runtime files https://github.com/vim/vim/commit/589edb340454e7f1b19358f129287a636d53d0e1 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.1.2062: the mouse code is spread out (#24817)zeertzjq2023-08-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The mouse code is spread out. Solution: Move all the mouse code to mouse.c. (Yegappan Lakshmanan, closes vim/vim#4959) https://github.com/vim/vim/commit/b20b9e14ddd8db111e886ad0494e15b955159426 Also move getmousepos() there. N/A patches for version.c: vim-patch:8.1.2070: mouse code is spread out Problem: Mouse code is spread out. Solution: Move mouse terminal code parsing to mouse.c. (Yegappan Lakshmanan, closes vim/vim#4966) https://github.com/vim/vim/commit/b8ff5c271ee5dcef6f63436b77e228e062ff9a0e Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.2.4299: SafeState autocommand interferes with debuggingzeertzjq2023-08-21
| | | | | | | | | | | | | | | | | | Problem: SafeState autocommand interferes with debugging. Solution: Do not trigger SafeState while debugging. (closes vim/vim#9697) https://github.com/vim/vim/commit/46f3080e5cd4cd1bae23e72a429a8195eb1ded7a Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.1.2066: no tests for state()zeertzjq2023-08-21
| | | | | | | | | | | | | | | | | | Problem: No tests for state(). Solution: Add tests. Clean up some feature checks. Make "a" flag work. https://github.com/vim/vim/commit/c2585490321854ca3df115efcf0b40986901d96c Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.1.2053: SafeStateAgain not triggered if callback uses feedkeys()zeertzjq2023-08-21
| | | | | | | | | | | | | | | | | | | | | | | | Problem: SafeStateAgain not triggered if callback uses feedkeys(). Solution: Check for safe state in the input loop. Make log messages easier to find. Add 'S' flag to state(). https://github.com/vim/vim/commit/d103ee78432f9036d243b18dd5aac1263d3b7dc9 Include misc1.c change from patch 8.1.2062. Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.1.2048: not clear why SafeState and SafeStateAgain are not triggeredzeertzjq2023-08-21
| | | | | | | | | | | | | | | | | | Problem: Not clear why SafeState and SafeStateAgain are not triggered. Solution: Add log statements. https://github.com/vim/vim/commit/37d1807a801d5296f00b3ac85a38b26cfe6de55c Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.1.2047: cannot check the current statezeertzjq2023-08-21
| | | | | | | | | | | | | | | | | | Problem: Cannot check the current state. Solution: Add the state() function. https://github.com/vim/vim/commit/0e57dd859ecb1e8a3b91509d2f4343e839340eb8 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.1.2046: SafeState may be triggered at the wrong momentzeertzjq2023-08-21
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: SafeState may be triggered at the wrong moment. Solution: Move it up higher to after where messages are processed. Add a SafeStateAgain event to tigger there. https://github.com/vim/vim/commit/69198cb8c08f124729c41a4681f2d142228a9139 SafeStateAgain is N/A. Move SafeState functions to state.c. Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.1.2044: no easy way to process postponed workzeertzjq2023-08-21
| | | | | | | | | | | | | | | | | | Problem: No easy way to process postponed work. (Paul Jolly) Solution: Add the SafeState autocommand event. https://github.com/vim/vim/commit/8aeec40207b5adcd3a155277dc4f29189343b963 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:9.0.1767: '.-' no allowed in highlight group names (#24814)zeertzjq2023-08-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: '.-' no allowed in highlight group names Solution: Allow dot and hyphen characters in highlight group names Allow dots and hyphens in group names. There does not seem to be any reason for these to be disallowed. closes: vim/vim#12807 https://github.com/vim/vim/commit/d4376dc3ebea91abcb4d9ef9963ef5b968048b78 Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
| * 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.1774: no support for custom cmdline completion (#24808)zeertzjq2023-08-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: no support for custom cmdline completion Solution: Add new vimscript functions Add the following two functions: - getcmdcompltype() returns custom and customlist functions - getcompletion() supports both custom and customlist closes: vim/vim#12228 https://github.com/vim/vim/commit/92997dda789ad8061841128cbc99b15ec0374411 Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
| * vim-patch:9.0.1763: crash when passing invalid buffer to undotree() (#24807)zeertzjq2023-08-21
| | | | | | | | | | | | | | | | | | Problem: crash when passing invalid buffer to undotree() Solution: Use get_buf_arg() instead of tv_get_buf_from_arg(). closes: vim/vim#12862 closes: vim/vim#12830 https://github.com/vim/vim/commit/ab9f2ecfd4ecaf74eeed0e5ec41355589af3ec8f
| * 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.1761: g<kEnd> behaves different from g<end>zeertzjq2023-08-21
| | | | | | | | | | | | | | | | | | Problem: g<kEnd> behaves different from g<end> Solution: Make g<kEnd> behave like g<End> closes: vim/vim#12861 https://github.com/vim/vim/commit/654bdbbd329e7267051cc2eb496bc52b66053081
| * vim-patch:9.0.1753: can't move to last non-blank charzeertzjq2023-08-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: can't move to last non-blank char Solution: Make g<end> behave like that Make it possible to move to last non-blank char on a line We can distinguish between g0 and g^ to move to the very first character and the first non-blank char. And while we can move to the last screen char, we cannot go to the last non-blank screen char. Since I think g$ is the more widely used and known movement command (and g<end> is synonymous to it) change the behaviour of g<end> to move to last non-screen char instead and don't have this be the same command as the g$ command anymore. If you want to keep the old behaviour, you can use: ``` nnoremap g<end> g$ ``` Add a test to verify the behaviour. closes: vim/vim#12593 https://github.com/vim/vim/commit/b5f6fe9ca2661d06bc0be839447ce1995450b9de Co-authored-by: Christian Brabandt <cb@256bit.org>
| * vim-patch:9.0.1747: screenpos() may cause unnecessary redraw (#24792)zeertzjq2023-08-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: screenpos() may cause unnecessary redraw. Solution: Don't unnecessarily reset VALID_WROW flag. VALID_WROW flag is only used by two functions: validate_cursor() and cursor_valid(), and cursor_valid() is only used once in ex_sleep(). When adjust_plines_for_skipcol() was first added in patch 9.0.0640, it was called in two functions: comp_botline() and curs_rows(). - comp_botline() is called in two places: - onepage(), which resets VALID_WROW flag immediately afterwards. - validate_botline_win(), where resetting a VALID_ flag is strange. - curs_rows() is called in two places: - curs_columns(), which sets VALID_WROW flag afterwards. - validate_cline_row(), which is only used by GUI mouse focus. Therefore resetting VALID_WROW there doesn't seem to do anything useful. Also, a w_skipcol check (which resets VALID_WROW flag) was added to check_cursor_moved() in patch 9.0.0734, which seems to make more sense than resetting that flag in the middle of a computation. While at it make adjust_plines_for_skipcol() and textpos2screenpos() a bit less confusing: - Make adjust_plines_for_skipcol() return "off" instead of "n - off". - Use 0-based "row" in textpos2screenpos() until W_WINROW is added. closes: vim/vim#12832 https://github.com/vim/vim/commit/6235a109c48ff2559eca3b16578c429ffb61eadc
| * vim-patch:9.0.1742: wrong curswant when clicking on second cell of ↵zeertzjq2023-08-19
| | | | | | | | | | | | | | | | | | | | | | double-width char (#24789) Problem: Wrong curswant when clicking and the second cell of a double-width char. Solution: Don't copy virtcol of the first char to the second one. closes: vim/vim#12842 https://github.com/vim/vim/commit/9994160bfe74501886bbbf5631aec8ea2ae05991
| * vim-patch:9.0.1540: reverse() on string doesn't work in compiled functionzeertzjq2023-08-19
| | | | | | | | | | | | | | | | | | | | Problem: reverse() on string doesn't work in compiled function. Solution: Accept string in argument type check. (Yegappan Lakshmanan, closes vim/vim#12377) https://github.com/vim/vim/commit/f9dc278946d52235a0025fd347bd9ff571258470 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>