aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval
Commit message (Collapse)AuthorAge
* Merge branch 'fix_repeatcmdline' into mixmixJosh Rahm2022-09-15
|\
| * eval/userfunc.c: save the repeat_cmdline along with the redo buffJosh Rahm2022-09-15
| | | | | | | | | | | | A user function can clobber the repeat_cmdline, which is used to build the redo buffer, thus, if the redo buffer is saved when calling a userfunc, so should the repeat_cmdline.
* | Merge branch 'floattitle' into mixJosh Rahm2022-09-12
|\ \
| * \ Merge remote-tracking branch 'upstream/master' into floattitleJosh Rahm2022-09-12
| |\ \
| * \ \ Merge remote-tracking branch 'upstream/master' into floattitleJosh Rahm2022-08-22
| |\ \ \
| * | | | feat(floattitle): add ability to title floating windowsJosh Rahm2022-08-22
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is accomplished with adding a few new parameters to th e float config: * title: The title as a string * title_pos: The position of the title is one of: * kTitleLeft * kTitleCenter * kTitleRight The title does support statusline-esque highlighting semantics.
* | | | Merge branch 'userreg' into mixJosh Rahm2022-09-12
|\ \ \ \
| * \ \ \ Merge remote-tracking branch 'upstream/master' into userregJosh Rahm2022-09-12
| |\ \ \ \ | | | |_|/ | | |/| |
| * | | | Merge remote-tracking branch 'upstream/master' into userregJosh Rahm2022-08-22
| |\ \ \ \ | | | |_|/ | | |/| |
| * | | | feat(userregs): getreg() now works for multibyte registersJosh Rahm2022-08-22
| | | | |
| * | | | feat(userreg): Add user-defined registers to Neovim.Josh Rahm2022-08-21
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change unlocks additional registers for Neovim by allowing a user to define their own behavior for non-builtin registers. This is accopmlished through a new option 'userregfunc' The 'userregfunc' defines the function to call when handling a register for which there is no builtin functionality. The 'userregfunc' function should take 3 arguments: action - Either "yank" or "put" register - The character corresponding to the register content - In the case of action == "yank", the dictionary describing the yanked content, with the following keys: {type} - Either "char", "line" or "block" {lines} - The lines being yanked as a list {width} - The width in case of "block" mode. {additional_data} - Additional data (can be returned in "put" mode) In case of "put" this function should return the content to put. This content can be either: * A dictionary in the same template as content above. * A list of strings. This will be assumed to be "line" mode. * A string. This will be assumed to be "char" mode. An example of a "null" 'userregfunc' that provides an implementation identical to traditional vim registers would be: let s:contents = {} function! MyUserregFunction(action, register, content) abort if a:action == "put" return get(s:contents, a:register, "") else let s:contents[a:register] = a:content endif endfunction set userregfun=MyUserregFunction It is important to note that any valid unicode character can now be a register, including something like @☺. This change also addresses the multibyte parsing issues surrounding let @a = 'xyz' let @🔨 = 'hammer'
* | | | Merge remote-tracking branch 'upstream/master' into usermarksJosh Rahm2022-09-12
|\ \ \ \ | | |_|/ | |/| |
| * | | vim-patch:9.0.0299: error messages for setcmdline() could be better (#20169)zeertzjq2022-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Error messages for setcmdline() could be better. Solution: Use more specific error messages. (Yegappan Lakshmanan, closes vim/vim#10995) https://github.com/vim/vim/commit/25f1e5556259d536c8608185145b0769262873ff Cherry-pick tv_check_for_opt_number_arg() from Vim.
| * | | vim-patch:8.2.5034: there is no way to get the byte index from a virtual columnzeertzjq2022-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: There is no way to get the byte index from a virtual column. Solution: Add virtcol2col(). (Yegappan Lakshmanan, closes vim/vim#10477, closes vim/vim#10098) https://github.com/vim/vim/commit/5a6ec10cc80ab02eeff644ab19b82312630ea855 Cherry-pick tv_check_for_number_arg() from Vim. Cherry-pick pathshorten() doc change.
| * | | refactor: move f_screenpos() to move.czeertzjq2022-09-12
| | | |
| * | | vim-patch:8.2.2664: Vim9: not enough function arguments checked for stringzeertzjq2022-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: not enough function arguments checked for string. Solution: Check in balloon functions. Refactor function arguments. https://github.com/vim/vim/commit/32105ae88f3aa6a6af30336f0bc9f8eb81292cd7 Cherry-pick removal of useless check from patch 8.2.3840. vim-patch:8.2.3083: crash when passing null string to charclass() Problem: Crash when passing null string to charclass(). Solution: Bail out when string pointer is NULL. (Christian Brabandt, closes vim/vim#8498, closes vim/vim#8260) https://github.com/vim/vim/commit/72463f883cdfd08e29ab0018ef3889284848d5f1
| * | | vim-patch:8.2.2646: Vim9: error for not using string doesn't mention argumentzeertzjq2022-09-12
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: error for not using string doesn't mention argument. Solution: Add argument number. https://github.com/vim/vim/commit/f28f2ac425600b88da0bdcc12a82cd620f575681
| * | | refactor: replace char_u with charDundar Göc2022-09-10
| | | | | | | | | | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * | | refactor: replace char_u with charDundar Göc2022-09-09
| | | | | | | | | | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * | | refactor(typval): change FC_CFUNC abstraction into FC_LUAREFbfredl2022-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "cfuncs" was only ever used to wrap luarefs. As vim8script is finished and will not be developed further, support for "cfuncs" for other usecases are not planned. This abstraction was immediately broken anyway in order to get luarefs out of userfuncs again. Even if a new kind of userfunc needs to be invented in the future, likely just extending the FC_... flag union directy, instead of invoking unnecessary heap object and c function pointer indirection, will be a more straightforward design pattern.
| * | | refactor: replace char_u with charDundar Göc2022-09-06
| | | | | | | | | | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * | | refactor: migrate comment style (#20012)Lewis Russell2022-09-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done automatically using the following perl command: perl -pi -0777pe 's#\n\K */\*\n(.+?)\s*\*/\n#join("\n", map { $_ =~ s:^\s*\K \*://:; $_ } split("\n", $1)) . "\n"#sge' src/nvim/**/*.c Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * | | refactor: replace char_u with charDundar Göc2022-09-01
| | | | | | | | | | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * | | refactor: replace char_u with charDundar Göc2022-08-31
| | | | | | | | | | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * | | refactor: replace char_u with charDundar Göc2022-08-31
| | | | | | | | | | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * | | vim-patch:8.2.0301: insufficient testing for exception handling (#20016)zeertzjq2022-08-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Insufficient testing for exception handling and the "attention" prompt. Solution: Add test cases. (Yegappan Lakshmanan, closes vim/vim#5681) https://github.com/vim/vim/commit/b654103ad1e379348616f354272db86804ab4bdb Fix memory leak from last char_u refactor.
| * | | vim-patch:8.1.2037: can call win_gotoid() in cmdline window (#20015)zeertzjq2022-08-31
| | | | | | | | | | | | | | | | | | | | Problem: Can call win_gotoid() in cmdline window. Solution: Disallow switching windows. (Yasuhiro Matsumoto, closes vim/vim#4940) https://github.com/vim/vim/commit/a046b37c22bcabdea5f0fd6d21ca4bd0aa4c768e
| * | | fix(exceptions): restore `did_throw` (#20000)Sean Dewar2022-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `!did_throw` doesn't exactly imply `!current_exception`, as `did_throw = false` is sometimes used to defer exception handling for later (without forgetting the exception). E.g: uncaught exception handling in `do_cmdline()` may be deferred to a different call (e.g: when `try_level > 0`). In #7881, `current_exception = NULL` in `do_cmdline()` is used as an analogue of `did_throw = false`, but also causes the pending exception to be lost, which also leaks as `discard_exception()` wasn't used. It may be possible to fix this by saving/restoring `current_exception`, but handling all of `did_throw`'s edge cases seems messier. Maybe not worth diverging over. This fix also uncovers a `man_spec.lua` bug on Windows: exceptions are thrown due to Windows missing `man`, but they're lost; skip these tests if `man` isn't executable.
| * | | 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: move cmdline functions to ex_getln.czeertzjq2022-08-30
| | | |
| * | | refactor: replace char_u with charDundar Göc2022-08-29
| | | | | | | | | | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * | | Merge pull request #19961 from dundargoc/refactor/char_u/2bfredl2022-08-29
| |\ \ \ | | | | | | | | | | refactor: replace char_u with char 2: electric chaaralo
| | * | | refactor: replace char_u with charDundar Göc2022-08-27
| | | | | | | | | | | | | | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * | | | Merge pull request #19975 from bfredl/chartabsizebfredl2022-08-29
| |\ \ \ \ | | | | | | | | | | | | refactor(plines): use a struct for chartabsize state
| | * | | | refactor(plines): use a struct for chartabsize statebfredl2022-08-29
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a refactor extracted from vim-patch 9.0.0067: cannot show virtual text The logic for inline virtual text is going to be different in nvim than text property based text in vim, but this refactor is still useful, as calculation of displayed linesize is going to be stateful in a similar way.
| * / / / vim-patch:9.0.0285: it is not easy to change the command line from a plugin ↵Shougo2022-08-29
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#19979) vim-patch:9.0.0285: it is not easy to change the command line from a plugin Problem: It is not easy to change the command line from a plugin. Solution: Add setcmdline(). (Shougo Matsushita, closes vim/vim#10869) https://github.com/vim/vim/commit/07ea5f1509fe8dafe3262ed2702b4d0fc99e288b
| * | | refactor: replace char_u with charDundar Göc2022-08-26
| | | | | | | | | | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * | | refactor: change FALSE/TRUE to false/trueLewis Russell2022-08-26
| | | | | | | | | | | | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * | | 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: suppress clang and PVS warnings (#19940)zeertzjq2022-08-25
| | | |
| * | | vim-patch:8.2.1960: warning for uninitialized variablezeertzjq2022-08-25
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Warning for uninitialized variable. Solution: Initialize the variable. https://github.com/vim/vim/commit/0fd797eacd569a0680a86452c18713eacf6608fe
| * | | Merge pull request #19906 from bfredl/bigstagebfredl2022-08-24
| |\ \ \ | | | | | | | | | | perf(api): allow to use an arena for return values
| | * | | refactor(api): provide a temporary copy solution for nvim_call_atomicbfredl2022-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the copy_object() family accept an optional arena. More than half of the callsites should be refactored to use an arena later anyway.
| | * | | 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)
| | * | | perf(api): allow to use an arena for return valuesbfredl2022-08-23
| | | |/ | | |/|
| * | | feat(eval)!: make Vim functions return inner window width and height (#19743)zeertzjq2022-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In non-multigrid UI the only change is that the returned height now excludes winbar, and this is compatible with Vim. In multigrid UI this means the return value of these functions now reflect the space available for buffer lines in a window. No change in nvim_win_get_height() and nvim_win_get_width().
| * | | vim-patch:9.0.0206: redraw flags are not named specifically (#19913)zeertzjq2022-08-23
| | | | | | | | | | | | | | | | | | | | Problem: Redraw flags are not named specifically. Solution: Prefix "UPD_" to the flags, for UPDate_screen(). https://github.com/vim/vim/commit/a4d158b3c839e96ed98ff87c7b7124ff4518c4ff
| * | | vim-patch:8.2.4841: empty string considered an error for expand()zeertzjq2022-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Empty string considered an error for expand() when 'verbose' is set. (Christian Brabandt) Solution: Do not give an error for an empty result. (closes vim/vim#10307) https://github.com/vim/vim/commit/a96edb736d4274fc4aea460800780e06e1510812
| * | | vim-patch:8.2.4740: when expand() fails there is no error messagezeertzjq2022-08-23
| | | | | | | | | | | | | | | | | | | | | | | | Problem: When expand() fails there is no error message. Solution: When 'verbose' is set give an error message. https://github.com/vim/vim/commit/575445200bd35283191ecd7a0d596b37c5b477a4