aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* | | | refactor: remove redundant char casts #15888dundargoc2021-10-04
| | | |
* | | | refactor: define diagnostic highlights in syntax.cGregory Anders2021-10-03
| | | |
* | | | vim-patch:8.2.3469: some files with json syntax are not recognized (#15891)dundargoc2021-10-03
| |_|/ |/| | | | | | | | | | | Problem: Some files with json syntax are not recognized. Solution: Add a few file patterns. (Emiliano Ruiz Carletti, closes vim/vim#8947) https://github.com/vim/vim/commit/50c56893423eb6ad2154a4151e67f7097f52efb6
* | | vim-patch:8.2.3466: completion submode not indicated for virtual replace ↵zeertzjq2021-10-03
| | | | | | | | | | | | | | | | | | | | | (#15886) Problem: Completion submode not indicated for virtual replace. Solution: Add submode to "Rv". (closes vim/vim#8945) https://github.com/vim/vim/commit/cc8cd4453332276d55b4a1109eace5785a4f319d
* | | vim-patch:8.2.3465: cannot detect insert scroll mode (#15885)zeertzjq2021-10-03
|/ / | | | | | | | | Problem: Cannot detect insert scroll mode. Solution: Add "scroll" to complete_info(). (closes vim/vim#8943) https://github.com/vim/vim/commit/27fef59dd1dd75f50c366f7f616ffa4451560452
* | Merge pull request #15516 from bfredl/keysetBjörn Linse2021-10-03
|\ \ | | | | | | refactor(api): Represent option dicts as a structs in C and reduce conversion overhead from lua
| * | refactor(api): handle option dicts properlyBjörn Linse2021-10-03
| |/ | | | | | | | | | | | | Do not copy a lot of lua strings (dict keys) to just strequal() them Just compare them directly to a dedicated hash function. feat(generators): HASHY McHASHFACE
* | vim-patch:8.2.3464: nginx files are not recognized (#15883)Christian Clason2021-10-03
| | | | | | | | | | Problem: nginx files are not recognized. Solution: Add several file patterns. (Chris Aumann, closes vim/vim#8922) https://github.com/vim/vim/commit/8b8c0ed657fabd88e610401ca8a12366f987db94
* | fix(nvim_open_win): crash if autocmds delete buffer/window #15549Sean Dewar2021-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | win_set_buf can trigger autocmds if noautocmd=false. If they close the window, code afterwards will dereference the freed win_T* wp pointer. This interaction became possible after commit 1def3d1542d6a65f057e743faea39a760b50db87. The reason deleting curbuf crashes, and not the buf passed to `nvim_open_win`, is because the float initially edits curbuf (`win_init`) until it's later set to edit buf (windows from `:new` and `:split <buf>` behave similiarly: approx. `:split`, then `:buffer <buf>`). `do_buffer` closes windows when their edited buffer is deleted (unless it's the only window; N/A for floats), so the float closes when curbuf is deleted, so we need to check `win_valid` after `win_set_buf` too. Closes #15548
* | vim-patch:8.2.3460: some type casts are not needed #15868dundargoc2021-10-02
| | | | | | | | | | Problem: Some type casts are not needed. Solution: Remove unnecessary type casts. (closes vim/vim#8934) https://github.com/vim/vim/commit/dfa5e464d459f84200a73d178f1ecefe75bbe511
* | fix(float)!: always anchor to corner of window including border #15832zeertzjq2021-10-02
| | | | | | | | | | | | | | | | | | | | N, W, S, E are all inclusive, i.e., always anchor to the exact corner of the window (including border). This line may also need change in this case (change 0 to -1): This is most consistent and easiest to reason about, especially with GUIs whose border do not need to have width/height of 1/1 in cell units. Fix #15789
* | refactor: format with uncrustify #15872dundargoc2021-10-02
| | | | | | | | * refactor: format with uncrustify * refactor: fix function parameter comments
* | fix(input): resolve isolated (non-ALT/META) mappings #13109erw72021-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Since 2f06413dfb36 #13042, "ESC+c" sequence is treated as "ESC c" instead of "M-c" (ALT/META+c) when not mapped, aka "fallthrough" behavior. But "isolated" (non-ALT/META) mappings to ESC and c were not resolved. This behavior is especially confusing for the TUI. Solution: Resolve isolated ESC, c mappings when there is no M-c mapping. Change ins_char_typebuf() to escape CSI, K_SPECIAL. fixes #13086 fixes #15869
* | Merge pull request #15867 from bfredl/starpackBjörn Linse2021-10-02
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix(runtime): add compressed {&packpath}/start/*/pack/*[/after] representation to &rtp by suggestion by at-tpope Summary: We can add XDG_DATA_DIR/nvim/site/pack/*/start/* (et al) as an unexpanded wildchar to &rtp which keeps it both short and explicit and still supporting globpath(&rtp, ...). ref #15101
| * | fix(runtime): add packages as "/pack/*/start/*" patterns to &rtpBjörn Linse2021-10-02
| |/ | | | | | | This makes `globpath(&rtp, ...)` work again for start packages
* | refactor: format with uncrustify #15842dundargoc2021-10-02
| | | | | | | | * refactor: format with uncrustify * refactor: convert function comments to doxygen
* | refactor: convert char_u to char #15824dundargoc2021-10-02
| |
* | Merge pull request #15861 from dundargoc/refactor/xdiffJames McCoy2021-10-01
|\ \ | | | | | | refactor: update path to xdiff in comments
| * | refactor: update path to xdiff in commentsDundar Göc2021-10-01
| |/
* / refactor: remove PVS comment on top of filesDundar Göc2021-10-01
|/ | | | | The xdiff directory is excluded from the PVS report so the comment isn't required.
* fix(runtime): fix ordering of "after" packagesBjörn Linse2021-09-30
| | | | they must come after ordinary runtime dirs which are not "after"
* Merge pull request #14937 from dstein64/vim-8.1.2304Jan Edmund Lazo2021-09-29
|\ | | | | vim-patch:8.1.2304,8.1.2309,8.1.2319,8.1.2321
| * vim-patch:8.1.2321: cannot select all text with the mouseDaniel Steinberg2021-09-29
| | | | | | | | | | | | | | Problem: Cannot select all text with the mouse. (John Marriott) Solution: Move limiting the mouse column to f_getmousepos(). (closes https://github.com/vim/vim/issues/5242) https://github.com/vim/vim/commit/0a5aa7b28a39507260acb15c1ef698a33c855cc1
| * vim-patch:8.1.2319: compiler warning for int sizeDaniel Steinberg2021-09-29
| | | | | | | | | | | | Problem: Compiler warning for int size. Solution: Add typecast. (Mike Williams) https://github.com/vim/vim/commit/07a63d86338476bafbd1a3ec462672df92666498
| * vim-patch:8.1.2309: compiler warning for argument typeDaniel Steinberg2021-09-29
| | | | | | | | | | | | Problem: Compiler warning for argument type. Solution: Use linenr_T and cast to varnumber_T. (John Marriott) https://github.com/vim/vim/commit/abe12a1a4fce36bfa5dea3a0ce85603432d1905b
| * vim-patch:8.1.2304: cannot get the mouse position when getting a mouse clickDaniel Steinberg2021-09-29
| | | | | | | | | | | | Problem: Cannot get the mouse position when getting a mouse click. Solution: Add getmousepos(). https://github.com/vim/vim/commit/db3a205147ce2c335d5c2181c1f789277f8775b0
* | Refactor/uncrustify (#15790)dundargoc2021-09-29
|/ | | | | | | | | | | | | * refactor: format with uncrustify * fixup(dundar): fix functions comments * fixup(dundar): remove space between variable and ++/-- * fixup(dundar): better workaround for macro attributes This is done to be able to better use uncrustify rules for macros * fixup(justin): make preprocessors follow neovim style guide
* Merge pull request #15812 from bfredl/tabaBjörn Linse2021-09-28
|\ | | | | fix(runtime): make a copy of runtime_search_path when iterating
| * fix(runtime): make a copy of runtime_search_path when iteratingBjörn Linse2021-09-27
| | | | | | | | | | This is to prevent concurrent modification, just like save_rtp in the vim 8 implementation
* | feat(ui): add vim.ui.select and use in code actions (#15771)Mathias Fußenegger2021-09-27
|/ | | | | | | | | | | | | Continuation of https://github.com/neovim/neovim/pull/15202 A plugin like telescope could override it with a fancy implementation and then users would get the telescope-ui within each plugin that utilizes the vim.ui.select function. There are some plugins which override the `textDocument/codeAction` handler solely to provide a different UI. With custom client commands and soon codeAction resolve support, it becomes more difficult to implement the handler right - so having a dedicated way to override the picking function will be useful.
* Merge pull request #14871 from mjlbach/feature/lua-cjson-embeddedMichael Lingelbach2021-09-26
|\ | | | | feat(lua): expose lua-cjson as vim.json
| * feat(lua): expose lua-cjson as vim.jsonMichael Lingelbach2021-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add vim.json.encode and vim.json.decode * use vim.NIL instead of cjson.null * resolve strict-prototypes warnings * The following benchmark shows an approximately 2.5x (750 ms vs 300 ms) improvement in deserialization performance over vim.fn.json_decode on a medium package.json ```lua local uv = vim.loop local function readfile(path) return end local json_url = "https://raw.githubusercontent.com/rust-analyzer/rust-analyzer/b24c8d5c89ee93d1172b4127564f5da3b0c88dad/editors/code/package.json" io.popen(string.format('curl -v -f -L -O %q &> /dev/null', json_url)) local json_string = io.open('package.json'):read '*a' uv.update_time() local start = uv.hrtime() for i = 1,1000 do vim.fn.json_decode(json_string) end uv.update_time() print(string.format("Deserialization time vim.fn.json_decode: %s ms", (uv.hrtime() - start) * (1e-6))) uv.update_time() local start = uv.hrtime() for i = 1,1000 do vim.json.decode(json_string) end uv.update_time() print(string.format("Deserialization time vim.json.decode: %s ms", (uv.hrtime() - start) * (1e-6))) ``` Co-Authored-By: Björn Linse <bjorn.linse@gmail.com>
| * feat(lua): add lua-cjson as vendored dependencyMichael Lingelbach2021-09-26
| | | | | | | | Derived from the openresty lua-cjson fork at commit https://github.com/openresty/lua-cjson/commit/3d93d297092172eac3d52a1b3b6c1d479da5341a
* | Merge pull request #15797 from smolck/ui-stuffBjörn Linse2021-09-26
|\ \ | | | | | | fix(ui_bridge): set bridge width and height on attach
| * | fix(ui_bridge): set bridge width and height on attachsmolck2021-09-26
| | |
* | | fix(tui): remove obsolete $NVIM detection #15791erw72021-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initially, we planned to set the NVIM environment variable to detect that neovim is running in the neovim built-in terminal. At the time this code was written, there was no way for a parent to set environment variables for a program running in an embedded terminal. Later it was implemented in #12937, but the code to set the NVIM was not added. #11390 now uses ConPTY instead of winpty when possible, so it is no longer necessary to force the use of win32con even when running inside an embedded terminal. Therefore, we now do not need this code.
* | | Merge pull request #15351 from bfredl/virt_lineBjörn Linse2021-09-26
|\ \ \ | | | | | | | | feat(screen): virtual lines
| * | | feat(decorations): support virtual lines (for now: only one block at a time)Björn Linse2021-09-26
| | | |
* | | | refactor: replace sprintf with snprintf #15794dundargoc2021-09-26
| | | |
* | | | fix(runtime): ordering of loading packages with user configBjörn Linse2021-09-26
|/ / / | | | | | | | | | | | | | | | | | | | | | site packages must be sourced before user config NOTE: we only consider dirs exactly matching "after" to be an AFTER dir. vim8 considers all dirs like "foo/bar_after", "Xafter" etc, as an "after" dir in SOME codepaths not not in ALL codepaths.
* | | fix(api): fix crash after set_option_value_for() #15390gmntroll2021-09-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: This crashes Nvim: tabedit call nvim_win_set_option(1000, 'statusline', 'status') split wincmd J wincmd j Solution: - Change `no_display` parameter value to be the same as in matching `restore_win_noblock` call. In case of different values `topframe` isn't restored to `curtab->tp_topframe`. - Call `restore_win_noblock` if `switch_win_noblock` returns `FAIL` (`switch_win` must always have matching `restore_win`) - Change `switch_win`/`restore_win` to `_noblock` versions to allow autocommands. fixes #14097 fixes #13577
* | | refactor: format with uncrustify #15778dundargoc2021-09-25
|/ / | | | | * fixup: force exactly one whitespace between type and variable
* | Merge #15774 fix(pvs): fix warnings, scriptJustin M. Keyes2021-09-24
|\ \
| * | fix(PVS V681): function call order is undefinedJustin M. Keyes2021-09-24
| | | | | | | | | | | | https://pvs-studio.com/en/docs/warnings/v681/
| * | fix(PVS V576): false positiveJustin M. Keyes2021-09-24
| | | | | | | | | | | | | | | `lower`, `upper` are `varnumber_T`, correctly matched to `PRIdVARNUMBER` format.
| * | fix(PVS V576): wrong fprintf() formatJustin M. Keyes2021-09-24
| | | | | | | | | | | | | | | | | | | | | | | | https://pvs-studio.com/en/docs/warnings/v576/ Before 1bffe66508ff986a61c0e08caddc92b7f3ace81e this was originally "%ld" but that looks like a mistake. At least now, w_height_inner and w_width_inner are just `int`.
| * | fix(PVS V507): false positiveJustin M. Keyes2021-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://pvs-studio.com/en/docs/warnings/v507/ "Pointer to local array 'sourcing_name_buf' is stored outside the scope of this array. Such a pointer will become invalid." False positive: `sourcing_name = save_sourcing_name` before returning from this scope.
* | | Merge #15731 vim-patch:7.4.725,8.2.{0597,0598,0924,1035}Justin M. Keyes2021-09-24
|\ \ \ | | | | | | | | fixes #14581
| * | | vim-patch:8.2.1035: setreg() does not always clear the registerSean Dewar2021-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: setreg() does not always clear the register. Solution: Clear the register if the dict argument is empty. (Andy Massimino, closes vim/vim#3370) https://github.com/vim/vim/commit/7633fe595e6a27d6bb376548ff89f0dcce481600 Do not getdigits for block_len strictly. For example, a user could previously abort Nvim using: :call setreg("0", "abort!", "\<C-V>999999999999999999") or, after v8.2.0924's port: :call setreg("0", #{regcontents: ["abort!"], \ regtype: "\<C-V>999999999999999999"}) Instead, default to 0 so block_len is -1, which acts like the selection width was omitted (defaults to length of longest line).
| * | | vim-patch:7.4.725Sean Dewar2021-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ":call setreg('"', [])" reports an internal error. Solution: Make the register empty. (Yasuhiro Matsumoto) https://github.com/vim/vim/commit/659c94d483b2fdad949c14a42cee96f99a66394b Required for v8.2.1035. Note that setreg('"', []) didn't cause an internal error for us, but didn't clear the register properly either...