aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| * | vim-patch:8.2.5019: cannot get the first screen column of a character (#23312)zeertzjq2023-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot get the first screen column of a character. Solution: Let virtcol() optionally return a list. (closes vim/vim#10482, closes vim/vim#7964) https://github.com/vim/vim/commit/0f7a3e1de6f71e8e1423fe594890d6aa7f94e132 Co-authored-by: LemonBoy <thatlemon@gmail.com>
| * | vim-patch:9.0.0335: checks for Dictionary argument often give a vague error ↵zeertzjq2023-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#23309) Problem: Checks for Dictionary argument often give a vague error message. Solution: Give a useful error message. (Yegappan Lakshmanan, closes vim/vim#11009) https://github.com/vim/vim/commit/04c4c5746e15884768d2cb41370c3276a196cd4c Cherry-pick removal of E922 from docs from patch 9.0.1403. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * | refactor: remove unnecessary height change in frame_add_hsep() (#23305)zeertzjq2023-04-25
| |/ | | | | | | This height change is wrong, and the height will be overwritten later by another height change.
| * Merge pull request #23293 from bfredl/bigsleepbfredl2023-04-25
| |\ | | | | | | refactor(time): refactor delay with input checking
| | * refactor(time): refactor delay with input checkingbfredl2023-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, there were three low-level delay entry points - os_delay(ms, ignoreinput=true): sleep for ms, only break on got_int - os_delay(ms, ignoreinput=false): sleep for ms, break on any key input os_microdelay(us, false): equivalent, but in μs (not directly called) - os_microdelay(us, true): sleep for μs, never break. The implementation of the latter two both used uv_cond_timedwait() This could have been for two reasons: 1. allow another thread to "interrupt" the wait 2. uv_cond_timedwait() has higher resolution than uv_sleep() However we (1) never used the first, even when TUI was a thread, and (2) nowhere in the codebase are we using μs resolution, it is always a ms multiplied with 1000. In addition, os_delay(ms, false) would completely block the thread for 100ms intervals and in between check for input. This is not how event handling is done alound here. Therefore: Replace the implementation of os_delay(ms, false) to use LOOP_PROCESS_EVENTS_UNTIL which does a proper epoll wait with a timeout, instead of the 100ms timer panic. Replace os_microdelay(us, false) with a direct wrapper of uv_sleep.
| * | fix(statusline): also allow right click when 'mousemodel' is "popup*" (#23258)luukvbaal2023-04-25
| | | | | | | | | | | | | | | Problem: The 'statusline'-format ui elements do not receive right click events when "mousemodel" is "popup*" Solution: Do not draw popupmenu and handle click event instead.
| * | fix(column): don't reset 'statuscolumn' width after it has been drawnluukvbaal2023-04-24
| | | | | | | | | | | | | | | | | | | | | | | | Problem: 'statuscolumn' width may be reset after it has been drawn when multiple windows contain the same buffer. This results in an offset for the drawn cursor position. Solution: Loop over all windows (twice) prior to drawing them to reset the 'statuscolumn' width and validate the sign column when necessary.
| * | fix(pum): show right-click menu above cmdline area (#23298)zeertzjq2023-04-24
| | |
| * | fix(typval): don't treat v:null as truthy (#23281)zeertzjq2023-04-23
| |/
| * fix(api): avoid assertion when autocmd group id is 0 (#23210)Dhruv Manilawala2023-04-23
| |
| * vim-patch:9.0.1477: crash when recovering from corrupted swap file (#23273)zeertzjq2023-04-23
| | | | | | | | | | | | | | | | Problem: Crash when recovering from corrupted swap file. Solution: Check for a valid page count. (closes vim/vim#12275) https://github.com/vim/vim/commit/b67ba03d3ef2e6c5f207d508e85fc6906f938028 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:9.0.1479: small source file problems; outdated list of distrib. ↵zeertzjq2023-04-23
| | | | | | | | | | | | | | | | | | | | files (#23272) Problem: Small source file problems; outdated list of distributed files. Solution: Small updates to source files and list of distributed files. https://github.com/vim/vim/commit/f39d9e9dca443e42920066be3a98fd9780e4ed33 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * build: drop diff.exe from windows buildsdundargoc2023-04-22
| | | | | | | | | | | | | | | | The shipped versions of xdiff already does everything diff does, so this duplication of tools isn't necessary. Furthermore, this setup is more consistent overall, as the 'diffopt=external' option should be for external programs rather than programs we bundle neovim with. Install diffutils for oldtests in CI to avoid needing to modify tests.
| * vim-patch:9.0.1476: lines put in non-current window are not displayed (#23265)zeertzjq2023-04-23
| | | | | | | | | | | | | | | | | | | | Problem: Lines put in non-current window are not displayed. (Marius Gedminas) Solution: Don't increment the topline when inserting just above it. (closes vim/vim#12212) https://github.com/vim/vim/commit/e7f05a8780426dc7af247419c6d02d5f1e896689 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * fix(cmake): restore previously undocumented workround, now documentedbfredl2023-04-22
| |
| * Merge pull request #23255 from lewis6991/vimpatch/9.0.1293Lewis Russell2023-04-22
| |\ | | | | | | vim-patch:9.0.{1293,1308,1311}: refactor option.c
| | * vim-patch:9.0.1311: Coverity warns for using a NULL pointerLewis Russell2023-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Coverity warns for using a NULL pointer. Solution: Use "empty_option" instead of NULL. https://github.com/vim/vim/commit/339e114d70de3ec2b36edf37d7ba7a7cfdf9d1a6 N/A patches for version.c: vim-patch:9.0.1405: missing check for out-of-memory Problem: Missing check for out-of-memory. Solution: Check for alloc() returning NULL pointer. (closes vim/vim#12149) https://github.com/vim/vim/commit/14338024c131b71a337c2bb87cb5904f5a5782b8
| | * vim-patch:9.0.1308: the code for setting options is too complicatedLewis Russell2023-04-22
| | | | | | | | | | | | | | | | | | | | | | | | Problem: The code for setting options is too complicated. Solution: Refactor the code for setting options. (Yegappan Lakshmanan, closes vim/vim#11989) https://github.com/vim/vim/commit/1a6476428f63e9fa0c2cbea296e475e60363af11
| | * vim-patch:9.0.1293: the set_num_option() is too longLewis Russell2023-04-22
| | | | | | | | | | | | | | | | | | | | | | | | Problem: The set_num_option() is too long. Solution: Move code to separate functions. (Yegappan Lakshmanan, closes vim/vim#11954) https://github.com/vim/vim/commit/0caaf1e46511f7a92e036f05e6aa9d5992540117
| * | version.c: update [skip ci] (#22095)github-actions[bot]2023-04-22
| | | | | | | | | Co-authored-by: marvim <marvim@users.noreply.github.com>
| * | build: include all dependency directories when generating headersdundargoc2023-04-21
| | | | | | | | | | | | | | | | | | | | | This will add all interface include directories property from all targets to main_lib. This may not be universally wanted, in which case we can revisit/rework it. Closes https://github.com/neovim/neovim/issues/23237.
| * | refactor: revert incorrect change to ui_client.c codebfredl2023-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | - There is no "resource leak". - "return 0" is definitely not the correct behavior if we ever occur a platform where this would fail. - There was no problem here to fix. so let's not "fix" it. - once CI is upgraded to gcc 13, we'll figure out the correct way to make it shut the fuck up. warnings on non-ci platforms are not critical.
| * | refactor(build): move the last generator from scripts/ to src/nvim/generatorsbfredl2023-04-21
| |/ | | | | | | | | | | | | | | | | | | This one generates a runtime/ file instead of a source file. But otherwise it works the same like all other generators. It has the same prerequisites (shared and mpack modules, etc), and, importantly, it uses results from the source generators. The odd location makes it easy to overlook when refactoring generators (like I did last time, lol)
| * vim-patch:9.0.1294: the set_bool_option() function is too long Lewis Russell2023-04-21
| | | | | | | | | | | | | | | | | | | | Problem: The set_bool_option() function is too long. Solution: Move code to separate functions. (Yegappan Lakshmanan, closes vim/vim#11964) https://github.com/vim/vim/commit/80b817b7494b5b162efd2d0d308933f81aef7c45 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * fix(usercmd): Fix buffer overflow in uc_list() (#23225)Andreas Schneider2023-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix(usercmd): fix buffer overflow in uc_list() Build with: -Wp,-D_FORTIFY_SOURCE=3 -O1 and gcc 13. *** buffer overflow detected ***: terminated (gdb) bt #0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44 #1 0x00007f3eb8b93c03 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78 #2 0x00007f3eb8b42aee in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 #3 0x00007f3eb8b2b87f in __GI_abort () at abort.c:79 #4 0x00007f3eb8b2c60f in __libc_message (fmt=fmt@entry=0x7f3eb8ca72e6 "*** %s ***: terminated\n") at ../sysdeps/posix/libc_fatal.c:150 #5 0x00007f3eb8c27b29 in __GI___fortify_fail (msg=msg@entry=0x7f3eb8ca728c "buffer overflow detected") at fortify_fail.c:24 #6 0x00007f3eb8c26364 in __GI___chk_fail () at chk_fail.c:28 #7 0x00007f3eb8c25f45 in ___snprintf_chk (s=s@entry=0x55b8c7c096a5 <IObuff+5> "t' item", maxlen=maxlen@entry=1025, flag=flag@entry=2, slen=slen@entry=1020, format=format@entry=0x55b8c7b872a6 "%ldc") at snprintf_chk.c:29 #8 0x000055b8c7aea59f in snprintf (__fmt=0x55b8c7b872a6 "%ldc", __n=1025, __s=0x55b8c7c096a5 <IObuff+5> "t' item") at /usr/include/bits/stdio2.h:54 #9 uc_list (name=name@entry=0x55b8c8351788 "Explore", name_len=name_len@entry=7) at /usr/src/debug/neovim-0.9.0-1.fc38.x86_64/src/nvim/usercmd.c:534 #10 0x000055b8c7aeb8a0 in ex_command (eap=0x7fffdc350e60) at /usr/src/debug/neovim-0.9.0-1.fc38.x86_64/src/nvim/usercmd.c:1009 #11 0x000055b8c7972537 in execute_cmd0 (retv=retv@entry=0x7fffdc350e54, eap=eap@entry=0x7fffdc350e60, errormsg=errormsg@entry=0x7fffdc350e58, preview=preview@entry=false) at /usr/src/debug/neovim-0.9.0-1.fc38.x86_64/src/nvim/ex_docmd.c:1620 #12 0x000055b8c7975c55 in do_one_cmd (cmdlinep=cmdlinep@entry=0x7fffdc3510b8, flags=flags@entry=0, cstack=cstack@entry=0x7fffdc351140, fgetline=fgetline@entry=0x55b8c79882b8 <getexline>, cookie=cookie@entry=0x0) at /usr/src/debug/neovim-0.9.0-1.fc38.x86_64/src/nvim/ex_docmd.c:2279 #13 0x000055b8c79767fe in do_cmdline (cmdline=<optimized out>, fgetline=0x55b8c79882b8 <getexline>, cookie=0x0, flags=0) at /usr/src/debug/neovim-0.9.0-1.fc38.x86_64/src/nvim/ex_docmd.c:578 #14 0x000055b8c7a17463 in nv_colon (cap=0x7fffdc351780) at /usr/src/debug/neovim-0.9.0-1.fc38.x86_64/src/nvim/normal.c:3228 #15 0x000055b8c7a11b35 in normal_execute (state=0x7fffdc351700, key=<optimized out>) at /usr/src/debug/neovim-0.9.0-1.fc38.x86_64/src/nvim/normal.c:1196 #16 0x000055b8c7ab0994 in state_enter (s=0x7fffdc351700) at /usr/src/debug/neovim-0.9.0-1.fc38.x86_64/src/nvim/state.c:99 #17 0x000055b8c7a0ef68 in normal_enter (cmdwin=false, noexmode=false) at /usr/src/debug/neovim-0.9.0-1.fc38.x86_64/src/nvim/normal.c:497 #18 0x000055b8c78a0640 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/neovim-0.9.0-1.fc38.x86_64/src/nvim/main.c:641
| * Merge pull request #23239 from cryptomilk/asn-fix-warningszeertzjq2023-04-21
| |\ | | | | | | Fix compiler warnings detected by gcc 13
| | * fix(ui_client): check return code of dup()Andreas Schneider2023-04-21
| | | | | | | | | | | | | | | | | | | | | gsrc/nvim/ui_client.c: In function ‘ui_client_start_server’: gsrc/nvim/ui_client.c:68:5: warning: ignoring return value of ‘dup’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 68 | dup(stderr_isatty ? STDERR_FILENO : STDOUT_FILENO); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | * fix(statusline): fix uninitialized variable and possible overflowAndreas Schneider2023-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In file included from /usr/include/string.h:535, from gsrc/nvim/statusline.c:10: In function ‘strcat’, inlined from ‘build_stl_str_hl’ at gsrc/nvim/statusline.c:1688:9: /usr/include/bits/string_fortified.h:130:10: warning: ‘p’ may be used uninitialized [-Wmaybe-uninitialized] 130 | return __builtin___strcat_chk (__dest, __src, __glibc_objsize (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | * fix(linematch): initialize arrayAndreas Schneider2023-04-21
| | | | | | | | | | | | | | | | | | | | | gsrc/nvim/linematch.c: In function ‘try_possible_paths’: gsrc/nvim/linematch.c:204:35: warning: ‘from_vals’ may be used uninitialized [-Wmaybe-uninitialized] 204 | size_t unwrapped_idx_from = unwrap_indexes(from_vals, diff_len, ndiffs); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | * fix(ex_getln): initialize pointer with NULLAndreas Schneider2023-04-21
| | | | | | | | | | | | | | | | | | | | | | | | In function ‘cmdpreview_open_win’, inlined from ‘cmdpreview_may_show’ at gsrc/nvim/ex_getln.c:2487:28: gsrc/nvim/ex_getln.c:2251:16: warning: ‘cmdpreview_buf’ may be used uninitialized [-Wmaybe-uninitialized] 2251 | int result = do_buffer(DOBUF_GOTO, DOBUF_FIRST, FORWARD, cmdpreview_buf->handle, 0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | * fix(userfunc): fix possible out of bound accessAndreas Schneider2023-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In file included from /usr/include/string.h:535, from gsrc/nvim/eval/userfunc.c:11: In function ‘strcpy’, inlined from ‘cat_func_name’ at gsrc/nvim/eval/userfunc.c:662:5, inlined from ‘get_user_func_name’ at gsrc/nvim/eval/userfunc.c:2854:5: /usr/include/bits/string_fortified.h:79:10: warning: ‘__builtin___strcpy_chk’ offset 0 from the object at ‘<unknown>’ is out of the bounds of referenced subobject ‘uf_name’ with ty pe ‘char[]’ at offset 0 [-Warray-bounds=] 79 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from gsrc/nvim/eval/typval.h:10, from gsrc/nvim/buffer_defs.h:20, from gsrc/nvim/autocmd.h:8, from gsrc/nvim/eval/userfunc.c:15: gsrc/nvim/eval/typval_defs.h: In function ‘get_user_func_name’: gsrc/nvim/eval/typval_defs.h:342:8: note: subobject ‘uf_name’ declared here 342 | char uf_name[]; ///< Name of function (actual size equals name); | ^~~~~~~
| | * fix(drawline): initialize variableAndreas Schneider2023-04-21
| | | | | | | | | | | | | | | | | | | | | src/nvim/drawline.c: In function ‘win_line’: src/nvim/drawline.c:1418:16: warning: ‘charsize’ may be used uninitialized [-Wmaybe-uninitialized] 1418 | wlv.vcol -= charsize; | ^~
| | * fix(drawline): initialize variableAndreas Schneider2023-04-21
| | | | | | | | | | | | | | | | | | | | | src/nvim/drawline.c: In function ‘draw_virt_text’: src/nvim/drawline.c:298:28: warning: ‘col’ may be used uninitialized [-Wmaybe-uninitialized] 298 | state->eol_col = col + 1; | ~~~~^~~
| | * fix(api): avoid integer truncationAndreas Schneider2023-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gsrc/nvim/api/vim.c: In function ‘nvim_eval_statusline’: gsrc/nvim/api/vim.c:2268:55: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 2 [-Wformat-tru ncation=] 2268 | snprintf(user_group, sizeof(user_group), "User%d", sp->userhl); | ^~ gsrc/nvim/api/vim.c:2268:50: note: directive argument in the range [1, 2147483647] 2268 | snprintf(user_group, sizeof(user_group), "User%d", sp->userhl); | ^~~~~~~~ In file included from /usr/include/stdio.h:906, from gsrc/nvim/api/vim.c:9: In function ‘snprintf’, inlined from ‘nvim_eval_statusline’ at gsrc/nvim/api/vim.c:2268:9: /usr/include/bits/stdio2.h:54:10: note: ‘__builtin___snprintf_chk’ output between 6 and 15 bytes into a destination of size 6 54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 55 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 56 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~
| * | Merge pull request #23187 from luukvbaal/statuscolumnLewis Russell2023-04-21
| |\ \ | | |/ | |/| fix(column): rebuild status column when sign column is invalid
| | * fix(column): rebuild status column when sign column is invalidLuuk van Baal2023-04-19
| | |
| * | vim-patch:9.0.1472: ":drop fname" may change the last used tab page (#23230)zeertzjq2023-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ":drop fname" may change the last used tab page. Solution: Restore the last used tab page when :drop has changed it. (closes vim/vim#12087) https://github.com/vim/vim/commit/8281a16efc76197f7b0b2a385dffb44fce66d33e Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * | Merge pull request #23224 from bfredl/nomutexbfredl2023-04-20
| |\ \ | | | | | | | | refactor(env): remove unused mutex
| | * | refactor(env): remove unused mutexbfredl2023-04-20
| | | | | | | | | | | | | | | | | | | | This was needed when TUI was a thread. lua code uses os_getenv only on the main thread.
| * | | fix(build): distinguish vim.mpack from global require'mpack'bfredl2023-04-20
| |/ / | | | | | | | | | | | | problem: the api of vim.mpack is not compatible with a system provided mpack solution: don't require 'mpack' directly from the system path
| * | Merge pull request #23106 from bfredl/nlua0bfredl2023-04-19
| |\ \ | | | | | | | | refactor(build): use vendored versions of mpack and luabitop
| | * | refactor(build): use vendored versions of mpack and luabitopbfredl2023-04-19
| | | |
| * | | build: update uncrustify to 0.76Lewis Russell2023-04-19
| | | |
| * | | Merge pull request #23155 from bfredl/nobreakbfredl2023-04-19
| |\ \ \ | | | | | | | | | | fix(runtime): do not allow breakcheck inside runtime path calculation
| | * | | fix(runtime): do not allow breakcheck inside runtime path calculationbfredl2023-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | problem: breakcheck might run arbitrary lua code, which might require modules and thus invoke runtime path calculation recursively. solution: Block the use of breakcheck when expanding glob patterns inside 'runtimepath' fixes #23012
| * | | | refactor: fix PVS warnings (#23200)zeertzjq2023-04-19
| | | | |
| * | | | vim-patch:9.0.1470: deferred functions invoked in unexpected order (#23199)zeertzjq2023-04-19
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Deferred functions invoked in unexpected order when using :qa and autocommands. Solution: Call deferred functions for the current funccal before using the stack. (closes vim/vim#12278) https://github.com/vim/vim/commit/1be4b81bfb3d7edf0e2ae41711d429e8fa5e0555
| * | | vim-patch:8.1.2094: the fileio.c file is too big Lewis Russell2023-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The fileio.c file is too big. Solution: Move buf_write() to bufwrite.c. (Yegappan Lakshmanan, closes vim/vim#4990) https://github.com/vim/vim/commit/c079f0fed1c16495d726d616c5362edc04742a0d Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * | | vim-patch:9.0.1141: 'cursorcolumn' and 'colorcolumn' wrong after concealingzeertzjq2023-04-19
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: 'cursorcolumn' and 'colorcolumn' wrong after concealing and wrapping line. Solution: Reset "wlv.vcol_off" after each screen line. (Alexey Radkov, closes vim/vim#11777) https://github.com/vim/vim/commit/aaa16b09180080284c4a5049fe16bdaccbb13b74 Cherry-pick test_conceal.vim changes from patches 8.2.4339, 9.0.0418. Co-authored-by: Alexey Radkov <alexey.radkov@gmail.com>
| * | refactor(eval): use tv_list_append_allocated_string()zeertzjq2023-04-19
| | |