aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/funcs.c
Commit message (Collapse)AuthorAge
...
* refactor: grid->rows and grid->colsbfredl2022-05-18
|
* feat(ui): add `'winbar'`Famiu Haque2022-05-18
| | | | | | | Adds support for a bar at the top of each window, enabled through the `'winbar'` option. Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
* refactor: replace char_u variables and functions with charDundar Goc2022-05-16
| | | | Work on https://github.com/neovim/neovim/issues/459
* fix PVS warnings (#18459)dundargoc2022-05-15
| | | | | | | | | | | | | * fix(PVS/V547): remove ifs that are always true or false * fix(PVS/V560): remove partial conditions that are always true * fix(PVS/V1044): suppress warning about loop break conditions * fix(PVS/V1063): suppress "modulo by 1 operation is meaningless" * fix(PVS/V568): suppress "operator evaluates the size of a pointer" Also mark vim-patch:8.2.4958 as ported.
* Merge pull request #18489 from dundargoc/refactor/remove-char_ubfredl2022-05-13
|\ | | | | refactor: replace char_u variables and functions with char
| * refactor: replace char_u variables and functions with charDundar Goc2022-05-11
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
* | refactor(eval): use Hashy McHashFace instead of gperfbfredl2022-05-12
| | | | | | | | this removes gperf as a build dependency
* | feat(defaults): session data in $XDG_STATE_HOME #15583Ivan2022-05-12
|/ | | | | | | | | | | | See: https://gitlab.freedesktop.org/xdg/xdg-specs/-/commit/4f2884e16db35f2962d9b64312917c81be5cb54b - Move session persistent data to $XDG_STATE_HOME Change 'directory', 'backupdir', 'undodir', 'viewdir' and 'shadafile' default location to $XDG_STATE_HOME/nvim. - Move logs to $XDG_STATE_HOME, too. - Add stdpath('log') support. Fixes: #14805
* vim-patch:8.2.4911: the mode #defines are not clearly named (#18499)zeertzjq2022-05-10
| | | | | | | | Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first. https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435 A hunk from the patch depends on patch 8.2.4861, which hasn't been ported yet, but that should be easy to notice.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* feat: cmdline funcs (#18284)Shougo2022-05-09
| | | | | | | | | | | | | | vim-patch:8.2.4903: cannot get the current cmdline completion type and position Problem: Cannot get the current cmdline completion type and position. Solution: Add getcmdcompltype() and getcmdscreenpos(). (Shougo Matsushita, closes vim/vim#10344) https://github.com/vim/vim/commit/79d599b8772022af1d657f368c2fc97aa342c0da vim-patch:8.2.4910: imperfect coding Problem: Imperfect coding. Solution: Make code nicer. https://github.com/vim/vim/commit/9ff7d717aa3176de5c61de340deb93f41c7780fc
* refactor: replace char_u variables and functions with charDundar Goc2022-05-07
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-05
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-04
| | | | Work on https://github.com/neovim/neovim/issues/459
* feat(server): set $NVIM, unset $NVIM_LISTEN_ADDRESS #11009Justin M. Keyes2022-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEM ------------------------------------------------------------------------ $NVIM_LISTEN_ADDRESS has conflicting purposes as both a parameter ("the current process should listen on this address") and a descriptor ("the current process is a child of this address"). This contradiction means the presence of NVIM_LISTEN_ADDRESS is ambiguous, so child Nvim always tries to listen on its _parent's_ socket. This is the cause of lots of "Failed to start server" spam in our test/CI logs: WARN 2022-04-30… server_start:154: Failed to start server: address already in use: \\.\pipe\nvim-4480-0 WARN 2022-04-30… server_start:154: Failed to start server: address already in use: \\.\pipe\nvim-2168-0 SOLUTION ------------------------------------------------------------------------ 1. Set $NVIM to the parent v:servername, *only* in child processes. - Now the correct way to detect a "parent" Nvim is to check for $NVIM. 2. Do NOT set $NVIM_LISTEN_ADDRESS in child processes. 3. On startup if $NVIM_LISTEN_ADDRESS exists, unset it immediately after server init. 4. Open a channel to parent automatically, expose it as v:parent. Fixes #3118 Fixes #6764 Fixes #9336 Ref https://github.com/neovim/neovim/pull/8247#issuecomment-380275696 Ref #8696
* refactor: replace char_u variables and functions with charDundar Goc2022-05-03
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with char (#18288)dundargoc2022-04-30
| | | Work on https://github.com/neovim/neovim/issues/459
* refactor(uncrustify): change rules to better align with the style guideDundar Goc2022-04-29
| | | | | | | | | | | | | Add space around arithmetic operators '+' and '-'. Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. Remove space between '((' or '))' of control statements. Add space between ')' and '{' of control statements. Remove space between function name and '(' on function declaration. Collapse empty blocks between '{' and '}'. Remove newline at the end of the file. Remove newline between 'enum' and '{'. Remove newline between '}' and ')' in a function invocation. Remove newline between '}' and 'while' of 'do' statement.
* refactor(uncrustify): format all c code under /src/nvim/Dundar Goc2022-04-29
|
* revert: "refactor: Remove allow_keys global (#6346)"zeertzjq2022-04-29
|
* vim-patch:partial:8.2.0815: maparg() does not provide enough information for ↵zeertzjq2022-04-29
| | | | | | | | | | mapset() Problem: maparg() does not provide enough information for mapset(). Solution: Add "lhsraw" and "lhsrawalt" items. Drop "simplified" https://github.com/vim/vim/commit/9c65253fe702ea010afec11aa971acd542c35de2 This only includes the "lhs" value part.
* vim-patch:8.1.2145: cannot map <C-H> when modifyOtherKeys is enabledzeertzjq2022-04-29
| | | | | | | | | | | | | Problem: Cannot map <C-H> when modifyOtherKeys is enabled. Solution: Add the <C-H> mapping twice, both with modifier and as 0x08. Use only the first one when modifyOtherKeys has been detected. https://github.com/vim/vim/commit/459fd785e4a8d044147a3f83a5fca8748528aa84 Add REPTERM_NO_SPECIAL instead of REPTERM_SPECIAL because the meaning of "special" is different between Vim and Nvim. Omit seenModifyOtherKeys as Nvim supports attaching multiple UIs. Omit tests as they send terminal codes. Keep the behavior of API functions.
* Merge pull request #18254 from dundargoc/refactor/remove-char_ubfredl2022-04-27
|\ | | | | refactor: replace char_u variables and functions with char
| * refactor: replace char_u variables and functions with charDundar Goc2022-04-25
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
* | refactor(build): remove unused includes #17078kylo2522022-04-26
| | | | | | | | Remove unused includes in src/nvim/buffer.c|h using the IWYU library. Yet another step towards #6371 and #549
* | fix: has() should preserve v:shell_error #18280Andrey Mishchenko2022-04-26
|/ | | fixes #18278
* refactor: replace char_u variables and functions with charDundar Göc2022-04-16
| | | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:8.2.3184: cannot add a digraph with a leading spacezeertzjq2022-04-12
| | | | | | | | | | | | | | | Problem: Cannot add a digraph with a leading space. It is not easy to list existing digraphs. Solution: Add setdigraph(), setdigraphlist(), getdigraph() and getdigraphlist(). (closes vim/vim#8580) https://github.com/vim/vim/commit/6106504e9edc8500131f7a36e59bc146f90180fa Use GA_APPEND_VIA_PTR in registerdigraph(). Use tv_list_append_*() in getdigraphlist_appendpair(). Put the error messages in digraph.c. E196 is N/A. Remove mentions about 'encoding' being non-Unicode. Nvim doesn't support setting encoding=japan, so skip a test.
* vim-patch:8.2.4723: the ModeChanged autocmd event is inefficientzeertzjq2022-04-10
| | | | | | | | | Problem: The ModeChanged autocmd event is inefficient. Solution: Avoid allocating memory. (closes vim/vim#10134) Rename trigger_modechanged() to may_trigger_modechanged(). https://github.com/vim/vim/commit/2bf52dd065495cbf28e28792f2c2d50d44546d9f Make v:event readonly for ModeChanged.
* vim-patch:8.2.4402: missing parenthesis may cause unexpected problemsBrian Leung2022-04-03
| | | | | | Problem: Missing parenthesis may cause unexpected problems. Solution: Add more parenthesis is macros. https://github.com/vim/vim/commit/ae6f1d8b14c2f63811ee83ef14e32086fb3e9b83
* [RFC] vim-patch:8.1.1378: delete() can not handle a file name that looks ↵Shougo2022-04-03
| | | | | | | | | | | | li… (#16268) Problem: Delete() can not handle a file name that looks like a pattern. Solution: Use readdir() instead of appending "/*" and expanding wildcards. (Ken Takata, closes vim/vim#4424, closes vim/vim#696) https://github.com/vim/vim/commit/701ff0a3e53d253d7300c385e582659bbff7860d Cherry-pick a change to Test_delete_rf() from patch 8.1.1921. Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* vim-patch:8.1.1687: the evalfunc.c file is too big (#17949)Lewis Russell2022-04-03
| | | | | Problem: The evalfunc.c file is too big. Solution: Move testing support to a separate file. https://github.com/vim/vim/commit/ecaa70ea29c269dd0dabd3cd5acdfa0ce42ccd54
* vim-patch:8.2.3449: sort fails if the sort compare function returns 999 (#17909)dundargoc2022-03-30
| | | | | Problem: Sort fails if the sort compare function returns 999. Solution: Adjust value to -1 / 0 / 1. (Yasuhiro Matsumoto, closes vim/vim#8884) https://github.com/vim/vim/commit/c04f62346bfd6b92151908239a3c5ab1a7d18f2a
* vim-patch:8.2.1078: highlight and match functionality together in one file ↵Lewis Russell2022-03-23
| | | | | | | | | (#17805) Problem: Highlight and match functionality together in one file. Solution: Move match functionality to a separate file. (Yegappan Lakshmanan, closes vim/vim#6352) https://github.com/vim/vim/commit/06cf97e714fd8bf9b35ff5f8a6f2302c79acdd03
* vim-patch:8.1.1608: the evalfunc.c file is too big (#17807)Lewis Russell2022-03-23
| | | | | | Problem: The evalfunc.c file is too big. Solution: Move sign functionality to sign.c. https://github.com/vim/vim/commit/b60d8514b8813e2f3acefd454efcccbe04ac135a
* vim-patch:8.1.1742: still some match functions in evalfunc.cLewis Russell2022-03-20
| | | | | | | Problem: Still some match functions in evalfunc.c. Solution: Move them to highlight.c. https://github.com/vim/vim/commit/7dfb016d25e3e3e1f4411026dda21d1536f21acc
* vim-patch:8.1.1734: the evalfunc.c file is too bigLewis Russell2022-03-20
| | | | | | | Problem: The evalfunc.c file is too big. Solution: Move some functions to other files. https://github.com/vim/vim/commit/29b7d7a9aac591f920edb89241c8cde27378e50b
* vim-patch:8.1.1693: syntax coloring and highlighting is in one big file (#17721)Lewis Russell2022-03-18
| | | | | | | | | | | Problem: Syntax coloring and highlighting is in one big file. Solution: Move the highlighting to a separate file. (Yegappan Lakshmanan, closes vim/vim#4674) https://github.com/vim/vim/commit/f9cc9f209ede9f15959e4c2351e970477c139614 Name the new file highlight_group.c instead. Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* Merge pull request #17266 from famiu/feat/ui/global-statuslinebfredl2022-03-17
|\ | | | | feat(statusline): add global statusline
| * feat: add support for global statuslineFamiu Haque2022-03-18
| | | | | | | | | | | | | | | | | | | | Ref: #9342 Adds the option to have a single global statusline for the current window at the bottom of the screen instead of a statusline at the bottom of every window. Enabled by setting `laststatus = 3`. Due to the fact that statuslines at the bottom of windows are removed when global statusline is enabled, horizontal separators are used instead to separate horizontal splits. The horizontal separator character is configurable through the`horiz` item in `'fillchars'`. Separator connector characters are also used to connect the horizontal and vertical separators together, which are also configurable through the `horizup`, `horizdown`, `vertleft`, `vertright` and `verthoriz` items in `fillchars`. The window separators are highlighted using the `WinSeparator` highlight group, which supersedes `VertSplit` and is linked to `VertSplit` by default in order to maintain backwards compatibility.
* | chore: fix typos (#17670)dundargoc2022-03-17
| | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* | vim-patch:8.2.4568: getmousepos() does not compute the column below the last ↵Sean Dewar2022-03-15
| | | | | | | | | | | | | | | | | | | | | | line Problem: getmousepos() does not compute the column below the last line. Solution: Also compute the column when the mouse is below the last line. (Sean Dewar, closes vim/vim#9946) https://github.com/vim/vim/commit/10792feebd237aee89270669e509e85cafdfac60 test_setmouse is N/A.
* | vim-patch:8.2.4559: getmousepos() returns the screen columnSean Dewar2022-03-15
| | | | | | | | | | | | | | | | | | Problem: getmousepos() returns the screen column. (Ernie Rael) Solution: Return the text column, as documented. https://github.com/vim/vim/commit/533870a98501fac2b51ef4bc489fac3a055a41a9 Re-introduce vcol2col, which was removed in 71b1f4e for being unused. Move it to mouse.c (like in v8.1.2062, which hasn't been ported yet).
* | vim-patch:8.2.4555: getmousepos() returns the wrong columnSean Dewar2022-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: getmousepos() returns the wrong column. (Ernie Rael) Solution: Limit to the text size, not the number of bytes. https://github.com/vim/vim/commit/986b0fd0c550d9834a3cc45dd87555c13152c391 test_setmouse is N/A; adjust test for Nvim. N/A patches for version.c: vim-patch:8.2.4569: Coverity warning for not using a return value Problem: Coverity warning for not using a return value. Solution: Add "(void)". https://github.com/vim/vim/commit/977525fea662b7f37ad0e052894c1f62b5b03269
* | vim-patch:8.2.1401: cannot jump to the last used tabpageSean Dewar2022-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot jump to the last used tabpage. Solution: Add g<Tab> and tabpagnr('#'). (Yegappan Lakshmanan, closes vim/vim#6661, neovim #11626) https://github.com/vim/vim/commit/62a232506d06f6d1b3b7271801c907d6294dfe84 Nvim implemented this feature before Vim, but Vim made some useful changes (e.g: beeping on failure). Port the changes to closer match Vim (also makes porting future patches easier). Also note that because CHECK_CMDWIN was added to goto_tabpage_tp, there is no need to do the extra work with tabpage_index and goto_tabpage inside goto_tabpage_lastused to fix cmdwin issues any more (#11692). Note that while goto_tabpage_tp doesn't check for textlock like goto_tabpage does, it shouldn't matter as it is already checked for earlier. Add tags for <C-Tab> to tabpage.txt, and refer to <C-Tab> over CTRL-Tab to be consistent with other docs like the patch. Remove mention of "previous tabpage" (it can be confused with the tabpage to the left, e.g: `:tabprevious`). Similarly, don't rename old_curtab to last_tab in enter_tabpage (it might be confused with the right-most tabpage, e.g: `:tablast`). Cherry-pick Test_tabpage change from v8.2.0634. https://github.com/vim/vim/commit/92b83ccfda7a1d654ccaaf161a9c8a8e01fbcf76
* | refactor(eval/funcs): convert function comments to doxygen formatDundar Göc2022-03-14
| |
* | vim-patch:8.1.0892: failure when closing a window when location list is in useVVKot2022-03-13
| | | | | | | | | | | | | | | | Problem: Failure when closing a window when location list is in use. Solution: Handle the situation gracefully. Make sure memory for 'switchbuf' is not freed at the wrong time. (Yegappan Lakshmanan, closes vim/vim#3928) https://github.com/vim/vim/commit/eeb1b9c7ed33c152e041a286d79bf3ed00d80e40
* | refactor(uncrustify): disable uncrustify for misformatted code sectionsDundar Göc2022-03-10
| | | | | | | | | | Uncrustify version 0.74 has a bug that deindents and misformats the entire fileio.c.
* | chore(lgtm): fix "empty block without comment" warningsDundar Göc2022-03-09
| |
* | Merge pull request #17622 from ↵zeertzjq2022-03-09
|\ \ | | | | | | | | | | | | dundargoc/refactor/clang-tidy/remove-redundant-casts refactor/clang tidy/remove redundant casts