aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval
Commit message (Collapse)AuthorAge
...
| * 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.
| * vim-patch:8.2.1489: Vim9: error when setting an option with setbufvar()zeertzjq2022-07-22
| | | | | | | | | | | | | | | | Problem: Vim9: error when setting an option with setbufvar(). Solution: Do not get a number from a string value. (closes vim/vim#6740) https://github.com/vim/vim/commit/191929b182ba38abe6bc431fb9d8d9507f408903 Vim9 is N/A, so this just refactors the code without changing behavior.
| * refactor: move f_getbufvar() and f_setbufvar() to eval/vars.czeertzjq2022-07-22
| | | | | | | | Vim moved them there in patch 8.1.1943.
| * refactor: move FunPtr to types.h (#19466)zeertzjq2022-07-22
| | | | | | | | | | This type itself is not eval-specific. Moving it to types.h can avoid including eval/funcs.h in many headers, and types.h is already included by many headers.
| * 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.
* | Merge remote-tracking branch 'upstream/master' into rahmJosh Rahm2022-07-18
|\|
| * 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().
| * vim-patch:8.2.5152: search() gets stuck with "c" and skip evaluates to true ↵zeertzjq2022-06-23
| | | | | | | | | | | | | | (#19064) Problem: search() gets stuck with "c" and skip evaluates to true. Solution: Reset the SEARCH_START option. (closes vim/vim#10608) https://github.com/vim/vim/commit/180246cfd1a5842c538fa8a4a0b520f1d95c90c7
| * fix(float): make `screen*()` functions respect floating windowsEvgeni Chasnovski2022-06-23
| | | | | | | | Resolves #19013.
| * feat(server): instance "name", store pipes in stdpath(state)Justin M. Keyes2022-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: - Unix sockets are created in random /tmp dirs. - /tmp is messy, unclear when OSes actually clear it. - The generated paths are very ugly. This adds friction to reasoning about which paths belong to which Nvim instances. - No way to provide a human-friendly way to identify Nvim instances in logs or server addresses. Solution: - Store unix sockets in stdpath('state') - Allow --listen "name" and serverstart("name") to given a name (which is appended to a generated path). TODO: - is stdpath(state) the right place?
| * perf(memory): use an arena for RPC decodingbfredl2022-06-14
| | | | | | | | | | | | | | | | | | drawback: tracing memory errors with ASAN is less accurate for arena allocated memory. Therefore, to start with it is being used for Object types around serialization/deserialization exclusively. This is going to have a large impact especially when TUI is refactored as a co-prosess as all UI events will be serialized and deserialized by nvim itself.
| * feat(autocmds): retrieve lua callback (#18642)kylo2522022-06-09
| | | | | | add a new `callback` field to `nvim_get_autocmds`
| * Merge pull request #18306 from lewis6991/fnfastbfredl2022-05-26
| |\ | | | | | | feat(lua): allow some viml functions to run in fast
| | * feat(lua): allow some viml functions to run in fastLewis Russell2022-05-17
| | | | | | | | | | | | | | | This change adds the necessary plumbing to annotate functions in funcs.c as being allowed in run in luv fast events.
| * | refactor: missing parenthesis may cause unexpected problems (#17443)kylo2522022-05-26
| | | | | | | | | related vim-8.2.{4402,4639}
| * | refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
| | |
| * | vim-patch:8.2.5002: deletebufline() may change Visual selectionzeertzjq2022-05-23
| | | | | | | | | | | | | | | | | | Problem: deletebufline() may change Visual selection. Solution: Disable Visual mode when using another buffer. (closes vim/vim#10469) https://github.com/vim/vim/commit/9b2edfd3bf2f14a1faaee9b62930598a2e77a798
| * | ci: lint with uncrustify #18563dundargoc2022-05-20
| | | | | | | | | | | | | | | | | | | | | This lint job will ensure that the C codebase is properly formatted at all times. This helps eliminate most of clint.py. To save CI time, it's faster to manually compile uncrustify and cache the binary instead of using homebrew (the apt-get package is too old).
| * | ci(coverity): annotate register_cfunc as leaking memoryJames McCoy2022-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | register_cfunc allocates a ufunc_T, but doesn't store the pointer anywhere before returning. The uf_name member variable is stored in a hashtable and used to lookup the ufunc_T later, but that's too much for Coverity to track. Adding the annotation ensures that any new callers to register_cfunc don't pop up as new "leaks" in the Coverity scans.
| * | fix(termopen): avoid ambiguity in URI when CWD is root dir (#16988)zeertzjq2022-05-19
| | |
| * | 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
| * Merge pull request #18425 from dundargoc/refactor/char_u/1bfredl2022-05-07
| |\ | | | | | | refactor: replace char_u variables and functions with char
| | * refactor: replace char_u variables and functions with charDundar Goc2022-05-07
| | | | | | | | | | | | Work on https://github.com/neovim/neovim/issues/459