aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
| * | fix(api): check for inclusive buffer line index out of bounds correctly (#19056)zeertzjq2022-06-23
| | |
| * | 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().
| * | Merge pull request #19058 from bfredl/minioptbfredl2022-06-23
| |\ \ | | | | | | | | perf(highlight): use binary search to lookup RGB color names
| | * | perf(highlight): use binary search to lookup RGB color namesbfredl2022-06-23
| | |/
| * | 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
| * | Merge pull request #19020 from echasnovski/screenchar-floatbfredl2022-06-23
| |\ \ | | | | | | | | fix(float): make `screen*()` functions respect floating windows
| | * | fix(float): make `screen*()` functions respect floating windowsEvgeni Chasnovski2022-06-23
| | | | | | | | | | | | | | | | Resolves #19013.
| * | | vim-patch:8.2.2068: transparent syntax item uses start/end of containing ↵zeertzjq2022-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | region (#19055) Problem: Transparent syntax item uses start/end of containing region. Solution: Do not change the startpos and endpos of a transparent region to that of its containing region. (Adrian Ghizaru, closes vim/vim#7349, closes vim/vim#7391) https://github.com/vim/vim/commit/b46f57e87b3706a8c4b97d8e03f7853a7938b061
| * | | Merge pull request #19054 from zeertzjq/vim-8.2.5150zeertzjq2022-06-23
| |\ \ \ | | | | | | | | | | vim-patch:8.2.{5150,5151}: reading beyond the end of the line
| | * | | vim-patch:8.2.5151: reading beyond the end of the line with lisp indentingzeertzjq2022-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Reading beyond the end of the line with lisp indenting. Solution: Avoid going over the NUL at the end of the line. https://github.com/vim/vim/commit/8eba2bd291b347e3008aa9e565652d51ad638cfa
| | * | | vim-patch:8.2.5150: read past the end of the first line with ":0;'{"zeertzjq2022-06-23
| |/ / / | | | | | | | | | | | | | | | | | | | | Problem: Read past the end of the first line with ":0;'{". Solution: When on line zero check the column is valid for line one. https://github.com/vim/vim/commit/f7c7c3fad6d2135d558f3b36d0d1a943118aeb5e
| * | | fix(input): use correct grid when restoring cursor for <expr> mapping (#19047)zeertzjq2022-06-23
| | | |
| * | | fix(api): check error after getting win/buf handle (#19052)Gregory Anders2022-06-22
| | | |
| * | | fix(build): only pass -municode if MINGW #19049Justin M. Keyes2022-06-22
| | |/ | |/| | | | | | | | | | Avoids this warning in the Windows build: 2022-06-22T08:58:13.0542153Z LINK : warning LNK4044: unrecognized option '/municode'; ignored [D:\a\neovim\neovim\build\test\functional\fixtures\printenv-test.vcxproj]
| * | Merge pull request #19039 from bfredl/multicolorbfredl2022-06-22
| |\ \ | | | | | | | | perf: get rid of unnecessary allocations in highlight groups
| | * | perf(ui): remove spurious allocations from mode_style_array()bfredl2022-06-21
| | | |
| | * | perf(highlight): allocate permanent names in an arena for fun and cache localitybfredl2022-06-21
| | | |
| | * | refactor: remove atrocious HL_TABLE()[idx] syntax before I poke my eyes outbfredl2022-06-21
| | | |
| | * | refactor(highlight): get rid of syn_unadd_group()bfredl2022-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a sham. if the user does hi ExistingGroup guifg=AliceBlue invalidkey=foobar the "guifg" part will still be executed. No need to micro-manage the same case where ANewGroup is added instead.
| | * | perf(highlight): don't allocate duplicates for color namesbfredl2022-06-21
| | | |
| | * | perf(highlight): get rid of local memory allocations for "{key}={arg}"bfredl2022-06-21
| | | |
| * | | vim-patch:8.2.5132: :mkview test doesn't test much (#19045)zeertzjq2022-06-22
| | | | | | | | | | | | | | | | | | | | Problem: :mkview test doesn't test much. Solution: Save the view with the folds closed. (James McCoy, closes vim/vim#10596) https://github.com/vim/vim/commit/c829faa8211df52997c0b9ee49cdea0c8786b177
| * | | refactor(option): DRY get/set option value #19038Lewis Russell2022-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main motivation for this is for the buf and win cases which need to set up and restore context, and it's what specifically makes the semantics of options nuanced, and thus this should not be repeated more than once. - nvim_get/set_option_value now share argument validation.
| * | | Merge pull request #19043 from dundargoc/cmakebfredl2022-06-22
| |\ \ \ | | | | | | | | | | build(cmake): use glob_wrapper instead of file(GLOB ...) in main CMakeLists
| | * | | build(cmake): use glob_wrapper instead of file(GLOB in main CMakeListsDundar Goc2022-06-21
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | This will allow cmake to check if any directories needs re-globbing, in other words, if any new file has been added since last time cmake was run. This will (allegedly) make the configure stage slower but I have not noticed any difference so I believe this is well worth it.
| * / / refactor(runtime): refactor filetype.lua (#18813)Jonas Strittmatter2022-06-21
| |/ / | | | | | | | | | Move some filetype detection functions to detect.lua, sort patterns by detected filetype.
| * | docs(deprecated): alternatives for $NVIM_LISTEN_ADDRESSeyalk112022-06-21
| | |
| * | Merge pull request #18743 from gpanders/bowooptvalueGregory Anders2022-06-20
| |\ \ | | | | | | | | Add "buf" and "win" to nvim_get_option_value and use them in vim.bo and vim.wo
| | * | refactor: use nvim_{get,set}_option_value for vim.{b,w}oGregory Anders2022-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `nvim_get_option_value` and `nvim_set_option_value` better handle unsetting local options. For instance, this is currently not possible: vim.bo.tagfunc = nil This does not work because 'tagfunc' is marked as "local to buffer" and does not have a fallback global option. However, using :setlocal *does* work as expected :setlocal tagfunc= `nvim_set_option_value` behaves more like :set and :setlocal (by design), so using these as the underlying API functions beneath vim.bo and vim.wo makes those two tables act more like :setlocal. Note that vim.o *already* uses `nvim_set_option_value` under the hood, so that vim.o behaves like :set.
| | * | feat(api): add "buf" and "win" to nvim_get_option_valueGregory Anders2022-06-20
| | | | | | | | | | | | | | | | These mirror their counterparts in nvim_set_option_value.
| * | | Merge pull request #19030 from zeertzjq/vim-8.2.5138zeertzjq2022-06-21
| |\ \ \ | | | | | | | | | | vim-patch:8.2.{5107,5138}: various small issues
| | * | | vim-patch:8.2.5138: various small issueszeertzjq2022-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Various small issues. Solution: Various small improvments. https://github.com/vim/vim/commit/8088ae95bbed2085c5fb196850c4e4b8df55c989 N/A patches for version.c: vim-patch:8.2.5107: some callers of rettv_list_alloc() check for not OK Problem: Some callers of rettv_list_alloc() check for not OK. (Christ van Willegen) Solution: Use "==" instead of "!=" when checking the return value. https://github.com/vim/vim/commit/93a1096fe48e12095544924adb267e3b8a16b221
| * | | | vim-patch:d799daa660b8 (#19031)Christian Clason2022-06-20
| | | | | | | | | | | | | | | | | | | | Update runtime files https://github.com/vim/vim/commit/d799daa660b8821943cbe1682f00da9e812dd48c
| * | | | refactor(provider): use list comprehension #19027Zaz Brown2022-06-20
| | | | | | | | | | | | | | | | | | | | - list(filter(lambda x: x != "", sys.path)) + [p for p in sys.path if p != ""]
| * | | | Merge pull request #18988 from bfredl/uipackbfredl2022-06-20
| |\ \ \ \ | | |/ / / | |/| | | refactor(ui): encode "redraw" events without intermediate allocations
| | * | | perf(ui): reduce allocation overhead when encoding "redraw" eventsbfredl2022-06-20
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note for external UIs: Nvim can now emit multiple "redraw" event batches before a final "flush" event is received. To retain existing behavior, clients should make sure to update visible state at an explicit "flush" event, not just the end of a "redraw" batch of event. * Get rid of copy_object() blizzard in the auto-generated ui_event layer * Special case "grid_line" by encoding screen state directly to msgpack events with no intermediate API events. * Get rid of the arcane notion of referring to the screen as the "shell" * Array and Dictionary are kvec_t:s, so define them as such. * Allow kvec_t:s, such as Arrays and Dictionaries, to be allocated with a predetermined size within an arena. * Eliminate redundant capacity checking when filling such kvec_t:s with values.
| * | | Merge #19015 delete cmake codeJustin M. Keyes2022-06-19
| |\ \ \
| | * | | build: remove FindLua.cmake since it's already built into cmakeDundar Goc2022-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FindLua.cmake is a copy from the cmake repo: https://github.com/Kitware/CMake/blob/0419ecbcad7719614349a07189b45e341a8f2c69/Modules/FindLua.cmake. It's a cmake module, meaning it's already shipped with cmake by default. There have been two changes done to our version of FindLua.cmake. The first change is that include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) was changed to include(FindPackageHandleStandardArgs.cmake) This change is required only because we have imported FindLua.cmake module but not FindPackageHandleStandardArgs module. Had FindLua been called as a module as intended then this file would not need changing. The second change is that support for Lua 5.4 is added. However, support for any version of Lua except for 5.1 is disabled since https://github.com/neovim/neovim/pull/16633/commits/e322b5c864c771f774ddfea32f6cd5190a1af419. Because these changes from the upstream FindLua.cmake is unnecessary I believe we can and should use the builtin FindLua.cmake instead of our own.
| | * | | build(cmake): simplify def_cmd_target functionDundar Goc2022-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of appending to a command output, append to an existing target instead. The primary benefit is intermediary ...-cmd targets aren't needed, we can instead append commands to the relevant target directly.
| | * | | build(cmake): simplify and speed up the uninstall targetDundar Goc2022-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | More specifically, replace exec_program with file(REMOVE ...) so that the uninstall target is run during the build stage instead of the configure stage, significantly speeding up the target. The code snippet that was removed is taken from the cmake FAQ https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#can-i-do-make-uninstall-with-cmake. However, this uses undocumented features such as IMMEDIATE when calling configure_file, which is an artifact from cmake 2.x (it's so old it's difficult to find information on it). Similarly, this particular code snippet has been around for a long time and originated from the cmake mailing lists. Based on this I believe the in-file was a workaround for the limitations of cmake back then and that it's not required anymore.
| | * | | build(cmake): remove unnecessary globbing with fileDundar Goc2022-06-19
| | | | | | | | | | | | | | | | | | | | There's no need to use globbing since there's only one file.
| | * | | build(cmake): remove unnecessary *-prereqs targetsDundar Goc2022-06-19
| | | | | | | | | | | | | | | | | | | | Running the tests on their own works just fine.
| * | | | fix(decorations): nvim_buf_set_extmark breaks conceal #19010ii142022-06-19
| |/ / / | | | | | | | | | | | | | | | | | | | | Closes #19007 Co-authored-by: bfredl <bjorn.linse@gmail.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
| * | | fix(tui): piping nodejs to nvim breaks input handling #18932Kevin Sicong Jiang2022-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Piping NodeJS output into Neovim makes the editor unusable. This happens because NodeJS changes the tty state on exit after Nvim calls uv_tty_set_mode(). (May not always happen due to race condition.) This should have been fixed by 4ba5b4a86461 #13084. But some commands and functions (:sleep, system(), …) call ui_flush() internally, in particular the first tui_mode_change() is called before the end of startup. Steps to reproduce: 1. node -e "setTimeout(()=>{console.log('test')}, 1000)" | nvim -u NORC +"sleep 500m" - 2. The cursor key letters just overwrite the editor screen, and CTRL+C exits. Solution: Skip pending_mode_update during startup. Note: Delaying ui_flush() entirely could be a more general solution (emit a new UI event on VimEnter?). But "remote/coprocess TUI" #18375 could make all of this moot anyway. Fixes #18470
| * | | ci(release): skip CoreServices system library on macOS (#19021)Christian Clason2022-06-19
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | Problem: The release script bundles a system library (CoreServices) that was added in #18294, which leads to errors on M1 since the architecture is different from the Github runner. Solution: Skip CoreServices when bundling the libraries (as was done for the CoreFoundation library that #18294 replaced with CoreServices).
| * | fix(ci): noisy logs, unreliable test #19019Justin M. Keyes2022-06-18
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: 1. CI logs have too many (40+) logs mentioning SIGHUP: ``` WRN 2022-06-18T16:05:47.075 T3568.22499.0/c deadly_signal:177: got signal 1 (SIGHUP) WRN 2022-06-18T16:05:47.273 T3569.91095.0/c deadly_signal:177: got signal 1 (SIGHUP) WRN 2022-06-18T16:05:47.651 T3570.59545.0/c deadly_signal:177: got signal 1 (SIGHUP) ``` 2. TS parser test still sometimes fails on BSD CI. 3. remote_spec test fails too often. Solution: 1. Log deadly signals at INFO level. It hasn't been helpful in CI, and for local troubleshooting it's reasonable to adjust the loglevel as needed. 2. Adjust the TS parser test again. ref #18911 3. Skip the remote_spec test. The `--remote` feature was merged before it was fully formed and needs to be revisited.
| * build(lint): set some linters as non-fatal #19018Justin M. Keyes2022-06-18
| | | | | | | | | | | | | | | | | | | | luacheck and clint are the most important, and they are bundled. The others are nice-to-have, and not always available (and not bundled), so make them optional. This allows the "lint" target to function as a convenient and low-hassle handle for contributors. We still get the full power of lint in CI. TODO: bundle uncrustify (and then set it as required for "lint")?
| * fix(terminal): coverity USE_AFTER_FREE #18978Justin M. Keyes2022-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Coverity reports use after free: *** CID 352784: Memory - illegal accesses (USE_AFTER_FREE) /src/nvim/buffer.c: 1508 in set_curbuf() 1502 if (old_tw != curbuf->b_p_tw) { 1503 check_colorcolumn(curwin); 1504 } 1505 } 1506 1507 if (bufref_valid(&prevbufref) && prevbuf->terminal != NULL) { >>> CID 352784: Memory - illegal accesses (USE_AFTER_FREE) >>> Calling "terminal_check_size" dereferences freed pointer "prevbuf->terminal". 1508 terminal_check_size(prevbuf->terminal); 1509 } 1510 } 1511 1512 /// Enter a new current buffer. 1513 /// Old curbuf must have been abandoned already! This also means "curbuf" may Solution: Change terminal_destroy and terminal_close to set caller storage to NULL, similar to XFREE_CLEAR. This aligns with the pattern found already in: terminal_destroy e897ccad3eb1e term_delayed_free 3e59c1e20d605
| * fix(logging): try harder to resolve Nvim "name" #19016Justin M. Keyes2022-06-18
| | | | | | | | | | | | | | | | | | | | | | Problem: If startup finishes (starting=false) before the logger ever happens to see a v:servername, we're stuck with the "?.<PID>" fallback name forever. Solution: Drop the `starting` condition. Discard the "?.<PID>" fallback after using it for the current log message. So logging will always check v:servername next time.
| * fix(highlight): use ctermbg/fg instead of bg/fg when use_rgb=false #18982Oliver Marriott2022-06-18
| | | | | | | | | | | | | | | | | | | | | | | | If `use_rgb` was false, we would attempt to set the `cterm_bg_color` to the variable `bg`, which is only retrieved from `bg` and `background` keys, not `ctermbg`. Same for `fg`. This means the values would be `-1` (the default, un-got value) and we'd always set the returned values to `0`. My understanding is `fg/bg` is always "gui" values, so instead we should be using `ctermbg` when needed. Nb: when looking around I think this function is currently *always* called with `use_rgb = true`.