aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/funcs.c
Commit message (Collapse)AuthorAge
...
* 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.
* vim-patch:8.2.4667: expandcmd() fails on an errorzeertzjq2022-08-20
| | | | | | | Problem: expandcmd() fails on an error. Solution: On failure return the command unmodified. (yegappan Lakshmanan, closes vim/vim#10063) https://github.com/vim/vim/commit/5018a836c030988944a9bbe2fd2e538bf5261a72
* 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
* revert: "jobstart(): Fix hang on non-executable cwd #9204" (#19826)zeertzjq2022-08-18
| | | | | This reverts commit c4c74c3883aa3122c0c877ca8dd7b26beb5cc4aa. LibUV already gives an error for this, so this isn't needed.
* 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
* vim-patch:8.1.2042: the evalfunc.c file is too big (#19792)zeertzjq2022-08-16
| | | | | | | Problem: The evalfunc.c file is too big. Solution: Move getchar() and parse_queued_messages() to getchar.c. https://github.com/vim/vim/commit/9c658c9eacbd97e2c071f652a0155f71db94c0f3 Omit parse_queued_messages(): Nvim does not have MESSAGE_QUEUE.
* vim-patch:8.1.1869: code for the argument list is spread out (#19791)zeertzjq2022-08-16
| | | | | | Problem: Code for the argument list is spread out. Solution: Put argument list code in arglist.c. (Yegappan Lakshmanan, closes vim/vim#4819) https://github.com/vim/vim/commit/4ad62155a1015751a6645aaecd94b02c94c8934b
* fix(getchar): flush screen before doing a blocking waitzeertzjq2022-08-15
|
* refactor: move menu non-symbols to menu_defs.h (#19778)zeertzjq2022-08-15
|
* vim-patch:8.1.1960: fold code is spread out (#19777)zeertzjq2022-08-15
| | | | | Problem: Fold code is spread out. Solution: Move fold functions to fold.c. https://github.com/vim/vim/commit/db022f3ffb57c5ff4b97b4e93a994d11e4c10466
* refactor(eval/funcs.c): resolve all clint errorsLewis Russell2022-08-14
| | | | | | ... and tidy up local variable declarations Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* vim-patch:8.1.2081: the spell.c file is too big (#19767)zeertzjq2022-08-14
| | | | | | Problem: The spell.c file is too big. Solution: Move the code for spell suggestions to a separate file. (Yegappan Lakshmanan, closes vim/vim#4988) https://github.com/vim/vim/commit/46a426c9acfdd3d6c0fa134a17681634b9325bee
* refactor: change remaining sourcing_name/sourcing_lnum to exestackzeertzjq2022-08-14
| | | | Co-Authored-By: VVKot <volodymyr.kot.ua@gmail.com>
* vim-patch:8.2.0056: execution stack is incomplete and inefficientzeertzjq2022-08-14
| | | | | | | | | | | Problem: Execution stack is incomplete and inefficient. Solution: Introduce a proper execution stack and use it instead of sourcing_name/sourcing_lnum. Create a string only when used. https://github.com/vim/vim/commit/1a47ae32cdc19b0fd5a82e19fe5fddf45db1a506 Omit test_debugger.vim: superseded by later patches. Omit check_map_keycodes(): N/A. Omit kword_test.c: N/A (converted to a unit test).
* refactor: replace char_u with charDundar Goc2022-08-12
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: move non-symbols in ex_eval.h to ex_eval_defs.h (#19739)zeertzjq2022-08-12
| | | | This avoids including ex_eval.h in any other header, thus preventing future circular includes.
* vim-patch:8.1.1684: profiling functionality is spread outzeertzjq2022-08-12
| | | | | | | | | Problem: Profiling functionality is spread out. Solution: Put profiling functionality in profiling.c. (Yegappan Lakshmanan, closes vim/vim#4666) https://github.com/vim/vim/commit/fa55cfc69d2b14761e2a8bd85bc1e0d82df770aa Move proftime_T to types.h for now to avoid recursive #include.
* refactor: use CLEAR_FIELD and CLEAR_POINTER macros (#19709)zeertzjq2022-08-11
| | | | | | | vim-patch:8.2.0559: clearing a struct is verbose Problem: Clearing a struct is verbose. Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER(). https://github.com/vim/vim/commit/a80faa8930ed5a554beeb2727762538873135e83
* vim-patch:8.1.1823: command line history code is spread out (#19688)zeertzjq2022-08-09
| | | | | | Problem: Command line history code is spread out. Solution: Put the code in a new file. (Yegappan Lakshmanan, closes vim/vim#4779) Also graduate the +cmdline_hist feature. https://github.com/vim/vim/commit/d7663c22c6c1ff0f86b81371586fbc851d3a3e9e
* vim-patch:8.2.1281: the "trailing characters" error can be hard to understandzeertzjq2022-08-07
| | | | | | Problem: The "trailing characters" error can be hard to understand. Solution: Add the trailing characters to the message. https://github.com/vim/vim/commit/2d06bfde29bd3a62fc85823d2aa719ef943bd319
* vim-patch:8.2.0413: buffer menu does not handle special buffers properlyzeertzjq2022-08-05
| | | | | | | | | Problem: Buffer menu does not handle special buffers properly. Solution: Keep a dictionary with buffer names to reliably keep track of entries. Also trigger BufFilePre and BufFilePost for command-line and terminal buffers when the name changes. https://github.com/vim/vim/commit/5e94a29ebbde10dd973d58f1adba9a2fc83877d1
* Merge pull request #19437 from dundargoc/refactor/char_u-to-charbfredl2022-07-31
|\ | | | | refactor: replace char_u with char
| * refactor: replace char_u with charDundar Goc2022-07-31
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
* | cmdheight=0: fix bugs part2 (#19185)Shougo2022-07-31
| |
* | vim-patch:9.0.0111: "nocombine" is missing from synIDattr()Christian Clason2022-07-31
|/ | | | | | Problem: "nocombine" is missing from synIDattr(). Solution: Add "nocombine". (Munif Tanjim, closes vim/vim#10816) https://github.com/vim/vim/commit/de78632c41d870d5254e9ccd285f53674b955f4e
* refactor: enable -Wconversion warning for eval/funcs.c (#19541)dundargoc2022-07-27
| | | Work on https://github.com/neovim/neovim/issues/567
* vim-patch:9.0.0083: ModeChanged event not triggered when leaving cmdline windowzeertzjq2022-07-27
| | | | | | | | Problem: ModeChanged event not triggered when leaving the cmdline window. Solution: Call may_trigger_modechanged(). (closes vim/vim#10791) https://github.com/vim/vim/commit/c9e8fd6fc7d2027d0645b376d95a6ed51098036c Code is already present in Nvim. Add some other related missing changes.
* vim-patch:8.1.1763: evalfunc.c is still too big (#17952)Lewis Russell2022-07-24
|
* vim-patch:8.2.4731: the changelist index is not remembered per bufferzeertzjq2022-07-23
| | | | | | | | | | Problem: The changelist index is not remembered per buffer. Solution: Keep the changelist index per window and buffer. (closes vim/vim#10135, closes vim/vim#2173) https://github.com/vim/vim/commit/db0ea7f2b00c84d84f188c9e9953c4f1887528e7 Cherry-pick FOR_ALL_BUF_WININFO from patch 8.2.0500. Cherry-pick test_changelist.vim change from patch 8.2.3795.
* refactor: move f_getbufvar() and f_setbufvar() to eval/vars.czeertzjq2022-07-22
| | | | Vim moved them there in patch 8.1.1943.
* vim-patch:8.1.1933: the eval.c file is too big (#19462)zeertzjq2022-07-22
| | | | | | | | Problem: The eval.c file is too big. Solution: Move code related to variables to evalvars.c. (Yegappan Lakshmanan, closes vim/vim#4868) https://github.com/vim/vim/commit/0522ba0359c96a8c2a4fc8fca0d3b58e49dda759 Name the new file eval/vars.c instead.
* vim-patch:8.1.1849zeertzjq2022-07-20
| | | | https://github.com/vim/vim/commit/9bca58f36d1f6a2ac0e4022caa5f355d39357a05
* vim-patch:8.1.1076: file for Insert mode is much too bigzeertzjq2022-07-20
| | | | | | | | | | | | Problem: File for Insert mode is much too big. Solution: Split off the code for Insert completion. (Yegappan Lakshmanan, closes vim/vim#4044) https://github.com/vim/vim/commit/7591bb39d58ece38a5fef984a08ea9012616c1f9 Cherry-pick ins_compl_len() -> get_compl_len() from patch 8.2.4001. Revert a71c5e9eb98fbb2ca88510269935cdcda37369fc: ctrl_x_mode is no longer a global variable, so l_ctrl_x_mode is no longer needed.
* fix(windows):exepath, stdpath return wrong slashes #19111Enan Ajmain2022-07-17
| | | | | | exepath and stdpath should respect shellslash and return path with proper file separator. Closes #13787
* vim-patch:8.2.2426: allowing 'completefunc' to switch windows causes troublezeertzjq2022-07-17
| | | | | | | | | | | | | | | | | | | | | | Problem: Allowing 'completefunc' to switch windows causes trouble. Solution: use "textwinlock" instead of "textlock". https://github.com/vim/vim/commit/28976e2accf11591c60e8a658a9e03544f0408b2 Assert E565 instead of E578. vim-patch:8.2.0670: cannot change window when evaluating 'completefunc' Problem: Cannot change window when evaluating 'completefunc'. Solution: Make a difference between not changing text or buffers and also not changing window. https://github.com/vim/vim/commit/6adb9ea0a6ca01414f4b591f379b0f829a8273c0 vim-patch:8.2.5029: "textlock" is always zero Problem: "textlock" is always zero. Solution: Remove "textlock" and rename "textwinlock" to "textlock". (closes vim/vim#10489) https://github.com/vim/vim/commit/cfe456543e840d133399551f8626d985e1fb1958
* vim-patch:8.1.1547: functionality of bt_nofile() is confusingzeertzjq2022-07-15
| | | | | | Problem: Functionality of bt_nofile() is confusing. Solution: Split into bt_nofile() and bt_nofilename(). https://github.com/vim/vim/commit/26910de8b0da6abab87bd5a397330f9cbe483309
* vim-patch:8.2.0035: saving and restoring called_emsg is clumsy (#19335)zeertzjq2022-07-13
| | | | | Problem: Saving and restoring called_emsg is clumsy. Solution: Count the number of error messages. https://github.com/vim/vim/commit/53989554a44caca0964376d60297f08ec257c53c
* vim-patch:8.2.3530: ":buf \{a}" fails while ":edit \{a}" workszeertzjq2022-07-10
| | | | | | Problem: ":buf \{a}" fails while ":edit \{a}" works. Solution: Unescape "\{". (closes vim/vim#8917) https://github.com/vim/vim/commit/21c1a0c2f10575dbb72fa873d33f0c1f6e170aa7
* vim-patch:8.2.0614: get ml_get error when deleting a line in 'completefunc' ↵zeertzjq2022-07-07
| | | | | | | | | | | | | (#19244) Problem: Get ml_get error when deleting a line in 'completefunc'. (Yegappan Lakshmanan) Solution: Lock the text while evaluating 'completefunc'. https://github.com/vim/vim/commit/ff06f283e3e4b3ec43012dd3b83f8454c98f6639 Fix a mistake in the porting of patch 8.1.0098. Cherry-pick Test_run_excmd_with_text_locked() from patch 8.2.0270. Cherry-pick test_gf.vim changes from patch 8.2.0369. Cherry-pick message change from later patches.
* refactor: replace char_uDundar Goc2022-07-02
| | | | Work on https://github.com/neovim/neovim/issues/459
* feat(marks): restore viewport on jump #15831Javier Lopez2022-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ** Refactor Previously most functions used to "get" a mark returned a position, changed the line number and sometimes changed even the current buffer. Now functions return a {x}fmark_T making calling context aware whether the mark is in another buffer without arcane casting. A new function is provided for switching to the mark buffer and returning a flag style Enum to convey what happen in the movement. If the cursor changed, line, columns, if it changed buffer, etc. The function to get named mark was split into multiple functions. - mark_get() -> fmark_T - mark_get_global() -> xfmark_T - mark_get_local() -> fmark_T - mark_get_motion() -> fmark_T - mark_get_visual() -> fmark_T Functions that manage the changelist and jumplist were also modified to return mark types. - get_jumplist -> fmark_T - get_changelist -> fmark_T The refactor is also seen mainly on normal.c, where all the mark movement has been siphoned through one function nv_gomark, while the other functions handle getting the mark and setting their movement flags. To handle whether context marks should be left, etc. ** Mark View While doing the refactor the concept of a mark view was also implemented: The view of a mark currently implemented as the number of lines between the mark position on creation and the window topline. This allows for moving not only back to the position of a mark but having the window look similar to when the mark was defined. This is done by carrying and extra element in the fmark_T struct, which can be extended later to also restore horizontal shift. *** User space features 1. There's a new option, jumpoptions+=view enables the mark view restoring automatically when using the jumplist, changelist, alternate-file and mark motions. <C-O> <C-I> g; g, <C-^> '[mark] `[mark] ** Limitations - The view information is not saved in shada. - Calls to get_mark should copy the value in the pointer since we are using pos_to_mark() to wrap and provide a homogeneous interfaces. This was also a limitation in the previous state of things.
* refactor(uncrustify): change config to better align with style guide (#18803)dundargoc2022-06-30
| | | refactor(uncrustify): change config to better align with neovim style
* feat: stdpath('run'), /tmp/nvim.user/ #18993Justin M. Keyes2022-06-30
| | | | | | | | | | | | | | | | Problem: - Since c57f6b28d71d #8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Store sockets in stdpath('run') ($XDG_RUNTIME_DIR). - Establish "/tmp/nvim.user/" as the tempdir root shared by all Nvims. - Make ok() actually useful. - Introduce assert_nolog(). closes #3517 closes #17093
* refactor(highlight)!: rename attributes to match Vim (#19159)zeertzjq2022-06-30
| | | | | | | | | Ref: https://github.com/vim/vim/commit/84f546363068e4ddfe14a8a2a2322bb8d3a25417 Rename: - `underlineline` to `underdouble` - `underdot` to `underdotted` - `underdash` to `underdashed` `underdouble` also now takes higher precedence than `undercurl`.
* vim-patch:9.0.0002: map functionality outside of map.c (#19150)zeertzjq2022-06-29
| | | | | Problem: Map functionality outside of map.c. Solution: Move f_hasmapto() to map.c. Rename a function. (closes vim/vim#10611) https://github.com/vim/vim/commit/c207fd2535717030d78f9b92839e5f2ac004cc78
* Merge #19060 memory leaksJustin M. Keyes2022-06-28
|\
| * fix(coverity/352829): correctly free memory in f_callThomas Vigouroux2022-06-24
| | | | | | | | | | This function was not freeing allocated memory that it owns when calling functions from lua.
* | refactor: replace char_u #18429dundargoc2022-06-28
|/ | | Work on https://github.com/neovim/neovim/issues/459
* refactor: move some mapping-related code to a separate file (#19061)zeertzjq2022-06-23
| | | | | | | | | | | | | | | | | | | This marks the following Vim patches as ported: vim-patch:8.1.1785: map functionality mixed with character input Problem: Map functionality mixed with character input. Solution: Move the map functionality to a separate file. (Yegappan Lakshmanan, closes vim/vim#4740) Graduate the +localmap feature. https://github.com/vim/vim/commit/b66bab381c8ba71fd6e92327d1d34c6f8a65f2a7 vim-patch:8.2.3643: header for source file is outdated Problem: Header for source file is outdated. Solution: Make the header more accurate. (closes vim/vim#9186) https://github.com/vim/vim/commit/a3f83feb63eae5464a620ae793c002eb45f7a838 Also cherry-pick a change for <unique> mappings from patch 8.2.0807. Rename map_clear_mode() to do_mapclear().