aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* vim-patch:8.2.1259: empty group in 'tabline' may cause using an invalid pointerJan Edmund Lazo2020-08-04
| | | | | | | Problem: Empty group in 'tabline' may cause using an invalid pointer. Solution: Set the group start position. (closes vim/vim#6505) https://github.com/vim/vim/commit/f56c95fdad5af521887f8cd7bc15729b5355231d (cherry picked from commit 9443d3994190943c2b9d8c4efefcf3de854ec7be)
* ui: fix problem with sattr_T overflowerw72020-08-04
| | | | | | | | | | | sattr_T was defined as uint16_t. But this is not enough to handle the 24-bit colors of the terminal. To solve this problem, change it to int. In 32bit, int may overflow. So, if it overflows, change it to ignore it without adding more attr_entries. fixes #12366 (cherry picked from commit 872ecf65d10f0d22bbf3e2257f9ae89a6c61d2f4)
* Merge remote-tracking branch 'upstream/release-0.4' into fileinfo-garbage-0.4James McCoy2020-08-02
|\
| * main.c: fix hang issue with recoverymode (#12496) (#12520)James McCoy2020-06-23
| | | | | | | | | | | | | | In the case of recoverymode, the headlessmode was true, causing the UI to hang without starting. Fix this problem by setting headlessmode to true for List swap files only. Co-authored-by: erw7 <erw7.github@gmail.com>
| * fixed hang issue with --headless and -r option specified (#12209)Kei Kamikawa2020-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fixed hang issue with --headless and -r option specified Calling the do_more_prompt function in headless mode will freeze neovim because it is eventally in the input-accepting state (the same as waiting for --more--). * fixed "Press ENTER or type command to continue" to be suppressed If in headless mode, we need to exit at this point. If we continue, we will enter the normal mode and the message "Press ENTER or type command to continue" will be displayed and we will be in the input waiting state. * fixed functional ex_cmds tests * Revert "fixed "Press ENTER or type command to continue" to be suppressed" This reverts commit a02dc40e3b3fad69cedcde6abe1bd4efe39ab102. * Revert "fixed functional ex_cmds tests" This reverts commit 3bdb8da20acf34673b2c2028d15e7ce6da4c792a. * fixed conditional again * added test for fixed hang issue with --headless (#11386) (cherry picked from commit c6dc397801d0566b583d4916220a60f17e609e25)
| * TUI: block signals on suspend #12180Kei Kamikawa2020-04-25
| | | | | | fix #8075
| * [release-0.4] nvim: Correctly setup global channelsAndreas Schneider2020-04-17
| | | | | | | | | | | | | | | | | | As gcc10 uses -fno-common by default, global variables declared with the same name more than once is not allowed anymore revealing this issue. We need to define it as extern to access it. See also https://bugzilla.redhat.com/show_bug.cgi?id=1799680
| * [release-0.4] nvim:msgpack: Correctly set up global ch_before_blocking_eventsAndreas Schneider2020-04-17
| | | | | | | | | | | | | | gcc10 builds with -fno-common by default. This mean you can't define a global variable with the same name twice. See also https://bugzilla.redhat.com/show_bug.cgi?id=1799680
| * [release-0.4] nvim: Fix enum declaration of RemapValuesAndreas Schneider2020-04-17
| | | | | | | | | | | | | | | | | | | | | | Instead of declaring an enum, this creates a global variable. As gcc10 uses -fno-common by default, global variables declared with the same name more than once is not allowed anymore revealing this issue. Each time this header is included, we define the enum name as a global variable. See also https://bugzilla.redhat.com/show_bug.cgi?id=1799680
| * [release-0.4] nvim:viml: Fix enum declaration of ExprParserFlagsAndreas Schneider2020-04-17
| | | | | | | | | | | | | | | | | | | | | | Instead of declaring an enum, this creates a global variable. As gcc10 uses -fno-common by default, global variables declared with the same name more than once is not allowed anymore revealing this issue. Each time this header is included, we define the enum name as a global variable. See also https://bugzilla.redhat.com/show_bug.cgi?id=1799680
| * [release-0.4] nvim:eval: Fix enum declaration for ListLenSpecialsAndreas Schneider2020-04-17
| | | | | | | | | | | | | | | | | | | | | | Instead of declaring an enum, this creates a global variable. As gcc10 uses -fno-common by default, global variables declared with the same name more than once is not allowed anymore revealing this issue. Each time this header is included, we define the enum name as a global variable. See also https://bugzilla.redhat.com/show_bug.cgi?id=1799680
| * vim-patch:8.1.2060: "precedes" in 'listchars' not used properlyJustin M. Keyes2020-02-22
| | | | | | | | | | | | | | | | (Credit: Zach Wegner, https://github.com/neovim/neovim/pull/11034) Problem: "precedes" in 'listchars' not used properly. Solution: Correctly handle the "precedes" char in list mode for long lines. https://github.com/vim/vim/commit/bffba7f7042f6082e75b42484b15f66087b01941
| * Fix "precedes" listchar behavior in wrap modeZach Wegner2020-02-21
| | | | | | | | | | | | | | | | | | | | | | | | Previously, the "precedes" character would be rendered on every row when w_skipcol > 0 (i.e., when viewing a single line longer than the entire screen), instead of just on the first row. Make sure to only render it on the first row in this case. Add a test for this behavior. Fix documentation for the "precedes" character, which erroneously stated that it was only active when wrap mode was off.
| * options: make 'fillchars' and 'listchars' global-localBjörn Linse2020-02-21
| | | | | | | | | | | | | | | | | | These options were previously global. A global-local window option behaves closer to a global option "per default" (i e with :set), but still supports local behavior via :setl Also this restores back-compat for nvim_set_option("fcs", ...) which are currently broken on 0.4.x but worked in earlier versions
| * quickfix.c: Fix vimgrep regression #11907cballam2020-02-19
| | | | | | | | | | | | | | Fix ex_vimgrep to properly ignore filetype when running vimgrep. This restores vimgrep to behaviour before function refactoring. fix #9842 fix #11856
| * Merge pull request #11903 from bfredl/backport-qf_msgBjörn Linse2020-02-19
| |\ | | | | | | [release-0.4] screen: add missing redraws after a message
| | * [release-0.4] screen: add missing redraws after a messageBjörn Linse2020-02-19
| | |
| * | [release-0.4] vim-patch:8.2.0235: draw error when an empty group is removed ↵Björn Linse2020-02-19
| |/ | | | | | | | | | | | | | | from 'statusline' Problem: Draw error when an empty group is removed from 'statusline'. Solution: Do not use highlighting from a removed group. https://github.com/vim/vim/commit/dbe5d361feb65137099644329cf0ecfd4a945a14
| * loop_close: close all handlesJustin M. Keyes2020-02-18
| | | | | | | | | | | | | | | | | | | | - Move uv_stop(), it still causes a "leak" on exit somehow. - Tenatively restore `UV_RUN_DEFAULT`. It shouldn't hang since we clobber the handles via `uv_walk((h)=>uv_close(h))`. Although this still "leaks" on exit, it's faster than the 2-second timeout. fix #11820 fix #7376
| * loop_close: call uv_stop(), fix bugJustin M. Keyes2020-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Call uv_stop(). - Restore `uv_loop_close` condition (braindead cosmetic change from a2efc9cf8b0f that caused uv_loop_close *not* to be called if wait=false, sorry). Not doing `uv_walk(() => uv_close)`: see source comment for explanation. fix #11820 fix #7376 Q: Should we restore use of `UV_RUN_DEFAULT`/`UV_RUN_ONCE` (removed in a2efc9cf8b0f)? A: The while-loop (hopefully) achieves the same purpose while avoiding a hang.
| * loop_close: timout after 2 seconds #11821Justin M. Keyes2020-02-18
| | | | | | | | | | never UV_RUN_DEFAULT ref #11820 ref #7376
| * messages: echo "line1\r\nline2" should not clear line1Björn Linse2020-01-26
| |
| * API: fix crash on copy_object(kObjectTypeWindow) #11651Ghjuvan Lacambre2020-01-02
| | | | | | Closes #11646
| * Merge remote-tracking branch 'upstream/release-0.4' into release-0.4.x/libcallJames McCoy2019-12-16
| |\
| | * win_line: Fix crash with 'rightleft' in :terminal #11460erw72019-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes #11438 Backtrace: 0 schar_from_ascii ( p=0x801cc9e112c3 <error: Cannot access memory at address 0x801cc9e112c3>, c=32 ' ') at ../src/nvim/screen.c:5263 1 0x00007f31460eccc5 in win_line (wp=wp@entry=0x7fffc9df6230, lnum=lnum@entry=11, startrow=startrow@entry=10, endrow=41, nochange=false, number_only=number_only@entry=false) at ../src/nvim/screen.c:4025 2 0x00007f31460eed8e in win_update (wp=wp@entry=0x7fffc9df6230) at ../src/nvim/screen.c:1403 3 0x00007f31460f011f in update_screen (type=<optimized out>) at ../src/nvim/screen.c:502 4 0x00007f3146138ef4 in normal_redraw (s=s@entry=0x7fffd0a5f700) at ../src/nvim/normal.c:1247 5 0x00007f314613b159 in normal_check (state=0x7fffd0a5f700) at ../src/nvim/normal.c:1324 6 0x00007f31460accfe in state_enter (s=0x7fffd0a5f700) at ../src/nvim/state.c:28 7 0x00007f3146143099 in normal_enter (cmdwin=<optimized out>, noexmode=<optimized out>) at ../src/nvim/normal.c:463 8 0x00007f314618b541 in main (argc=<optimized out>, argv=<optimized out>) at ../src/nvim/main.c:580 (cherry picked from commit 1bb7ea189e0b1bf402f4733d42dbf3d74ade932e)
| | * Merge pull request #11392 from jamessan/get-setenv-bugJames McCoy2019-11-14
| | |\ | | | | | | | | [release-0.4] f_getenv/setenv: Access v_special when v_type is VAR_SPECIAL
| | | * f_getenv/setenv: Access v_special when v_type is VAR_SPECIALJames McCoy2019-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Multiple Debian builds were failing these tests: Failures: From test_environ.vim: Found errors in Test_external_env(): function RunTheTest[37]..Test_external_env line 16: Expected '' but got 'FOO=null\n' Found errors in Test_getenv(): function RunTheTest[37]..Test_getenv line 2: Expected v:null but got v:false Found errors in Test_setenv(): function RunTheTest[37]..Test_setenv line 5: Expected v:null but got 'null' This is because nvim has a separate tag (`v_special`) in `typval_T` for special variables, whereas vim re-uses the `v_number` tag. On little-endian architectures, using the incorrect tag is not an issue because the byte representation is the same. However, on big-endian systems this caused the `v_number == kSpecialVarNull` checks to fail, and the non-special code to execute.
| | * | paste: Select-mode, Visual-mode #11360Justin M. Keyes2019-11-09
| | | | | | | | | | | | | | | | fix #11344
| | * | autocmd: Fix event name casing #11332lacygoill2019-11-04
| | | | | | | | | | | | Affects getcompletion()
| | * | [release-0.4] ex_echo: fix check for got_int #11225Daniel Hahler2019-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It needs to return to not output any remaining parts. Followup to https://github.com/neovim/neovim/pull/10926 Ref: https://github.com/neovim/neovim/issues/10923 (cherry picked from commit 93fe30593b47fe98a31c6bb67f4d6effb8b725fe)
| | * | [release-0.4] mac: fix "tags file not sorted" bug on Catalina (#11222)dm1try2019-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I/O in Catalina is currently known to be broken. This commit works around a pesky bug and also makes the code more consistent by removing the mix of C file and standard I/O. Fixes https://github.com/neovim/neovim/issues/11196 (cherry picked from commit d0efc1c9062441c9addc846429794ad4a06cc130)
| | * | [release-0.4] recovery mode (-r/-L): use headless_mode (#11187)Daniel Hahler2019-10-11
| | | | | | | | | | | | | | | | | | | | | | | | Fixes https://github.com/neovim/neovim/issues/11181. (cherry picked from commit 9af0fe529d2d91640e4d3388ab9f28159553f14c)
| | * | Remove "highbright bold" conversion. Fixes #11190Björn Linse2019-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using TUI host terminal should take care of this (regardless if 'termguicolors' is active or not). For GUI the behavior doesn't make sense (GUI should display bold attr as bold always). (cherry picked from commit b772b86d2ba256a2c03ab701d00b322cf52560e0)
| | * | [release-0.4] terminfo_start: flush buffer #11074Daniel Hahler2019-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This aligns with `terminfo_stop`, which also flushes the buffer after disabling things. This ensures Neovim gets the response to the terminal background query before exiting (`nvim -u NONE -cq` with e.g. urxvt or kitty). Caveats: * With kitty this causes some "flickering", likely since the alternate screen is being setup with `nvim -u NONE -cq`, whereas it would not be processed otherwise before quitting (as with the background query). * tmux after this patch may print ^[[I (CSI I / FocusGained) after `nvim -u NONE -cq`. Fixes https://github.com/neovim/neovim/issues/11062 Ref: https://github.com/neovim/neovim/issues/11181
| | * | [release-0.4] win_line: update `w_last_cursorline` alwaysDaniel Hahler2019-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vim patch 8.1.0856 (54d9ea6) caused a performance regression in Neovim, when `set conceallevel=1 nocursorline` was used, since then due to refactoring in 23c71d5 `w_last_cursorline` would never get updated anymore. Adds/uses `redrawdebug+=nodelta` for testing this. Fixes https://github.com/neovim/neovim/issues/11100. Closes https://github.com/neovim/neovim/pull/11101.
| | * | [release-0.4] patch_terminfo_bugs: TERM=xterm with non-xterm: ignore smglr ↵Daniel Hahler2019-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#11132) "smglr" was added for TERM=xterm recently to the terminfo database, which causes display issues with terminals that use `TERM=xterm` by default for themselves, although not supporting it. This patch makes "smglr" to be ignored then. Fixes https://github.com/neovim/neovim/issues/10562
| | * | [release-0.4] Fix redraw regression with w_p_cole in visual modeDaniel Hahler2019-10-03
| | | | | | | | | | | | | | | | | | | | Fixes https://github.com/neovim/neovim/issues/11024, regressed in 23c71d51. Closes https://github.com/neovim/neovim/pull/11120.
| | * | [release-0.4] screen: missing redraw/highlight for ruler in message areaBjörn Linse2019-10-02
| | | |
| | * | [release-0.4] cmdline: wildmenumode() should be true with wildoptions+=pumBjörn Linse2019-10-02
| | | |
| | * | [release-0.4] win_update: fix redraw regression (#11027)Daniel Hahler2019-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before 6e9ea5adc `win_ins_lines` would return `FAIL` for `i/line_count == 0`. Handle this by checking it in the outer `if`. Ref: https://github.com/neovim/neovim/commit/6e9ea5ad#commitcomment-35084669
| | * | [release-0.4] Merge pull request #11069 from bfredl/virtualcolBjörn Linse2019-10-01
| | | | | | | | | | | | | | | | screen: fix vcol counting with virtual text.
| | * | [release-0.4] env: use putenv_s for LC_ALL, LANG, etc. #11050erw72019-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ":lang messages en_US.UTF-8" no longer overrides the language detected from the environment (at startup). Solution: In os_setenv, special-case "LC_ALL", "LANG", et al. to use putenv_s instead of uv_os_setenv. fixes #11045
| | * | [release-0.4] paste: fix handling of "<" in cmdline (#11094)Daniel Hahler2019-10-01
| | | | | | | | | | | | | | | | Fixes https://github.com/neovim/neovim/issues/11088.
| | * | screen: don't crash on invalid grid cells being recomposedBjörn Linse2019-09-30
| | |/
* | / fs: Ensure FileInfo struct is initializedJames McCoy2020-07-31
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zero out the caller's FileInfo in all the functions which populate the struct. The contents are considered private, so we need to ensure it's initialized. If the stat call fails, the buffer we get back from libuv may not have any valid data in it, so don't copy it into the caller's FileInfo. This was happening, expectedly, in functional/ex_cmds/write_spec.lua's "write errors out correctly", which caused it to fail in certain environments: test/functional/ex_cmds/write_spec.lua:130: Expected objects to be the same. Passed in: (string) 'Vim(write):E212: Can't open file for writing: not a directory' Expected: (string) 'Vim(write):E166: Can't open linked file for writing'
* / libcallnr: Use int, not int64_t, as the return type for Vim compatJames McCoy2019-12-15
|/ | | | | | | | | | Vim's documentation simply states that libcallnr() should be used "for a function that returns an int". Based on the tests, code, and common syscall interfaces, this should likely be taken literally instead of trying to apply some well-defined type lipstick. Notably, this change fixes Test_libcall_libcallnr on hppa (a 32-bit big-endian system).
* Merge pull request #11025 from bfredl/doublescrollBjörn Linse2019-09-15
|\ | | | | compositor: avoid transmitting invalid lines on double scroll
| * compositor: avoid transmitting invalid lines on double scrollBjörn Linse2019-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This happens in an operation which both increases topline and also inserts new lines somewhere in the remaining are. So before drawing any line, win_update() is performing two grid_scroll operations. === A B C D E^ F === Consider that new line will be inserted after line E and screen also scrolled up to line C. First the topline will be adjusted (x is the scrolling region, ! invalid/empty space created by the scroll): === C x D x E^ x F x ! x ! x === and then space is inserted for the new line === C D E^ ! x F x ! x === The problem is that we are now assuming that any invalid area ! created by a scroll is filled with actual contents (by win_line etc) before it is scrolled again. But in this case the last invalid line ! gets scrolled. Ideally we should make win_update smarter and just scroll valid lines for the later scroll (it is just wasteful to scroll the larger area anyway), but for the 0.4 releasejust make the compositor ignore such an invalid line (as it will get overdrawn anyway later).
* | test/old: detect user modules for python,rubyJan Edmund Lazo2019-09-15
| | | | | | | | | | | | | | | | | | Set the environment variables before changing $HOME so that python,ruby can find user modules not in $HOME. Reference: - https://github.com/neovim/neovim/commit/7be7ec98a22451ec75ce5eb9284fa1722b53c697 - https://github.com/neovim/neovim/issues/10270#issuecomment-531516948
* | vim-patch:8.1.0220: Ruby converts v:true and v:false to a numberJan Edmund Lazo2019-09-15
|/ | | | | | | | | Problem: Ruby converts v:true and v:false to a number. Solution: Use Qtrue and Qfalse instead. (Masataka Pocke Kuwabara, closes vim/vim#3259) https://github.com/vim/vim/commit/d84b26a03b13cd816d80ff32b61e8de740d499ce nvim does not support v:none.