Commit Graph

16065 Commits

Author SHA1 Message Date
James McCoy
817522b231
luacheck: Enforce compatibility with Lua5.1
However, allow reading "jit" since we want to support running
differently under LuaJIT.
2020-07-31 01:32:07 -04:00
Andreas Johansson
82bfdbfe5c
Revert "lsp: Fix text edits with the same start position (#12434)" (#12564)
This reverts commit 44fe8828f0.
2020-07-30 13:37:19 -04:00
James McCoy
54ff1cdd76
Merge pull request #12685 from BigPeet/vim-patch-8.2.1252
vim-patch:8.2.1252
2020-07-29 17:23:21 -04:00
Peter Wolf
e5e547ded4 vim-patch:8.2.1252: ":marks" may show '< and '> mixed up
Problem:    ":marks" may show '< and '> mixed up.
Solution:   Show the mark position as where '< and '> would jump.
54c3fcd852
2020-07-28 23:33:08 +02:00
erw7
5f5bd576e5
Merge pull request #12687 from erw7/fix-terminal-overflow
terminal: fix terminal attribute overflow
2020-07-29 04:36:17 +09:00
erw7
b6b270b28f terminal: fix terminal attribute overflow
fixes #11548
2020-07-29 02:16:50 +09:00
erw7
33eaa171fa
Merge pull request #12673 from erw7/fix-tv-dict-add-str
typval: fix incompatibility with vim
2020-07-26 12:27:58 +09:00
jnozsc
44cbf288ec
script: simplify python version check (#12672) 2020-07-24 22:42:25 +02:00
Christian Clason
38145b919d
build: remove duplicate empty CONFIGURE_COMMAND (#12676)
The cmake file for libvterm had an empty CONFIGURE_COMMAND "", which tells cmake to skip the configure step for this dependency (even though a later patch added another, actual, CONFIGURE_COMMAND two lines below). Evidently the recently released cmake 3.18.0 is pickier about this than previous versions, causing the build to fail. Removing this line makes the build successful again.
2020-07-24 22:39:12 +02:00
erw7
6c6cee644d
ci: fix build failure in Travis [skip appveyor] (#12678) 2020-07-24 22:37:47 +02:00
erw7
e0afec8a62 typval: fix incompatibility with vim
The dict_add_string of vim accepts NULL as the value to add. But
tv_dict_add_str didn't accept it. Change it to accept NULL as well as vim.
2020-07-23 14:51:37 +09:00
Shougo Matsushita
73340c1ce2 vim-patch:8.1.1570: icon signs not displayed properly in the number column
Problem:    Icon signs not displayed properly in the number column.
Solution:   Display them properly. (Yegappan Lakshmanan, closes vim/vim#4559)
4dff4aed09
2020-07-23 10:29:36 +09:00
Shougo Matsushita
1647e0a5b3 vim-patch:8.1.1564: sign column takes up space
Problem:    Sign column takes up space.  (Adam Stankiewicz)
Solution:   Optionally put signs in the number column. (Yegappan Lakshmanan,
            closes vim/vim#4555, closes vim/vim#4515)
394c5d8870
2020-07-23 10:29:36 +09:00
erw7
6b521ceeaf vim-patch:8.1.1712: signs in number column cause text to be misaligned
Problem:    Signs in number column cause text to be misaligned.
Solution:   Improve alignment. (Yasuhiro Matsumoto, closes vim/vim#4694)
d6bcff4577
2020-07-23 10:29:36 +09:00
erw7
bfe94d0a08 vim-patch:8.1.1623: display wrong with signs in narrow number column
Problem:    Display wrong with signs in narrow number column.
Solution:   Increase the numbercolumn width if needed. (Yegappan Lakshmanan,
            closes vim/vim#4606)
e4b407f536
2020-07-23 10:29:36 +09:00
Shougo Matsushita
d3eddcf630 vim-patch:8.1.1564: sign column takes up space
Problem:    Sign column takes up space.  (Adam Stankiewicz)
Solution:   Optionally put signs in the number column. (Yegappan Lakshmanan,
            closes vim/vim#4555, closes vim/vim#4515)
394c5d8870
2020-07-23 10:29:36 +09:00
Matthieu Coudron
326b87feb6
Merge pull request #12646 from vigoux/ts-fix-tilde
buffer_updates: set `deleted_bytes` correctly when hitting `~`

When doing bytebased update, we need to revisit this to let outer calls of ml_get_line handle the deleted part (will be more precise)
2020-07-21 23:03:14 +02:00
Matthieu Coudron
b059fb5c67
Merge pull request #12654 from cbarrete/nomodifiable-hover
LSP: make the hover window nomodifiable
2020-07-21 19:50:33 +02:00
Thomas Vigouroux
be057197d3 buffer_updates: prefer using ml_add_deleted_len_buf 2020-07-21 19:18:04 +02:00
Thomas Vigouroux
2c34780c32 buffer_updates: emit valid old_byte_size
Test this using treesitter highlighting, which is based on this
old_byte_size.
2020-07-21 19:18:04 +02:00
Anmol Sethi
a6917f840d
man.vim: Simplify man#init to reduce load time (#12482)
I removed the SunOS stuff since no one uses SunOS and I've never tested
it on there.

I removed the section_flag init as we can just use -S instead of -s
and -S is used by every implementation as far as I know.

This brings man#init's time from 50-70ms to 15-20ms for me.

Closes #12318
Related #6766
Related #6815
2020-07-21 11:46:42 -04:00
Matthieu Coudron
459800db43
Merge pull request #12575 from cbarrete/vim-8.2.0935
[RFC] vim-patch:8.2.{0935,0937}
2020-07-20 22:04:30 +02:00
Cédric Barreteau
9464399c8c Fix documentation
The list parameter is an an [in,out] rather than just an [in].
2020-07-20 20:21:49 +02:00
Cédric Barreteau
fd6361278b Make the window nomodifiable when it's created 2020-07-20 20:16:46 +02:00
Cédric Barreteau
8bb2c3087a LSP: make the hover window nomodifiable 2020-07-20 20:16:46 +02:00
James McCoy
409a1dcdc6
Merge pull request #12653 from erw7/fix-build-freebsd-ci
build: Fix build failure with CI in FreeBSD
2020-07-20 07:49:10 -04:00
erw7
950ca6abcd
eval: improve ex_execute (#12445) 2020-07-20 11:01:14 +02:00
erw7
bfda389c5a build: Fix build failure with CI in FreeBSD
Co-authored-by: James McCoy <jamessan@jamessan.com>
2020-07-20 11:17:25 +09:00
TJ DeVries
398201cfab
lua: Fix crash on unprotected lua errors (#12658)
Can be reproduced with a script like this:

-- in some lua file
vim.fn.timer_start(10, function() error("uh....") end)

-- will cause neovim to crash with the following error.
PANIC: unprotected error in call to Lua API
        (nlua_CFunction_func_call failed.)

After this, it will instead print the error message
from the top of the stack, like so.

tmp/error_nvim.lua:10: uh...

Also added an example test. Previously this test
caused the embedded nvim to panic.
2020-07-19 17:16:48 -04:00
cbarrete
56f3b95180
doc: Add documentation for some vim.lsp.buf functions (#12552)
* Add documentation for some `vim.lsp.buf` functions

* Add inline Lua documentation

* Use generated documentation for LSP buffer functions

Co-authored-by: Cédric Barreteau <>
2020-07-19 17:16:12 -04:00
David Lukes
33837745bb
Fix / improve report messages (#12396) 2020-07-19 22:37:50 +02:00
Matthieu Coudron
e1d1c413f7
Merge pull request #12480 from nhooyr/mansect-trim
man.vim: Refactor verify_exists to unset $MANSECT as needed
2020-07-19 21:55:12 +02:00
Matthieu Coudron
6fcbcf72c3
Merge pull request #12448 from erw7/fix-shada-write-error-on-exit
Fix shada write error on exit, vim-patch:8.2.0920
2020-07-19 21:17:55 +02:00
Daniel Hahler
5a69eb99b7
tui.c: augment_terminfo: remove unused colorterm argument (#12602)
It is unused since 8898793ad.
2020-07-19 18:45:26 +02:00
erw7
02bbb8c45b
build: fix a problem with the static library name (#12591)
Fix the problem that the static library name was liblibnvim.a in the
environment other than Windows due to the change of bf58c00.
2020-07-19 18:42:41 +02:00
Matthieu Coudron
daa5bffd93
Merge pull request #12611 from janlazo/vim-8.0.1531
vim-patch:8.0.{1531,1544,1589,1591,1712,1745,1747},8.1.{819},8.2.{420,539,893,894,895,899,1114,1118,1169,1170,1171,1172,1173,1177,1179,1180,1181,1187,1188,1196,1198,1211,1214,1215,1222}
2020-07-19 18:41:40 +02:00
erw7
8e350c1c69
startup: fix stall issue with -D options (#12652)
fixes #12647.
2020-07-19 17:44:22 +02:00
Jan Edmund Lazo
140a372017
vim-patch:8.2.1222: using valgrind in Vim command started by test doesn't work
Problem:    When using valgrind a Vim command started by a test uses the same
            log file name which gets overwritten.
Solution:   Fix regexp to rename the log file.
657a826c07
2020-07-19 11:40:35 -04:00
Jan Edmund Lazo
bb1f06fa82
vim-patch:8.2.1211: removed more than dead code
Problem:    Removed more than dead code.
Solution:   Put back the decrement.
8455c5ed31

N/A patch for version.c:

vim-patch:8.2.1118: condition can never be true, dead code

Problem:    Condition can never be true, dead code.
Solution:   Remove the dead code.
810af5ea46

vim-patch:8.2.1214: MS-Windows: default _vimrc not correct in silent install mode

Problem:    MS-Windows: default _vimrc not correct in silent install mode.
Solution:   Add the LoadDefaultVimrc macro. (Ken Takata, closes vim/vim#6451)
ceb56ddbaf

vim-patch:8.2.1215: Atari MiNT support is outdated

Problem:    Atari MiNT support is outdated.
Solution:   Nobody responded this code is still useful, so let's delete it.
e3f915d12c
2020-07-19 11:40:35 -04:00
Jan Edmund Lazo
e16f2cbd12
vim-patch:8.2.0539: comparing two NULL list fails
Problem:    Comparing two NULL list fails.
Solution:   Change the order of comparing two lists.
7b293c730b

N/A patches for version.c:

vim-patch:8.2.1187: terminal2 test sometimes hangs in the GUI on Travis

Problem:    Terminal2 test sometimes hangs in the GUI on Travis.
Solution:   Disable Test_zz2_terminal_guioptions_bang() for now.
c85156bb89

vim-patch:8.2.1188: memory leak with invalid json input

Problem:    Memory leak with invalid json input.
Solution:   Free all keys at the end. (Dominique Pellé, closes vim/vim#6443,
            closes vim/vim#6442)
6d3a7213f5

vim-patch:8.2.1196: build failure with normal features

Problem:    Build failure with normal features.
Solution:   Add #ifdef.
83e7450053

vim-patch:8.2.1198: terminal2 test sometimes hangs in the GUI on Travis

Problem:    Terminal2 test sometimes hangs in the GUI on Travis.
Solution:   Move test function to terminal3 to see if the problem moves too.
a4b442614c
2020-07-19 11:40:34 -04:00
Jan Edmund Lazo
bf88228180
vim-patch:8.2.0899: assert_equalfile() does not give a hint about the difference
Problem:    Assert_equalfile() does not give a hint about the difference.
Solution:   Display the last seen text.
30cc44a97f
2020-07-19 11:40:34 -04:00
Jan Edmund Lazo
93f2dc0d03
vim-patch:8.2.0893: assert_equalfile() does not take a third argument
Problem:    Assert_equalfile() does not take a third argument.
Solution:   Implement the third argument. (Gary Johnson)
fb517bac23
2020-07-19 11:40:34 -04:00
Jan Edmund Lazo
ab69ea26dc
vim-patch:8.1.0819: a failed assert with a long string is hard to read
Problem:    A failed assert with a long string is hard to read.
Solution:   Shorten the assert message.
865767126e
2020-07-19 11:40:34 -04:00
Jan Edmund Lazo
65793a90d7
vim-patch:8.2.0895: :mkspell output does not mention the tree type
Problem:    :mkspell output does not mention the tree type.
Solution:   Back out increasing the limits, it has no effect.  Mention the
            tree being compressed.  Only give a message once per second.
408c23b079
2020-07-19 11:40:33 -04:00
Jan Edmund Lazo
420aff590a
vim-patch:8.2.0894: :mkspell can take very long if the word count is high
Problem:    :mkspell can take very long if the word count is high.
Solution:   Use long to avoid negative numbers.  Increase the limits by 20% if
            the compression did not have effect.
59f88fbf24
2020-07-19 11:40:33 -04:00
Jan Edmund Lazo
db8682b94e
vim-patch:8.2.0420: Vim9: cannot interrupt a loop with CTRL-C
Problem:    Vim9: cannot interrupt a loop with CTRL-C.
Solution:   Check for CTRL-C once in a while.  Doesn't fully work yet.
f1ec378b01

Vim9 test, commented out in this patch, is restored in patch 8.2.0421.
Vim9 tests were not ported over so skip the temporary change.

Vim should stop pushing broken commits on master.
2020-07-19 11:38:35 -04:00
Jan Edmund Lazo
be9de61012
vim-patch:8.2.1170: cursor off by one with block paste while 'virtualedit' "all"
Problem:    Cursor off by one with block paste while 'virtualedit' is "all".
Solution:   Adjust condition. (Hugo Gualandi, closes vim/vim#6430)
ef85a9b2d9

N/A patches for version.c:

vim-patch:8.2.1114: terminal test sometimes times out

Problem:    Terminal test sometimes times out.
Solution:   Split the test in two parts.
1112c0febb

vim-patch:8.2.1171: possible crash when out of memory

Problem:    Possible crash when out of memory.
Solution:   Check for NULL pointer. (Dominique Pellé, closes vim/vim#6432)
58bb61cf5e

vim-patch:8.2.1172: error messages when doing "make clean" in doc or tee

Problem:    Error messages when doing "make clean" in the runtime/doc or
            src/tee directories.
Solution:   Use "rm -f".
08fc48492a

vim-patch:8.2.1173: tee doesn't build on some systems

Problem:    Tee doesn't build on some systems.
Solution:   Include header files. (Dominique Pelle, closes vim/vim#6431)
4004315292

vim-patch:8.2.1177: terminal2 test sometimes hangs in the GUI

Problem:    Terminal2 test sometimes hangs in the GUI.
Solution:   Move some tests to other files to further locate the problem.
            Set the GUI to a fixed screen size.
18aa13d13b

vim-patch:8.2.1179: Test_termwinscroll() sometimes hangs in the GUI

Problem:    Test_termwinscroll() sometimes hangs in the GUI.
Solution:   Skip the test in the GUI.
f65927fc8d

vim-patch:8.2.1180: build failure in small version

Problem:    Build failure in small version.
Solution:   Add #ifdef.
1e624c912d

vim-patch:8.2.1181: json code not fully tested

Problem:    Json code not fully tested.
Solution:   Add more test coverage. (Dominique Pellé, closes vim/vim#6433)
21e5bdd271
2020-07-19 11:38:35 -04:00
Jan Edmund Lazo
0c498200f4
vim-patch:8.2.1169: write NUL past allocated space using corrupted spell file
Problem:    Write NUL past allocated space using corrupted spell file.
            (Markus Vervier)
Solution:   Init "c" every time.
97d2f34c87

N/A patches for version.c:

vim-patch:8.0.1531: cannot use 24 bit colors in MS-Windows console

Problem:    Cannot use 24 bit colors in MS-Windows console.
Solution:   Add support for vcon. (Nobuhiro Takasaki, Ken Takasaki,
            fixes vim/vim#1270, fixes vim/vim#2060)
cafafb381a

vim-patch:8.0.1544: when using 'termguicolors' SpellBad doesn't show

Problem:    When using 'termguicolors' SpellBad doesn't show.
Solution:   When the GUI colors are not set fall back to the cterm colors.
d4fc577e60

vim-patch:8.0.1589: error for setting 'modifiable' when resetting it

Problem:    Error for setting 'modifiable' when resetting it.
Solution:   Check if 'modifiable' was actually set.
d7db27bafd

vim-patch:8.0.1591: MS-Windows: when reparsing the arguments 'wildignore' matters

Problem:    MS-Windows: when reparsing the arguments 'wildignore' matters.
Solution:   Save and reset 'wildignore'. (Yasuhiro Matsumoto, closes vim/vim#2702)
20586cb4f4

vim-patch:8.0.1712: terminal scrollback is not limited

Problem:    Terminal scrollback is not limited.
Solution:   Add the 'terminalscroll' option.
8c041b6b95

Neovim has 'scrollback' option, not 'terminalscroll',
to limit scrollback in terminal buffers.

vim-patch:8.0.1745: build failure on MS-Windows

Problem:    Build failure on MS-Windows.
Solution:   Build job arguments for MS-Windows. Fix allocating job twice.
2060892028

vim-patch:8.0.1747: MS-Windows: term_start() does not set job_info() cmd

Problem:    MS-Windows: term_start() does not set job_info() cmd.
Solution:   Share the code from job_start() to set jv_argv.
ebe74b7367
2020-07-19 11:38:34 -04:00
cbarrete
08efa7037e
lsp: Add support for call hierarchies (#12556)
* LSP: Add support for call hierarchies

* LSP: Add support for call hierarchies

* LSP: Add support for call hierarchies

* LSP: Jump to call location

Jump to the call site instead of jumping to the definition of the
caller/callee.

* LSP: add tests for the call hierarchy callbacks

* Fix linting error

Co-authored-by: Cédric Barreteau <>
2020-07-18 15:10:09 -04:00
Cédric Barreteau
9f7f42ea0a Prevent flatten from taking a null list 2020-07-15 20:32:20 +02:00