Compare commits

...

6907 Commits

Author SHA1 Message Date
535fb9488c NVIM v0.7.1
BREAKING CHANGES:
fdd5178581 #18986 introduce $NVIM, unset $NVIM_LISTEN_ADDRESS

VIM PATCHES:
git log --oneline --grep "vim-patch" v0.7.0..v0.7.1

FEATURES:
0b8faccade #18440 feat(api): add `group_name` to `nvim_get_autocmds`
b7a5278249 #18440 feat(api): add `group_name` to `nvim_get_autocmds`
9e5cef945a #18264 feat(tui): query terminal for CSI u support

FIXES:
b477afa3ea #19088
    71e2c49b17 refactor(tests): introduce testprg()
    175892fa37 #15913 fix: make_filter_cmd for :! powershell
f2b465232d #18331 fix(lsp): make sure to always reset active codelens refreshes
b3d754ccd7 #18869 fix(lsp): fix multi client handling in code action
e820c6d7c3 #19069
    cf9c097f34 fix(api): check for inclusive buffer line index out of bounds correctly
a05da1c05a #19053
    17299b302c fix(input): use correct grid when restoring cursor for <expr> mapping
7266150eff #19025
    40e13c8d95 #19010 fix(decorations): nvim_buf_set_extmark breaks conceal
38928b5cc2 #19023
    18e0d64666 fix(tui): fix piping output make nvim unusable
cd7ac0eb29 #19014
    433f3067a0 fix: use ctermbg/fg instead of bg/fg when use_rgb is false
30ae06c8fe #19009
    777d415da8 fix(highlight): let winhighlight use cursor
    f70e0832b1 #18981 fix(hl): return cterm fg/bg even if they match Normal
    ee210b0f74 fix(hl): DRY set_hl_group() sg_attr set
    512a8197c8 test(hl): Add Normal group set_hl/get_hl_by_name check
    79ca64a1ef #18024) fix(hl): set Normal hl group sg_attr value (fixes
2ebc76b226 #19001
    41709831ae fix(startup): nvim with --clean should not load user rplugins
ed9e6d19ab #18990 fix(treesitter): new iter if folded
05ce04e994 #18984
    fe42dea674 #18976 fix(lua): highlight.on_yank can close timer in twice
    f15d6094fc #18824 fix(lua): stop pending highlight.on_yank timer, if any
5243cb8a4b #18975
    bf4df2a629 fix(ui): do not call showmode() when setting window height
3cea4d6de9 #18942
    05f6883ee2 fix(buffer): disable buffer-updates before removing buffer from window
1dba6cf8f0 #18918
    0c9d666205 fix(input): fix macro recording with ALT and special key
fc4e4b38b2 #18905
    bd3bb128c0 test(ts): skip test if C parser is not available
d317cb2322 #18886
    1496f4212b fix(input): allow Ctrl-C to interrupt a recursive mapping even if mapped
0dc5bcd072 #18680
    3a1e8ef881 #18617 fix(autocmds): separate command from desc
cb1b4bbeae #18655 fix(lsp): only send diagnostics from current buffer in code_action()
01d0d2ce64 #18517 build(deps): bump Luv to HEAD - c51e7052e
f3ffb73b18 #18612 fix(health): return 0 if file not exists
496e786cad #18534
    0377973769 fix(runtime/genvimvim): omit s[ubstitute] from vimCommand
35075dcc22 #18469 fix(lsp): fix unnecessary buffers being added on empty diagnostics
9e040acfa3 #18468 fix(lsp): unify progress message handling
e28799f2d8 #18436 fix: display global statusline correctly with ext_messages
1e28068d0d #18415 fix: ensure has() does not change v:shell_error
203b088d75 #18411 build(deps): bump LuaJIT to HEAD - 91bc6b8ad
e502e8106a #18400 fix(treesitter): bump match limit up
7567d2195a #18390
    d165289055 fix(lsp): add missing bufnr argument
f3587babfd #18367
    631393a712 fix(filetype.lua): escape expansion of ~ when used as a pattern
08cd391047 #18360 fix(shared): avoid indexing unindexable values in vim.tbl_get()
508c8a597e #18362 fix(ftdetect): source plugins in autogroup
ffd46b7688 #18351
    2a6198319f fix(mac): use same $LANG fallback mechanism as Vim
8d4fbcb5b1 #18324
    b80ef0de2f fix(tui): disable extended keys before exiting alternate screen
14a5b6b8d4 #18312
    89260ea5d6 fix(input): only disable mapped CTRL-C interrupts when getting input
ef43e7d1f6 #18298 fix: suppress "is a directory" messages with shortmess 'F'
aff05c5730 #18256 fix: show autocmd output when F is in shortmess
fa7d8c333f #18229
    d916d2f876 #18227 fix(lua): don't mutate opts parameter of vim.keymap.del
f7e2ad7915 #18220 fix(treesitter): create new parser if language is not the same as cached parser
7f8faac39e #18205 fix(diagnostic): use nvim_exec_autocmds to trigger DiagnosticChanged
3ee089ebf4 #18167
    0f811afc96 fix(tui): update modifyOtherKeys reporting
2022-06-26 03:19:05 -07:00
b477afa3ea Merge pull request #19088 from neovim/fix-powershell
[Backport release-0.7] fix: make_filter_cmd for powershell as shell (#16271)
2022-06-25 19:59:31 +02:00
71e2c49b17 refactor(tests): introduce testprg()
Also:
- Add a describe('shell :!') section to system_spec.
- Make the test for #16271 work on systems without powershell.
2022-06-25 19:09:29 +02:00
175892fa37 fix: make_filter_cmd for :! powershell #15913
Problem:
Nvim fails to create tempfile "…/nvim6UJx04/7" when 'shell' is set to
pwsh (PowerShell Core). This breaks filtered shell commands ":{range}!".
With shell set to cmd, it works.

Solution:
PowerShell doesn't use "<" for stdin redirection. Instead, use
"-RedirectStandardInput".

Closes #15913
2022-06-25 17:54:41 +02:00
790f6089e9 Merge pull request #19085 from neovim/build-universal-macos
[Backport release-0.7] macOS universal release (#19029, #18914, #19084)
2022-06-25 15:13:19 +02:00
b0eedceab4 fix(build): strip trailing newline from variable (#19084)
Problem: #19029 added a new fallback that sets
`$MACOSX_DEPLOYMENT_TARGET` to the local macOS version via `sw_vers`.
However, the output included a newline, which broke the generated Ninja
build script.

Solution: use `OUTPUT_STRIP_TRAILING_WHITESPACE` for `execute_process`.
2022-06-25 14:14:39 +02:00
059107f424 ci(release): build a universal binary on macOS
After some tweaks to our dep builds, we can now build a universal binary
for macOS by using `CMAKE_OSX_ARCHITECTURES`. So, let's do that. This
requires a number of additional changes:

1. We need to build on macOS 11, since earlier versions do not support
   building universal (M1 + Intel) binaries.
2. We need to provision a universal `libintl`. The linker will look for
   an ARM64 version of this library when linking the `nvim` binary.

While we're here:
1. Link statically to `libintl`. This allows to to avoid having to do
   any install name rewriting or codesigning to package Neovim.
2. Bump the `MACOSX_DEPLOYMENT_TARGET` to `11`. We're already using a
   `libintl` built by Homebrew (through the pre-installed version of
   `gettext`), and that is built for macOS 11.

In order to ensure we link to `libintl.a` instead of `libintl.dylib`, we
have to make sure that CMake can't find the latter. This ideally should
be a matter of doing `brew unlink gettext`. However, CMake is too adept
at finding things that Homebrew has installed (even when not linked), so
we have to do a bit more than that. This appears in the additional step
ensuring static linkage to `libintl`.

We end up breaking some Homebrew-installed software in the process, and
some of these software is called during our build (e.g. curl, git,
wget). To avoid any adverse effects, let's just uninstall them.
2022-06-25 14:14:29 +02:00
dca69c90d4 build(deps): support universal builds on macOS
CMake can handle building universal binaries on macOS using the
`CMAKE_OSX_ARCHITECTURES` variable. Let's pass this variable to the
relevant dep builds. We use the `LIST_SEPARATOR` argument to prevent the
shell from interpreting the `;` that CMake uses as a list separator.

For dependencies that don't build using CMake, we only need to make sure
that the compiler is invoked with the correct `-arch` flags. The
compiler does the rest.

The only exception to this is the LuaJIT build, which we handle
separately as a special case.
2022-06-25 14:13:35 +02:00
0d230d3f01 build: remove CMAKE_CROSSCOMPILING code #18914
This is rarely, if ever, used and certainly not tested. It's likely this
isn't functional anymore.
2022-06-25 14:13:21 +02:00
a59bade869 build(luajit): support universal builds on macOS
To build universal binaries on macOS, one typically only needs to pass
multiple `-arch` flags to `clang`.

Unfortunately, this strategy causes LuaJIT builds to fail. To work
around this, we build LuaJIT for each requested architecture
individually first and then use `lipo` to package each architecture
slice into a universal binary.

To be able to do this on an Intel macOS host or an M1 macOS host without
a Rosetta installation, we need some special flags in order to tell
LuaJIT that it is cross-compiling for a different target. See [1] for
details.

[1] https://luajit.org/install.html#cross
2022-06-25 14:07:19 +02:00
f2b465232d fix(lsp): make sure to always reset active codelens refreshes (#18331)
This fixes issues where subsequent calls to vim.lsp.codelens.refresh()
would have no effect due to the buffer not getting cleared from the
active_refresh table.

Examples of how such scenarios would occur are:
  - A textDocument/codeLens result yielded an error.
  - The 'textDocument/codeLens' handler was overriden in such a way that
    it no longer called vim.lsp.codelens.on_codelens().

(cherry picked from commit 94eb72cc44)
2022-06-25 12:31:58 +02:00
b3d754ccd7 fix(lsp): fix multi client handling in code action (#18869)
Fixes https://github.com/neovim/neovim/issues/18860

(cherry picked from commit e4df1c9b9e)
2022-06-25 12:22:17 +02:00
e820c6d7c3 Merge pull request #19069 from neovim/backport-19056-to-release-0.7
[Backport release-0.7] fix(api): check for inclusive buffer line index out of bounds correctly
2022-06-23 16:58:40 +02:00
cf9c097f34 fix(api): check for inclusive buffer line index out of bounds correctly
(cherry picked from commit 01ee7152c5)
2022-06-23 13:40:46 +00:00
3942a3f5d0 Merge pull request #19065 from neovim/backport-19064-to-release-0.7
[Backport release-0.7] vim-patch:8.2.5152: search() gets stuck with "c" and skip evaluates to true
2022-06-23 20:19:12 +08:00
c0224b59da vim-patch:8.2.5152: search() gets stuck with "c" and skip evaluates to true
Problem:    search() gets stuck with "c" and skip evaluates to true.
Solution:   Reset the SEARCH_START option. (closes vim/vim#10608)
180246cfd1
(cherry picked from commit c527be5600)
2022-06-23 11:35:15 +00:00
a05da1c05a Merge pull request #19053 from neovim/backport-19047-to-release-0.7
[Backport release-0.7] fix(input): use correct grid when restoring cursor for <expr> mapping
2022-06-23 07:00:23 +08:00
17299b302c fix(input): use correct grid when restoring cursor for <expr> mapping
(cherry picked from commit 2d4c992dbe)
2022-06-22 22:04:40 +00:00
2fe25ad06c Merge pull request #19037 from neovim/backport-19033-to-release-0.7
[Backport release-0.7] Update docs concerning $NVIM_LISTEN_ADDRESS
2022-06-21 10:28:13 +02:00
6349ec9e7c docs(deprecated): alternatives for $NVIM_LISTEN_ADDRESS
(cherry picked from commit 905093f6ae)
2022-06-21 08:26:22 +00:00
7266150eff Merge pull request #19025 from neovim/extmark-conceal
[Backport release-0.7] fix(decorations): nvim_buf_set_extmark breaks conceal (#19010)
2022-06-19 20:46:06 +02:00
40e13c8d95 fix(decorations): nvim_buf_set_extmark breaks conceal #19010
Closes #19007

Co-authored-by: bfredl <bjorn.linse@gmail.com>
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2022-06-19 19:39:14 +02:00
38928b5cc2 Merge pull request #19023 from neovim/backport-18932-to-release-0.7
[Backport release-0.7] fix(tui): fix piping output make nvim unusable
2022-06-19 18:12:57 +02:00
18e0d64666 fix(tui): fix piping output make nvim unusable
fix(tui): fix piping output make nvim unusable

(cherry picked from commit 72ce1f308b)
2022-06-19 15:23:13 +00:00
d78447481c Merge pull request #19022 from neovim/ci-macos-release
[Backport release-0.7] ci(release): skip CoreServices system library on macOS (#19021)
2022-06-19 17:01:41 +02:00
e2915709b0 ci(release): skip CoreServices system library on macOS (#19021)
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).
2022-06-19 16:22:12 +02:00
cd7ac0eb29 Merge pull request #19014 from neovim/backport-18982-to-release-0.7
[Backport release-0.7] fix: use ctermbg/fg instead of bg/fg when use_rgb is false
2022-06-18 18:51:48 +02:00
433f3067a0 fix: use ctermbg/fg instead of bg/fg when use_rgb is false
(cherry picked from commit d76ecae4ae)
2022-06-18 15:36:50 +00:00
30ae06c8fe Merge pull request #19009 from neovim/backport-18820-to-release-0.7
[Backport release-0.7] fix(hl): backport #18820, #18981, #18870
2022-06-18 15:03:56 +02:00
777d415da8 fix(highlight): let winhighlight use cursor 2022-06-18 14:14:24 +02:00
f70e0832b1 fix(hl): return cterm fg/bg even if they match Normal #18981
Fixes #18980

- 831fa45ad8 is related but this doesn't regress that
- The `cterm_normal_fg_color != ae.cterm_fg_color` comparison is originally
  carried from patch to patch starting all the way back in 29bc6dfabd where it
  was avoiding setting a HL attr. But `hlattrs2dict()` now is just
  informational.
2022-06-18 13:21:01 +02:00
ee210b0f74 fix(hl): DRY set_hl_group() sg_attr set
(cherry picked from commit 9747e984e1)
2022-06-18 11:18:39 +00:00
512a8197c8 test(hl): Add Normal group set_hl/get_hl_by_name check
(cherry picked from commit 02f70c1638)
2022-06-18 11:18:39 +00:00
79ca64a1ef fix(hl): set Normal hl group sg_attr value (fixes #18024)
(cherry picked from commit 03b4b07162)
2022-06-18 11:18:39 +00:00
2ebc76b226 Merge pull request #19001 from neovim/backport-18861-to-release-0.7
[Backport release-0.7] fix(startup): nvim with --clean should not load user rplugins
2022-06-17 18:09:11 +02:00
41709831ae fix(startup): nvim with --clean should not load user rplugins
runtime rplugins such like legacy script providers are not affected
by this change.

(cherry picked from commit aad20de5ab)
2022-06-17 15:17:41 +00:00
fdd5178581 [Backport release-0.7] introduce $NVIM, unset $NVIM_LISTEN_ADDRESS (#18986)
feat(server): introduce $NVIM

PROBLEM
------------------------------------------------------------------------
$NVIM_LISTEN_ADDRESS has conflicting purposes as both a parameter ("the
current process should listen on this address") and a descriptor ("the
current process is a child of this address").

This contradiction means the presence of NVIM_LISTEN_ADDRESS is
ambiguous, so child Nvim always tries to listen on its _parent's_
socket. This is the cause of lots of  "Failed to start server" spam in
our test/CI logs:

    WARN  2022-04-30… server_start:154: Failed to start server: address already in use: \\.\pipe\nvim-4480-0
    WARN  2022-04-30… server_start:154: Failed to start server: address already in use: \\.\pipe\nvim-2168-0

SOLUTION
------------------------------------------------------------------------

1. Set $NVIM to the parent v:servername, *only* in child processes.
   - Now the correct way to detect a "parent" Nvim is to check for $NVIM.
2. Do NOT set $NVIM_LISTEN_ADDRESS in child processes.
3. On startup if $NVIM_LISTEN_ADDRESS exists, unset it immediately after
   server init.
4. Open a channel to parent automatically, expose it as v:parent.

Fixes #3118
Fixes #6764
Fixes #9336
Ref https://github.com/neovim/neovim/pull/8247#issuecomment-380275696
Ref #8696

(cherry picked from commit b9d97f5951)

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2022-06-16 18:30:08 -07:00
ed9e6d19ab [Backport release-0.7] fix(treesitter): new iter if folded (#18990)
fix(treesitter): new iter if folded

(cherry picked from commit 8780076a78)

Co-authored-by: kevinhwang91 <kevin.hwang@live.com>
2022-06-16 19:08:48 +02:00
05ce04e994 Merge pull request #18984 from neovim/fix-highlight-yank
backport highlight.on_yank timer fixes #18824 and #18976
2022-06-16 15:10:22 +02:00
351b5969c1 vim-patch:8.2.5097: using uninitialized memory when using 'listchars' (#18985)
Problem:    Using uninitialized memory when using 'listchars'.
Solution:   Use the length returned by mb_char2bytes(). (closes vim/vim#10576)
74ac29cecd
2022-06-16 19:09:59 +08:00
fe42dea674 fix(lua): highlight.on_yank can close timer in twice #18976
check whether timer is closing in vim.defer_fn before closing
2022-06-16 12:27:59 +02:00
f15d6094fc fix(lua): stop pending highlight.on_yank timer, if any (#18824)
When yanking another range while previous yank is still highlighted, the
pending timer could clear the highlight almost immediately (especially
when using larger `timeout`, i.e. 2000)
2022-06-16 12:26:03 +02:00
5243cb8a4b Merge pull request #18975 from neovim/backport-18969-to-release-0.7
[Backport release-0.7] fix(ui): do not call showmode() when setting window height
2022-06-15 20:12:54 +08:00
bf4df2a629 fix(ui): do not call showmode() when setting window height
(cherry picked from commit 756e65ae62)
2022-06-15 11:42:36 +00:00
3cea4d6de9 Merge pull request #18942 from neovim/backport-18933-to-release-0.7
[Backport release-0.7] fix(buffer): disable buffer-updates before removing buffer from window
2022-06-13 07:44:20 +08:00
05f6883ee2 fix(buffer): disable buffer-updates before removing buffer from window
There can be other places that access window buffer info (e.g.
`tabpagebuflist()`), so checking `w_closing` in `win_findbuf()` doesn't
solve the crash in all cases, and may also cause Nvim's behavior to
diverge from Vim.

(cherry picked from commit fa30ef1c31)
2022-06-12 22:02:42 +00:00
1dba6cf8f0 Merge pull request #18918 from neovim/backport-18917-to-release-0.7
[Backport release-0.7] fix(input): fix macro recording with ALT and special key
2022-06-10 17:57:09 +08:00
0c9d666205 fix(input): fix macro recording with ALT and special key
(cherry picked from commit d6b309e20b)
2022-06-10 09:14:45 +00:00
fc4e4b38b2 Merge pull request #18905 from neovim/backport-18903-to-release-0.7
[Backport release-0.7] test(ts): skip test if C parser is not available
2022-06-08 21:11:27 -04:00
bd3bb128c0 test(ts): skip test if C parser is not available
(cherry picked from commit 6b0595d7cc)
2022-06-09 01:10:36 +00:00
d317cb2322 Merge pull request #18886 from neovim/backport-18885-to-release-0.7
[Backport release-0.7] fix(input): allow Ctrl-C to interrupt a recursive mapping even if mapped
2022-06-07 13:10:43 +08:00
1496f4212b fix(input): allow Ctrl-C to interrupt a recursive mapping even if mapped
(cherry picked from commit 56895cf4de)
2022-06-07 04:45:25 +00:00
f0f63502ce Merge pull request #18873 from neovim/backport-18872-to-release-0.7
[Backport release-0.7] vim-patch:8.2.5058: input() does not handle composing characters properly
2022-06-06 06:32:46 +08:00
df19f086ba Merge pull request #18874 from neovim/backport-18831-to-release-0.7
[Backport release-0.7] ci(provider): skip perl provider tests on macos
2022-06-06 06:32:07 +08:00
0e10b17164 ci(provider): skip installing perl provider on macOS
The macOS CI jobs fail to properly install the perl provider, making the
entire thing fail.

(cherry picked from commit 79bf507449)
2022-06-05 22:04:01 +00:00
6768784feb vim-patch:8.2.5058: input() does not handle composing characters properly
Problem:    input() does not handle composing characters properly.
Solution:   Use mb_cptr2char_adv() instead of mb_ptr2char_adv().
            (closes vim/vim#10527)
e3a529bc87

Cherry-pick all of Test_input_func() from patch 8.2.0316.

(cherry picked from commit 84ed71f319)
2022-06-05 21:46:39 +00:00
2146a48587 Merge pull request #18751 from neovim/backport-18138-to-release-0.7
[Backport release-0.7] vim-patch:8.2.4767: openscad files are not recognized
2022-05-26 10:52:58 +08:00
b43eed7d91 vim-patch:8.2.4767: openscad files are not recognized
Problem:    Openscad files are not recognized.
Solution:   Add a filetype pattern. (Niklas Adam, closes vim/vim#10199)
c360b2566c
(cherry picked from commit b49c1adb20)
2022-05-26 01:57:19 +00:00
ec40fef0af Merge pull request #18699 from dundargoc/backport/commitlint
ci(commitlint): only trigger on PRs to master #18679
2022-05-24 07:02:39 -04:00
811ee04030 Merge pull request #18718 from neovim/backport-18717-to-release-0.7
[Backport release-0.7] vim-patch:8.2.5008: when 'formatoptions' contains "/" wrongly wrapping comment
2022-05-23 22:03:25 +08:00
9876db1aa5 vim-patch:8.2.5008: when 'formatoptions' contains "/" wrongly wrapping comment
Problem:    When 'formatoptions' contains "/" wrongly wrapping a long trailing
            comment.
Solution:   Pass the OPENLINE_FORMAT flag.
7e66778815
(cherry picked from commit 01167f2448)
2022-05-23 13:28:37 +00:00
1677548ebc ci(commitlint): only trigger on PRs to master #18679
This will prevent a failure for backported PRs as they use a different
commit message.
2022-05-22 18:23:42 +02:00
0dc5bcd072 Merge pull request #18680 from dundargoc/backport-autocmd
[Backport] fix(autocmds): separate command from desc
2022-05-22 08:29:11 +08:00
3a1e8ef881 fix(autocmds): separate command from desc (#18617) 2022-05-21 17:16:56 +02:00
cb1b4bbeae fix(lsp): only send diagnostics from current buffer in code_action() (#18655)
Fix vim.lsp.buf.(range_)code_action() to only send diagnostics belonging
to the current buffer and not to other files in the workspace.

(cherry picked from commit e3d660e456)

Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com>
2022-05-21 16:02:38 +02:00
7af873f9d5 Merge pull request #18647 from neovim/backport-18636-to-release-0.7
[Backport release-0.7] vim-patch:8.2.4980: when 'shortmess' contains 'A' loading session may still warn
2022-05-20 08:05:38 +08:00
479f41aa89 vim-patch:8.2.4980: when 'shortmess' contains 'A' loading session may still warn
Problem:    When 'shortmess' contains 'A' loading a session may still warn for
            an existing swap file. (Melker Österberg)
Solution:   Keep the 'A' flag to 'shortmess' in the session file.
            (closes vim/vim#10443)
aaadb5b6f7

Use readfile() with "B" flag in test as readblob() needs patch 8.2.2343.

(cherry picked from commit 1d67dd16e2)
2022-05-19 23:29:29 +00:00
01d0d2ce64 build(deps): bump Luv to HEAD - c51e7052e (#18517)
(cherry picked from commit 7c9ee0347b)

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
2022-05-19 09:17:54 +02:00
f3ffb73b18 fix(health): return 0 if file not exists (#18612)
(cherry picked from commit 1d000e8248)

Co-authored-by: noval <noval.dev@protonmail.com>
2022-05-17 20:44:15 +02:00
4afadaf9d1 Merge pull request #18571 from neovim/backport-18567-to-release-0.7
[Backport release-0.7] vim-patch:8.2.{4951,4953}: with 'si' inserting char after completion goes wrong
2022-05-14 22:30:02 +08:00
107694acdc vim-patch:8.2.4953: with 'si' inserting '}' after completion goes wrong
Problem:    With 'smartindent' inserting '}' after completion goes wrong.
Solution:   Check the cursor is in indent.  (closes vim/vim#10420)
2e444bbef0
(cherry picked from commit dca0412d37)
2022-05-14 13:44:11 +00:00
58dd142090 vim-patch:8.2.4951: smart indenting done when not enabled
Problem:    Smart indenting done when not enabled.
Solution:   Check option values before setting can_si. (closes vim/vim#10420)
de5cf28781
(cherry picked from commit 24eb1af475)
2022-05-14 13:44:11 +00:00
8b63e3dc6d Merge pull request #18569 from neovim/backport-18180-to-release-0.7
[Backport release-0.7] vim-patch:8.2.{0358,4792,4794}: indent operator creates an undo entry for every line
2022-05-14 21:15:40 +08:00
7d4ab102a6 vim-patch:8.2.4794: compiler warning for not initialized variable
Problem:    Compiler warning for not initialized variable.
Solution:   Initialize the variable. (John Marriott)
4c84dd33ad
(cherry picked from commit f9c8ba0b85)
2022-05-14 12:50:35 +00:00
31307c3877 vim-patch:8.2.4792: indent operator creates an undo entry for every line
Problem:    Indent operator creates an undo entry for every line.
Solution:   Create one undo entry for all lines. (closes vim/vim#10227)
e468698994
(cherry picked from commit f8b832b171)
2022-05-14 12:50:35 +00:00
4e4e185405 vim-patch:8.2.0358: insufficient testing for indent.c
Problem:    Insufficient testing for indent.c.
Solution:   Add indent tests. (Yegappan Lakshmanan, closes vim/vim#5736)
bd7206e02c

Cherry-pick Test_ex_mode() changes from Vim patches 8.2.{0342,0347}.
Reorder test_expand_func.vim to match upstream.

(cherry picked from commit c72857d396)
2022-05-14 12:50:35 +00:00
aba7cb0613 Merge pull request #18552 from neovim/backport-18545-to-release-0.7
[Backport release-0.7] vim-patch:8.2.4943: changing 'switchbuf' may have no effect
2022-05-13 08:39:37 +08:00
56d05076f8 vim-patch:8.2.4943: changing 'switchbuf' may have no effect
Problem:    Changing 'switchbuf' may have no effect.
Solution:   Handle 'switchbuf' in didset_string_options(). (Sean Dewar,
            closes vim/vim#10406)
39c46b4378

Guess it doesn't hurt to cherry-pick didset_string_options from v8.1.2045
(but in option.c, for now).

(cherry picked from commit 809790b9f6)
2022-05-12 23:41:54 +00:00
496e786cad Merge pull request #18534 from neovim/backport-18480-to-release-0.7
[Backport release-0.7] fix(runtime/genvimvim): omit s[ubstitute] from vimCommand
2022-05-12 10:09:48 +08:00
0377973769 fix(runtime/genvimvim): omit s[ubstitute] from vimCommand
It's special cased by the vimSubst syntax group, and isn't present in Vim's
vimCommand group.

For example, this fixes `call s:Foo()` highlighting `:` as Error in Nvim, as the
`s` is parsed as vimCommand rather than as vimUserFunc since
`contains=vimCommand` was added to vimUserFunc (and vimFunc) in a rt update.

Interestingly, `g:`, `l:`, etc. have the same issues due to :global, :list, etc.
Vim also has that problem, so it should ideally be fixed upstream.

We could also omit g[lobal] from vimCommand and rely on vimGlobal instead, but
it doesn't work in some cases, like when there's a `:` before the command. Also,
Vim matches only `g` in vimCommand for some reason, which doesn't produce any
highlight for `:global/foo/bar` (with Nvim you at least get some highlights on
the `global` bit despite the leading `:`).

Also, remove special handling of :py3 in syntax/vim.vim, as the generator seems
to have no problems finding it.

(cherry picked from commit 53780d9fd0)
2022-05-12 00:09:01 +00:00
35075dcc22 [Backport release-0.7] fix(lsp): fix unnecessary buffers being added on empty diagnostics (#18469)
* fix(lsp): fix unnecessary buffers being added on empty diagnostics

Some language servers send empty `textDocument/publishDiagnostics`
messages after indexing the project, sometimes resulting in creation
of a lot of unnecessary buffers. As a workaround, skip empty messages
for nonexistent buffers before resolving the filename to a bufnr.

(cherry picked from commit 26eb6785eb)

* Add test

(cherry picked from commit d2e9dab377)

Co-authored-by: ii14 <ii14@users.noreply.github.com>
2022-05-08 11:27:30 +02:00
9e040acfa3 fix(lsp): unify progress message handling (#18468)
The LSP progress handler would put non-progress messages (such as from
clangd or pyls; not part of the LSP spec) directly into
`client.messages`, while `vim.lsp.util.get_progress_messages()` would
try to fetch them from `client.messages.messages` instead (and come up
empty everytime). This would result in these messages never being
cleaned up by `get_progress_messages()`.

This commit fixes that by treating those messages like show-once
progress messages (by setting `done=true` immediately).

(cherry picked from commit 2087960c76)

Co-authored-by: Patrice Peterson <patrice.peterson@mailbox.org>
2022-05-08 11:27:22 +02:00
28c08fdbe3 Merge pull request #18473 from neovim/backport-18472-to-release-0.7
[Backport release-0.7] vim-patch:8.2.4908: no text formatting for // comment after a statement
2022-05-08 08:17:36 +08:00
37b82b513c vim-patch:8.2.4908: no text formatting for // comment after a statement
Problem:    No text formatting for // comment after a statement.
Solution:   format a comment when the 'c' flag is in 'formatoptions'.
48a8a83303
(cherry picked from commit a74c08d524)
2022-05-07 23:51:48 +00:00
8a23b8ed29 vim-patch:8.2.4907: some users do not want a line comment always inserted (#18464)
Problem:    Some users do not want a line comment always inserted.
Solution:   Add the '/' flag to 'formatoptions' to not repeat the comment
            leader after a statement when using "o".
2bf875f881
(cherry picked from commit d4b9aa4f8e)

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
2022-05-07 17:39:28 +02:00
7990fa4a17 Merge pull request #18446 from neovim/backport-18445-to-release-0.7
[Backport release-0.7] vim-patch:8.2.4881: "P" in Visual mode still changes some registers
2022-05-06 19:55:21 +08:00
ca3ef915ce vim-patch:8.2.4881: "P" in Visual mode still changes some registers
Problem:    "P" in Visual mode still changes some registers.
Solution:   Make "P" in Visual mode not change any register. (Shougo
            Matsushita, closes vim/vim#10349)
509142ab7a
(cherry picked from commit 28c74ef687)
2022-05-06 11:27:01 +00:00
0b8faccade feat(api): add group_name to nvim_get_autocmds (#18440)
(cherry picked from commit 96289f2416)

Co-authored-by: Famiu Haque <famiuhaque@protonmail.com>
2022-05-05 21:00:33 +02:00
b7a5278249 feat(api): add group_name to nvim_get_autocmds (#18440)
(cherry picked from commit 96289f2416)

Co-authored-by: Famiu Haque <famiuhaque@protonmail.com>
2022-05-05 20:59:45 +02:00
e28799f2d8 fix: display global statusline correctly with ext_messages (#18436)
(cherry picked from commit b5957c3c32)

Co-authored-by: shirasaka <shirasaka@n-create.co.jp>
2022-05-05 19:00:35 +02:00
c4690565c7 Merge pull request #18422 from neovim/backport-18420-to-release-0.7
[Backport release-0.7] vim-patch:8.2.4868: when closing help window autocmds triggered for wrong window
2022-05-05 08:29:47 +08:00
15b8036f90 vim-patch:8.2.4868: when closing help window autocmds triggered for wrong window
Problem:    When closing help window autocmds triggered for the wrong window.
Solution:   Figure out the new current window earlier. (closes vim/vim#10348)
2a2707d033
(cherry picked from commit 71580dfef4)
2022-05-04 23:27:22 +00:00
7f08e3282f Merge pull request #18421 from neovim/backport-18418-to-release-0.7
[Backport release-0.7] vim-patch:8.2.4865: :startinsert right after :stopinsert may not work
2022-05-05 07:21:55 +08:00
3b4881afc2 vim-patch:8.2.4865: :startinsert right after :stopinsert may not work
Problem:    :startinsert right after :stopinsert does not work when popup menu
            is still visible.
Solution:   Use ins_compl_active() instead of pum_visible(). (closes vim/vim#10352)
cd5dbad184
(cherry picked from commit 97d86c45af)
2022-05-04 22:58:56 +00:00
1e28068d0d fix: ensure has() does not change v:shell_error (#18415)
(cherry picked from commit 0f21816b5f)

Co-authored-by: Andrey Mishchenko <mishchea@gmail.com>
2022-05-04 08:17:59 -07:00
203b088d75 [Backport release-0.7] build(deps): bump LuaJIT to HEAD - 91bc6b8ad (#18411)
* build(deps): bump LuaJIT to HEAD - 91bc6b8ad

(cherry picked from commit a0c10f6b67)

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
2022-05-04 10:21:42 +02:00
f179729789 refactor(lua): replace hard-coded gsub with vim.pesc() (#18410)
(cherry picked from commit b4c7f763f9)

Co-authored-by: James McCoy <jamessan@jamessan.com>
2022-05-04 08:57:41 +02:00
e502e8106a fix(treesitter): bump match limit up (#18400)
This avoids ignoring too many match results, and avoid highlighting
being blank in some files.

(cherry picked from commit e453b6391e)

Co-authored-by: Thomas Vigouroux <thomas.vigouroux@protonmail.com>
2022-05-03 22:58:02 +02:00
7567d2195a Merge pull request #18390 from neovim/backport-18382-to-release-0.7
[Backport release-0.7] fix(lsp): add missing bufnr argument to util.apply_text_edits
2022-05-03 22:33:01 +08:00
a10a904b8f Merge pull request #18391 from neovim/backport-18384-to-release-0.7
[Backport release-0.7] ci(MinGW): run pacman -Syu twice
2022-05-03 22:31:00 +08:00
3868c8db6f ci(MinGW): run pacman -Syu twice
(cherry picked from commit d4994a4e0f)
2022-05-03 14:29:41 +00:00
d165289055 fix(lsp): add missing bufnr argument
(cherry picked from commit 80cea05de0)
2022-05-03 14:29:08 +00:00
f3587babfd Merge pull request #18367 from neovim/backport-18353-to-release-0.7 2022-05-02 11:23:25 -04:00
631393a712 fix(filetype.lua): escape expansion of ~ when used as a pattern
(cherry picked from commit 88595fbb21)
2022-05-02 15:02:23 +00:00
08cd391047 [Backport release-0.7] fix(shared): avoid indexing unindexable values in vim.tbl_get() (#18360)
* fix(shared): avoid indexing unindexable values in vim.tbl_get()

(cherry picked from commit 95ec38dc8d)

* test: add more unindexable types

(cherry picked from commit 7dccdefce4)

Co-authored-by: William Boman <william@redwill.se>
2022-05-02 13:40:49 +02:00
508c8a597e fix(ftdetect): source plugins in autogroup (#18362)
(cherry picked from commit 244b371a18)

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
2022-05-02 13:17:05 +02:00
ffd46b7688 Merge pull request #18351 from neovim/backport-18294-to-release-0.7
[Backport release-0.7] fix(mac): use same $LANG fallback mechanism as Vim
2022-05-02 00:17:36 -04:00
2a6198319f fix(mac): use same $LANG fallback mechanism as Vim
In a locale "en_US", "en" is the language and "US" is the region.

Before this change, we were too clever for our own good and tried to handle the
region as well. But if the macOS primary language is set to "English" and the
region to "Norway", we would end up with "en_NO", which is a locale that does
not exist.

Now we only take the language into account. Taking the example from above would
yield "en_US", which is a sensible fallback.

If the region is important to you, set $LANG and the more specific LC_*
variables in your shell config or alternatively use `:help :language`.

References https://github.com/neovim/neovim/issues/18292

(cherry picked from commit e038625b87)
2022-05-01 23:15:48 +00:00
8d4fbcb5b1 Merge pull request #18324 from neovim/backport-18318-to-release-0.7
[Backport release-0.7] fix(tui): disable extended keys before exiting alternate screen
2022-04-30 22:22:35 +08:00
b80ef0de2f fix(tui): disable extended keys before exiting alternate screen
(cherry picked from commit 2660622865)
2022-04-30 14:18:44 +00:00
14a5b6b8d4 Merge pull request #18312 from neovim/backport-18310-to-release-0.7
[Backport release-0.7] fix(input): only disable mapped CTRL-C interrupts when getting input
2022-04-30 14:01:51 +08:00
89260ea5d6 fix(input): only disable mapped CTRL-C interrupts when getting input
(cherry picked from commit f3330023a5)
2022-04-30 05:20:40 +00:00
ef43e7d1f6 fix: suppress "is a directory" messages with shortmess 'F' (#18298)
When 'F' is in 'shortmess', don't show messages when editing a
directory. This fixes a regression introduced by 0956283.

(cherry picked from commit c9f90ee687)

Co-authored-by: Gregory Anders <greg@gpanders.com>
2022-04-28 15:35:03 -06:00
9e5cef945a feat(tui): query terminal for CSI u support (#18264)
On startup query the terminal for CSI u support and enable it using
the escape sequence from kitty's progressive enhancement protocol [1].

[1]: https://sw.kovidgoyal.net/kitty/keyboard-protocol/

(cherry picked from commit 797a25252c)

Co-authored-by: Gregory Anders <greg@gpanders.com>
2022-04-25 21:22:23 -06:00
aff05c5730 fix: show autocmd output when F is in shortmess (#18256)
The default value of including F in 'shortmess' has the unfortunate side
effect of hiding output from autocommands. This is a common source of
confusion and often leads people to think their autocommands are not
working when they are. There is a small snippet in the docs for
'shortmess' indicating that the F flag suppresses autocmd output, but
it's not easy to find if you don't already know to look for it.

This commit removes that behavior of the F flag to make it only suppress
file info when opening a new file.

(cherry picked from commit 09562839c3)

Co-authored-by: Gregory Anders <greg@gpanders.com>
2022-04-25 09:14:53 -06:00
fa7d8c333f Merge pull request #18229 from zeertzjq/backport-18227-to-release-0.7
[Backport release-0.7] fix(lua): don't mutate opts parameter of vim.keymap.del (#18227)
2022-04-23 08:41:47 +08:00
d916d2f876 fix(lua): don't mutate opts parameter of vim.keymap.del (#18227)
`vim.keymap.del` takes an `opts` parameter that lets caller refer to and
delete buffer-local mappings. For some reason the implementation of
`vim.keymap.del` mutates the table that is passed in, setting
`opts.buffer` to `nil`. This is wrong and also undocumented.

(cherry picked from commit 51f33ae5c0)
2022-04-23 08:03:06 +08:00
f7e2ad7915 [Backport release-0.7] fix(treesitter): create new parser if language is not the same as cached parser (#18220)
* fix(treesitter): create new parser if language is not the same as cached parser

Fixes #18148

(cherry picked from commit 8e35894fc2)

* test: create new parser in vim.treesitter.get_parser() when filetype changes

(cherry picked from commit 30e7b3f0a2)

Co-authored-by: Chinmay Dalal <dalal.chinmay.0101@gmail.com>
2022-04-22 16:47:00 +02:00
7f8faac39e fix(diagnostic): use nvim_exec_autocmds to trigger DiagnosticChanged (#18205)
Use nvim_exec_autocmds to issue the DiagnosticChanged autocommand,
rather than nvim_buf_call, which has some side effects when drawing
statuslines.

(cherry picked from commit 4a64ce140f)

Co-authored-by: Gregory Anders <greg@gpanders.com>
2022-04-21 07:07:03 -06:00
0302c351e7 Merge pull request #18208 from neovim/backport-18182-to-release-0.7
[Backport release-0.7] vim-patch:8.1.1756,8.2.{2472,2474,2475,2476,2477,4791,4802}: autocommand fixes
2022-04-21 20:03:12 +08:00
0298652c30 vim-patch:8.2.4802: test is not cleaned up
Problem:    Test is not cleaned up.
Solution:   Make test clean up after itself.  Avoid NUL. (closes vim/vim#10233)
7851c69a12

Adapt test_autocmd_vimgrep() to Nvim.

(cherry picked from commit 5e9afca1c1)
2022-04-21 11:43:40 +00:00
1a84384487 test: add a Lua functional test for NoName buffer event order
(cherry picked from commit e69cb86750)
2022-04-21 11:43:40 +00:00
91a326f474 vim-patch:8.2.4791: events triggered in different order when reusing buffer
Problem:    Autocmd events triggered in different order when reusing an empty
            buffer.
Solution:   Call buff_freeall() earlier. (Charlie Groves, closes vim/vim#10198)
fef4485ef5

Test failure becomes very strange.

(cherry picked from commit f531fb97ff)
2022-04-21 11:43:40 +00:00
e8e8827868 vim-patch:8.2.2477: autocommand tests hang on MS-Windows
Problem:    Autocommand tests hang on MS-Windows.
Solution:   Skip a couple of tests.  Fix file name.
dd07c02232
(cherry picked from commit 69fc23ed98)
2022-04-21 11:43:40 +00:00
82782ba593 vim-patch:8.2.2476: using freed memory when splitting window while closing buffer
Problem:    Using freed memory when using an autocommand to split a window
            while a buffer is being closed.
Solution:   Disallow splitting when the buffer has b_locked_split set.
983d83ff1c

Put the error message in window.c.
Cherry-pick a memory leak fix from Vim patch 8.2.0399.
Test still fails.

(cherry picked from commit 1664e3d4bc)
2022-04-21 11:43:40 +00:00
36b9f5edce vim-patch:8.2.2475: autocommand tests hangs on MS-Windows
Problem:    Autocommand tests hangs on MS-Windows.
Solution:   Skip one test.
dfc3db76b9
(cherry picked from commit 407be5975d)
2022-04-21 11:43:40 +00:00
a111b048d2 vim-patch:8.2.2474: using freed memory when window is closed by autocommand
Problem:    Using freed memory when window is closed by autocommand.
            (houyunsong)
Solution:   Check the window pointer is still valid.
2c7080bf1c

Add missing comment from Vim patch 8.0.1420.
Test fails.

(cherry picked from commit 69ac382a28)
2022-04-21 11:43:40 +00:00
148e225231 vim-patch:8.2.2472: crash when using command line window in an autocommand
Problem:    Crash when using command line window in an autocommand.
            (houyunsong)
Solution:   Save and restore au_new_curbuf.
aad5f9d79a

Nvim has removed :open, so use :edit in the test instead.

(cherry picked from commit fa15f2f938)
2022-04-21 11:43:40 +00:00
106fcd1e90 vim-patch:8.1.1756: autocommand that splits window messes up window layout
Problem:    Autocommand that splits window messes up window layout.
Solution:   Disallow splitting a window while closing one.  In ":all" give an
            error when moving a window will not work.
1417c766f5

Expected error number was changed to E242 in Vim in patch 8.2.1183, and
patch 8.2.2420 (which has already been ported) made the test no longer
throw E249 in Vim, so just use E242 in the test.

(cherry picked from commit 9b10b4cc64)
2022-04-21 11:43:40 +00:00
27c52616de Merge pull request #18202 from neovim/backport-18200-to-release-0.7
[Backport release-0.7] docs: vim.keymap.set can specify buffer as an option
2022-04-21 17:33:12 +08:00
c8f01db8f6 docs: vim.keymap.set can specify buffer as an option
(cherry picked from commit 5ecbbba6ee)
2022-04-21 09:32:27 +00:00
3ee089ebf4 Merge pull request #18167 from neovim/backport-18158-to-release-0.7
[Backport release-0.7] fix(tui): update modifyOtherKeys reporting
2022-04-19 11:11:39 +08:00
0f811afc96 fix(tui): update modifyOtherKeys reporting
* Use the Eneks and Dseks terminfo attributes if they exist
* Add VTE versions below 0.54.0 to the blacklist

(cherry picked from commit 56a1a7ca16)
2022-04-19 02:40:30 +00:00
555ded8e82 Merge pull request #18156 from zeertzjq/backport-to-release-0.7
Backport to release-0.7
2022-04-18 11:38:22 +08:00
98ecc6a74c test: add a test for #18135
(cherry picked from commit f823dce100)
2022-04-18 07:40:06 +08:00
30800ea73b vim-patch:8.2.0791: a second popup window with terminal causes trouble
Problem:    A second popup window with terminal causes trouble.
Solution:   Disallow opening a second terminal-popup window. (closes vim/vim#6101,
            closes vim/vim#6103) Avoid defaulting to an invalid line number.
b5383b174b

This is the only applicable hunk.

(cherry picked from commit 2116ff47ea)
2022-04-18 07:40:06 +08:00
c3623fcda6 fix(paste): ignore mappings in Cmdline mode (#18114)
(cherry picked from commit 813ecdac79)
2022-04-18 07:40:06 +08:00
1041cc7ccb vim-patch:8.2.4762: using freed memory using synstack() and synID() in WinEnter (#18136)
Problem:    Using freed memory when using synstack() and synID() in WinEnter.
Solution:   Check using the syntax window. (closes vim/vim#10204)
ca7e86c237
(cherry picked from commit dcf7bc4140)
2022-04-18 07:40:06 +08:00
dcaaeec8a4 chore: remove vestigial sfname freeing (#18123)
This freeing is necessary in Vim since the alloc can fail. Since we're
using xcalloc, that's not possible and the freeing will never run.

(cherry picked from commit 3f2e9298bd)
2022-04-18 07:40:06 +08:00
c68d9321e7 vim-patch:8.2.4752: wrong 'statusline' value can cause illegal memory access (#18117)
Problem:    Wrong 'statusline' value can cause illegal memory access.
Solution:   Properly check the value. (closes vim/vim#10192)
5dc294a7b6

Make two error messages static variables.

(cherry picked from commit 08a144912c)
2022-04-18 07:40:06 +08:00
b5953d4484 version bump 2022-04-17 20:00:12 +02:00
333ba6569d NVIM 0.7
BREAKING CHANGES

* Support for Python 2 is dropped. For Python 3, the minimum supported version is 3.6. Legacy `:pythonx` commands are still available, and always uses the python 3 provider.

* api: Existing usages of `nvim_buf_set_text` that use negative line numbers will be off-by-one.
* highlight: signature of `vim.highlight.range` was changed.

* input: distinguish between some input keys which previously were synonyms. This will break some exiting mappings.

- `<cr>`, `<tab>` and `<esc>` are no longer considered equivalent to `<c-m>`, `<c-i>` and `<c-[`> respectively. In case the terminal or GUI supports distinguishing these keys, these can now be mapped separately. But even if the terminal only can send one code you might still need to change what variant is used in the config.

FEATURES

Core APIs:

* api: add support for lua function & description in keymap
* api: add api and lua autocmds
* api: nvim_clear_autocmd
* api: pass args table to autocommand callbacks
* api: remove Lua autocommand callbacks when they return true
* api: implement nvim_{add,del}_user_command
* api: implement nvim_buf_get_text
* api: add nvim_get_option_value

* highlight: ns=0 to set :highlight namespace
* highlight: support for blend in nvim_set_hl
* api: add strikethrough, nocombine to set_hl
* api: relax statusline fillchar width check

Lua:

* lua: add vim.keymap
* lua: add vim.spell
* lua: add proper support of luv threads
* lua: make :lua =expr print result of expr
* lua: handle lazy submodules in `:lua vim.` wildmenu completion
* lua: add notify_once()
* lua: add support for multiple optional types in vim.validate
* lua: show proper verbose output for lua configuration
* lua: more conversions between LuaRef and Vim Funcref
* lua: support converting nested Funcref back to LuaRef
* call __tostring on lua errors if possible before reporting to user

* filetype.lua
* filetype.lua: add support for files under .git
* filetype.lua: add support for patch files
* filetype.lua: add support for tmux.conf files
* filetype.lua: add support for txt files
* filetype.lua: Add typescript extension to filetype detection
* filetype.lua: fix .cc file not detected
* filetype.lua: fix .env file not detected
* filetype: convert patterns for mail buffers
* filetype: support scripts.vim with filetype.lua

UI and decorations:

* decorations: support signs
* extmarks: add strict option
* api: expose extmark more details
* api: expose extmark right_gravity and end_right_gravity
* use nvim_buf_set_extmark for vim.highlight
* statusline: support multibyte fillchar
* add support for global statusline

Treesitter:

* ui: allow conceal to be defined in decorations and tree-sitter queries
* tree-sitter: allow Atom-style capture fallbacks
* treesitter: add more default groups to highlight map
* treesitter: multiline match predicates
* treesitter: set allocator when possible
* ts: add support for multiline nodes in get_node_text
* ts: expose minimum language version to lua
* runtime: add query filetype

LSP and diagnostic:

* diagnostic: add "code" to the diagnostic structure
* diagnostic: allow retrieving current diagnostic config
* lsp,diagnostic: open folds in jump-related functions
* lsp: add buf_detach_client
* lsp: add handler for workspace/workspaceFolders
* lsp: dynamically generate list title in response_to_list
* lsp: enable default debounce of 150 ms
* lsp: skip or reduce debounce after idle
* lsp: use `vim.ui.select` for selecting lsp client

Initial work to support remote TUI (and ui client library):

* ui_client: connect to remote ui
* ui_client: implement event handlers
* ui_client: handle resize events
* ui_client: implement async paste handling
* ui_client: pass user input to remote server

* --headless: add on_print callback to stdioopen
* add autocommand event when search wraps around
* add vim.tbl_get
* autocmd: add Recording autocmds
* autocmd: populate v:event in RecordingLeave
* completion: support selecting item via API from Lua mapping
* eval/method: partially port v8.1.1993
* eval/method: partially port v8.1.1996
* eval/method: partially port v8.1.2004
* eval: partially port v8.2.0878
* eval: port emsg from v8.2.3284
* events: add DirChangedPre
* events: support SIGWINCH for Signal event
* hardcopy: check gui colours for highlights first
* highlight: support color names for cterm
* ignore nore on <Plug> maps
* input: delay some conversions to vgetc()
* input: enable <tab>/<c-i>, <cr>/<c-m>, <esc>/<c-[> pairs unconditionally
* keymap: add F38-F63 keys
* keymap: return nil from an expr keymap
* mappings: considering map description when filtering
* provider: remove support for python2 and python3.[3-5]
* remote: add basic --remote support
* runtime: import cleanadd.vim from Vim
* runtime: include Lua in C++ ftplugin
* runtime: new checkhealth filetype
* term: use vterm_output_set_callback()
* test: use nvim_exec in helpers.source()
* trigger ModeChanged for terminal modes
* tui: add error logging
* tui: add support for `CSI 4 : [2,4,5] m`
* tui: enable CSI u keys
* vim-patch.sh: support additional args for -s

Performance Improvements

* lsp: request only changed portions of the buffer in changetracking
* only redraw concealed line if cursor has moved horizontally
* pre-compile embedded Lua source into bytecode
* screen: reduce cursorline redrawing when jumping around
* treesitter: cache query parsing
* api: elide luaref copy when setting 'callback' in nvim_set_keymap

BUG FIXES

* --headless: do not block on press-enter prompts when no UI
* <Nop> not shown in :map commands
* add forkpty for SunOS variants
* add STRNLEN compatability macro
* anonymous sid not working
* api, lua: return NIL on failure to find converted function
* api/nvim_win_call: share common win_execute logic
* api: allow empty list for cterm in nvim_set_hl
* api: allow nvim_buf_set_extmark to accept end_row key
* api: convert blob to NUL-terminated API string
* api: correctly handle negative line numbers for nvim_buf_set_text
* api: correctly pass f-args for nvim_create_user_command
* api: delete all autocmds with the same ID
* api: force redefinition of user commands by default
* api: highlight attribute for underline
* api: improve autocmd error handling
* api: include event in get_autocmds
* api: make nil value in nvim_set_option_value clear local value
* api: nvim__set_hl_ns causes extra redraws
* api: nvim_win_set_cursor() redraw for cursorline and statusline
* api: re-route nvim_get_runtime_file errors
* api: use changedir_func() in nvim_set_current_dir()
* api: validate command names in nvim_add_user_command
* api: validate user_command name
* append test for checking zero width node range
* aucmd_win: always make aucmd_win the last window
* aucmd_win: ensure aucmd_win stays floating
* autocmd: clean up autocmds only when needed
* autocmd: restore autocmd showing behavior
* autoload variables not loaded with vim.g & nvim_get_var
* bounds check for underdot
* build: check for empty value of LUAC_PRG
* build: check that LuaJIT has required modules for compilation
* build: install luajit modules on windows
* channel: fix channel consistency
* check for interrupt in nvim_echo, write_msg and nlua_print
* checkhealth: make provider checkhealth output more consistent
* ci/backport: check for event_name == "pull_request_target"
* ci: provide necessary permissions for calling workflow
* clang/'Dead store': do not assign endcol
* close floating windows when calling win_close()
* completion: prevent K_LUA from closing pum
* completion: update submode message when selecting from API
* correct vertical dragging room calculation with global statusline
* coverity/175977: big parameter passed by value
* coverity/188749: nullify pointer to fix use-after-free
* coverity/340720: error if nvim_eval_statusline given invalid winid
* coverity: dead code and operands don't affect result
* decorations: do not put empty virt_text
* define NAME_MAX from _XOPEN_NAME_MAX
* diagnostic: allow setting arbitrary config values
* diagnostic: assert that diagnostics have line number and column
* diagnostic: clamp diagnostics on negative line numbers
* diagnostic: escape special chars in file names
* diagnostic: improve validation for list arguments
* diagnostic: make `open_float` respect global diagnostic options
* diagnostic: only set default handler config if unset
* diagnostic: resolve nil opts tables
* diagnostic: respect "if_many" source option for virtual text
* diagnostic: set effective buffer number for DiagnosticChanged autocmd
* diagnostic: set effective buffer number in autocmd (again)
* diagnostic: use botright copen for qflist
* diff: make algorithm work for vim.diff
* do not cast offset to char_u
* do not pass aucmd to the callback
* do not save K_EVENT as lastc in Insert mode
* docs: add bufnr and user_data to diagnostic-structure
* docs: spelling in new underlines docs
* don't include pty.h on SunOS
* don't use cfsetspeed, use i and o variants
* enable filetype detection and syntax highlighting with --clean
* eval/method: add missing method support for existing built-ins
* eval: v:lua support for `-` in module names
* event-loop: call vpeekc() directly first to check for character
* event-loop: check if executed register has ended
* event-loop: duplicate display updating logic in vgetorpeek()
* events: make v:event readonly in more events
* ex_normal: spam \n in Ex mode only if in Cmdline mode
* extmarks: fix signs
* extmarks: splice extmarks on accepting spell
* filetype.lua: always return a string in getline helper function
* filetype: expand tildes in filetype patterns
* filetype: fix foam pattern detection
* filetype: match negative priority patterns after extensions
* filetype: match on <afile> rather than <abuf>
* filetype: normalize slashes in file paths
* filetype: set default ft_ignore_pat in filetype.lua
* float: do not switch window before deleting last listed buffer
* float: don't always switch window when deleting last listed buffer
* float: handle buffer deletion with floating windows
* float: make laststatus=1 behave consistently with floating windows
* healthcheck: handle empty reports
* health: do not run external processes in a shell
* highlight: accept NONE as a color name
* highlight: allow globals to be cleared
* highlight: always update window highlight if highlight changed
* inccommand: do not change reg_prev_sub when previewing
* input: do not translate scroll keys into multiclicks
* input: fix clearing of reg_executing
* input: never escape CSI bytes
* input: put modifiers back into typeahead buffer when needed
* input: remove reinterpreted ALT/META chords from recorded macro
* keymap: don't coerce false to ''
* keywordprg: retain terminal buffer after K
* line continuation: set growsize to correct value
* lsp and diagnostic highlight priority
* lsp: always split text edits on \r, \r\n, and \n
* lsp: always use target bufnr in location handler
* lsp: avoid attaching to unloaded buffers
* lsp: avoid nil workspace/symbol query
* lsp: call config on_exit handler before context is cleared
* lsp: correct prefix when filterText is present
* lsp: correctly align start and end range to codepoints during incremental sync
* lsp: create lsp requests with position offsets considering client encoding
* lsp: ensure pending changes are flushed on skipped debounce
* lsp: explicitly pass bufnr in didSave handler
* lsp: fetch offset_encoding from client in references
* lsp: fix `nil`-index behavior for UTF-8 in `_str_*index_enc` methods
* lsp: fix applying multiple out-of-range TextEdits
* lsp: fix lookup of boolean values in workspace/configuration
* lsp: forward offset_encoding in rename handler
* lsp: forward offset_encoding to apply_text_edits
* lsp: handle insertion of previous line
* lsp: handle negative activeSignature in signatureHelp
* lsp: only send valid params in executeCommand
* lsp: pass offset_encoding in formatexpr()
* lsp: progress handlers should return vim.NIL on error
* lsp: resolve bufnr for get_lines
* lsp: resolve nil bufnr
* lsp: respect all of 'fixeol', 'eol', and 'binary' applying edits
* lsp: set tabSize from 'shiftwidth', not 'softtabstop'
* lsp: start incremental sync range at previous newline character
* lsp: strictly enforce passing offset encoding
* lsp: suppress ContentModified errors from UI
* lsp: use "text" filetype for plaintext
* lsp: use botright copen for all handlers
* lua: don't use nlua_error when exiting early
* lua: print multiple return values with =expr
* lua: restore priority of the preloader
* lua: stricter type check when calling API function
* make mode() return correct value in ex mode
* man.vim: fix search function on some systems
* man.vim: support calling :Man without a section again
* msgpack#strptime: use calendar.timegm to get seconds since epoch
* ops: str_to_reg passing NULL to memcpy
* options: disallow empty 'fdc' and 'scl'
* paste: avoid edges cases caused by empty chunk
* paste: deal with eol and eof in Visual mode
* paste: deal with trailing new line in chunk
* paste: don't move cursor past the end of pasted text in Normal mode
* paste: escape control characters in Cmdline mode
* paste: use getcmdtype() to determine whether in cmdline mode
* prompt: add missing changes from v8.1.0036
* pty_process_win/wait_eof_timer_cb: also check for proc->out.did_eof
* pum_redraw: use grid_puts_len() to truncate the text
* PVS/V1019: compound assignment expression is used inside condition
* PVS/V560: ignore false "conditional expression is always false"
* PVS/V583: the '?:' operator always returns one and the same value
* query.lua: check empty table for lines
* quickfix: avoid O(N^2) when filling from string typval
* remote: make compile again
* remote: report connection error, missing return values
* remote: report on missing wait commands, typecheck lua results
* remote: respect silent in error reporting
* remote: use STATIC_CSTR_AS_STRING
* resolve nil arguments to API functions
* respect os_proc_children rv of pid not found
* runtime: add missing release metadata
* runtime: add syntax file for query
* runtime: check markdownError before syn-clear
* screen: do not do syntax highlighting at filler or folded lines
* screen: do not draw filler lines post eof if already at last row
* screen: do not update syntax_last_parsed when drawing folded line
* screen: don't put empty sign text in line number column
* screenpos, float: add top and left border adjustment
* screen: truncate double-width character correctly
* screen: truncate when overwriting right half of a double-width char
* set nested before executing callback
* set RedrawingDisabled before entering aucmd_win
* signcol: always trigger a redraw
* signcol: handle edge case with maximum value
* signcol: update cursor when signcol changes
* skip libutil on SunOS
* substitute: properly check for empty command line
* syntax.c: correct hunk from Vim patch 8.0.0647
* syntax: remove trailing spaces in vim.vim
* tabpage: correct check for failure to close window
* termdebug: handle exiting during startup properly
* terminal: correctly forward mouse events
* terminal: fix resize crash with pending scrollback
* terminal: ignore left-release mouse action
* terminal: return early if there are no invalid rows
* terminal: use coladvance() to calculate buffer cursor position
* test: only use buffer completion in popupmenu timer test
* tests: update legacy tab switch test to be sane
* translation: po file for Russian
* translation: po file for Ukrainian
* ts: escape lang when loading parsers
* tui: avoid using uninitialized memory in kitty
* tui: correct CSI sequence
* tui: end streamed paste correctly when key buffer is empty
* tui: remove `ESC NUL` forced escape
* ui: close floating window on BufLeave event
* ui: inccomand performance degradation
* ui: make window resize commands manage cmdheight
* update last cursor on first CursorMoved
* uri: change scheme pattern to not include the comma character
* use normal! <C-L> in default <C-L> mapping
* vim-patch.sh: fix N/A files patterns
* win_close: count the window the be closed instead of curwin
* win_split_ins: do not fail when oldwin is not valid
2022-04-15 13:38:44 +02:00
e63e5d1dbd docs: typo fixes (#17859)
Co-authored-by: Elias Alves Moura <eliamoura.alves@gmail.com>
Co-authored-by: venkatesh <shariharanvenkatesh@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Vikas Raj <24727447+numToStr@users.noreply.github.com>
Co-authored-by: Steve Vermeulen <sfvermeulen@gmail.com>
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: rwxd <rwxd@pm.me>
Co-authored-by: casswedson <58050969+casswedson@users.noreply.github.com>
2022-04-15 12:35:06 +02:00
4503cb6b64 vim-patch:8.2.4750: small pieces of dead code (#18113)
Problem:    Small pieces of dead code.
Solution:   Remove the dead code. (Goc Dundar, closes vim/vim#10190) Rename the
            qftf_cb struct member to avoid confusion.
b836658a04
2022-04-15 17:15:47 +08:00
6160973f36 fix(lsp): fix lookup of boolean values in workspace/configuration (#18026) 2022-04-15 11:12:41 +02:00
8486c87e58 vim-patch:8.2.4747: no filetype override for .sys files (#18105)
Problem:    No filetype override for .sys files.
Solution:   Add g:filetype_sys. (Patrick Meiser-Knosowski, closes vim/vim#10181)
f420ff2440
2022-04-13 23:11:56 +02:00
a9cd9de01d Merge pull request #15972 from seandewar/vim-8.2.3487
vim-patch:8.2.{3416,3448,3470,3478,3480,3486,3487}
2022-04-13 20:50:44 +01:00
9a35704333 Merge pull request #15491 from Diomendius/lua_docs
docs(lua): fix, clarify Lua require() docs
2022-04-13 10:50:03 -06:00
9938740ca6 vim-patch:8.2.4746: supercollider filetype not recognized (#18102)
Problem:    Supercollider filetype not recognized.
Solution:   Match file extentions and check file contents to detect
            supercollider. (closes vim/vim#10142)
8cac20ed42
2022-04-13 17:04:38 +02:00
7d1142b7e7 fix(runtime): add syntax file for query (#18101)
followup to #17905: also use Lisp syntax for treesitter queries
2022-04-13 16:29:23 +02:00
e463eb8146 fix(api): correctly pass f-args for nvim_create_user_command (#18098)
Skip runs of whitespace and do not include `\` characters when
followed by another `\` or whitespace. This matches the behavior
of <f-args> when used with `:command`.
2022-04-13 08:04:56 -06:00
76e6b81b23 vim-patch:8.2.3487: illegal memory access if buffer name is very long
Problem:    Illegal memory access if buffer name is very long.
Solution:   Make sure not to go over the end of the buffer.
826bfe4bbd

Adjust the test to use :noswapfile, as Nvim fails to create the swap file on Windows due to the file
name's length (E303).

We don't have this behaviour on Linux as we get "[Permission denied]" from readfile(), so there is
no attempt to create the swap file. However, Vim doesn't try to create the swap file on Windows
either for a different reason: MAXPATHL in Vim for Windows is only 1024 (compared to Nvim's 4096 on
the Windows CI), so readfile() gives "Illegal file name" instead, thus not needing :noswapfile for
both cases.
2022-04-13 21:31:24 +08:00
fc954d0a61 vim-patch:8.2.3486: illegal memory access with invalid sequence of commands
Problem:    Illegal memory access with invalid sequence of commands.
Solution:   Do not call leave_block() when not in a try block. (closes vim/vim#8966)
            Reset did_emsg so that exception is shown as an error.
cce81e9673

Vim9script is N/A, which includes leave_block.
2022-04-13 21:28:05 +08:00
789558d365 vim-patch:8.2.3480: test does not fail without the fix for a crash
Problem:    Test does not fail without the fix for a crash.
Solution:   Write the bad code in a file and source it. (Dominique Pellé,
            closes vim/vim#8961)
949de97da3
2022-04-13 21:27:38 +08:00
5feb8cdbb4 vim-patch:8.2.3478: still crash with error in :catch and also in :finally
Problem:    Still crash with error in :catch and also in :finally.
Solution:   Only call finish_exception() once. (closes vim/vim#8954)
f67d3fb736

Exclude CSF_FUNC_DEF change (Vim9script).
2022-04-13 21:15:24 +08:00
6415051796 refactor(ex_eval): cherry-pick CSF flags changes from v8.2.3099
4197828dc6

Cherry-pick the changes to existing flags values.
Required for v8.2.3478.

That patch mostly relates to Vim9script, but I'm careful not to mark it N/A in
case the flags have some use outside of Vim9 in the future.

Excludes CSF_FUNC_DEF (flag introduced in v8.2.1870 for Vim9's block scopes).
2022-04-13 21:15:24 +08:00
a25c35d6e4 vim-patch:8.2.3470: crash with error in :catch and also in :finally
Problem:    Crash with error in :catch and also in :finally.
Solution:   Only discard an exception if there is one. (closes vim/vim#8954)
a684a68409
2022-04-13 21:15:24 +08:00
93c72d866b vim-patch:8.2.3448: :endtry after function call that throws not found
Problem:    :endtry after function call that throws not found.
Solution:   Do check for following :endtry if an exception is being thrown.
            (closes vim/vim#8889)
1d34189ecb

Nvim obsoleted did_throw; check current_exception is not NULL instead.
2022-04-13 21:15:24 +08:00
b6026337f2 vim-patch:8.2.3416: second error is reported while exception is being thrown
Problem:    Second error is reported while exception is being thrown.
Solution:   Do not check for trailing characters when already aborting.
            (closes vim/vim#8842)
36f691f5f1
2022-04-13 21:15:24 +08:00
4dc09f38ee fix(translation): po file for Ukrainian (#18100) 2022-04-13 10:25:59 +02:00
18152cf6f1 Merge pull request #18092 from zeertzjq/test-termxx-no-pending
test: unskip tests skipped in #14661
2022-04-13 05:29:23 +08:00
bc19ae4e11 test: unskip tests skipped in #14661 2022-04-13 05:04:14 +08:00
4bef2f02e8 Merge pull request #17440 from zeertzjq/vim-8.2.3184
vim-patch:8.2.{3184,3226,3325}: digraph functions
2022-04-12 21:54:01 +08:00
c9d1fcd850 refactor(digraph.c): add more const qualifiers 2022-04-12 21:26:46 +08:00
b69ecacbb4 vim-patch:partial:a2baa73d1d33
Update runtime files.
a2baa73d1d

This only includes changes to docs of digraph functions.
2022-04-12 21:26:46 +08:00
0a813ae291 vim-patch:8.2.3325: digraph test fails when LC_ALL is set to "C"
Problem:    Digraph test fails when LC_ALL is set to "C".
Solution:   When restoring 'encoding' set it to "utf-8". (closes vim/vim#8742)
52eb372a04
2022-04-12 21:26:46 +08:00
3b0bcb8ad0 vim-patch:8.2.3226: new digraph functions use old naming scheme
Problem:    New digraph functions use old naming scheme.
Solution:   Use the digraph_ prefix. (Hirohito Higashi, closes vim/vim#8580)
29b857150c
2022-04-12 21:26:46 +08:00
cbc54cf484 vim-patch:8.2.3184: cannot add a digraph with a leading space
Problem:    Cannot add a digraph with a leading space.  It is not easy to list
            existing digraphs.
Solution:   Add setdigraph(), setdigraphlist(), getdigraph() and
            getdigraphlist(). (closes vim/vim#8580)
6106504e9e

Use GA_APPEND_VIA_PTR in registerdigraph().
Use tv_list_append_*() in getdigraphlist_appendpair().
Put the error messages in digraph.c.
E196 is N/A.
Remove mentions about 'encoding' being non-Unicode.
Nvim doesn't support setting encoding=japan, so skip a test.
2022-04-12 21:26:30 +08:00
7e1e906738 vim-patch:8.2.4739: accessing freed memory after WinScrolled autocmd event (#18090)
Problem:    Accessing freed memory after WinScrolled autocmd event.
Solution:   Check the window pointer is still valid. (closes vim/vim#10156)
            Remove the argument from may_trigger_winscrolled().
d58862d18f
2022-04-12 19:16:47 +08:00
dbd5242d8e Merge pull request #18075 from zeertzjq/vim-8.2.4713
vim-patch:8.2.4713: plugins cannot track text scrolling
2022-04-12 05:48:23 +08:00
6be4fd888c test: properly test WinScrolled event 2022-04-12 05:02:05 +08:00
53668a5815 vim-patch:8.2.4713: plugins cannot track text scrolling
Problem:    Plugins cannot track text scrolling.
Solution:   Add the WinScrolled event. (closes vim/vim#10102)
0937182d49

Skip User event in autocmd.txt, not needed unless #10689 is reverted.
2022-04-12 05:02:05 +08:00
10b40440dd test(old): fix mistakes in porting Vim patches 8.1.1362 and 8.1.1585 (#18080) 2022-04-12 04:56:15 +08:00
85b33fc042 vim-patch:8.2.4737: // in JavaScript string recognized as comment (#18083)
Problem:    // in JavaScript string recognized as comment.
Solution:   Only check for linecomment if 'cindent' is set. (closes vim/vim#10151)
1655619717
2022-04-11 22:50:17 +02:00
392cb7ac0c fix(lsp): pass offset_encoding in formatexpr() (#18084) 2022-04-11 12:44:31 -07:00
da31e953b6 docs(term.txt): add documentation about TUI input (#18072) 2022-04-11 23:22:04 +08:00
96b461a000 refactor(packaging): Windows: improve MSI, remove NSIS #18069
- Removed NSIS installer.
  - Prevents undefined behaviour when two installations are performed to the same directory (NSIS + MSI).
  - Reduced cost of maintaining two installers that do the same thing.
  - Chose Wix MSI due to its better integration with Windows.
- Added Wix patch file to add neovim binaries to the system path during installation.
- Replaced neovim installer icons with better looking versions.
- Renamed neovim installer icons from logo.ico -> neovim.ico for all
  icons to better reflect contents.
2022-04-11 07:58:46 -07:00
356cff78ec vim-patch:8.2.4734: getcharpos() may change a mark position (#18077)
Problem:    getcharpos() may change a mark position.
Solution:   Copy the mark position. (closes vim/vim#10148)
3caf1cce2b
2022-04-11 21:29:18 +08:00
f0d07dcb74 Merge pull request #18067 from zeertzjq/vim-8.2.4714
vim-patch:8.2.{4714,4733}
2022-04-11 19:30:42 +08:00
2dc86ef3b2 vim-patch:8.2.4733: HEEx and Surface do need a separate filetype
Problem:    HEEx and Surface do need a separate filetype.
Solution:   Revert 8.2.4729. (closes vim/vim#10147)
4232dff815
2022-04-11 18:40:46 +08:00
18ed556bbd vim-patch:8.2.4714: using g:filetype_dat and g:filetype_src not tested
Problem:    Using g:filetype_dat and g:filetype_src not tested.
Solution:   Add a test. (Patrick Meiser-Knosowski, closes vim/vim#10117)
a8034a4886
2022-04-11 18:38:42 +08:00
8f95f3ea06 fix(vim-patch.sh): fix N/A files patterns (#18073) 2022-04-11 14:41:26 +08:00
f89ca7194f fix(events): make v:event readonly in more events (#18070)
This makes v:event readonly in these four events:
- ChanInfo
- ChanOpen
- RecordingLeave
- TermClose
2022-04-11 11:32:15 +08:00
cdfb045ea0 Merge pull request #18071 from gpanders/create_uc
refactor!: Rename nvim_add_user_command to nvim_create_user_command
2022-04-10 20:46:02 -06:00
379067d038 docs: update dev-api to include "create" 2022-04-10 20:45:17 -06:00
a2f157233f fix(tui)!: remove ESC NUL forced escape (#17198)
This make Nvim recognize `ESC NUL` as <M-C-Space>, as many terminal
emulators (including libvterm) send <M-C-Space> as `ESC NUL`.

There is already another unambiguous way to encode a `ESC` key supported
by libtermkey: `ESC [ 2 7 u`, which is a `CSI u` sequence.

If one still wants to use `ESC NUL` as `ESC`, they can just map
<M-C-Space> to <Esc>.
2022-04-11 10:23:33 +08:00
f94f75dc05 refactor!: rename nvim_add_user_command to nvim_create_user_command 2022-04-10 20:18:41 -06:00
9da0023a66 feat(keymap): add F38-F63 keys (#17893) 2022-04-11 09:54:59 +08:00
b2cb05b53e feat(events): support SIGWINCH for Signal event #18029
closes #15411
2022-04-10 15:56:08 -07:00
8bdcd832ae refactor(globals.h): avoid confusing comment placement (#18066)
These comments were indented in Vim, but their indent was removed in
Nvim, causing them to be placed in a confusing place.
2022-04-10 21:22:22 +08:00
8f3845cdb7 docs: remove mentions of removed flag '#' in 'cpoptions' (#18064) 2022-04-10 14:58:01 +02:00
b438bb4343 vim-patch:8.2.4729: HEEx and Surface templates do not need a separate filetype (#18065)
Problem:    HEEx and Surface templates do not need a separate filetype.
Solution:   Use Eelixir for the similar filetypes. (Aaron Tinio, closes vim/vim#10124)
fa76a24109
2022-04-10 13:53:33 +02:00
b531e4ea33 Merge pull request #18062 from zeertzjq/vim-8.2.4723
vim-patch:8.2.{4723,4728}: the ModeChanged autocmd event is inefficient
2022-04-10 19:14:29 +08:00
381f8f86da vim-patch:8.2.4728: no test that v:event cannot be modified
Problem:    No test that v:event cannot be modified.
Solution:   Add a test. (closes vim/vim#10139)
021996ffaa
2022-04-10 18:45:16 +08:00
263a7fde35 vim-patch:8.2.4723: the ModeChanged autocmd event is inefficient
Problem:    The ModeChanged autocmd event is inefficient.
Solution:   Avoid allocating memory. (closes vim/vim#10134)  Rename
            trigger_modechanged() to may_trigger_modechanged().
2bf52dd065

Make v:event readonly for ModeChanged.
2022-04-10 08:02:22 +08:00
ff726cc569 vim-patch:8.2.4719: ">" marker sometimes not displayed in the jumplist (#18056)
Problem:    ">" marker sometimes not displayed in the jumplist.
Solution:   If the buffer no longer exists show "-invalid-". (Christian
            Brabandt, closes vim/vim#10131, closes vim/vim#10100)
a0f659c76e

Add a modeline to test_jumplist.vim
2022-04-10 07:13:22 +08:00
12662ac0c4 vim-patch:8.2.4722: ending recording with mapping records too much (#18060)
Problem:    When a recording is ended with a mapped key that key is also
            recorded.
Solution:   Remember the previous last_recorded_len. (closes vim/vim#10122)
81b46a6ccd
2022-04-10 06:45:27 +08:00
2a2c4e191f vim-patch:8.2.4718: @@@ in the last line sometimes drawn in the wrong place (#18055)
Problem:    @@@ in the last line sometimes drawn in the wrong place.
Solution:   Make sure the column is valid. (closes vim/vim#10130)
cee9c844f2
2022-04-10 04:50:49 +08:00
61bd5426f4 vim-patch:8.2.4721: cooklang files are not recognized (#18058)
Problem:    Cooklang files are not recognized.
Solution:   recognize *.cook files. (Goc Dundar, closes vim/vim#10120)
36951ed1da
2022-04-09 17:43:33 +02:00
3280dc2b60 vim-patch:8.2.4720: ABB Rapid files are not recognized properly (#18057)
Problem:    ABB Rapid files are not recognized properly.
Solution:   Add checks for ABB Rapid files. (Patrick Meiser-Knosowski,
            closes #10104)
b09c320039
2022-04-09 17:42:46 +02:00
f3183a4d7c Merge pull request #18023 from tom-anders/vim-8.2.4702
vim-patch:8.2.{4702,4703}: C++ scope labels are hard-coded
2022-04-09 22:13:34 +08:00
bf39c5fe4f vim-patch:8.2.4703: memory leak in handling 'cinscopedecls'
Problem:    Memory leak in handling 'cinscopedecls'.
Solution:   Free the memory before returning.
cb49a1d934
2022-04-09 15:39:48 +02:00
45f62464d3 vim-patch:8.2.4702: C++ scope labels are hard-coded
Problem:    C++ scope labels are hard-coded.
Solution:   Add 'cinscopedecls' to define the labels. (Tom Praschan,
            closes vim/vim#10109)
3506cf34c1
2022-04-09 15:39:46 +02:00
8055f9857b vim-patch:8.2.4715: Vagrantfile not recognized (#18052)
Problem:    Vagrantfile not recognized.
Solution:   Recognize Vagrantfile as ruby. (Julien Voisin, closes vim/vim#10119)
5e1792270a
2022-04-09 11:19:18 +02:00
b259426a25 chore(packaging): use transparent windows logo (#18051) 2022-04-09 10:31:11 +02:00
fda9adab5d vim-patch:partial:8.1.2333: with modifyOtherKeys CTRL-^ doesn't work (#18048)
Problem:    With modifyOtherKeys CTRL-^ doesn't work.
Solution:   Handle the exception.
828ffd5963
2022-04-09 13:31:42 +08:00
012c055804 vim-patch:partial:cbaff5e06ec5 (#18044)
Update runtime files
cbaff5e06e

Docs only.

Omit json_encode (different impl, Nvim throws E474 instead; see v8.2.4695).
Skip <MouseMove> (Nvim *kinda* has <MouseMove>, but most of this doc needs
  v8.2.4674 anyway...).
Nvim's 'hidden' doc was reworded somewhat, so manually integrate the changes
  (8331cd13c4).
Also apply "comma-separated" changes to all possible places in options.txt.
Cherry-pick *highlight-clear* tag from v8.2.3578.
2022-04-08 22:40:56 +02:00
d3068d34cc vim-patch:partial:cbaff5e06ec5 (#18042)
Update runtime files
cbaff5e06e

omit doc updates here
2022-04-08 19:53:41 +02:00
b4ec6af12a Merge pull request #17971 from chentau/extmark_spell
fix(extmarks): splice extmarks on accepting spell
2022-04-08 19:09:48 +02:00
d3603e157a build(deps): bump LuaJIT to HEAD - 5e3c45c43 (#18027) 2022-04-08 16:59:40 +02:00
c26d70d581 Merge pull request #17786 from gpanders/autocmd-args
feat(api)!: pass args table to autocommand callbacks
2022-04-08 16:55:47 +02:00
30bc02c636 feat(api)!: pass args table to autocommand callbacks 2022-04-08 15:12:54 +02:00
56ee7c29ab Merge pull request #18038 from zeertzjq/vim-8.2.4711
vim-patch:8.2.4711: when 'insermode' is set :edit from <Cmd> mapping misbehaves
2022-04-08 20:17:25 +08:00
b099bb1f2f test: add a test for #16823 2022-04-08 19:25:37 +08:00
38506553f7 vim-patch:8.2.4711: when 'insermode' is set :edit from <Cmd> mapping misbehaves
Problem:    When 'insermode' is set :edit from <Cmd> mapping misbehaves.
Solution:   Don't set "need_start_insertmode" when already in Insert mode.
            (closes vim/vim#10116)
3a56b6d405
2022-04-08 19:02:37 +08:00
2c7dc648ca vim-patch:8.2.3925: diff mode confused by NUL bytes (#18033)
Problem:    Diff mode confused by NUL bytes.
Solution:   Handle NUL bytes differently. (Christian Brabandt, closes vim/vim#9421,
            closes vim/vim#9418)
06f6095623
2022-04-08 10:45:42 +08:00
356baae80a vim-patch:8.2.4704: using "else" after return or break increases indent (#18032)
Problem:    Using "else" after return or break increases indent.
Solution:   Remove "else" and reduce indent. (Goc Dundar, closes vim/vim#10099)
f26c16144d
2022-04-08 10:25:22 +08:00
4c9a71c69e Merge pull request #18031 from zeertzjq/vim-8.2.0004
vim-patch:8.2.{0004,4700,4706}: buffer closing is interrupted
2022-04-08 10:23:55 +08:00
191f009ab7 vim-patch:8.2.4706: buffer remains active with WinClosed and tabpages
Problem:    Buffer remains active if a WinClosed event throws an exception
            when there are multiple tabpages.
Solution:   Ignore aborting() when closing the buffer. (closes vim/vim#10101)
6a06940f8a
2022-04-08 08:54:07 +08:00
b7bc931f63 vim-patch:8.2.4700: buffer remains active if WinClosed event throws an exception
Problem:    Buffer remains active if a WinClosed event throws an exception.
Solution:   Ignore aborting() when closing the buffer. (closes vim/vim#10097)
c947b9ae41
2022-04-08 08:54:07 +08:00
44b59d1a69 vim-patch:8.2.0004: get E685 and E931 if buffer reload is interrupted
Problem:    Get E685 and E931 if buffer reload is interrupted.
Solution:   Do not abort deleting a dummy buffer. (closes vim/vim#5361)
a6e8f888e7
2022-04-08 08:54:07 +08:00
8f3245dbfa refactor(window): cherry-pick win_close_buffer() from Vim patch 8.1.1391 2022-04-08 08:54:03 +08:00
65a5cea0d3 vim-patch:8.2.4710: smart indenting does not work after completion (#18030)
Problem:    Smart indenting does not work after completion.
Solution:   Set "can_si". (Christian Brabandt, closes vim/vim#10113, closes vim/vim#558)
ac72c21da6
2022-04-08 07:12:47 +08:00
8c25dbff46 vim-patch:8.2.4708: PHP test files are not recognized (#18025)
Problem:    PHP test files are not recognized.
Solution:   Add the *.phpt pattern. (Julien Voisin, closes vim/vim#10112)
177847e67a
2022-04-07 20:24:55 +02:00
0d2674a3c5 ci: add script to bump versions (#17884)
* ci: add script for bumping dependencies

* docs: add usage information for bump-deps.sh
2022-04-07 17:41:48 +02:00
1edca3872e vim-patch:8.2.4707: redrawing could be a bit more efficient (#18022)
Problem:    Redrawing could be a bit more efficient.
Solution:   Optimize redrawing. (closes vim/vim#10105)
8c97960850
2022-04-07 23:26:03 +08:00
abc157a6fd Merge pull request #18021 from zeertzjq/fix-clearing-reg-executing
Fix clearing of reg_executing
2022-04-07 22:40:01 +08:00
64802da6c4 fix(event-loop): check if executed register has ended 2022-04-07 21:42:11 +08:00
2a574f7aaa fix(input): fix clearing of reg_executing
vim-patch:8.2.4705
2022-04-07 21:42:07 +08:00
dc9e436986 Merge pull request #17979 from zeertzjq/autocmd-show-fix
fix(autocmd): restore autocmd showing behavior
2022-04-07 11:42:16 +02:00
f85f4e25d2 vim-patch:8.2.4701: Kuka Robot Language files not recognized (#18012)
Problem:    Kuka Robot Language files not recognized.
Solution:   Recognize *.src and *.dat files. (Patrick Meiser-Knosowski,
            closes vim/vim#10096)
3ad2090316
2022-04-07 09:09:08 +02:00
233014f92b vim-patch:8.2.0836: not all :cdo output is visible (#18007)
Problem:    Not all :cdo output is visible.
Solution:   Reset 'shortmess' temporarily. (Yegappan Lakshmanan, closes vim/vim#6155)
14798ab9a5

Cherry pick relevant changes form patches 8.1.1826 and 8.2.0557.
2022-04-06 12:04:19 +08:00
74a27748e6 fix(autocmd): restore autocmd showing behavior 2022-04-06 05:44:30 +08:00
128bedc0d2 vim-patch:8.2.4696: delete() with "rf" argument does not report a failure (#18002)
Problem:    delete() with "rf" argument does not report a failure.
Solution:   Return -1 if the directory could not be removed. (closes vim/vim#10078)
478700336d
2022-04-06 05:12:49 +08:00
f86f74c12f Merge pull request #18003 from bfredl/incperf2
fix(ui): inccomand performance degradation
2022-04-05 21:23:27 +02:00
54cec455cc fix(ui): inccomand performance degradation
It was broken since the introduction of the macro.
2022-04-05 20:21:43 +02:00
402a71ff87 Merge pull request #17335 from famiu/fix/ui/win-resize
fix: Make window resize commands manage cmdheight
2022-04-05 19:34:06 +02:00
6dc31eea43 fix(tests): update legacy tab switch test to be sane 2022-04-05 16:50:11 +02:00
463174b5d7 fix(ui): make window resize commands manage cmdheight
Previously, the window resize commands did not resize the value of `cmdheight` when they caused a change in the topframe height, leaving a gap between the end of topframe and the start of the command line, this commit fixes that by making window resize commands automatically change the value of cmdheight if the resize affects the height of topframe.
2022-04-05 16:50:07 +02:00
969d600f2a vim-patch:8.2.{4692,4691,4690}: fix Insert mode <LeftDrag> mapping bug (#17999)
vim-patch:8.2.4692: no test for what 8.2.4691 fixes

Problem:    No test for what 8.2.4691 fixes.
Solution:   Add a test.  Use a more generic sotlution. (closes vim/vim#10090)
0f68e6c07a

Test cannot be used because it must use test_setmouse(). Use a Lua test.

Reverted patches:

vim-patch:8.2.4691: solution for <Cmd> in a mapping causes trouble

Problem:    Solution for <Cmd> in a mapping causes trouble.
Solution:   Use another solution: put back CTRL-O after reading the <Cmd>
            sequence.
ca9d8d2cb9

vim-patch:8.2.4689: using <Cmd> in a mapping does not work for mouse keys

Problem:    Using <Cmd> in a mapping does not work for mouse keys in Insert
            mode. (Sergey Vlasov)
Solution:   When reading the <Cmd> argument do not use the stuff buffer.
            (closes vim/vim#10080)
d0fb2d8041
2022-04-05 21:38:53 +08:00
e135adcb8c vim-patch:8.2.4687: "vimgrep /%v/ *" may cause a crash (#17995)
Problem:    "vimgrep /\%v/ *" may cause a crash.
Solution:   When compiling the pattern with the old engine fails, restore the
            regprog of the new engine instead of leaving it NULL.
            (closes vim/vim#10079)
e8a4c0d91f
2022-04-05 09:00:48 +08:00
b08cf73be9 refactor(pos.h): remove unused include; make formatting consistent (#17892)
- remove include of limit.h from pos.h, because it is no longer used
- make formatting more consistent in pos.h
2022-04-04 15:18:00 +08:00
c41e75039f test: move completion :stopinsert test to completion_spec.lua (#17992) 2022-04-04 14:53:47 +08:00
daa8ac051d Merge pull request #17991 from zeertzjq/vim-8.2.4253
vim-patch:8.2.4253: using freed memory when substitute with function call
2022-04-04 13:02:32 +08:00
bbfc44e255 refactor: pass "preview" to regtilde() 2022-04-04 12:11:38 +08:00
6486983117 vim-patch:8.2.4253: using freed memory when substitute with function call
Problem:    Using freed memory when substitute uses a recursive function call.
Solution:   Make a copy of the substitute text.
37f47958b8

'compatible' doesn't seem needed for the test.
2022-04-04 12:11:04 +08:00
db13f105d6 Merge pull request #17988 from zeertzjq/vim-8.2.4247
vim-patch:8.2.{4247,4258}: stack corruption when looking for spell suggestions
2022-04-04 11:11:37 +08:00
683648a396 vim-patch:8.2.4258: Coverity warns for array overrun
Problem:    Coverity warns for array overrun.
Solution:   Restrict depth to MAXWLEN - 1.
6970e1e36a
2022-04-04 09:37:40 +08:00
945caeeda2 vim-patch:8.2.4247: stack corruption when looking for spell suggestions
Problem:    Stack corruption when looking for spell suggestions.
Solution:   Prevent the depth increased too much.  Add a five second time
            limit to finding suggestions.
06f15416bb

Cherry-pick parentheses from patch 8.2.4402.
2022-04-04 09:37:40 +08:00
1f038bc592 test(old): fix test_spell.vim encoding 2022-04-04 09:37:40 +08:00
a973fa5b43 test(old): fix test_regexp_latin.vim encoding (#17989)
Cherry-pick a change from Vim patch 8.2.3982
2022-04-04 09:12:20 +08:00
4e0a825262 Merge pull request #17987 from leungbk/vim-patch-4402
vim-patch:8.2.{4639,4402}: missing parenthesis may cause unexpected problems
2022-04-04 07:54:34 +08:00
33909b6564 chore: update .git-blame-ignore-revs 2022-04-03 16:12:30 -07:00
69e11b58b4 vim-patch:8.2.4402: missing parenthesis may cause unexpected problems
Problem:    Missing parenthesis may cause unexpected problems.
Solution:   Add more parenthesis is macros.
ae6f1d8b14
2022-04-03 16:11:23 -07:00
271bb32855 vim-patch:8.2.4639: not sufficient parenthesis in preprocessor macros
Problem:    Not sufficient parenthesis in preprocessor macros.
Solution:   Add more parenthesis.
9dac9b1751
2022-04-03 15:57:07 -07:00
a93b55273f Merge pull request #17986 from zeertzjq/fix-ex-mode-regression
Fix regression with :normal and Ex mode from #14311
2022-04-04 06:13:42 +08:00
559dcf45a1 test: add some tests with :normal and Ex mode 2022-04-04 05:46:54 +08:00
9955209afb fix(substitute): properly check for empty command line 2022-04-04 05:46:45 +08:00
d73bf3138a vim-patch:8.2.4672: using :normal with Ex mode may make :substitute hang (#17983)
Problem:    Using :normal with Ex mode may make :substitute hang.
Solution:   When getting an empty line behave like 'q' was typed.
            (closes vim/vim#10070)
ce416b453a

Cherry-pick a comment from patch 8.2.0363.
2022-04-03 20:38:31 +08:00
e9e16655af [RFC] vim-patch:8.1.1378: delete() can not handle a file name that looks li… (#16268)
Problem:    Delete() can not handle a file name that looks like a pattern.
Solution:   Use readdir() instead of appending "/*" and expanding wildcards.
            (Ken Takata, closes vim/vim#4424, closes vim/vim#696)
701ff0a3e5

Cherry-pick a change to Test_delete_rf() from patch 8.1.1921.

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-04-03 20:27:46 +08:00
6786b6afad vim-patch:8.1.1687: the evalfunc.c file is too big (#17949)
Problem:    The evalfunc.c file is too big.
Solution:   Move testing support to a separate file.
ecaa70ea29
2022-04-03 09:26:59 +08:00
a783cdd68d fix(ex_normal): spam \n in Ex mode only if in Cmdline mode (#17977)
When using :normal in Ex mode, the editor is no longer in Cmdline mode,
but the exmode_active flag is still set, causing the wrong character to
be spammed in Insert mode, leading to a hang.
2022-04-03 08:58:49 +08:00
ea71c26ec9 fix(extmarks): splice extmarks on accepting spell 2022-04-02 12:35:33 -04:00
2a46600140 docs(options): add more missing 'nofoo' tags (#17967) 2022-04-02 15:24:10 +02:00
e6bd9eee15 docs(options): add missing 'nofoo' tags (#17965) 2022-04-02 14:08:04 +02:00
e45d141e28 vim-patch:8.2.4664: Elvish files are not recognized (#17963)
Problem:    Elvish files are not recognized.
Solution:   Recognize .elv files. (Bruno Roque, closes vim/vim#10058)
c1658a196b
2022-04-02 13:36:19 +02:00
af1b61f342 Merge pull request #17961 from zeertzjq/scroll-no-multiclick
fix(input): do not translate scroll keys into multiclicks
2022-04-02 12:47:40 +02:00
5499736380 fix(input): do not translate scroll keys into multiclicks 2022-04-02 16:18:18 +08:00
fce0d54eb2 Merge pull request #17953 from zeertzjq/vim-8.2.4660
vim-patch:8.2.4660: cursorcolumn is sometimes not correct
2022-04-01 20:37:45 +08:00
ef595e9b93 test: add a test for #13916 2022-04-01 20:14:01 +08:00
139828cc7e vim-patch:8.2.4660: cursorcolumn is sometimes not correct
Problem:    Cursorcolumn is sometimes not correct.
Solution:   Recompute the cursor column when entering Insert mode and the
            cursor is on a character wider than a screen cell.
782c6744b4
2022-04-01 19:53:40 +08:00
377e875211 Merge pull request #17948 from zeertzjq/vim-8.2.3471
vim-patch:8.2.{3471,3472,3489}: fix some crashes/errors with search
2022-04-01 17:43:31 +08:00
b9454d1676 vim-patch:8.2.3489: ml_get error after search with range
Problem:    ml_get error after search with range.
Solution:   Limit the line number to the buffer line count.
35a319b77f
2022-04-01 17:18:21 +08:00
b8fbd749a9 vim-patch:8.2.3472: other crashes with empty search pattern not tested
Problem:    Other crashes with empty search pattern not tested.
Solution:   Add a few more test lines. (Dominique Pellé)
9af9fd6ab6
2022-04-01 17:12:17 +08:00
649a11bc13 vim-patch:8.2.3471: crash when using CTRL-T after an empty search pattern
Problem:    Crash when using CTRL-T after an empty search pattern.
Solution:   Bail out when there is no previous search pattern. (closes vim/vim#8953)
d8d957de86
2022-04-01 17:11:56 +08:00
88a4ac22f0 Merge pull request #17946 from lewis6991/fixes
Quick review fixes for autocmds and keymaps
2022-04-01 10:44:58 +02:00
3cc29b7f0d fix(keymap): don't coerce false to '' 2022-04-01 09:09:30 +01:00
dc3bbd31a9 fix(api): delete all autocmds with the same ID 2022-04-01 08:38:58 +01:00
973e91007c refactor: remove redundant check for w_p_cole (#17944)
No longer needed after #17890.
2022-04-01 11:40:45 +08:00
8a6cf51a71 vim-patch:8.2.3122: with 'nowrap' cursor position is unexected in narrow window (#17935)
Problem:    With 'nowrap' cursor position is unexected in narrow window.
            (Leonid V.  Fedorenchik)
Solution:   Put cursor on the last non-empty line. (closes vim/vim#8525)
30441bb3d5
2022-04-01 07:11:38 +08:00
dc48330b9d Merge pull request #17842 from lewis6991/keymap
feat(keymap): return nil from an expr keymap
2022-04-01 00:48:46 +02:00
80d4d6b486 Merge pull request #17938 from ggandor/autocmd-api-names
refactor(api)!: use singular/plural consistently in the autocmd API
2022-04-01 00:35:21 +02:00
9d40b2fda9 refactor(api)!: use singular/plural consistently in the autocmd API 2022-03-31 23:58:47 +02:00
38ba2a75fc vim-patch:8.2.4658: org-mode files are not recognized (#17939)
Problem:    Org-mode files are not recognized.
Solution:   Add patterns to recognize "org" files. (closes vim/vim#10046)
3a6f952cc8
2022-03-31 22:16:25 +02:00
dbcb76bd7a Merge pull request #17888 from dundargoc/ci/remove-reviewers-when-drafting 2022-03-31 15:38:26 -04:00
68c0e90189 Merge pull request #17906 from dundargoc/test/skip-nvimlog-on-success 2022-03-31 15:36:18 -04:00
4a89812d85 Merge pull request #17929 from lewis6991/autocmd
fix(api): improve autocmd error handling
2022-03-31 19:28:06 +02:00
ebab51b192 docs(extmark): fix nvim_buf_get_extmarks example (#17934) 2022-03-31 18:05:17 +02:00
2e85af47d2 feat(runtime): add query filetype (#17905)
used for Tree-sitter queries
uses Lisp runtime files

(in Lua to distinguish from upstream runtime files)
2022-03-31 08:46:45 -06:00
ea8ad79990 Merge pull request #17698 from tjdevries/nvim_clear_autocmd
api: nvim_clear_autocmd
2022-03-31 15:25:56 +02:00
929293815b fix(api): improve autocmd error handling
- nvim_del_augroup_* now works with pcall
- nvim_del_autocmd now errors for invalid ids
2022-03-31 14:23:53 +01:00
b80651eda9 feat(api): nvim_clear_autocmd
Co-authored-by: Christian Clason <christian.clason@uni-due.de>
2022-03-31 14:30:42 +02:00
b2bd800416 Merge pull request #17890 from zeertzjq/conceal-virtcol-changed
perf: only redraw concealed line if cursor has moved horizontally
2022-03-31 10:56:15 +02:00
1184097261 Merge pull request #17925 from zeertzjq/vim-8.2.1844
vim-patch:8.2.{1844,2515,4156,4200,4577}: messages patches
2022-03-31 10:48:41 +08:00
86f81c471a vim-patch:8.2.4577: message test is flaky
Problem:    Message test is flaky. (Elimar Riesebieter)
Solution:   Trigger the autocommand event only after startup is finished.
9323ca51c2
2022-03-31 10:05:26 +08:00
5a3a1304e1 vim-patch:8.2.4200: some tests do not clean up properly
Problem:    Some tests do not clean up properly.
Solution:   Delete created files. (Yegappan Lakshmanan, closes vim/vim#9611)
7e765a39b7

Omit test_filetype.vim: already ported
Omit test_vim9_import.vim: N/A
2022-03-31 10:05:26 +08:00
d5dee83552 vim-patch:8.2.4156: fileinfo message overwrites echo'ed message
Problem:    Fileinfo message overwrites echo'ed message.
Solution:   Reset need_fileinfo when displaying a message. (Rob Pilling,
            closes vim/vim#9569)
726f7f91fd
2022-03-31 10:05:26 +08:00
e2247c0baa vim-patch:8.2.2515: memory access error when truncating an empty message
Problem:    Memory access error when truncating an empty message.
Solution:   Check for an empty string. (Dominique Pellé, closes vim/vim#7841)
6281815ecc
2022-03-31 10:05:26 +08:00
47630743fc vim-patch:8.2.1844: using "q" at the more prompt doesn't stop a long message
Problem:    Using "q" at the more prompt doesn't stop a long message.
Solution:   Check for "got_int". (closes vim/vim#7122)
3d30af8783

Cherry-pick file name change from patch 8.2.2112.
2022-03-31 10:05:26 +08:00
b6e3a2dbbb vim-patch:8.2.4645: 'shortmess' changed when session does not store options (#17908)
Problem:    'shortmess' changed when session does not store options.
Solution:   Save and restore 'shortmess' if needed. (James Charti,
            closes vim/vim#10037)
fd01280d01
2022-03-31 10:04:12 +08:00
0d4bd420c1 fix: correct vertical dragging room calculation with global statusline (#17928)
This fixes the bug that win_move_statusline() or mouse dragging cannot
reduce 'cmdheight' to 1 when global statusline is used.
2022-03-31 08:40:17 +08:00
6d648f5594 feat(treesitter): add more default groups to highlight map (#17835)
This covers some default groups listed in :h group-name.
2022-03-30 22:14:20 +02:00
a18c9ba2da docs(lsp): remove outdated offset_encoding default value for apply_text_edits 2022-03-30 21:04:17 +02:00
7fb2310edb fix: set nested before executing callback (#17801) 2022-03-30 17:59:36 +02:00
1217694f21 Merge pull request #17921 from zeertzjq/vim-8.2.4649
vim-patch:8.2.{4349,4649}
2022-03-30 20:46:11 +08:00
06cf205ace vim-patch:8.2.4649: various formatting problems
Problem:    Various formatting problems.
Solution:   Improve the code formatting.
b4ad3b0dea
2022-03-30 20:32:27 +08:00
4ca14b310c vim-patch:8.2.4349: FileChangedShell test fails on MS-Windows
Problem:    FileChangedShell test fails on MS-Windows.
Solution:   Skip the test on MS-Windows.
c9e3187d05
2022-03-30 20:32:27 +08:00
ac1dd046c0 vim-patch:46eea444d (#17920)
Update runtime files
46eea444d9

Skip repeat.txt as it only has vim9-specific changes.
2022-03-30 12:12:12 +01:00
75ff156d9b Merge pull request #17773 from zeertzjq/vim-8.2.3110
vim-patch:8.2.{3110,4592}: a pattern that matches the cursor position is complicated
2022-03-30 09:03:57 +08:00
465f8ff8cb vim-patch:8.2.4592: search continues after giving E1204
Problem:    Search continues after giving E1204.
Solution:   Return failure after giving E1204. (closes vim/vim#9972)
b10ff5c1b3
2022-03-30 08:35:13 +08:00
b2819eec26 docs(pattern.txt): cherry-pick latests changes from Vim runtime updates
Update runtime files
53f7fccc94

Update runtime files
2286304cdb

Update runtime files
2f0936cb9a

Update runtime files.
a2baa73d1d
2022-03-30 08:35:13 +08:00
1bbe8ec282 vim-patch:8.2.3110: a pattern that matches the cursor position is complicated
Problem:    A pattern that matches the cursor position is bit complicated.
Solution:   Use a dot to indicate the cursor line and column. (Christian
            Brabandt, closes vim/vim#8497, closes vim/vim#8179)
04db26b360

Also use `n = ++vcol` in regexp_bt.c as `++vcol` alone fails lint.
2022-03-30 08:35:13 +08:00
e5428d10b5 vim-patch:8.1.0439: recursive use of getcmdline() still not protected (#17726)
Problem:    Recursive use of getcmdline() still not protected.
Solution:   Instead of saving the command buffer when making a call which may
            cause recursiveness, save the buffer when actually being called
            recursively.
438d176e35

Co-authored-by: zeertzjq <zeertzjq@outlook.com>

Clear ccline earlier in save_cmdline() if ccline is in use so that
ccline.prev_ccline can be assigned.
2022-03-30 08:32:12 +08:00
2f37823703 vim-patch:8.2.4646: using buffer line after it has been freed (#17907)
Problem:    Using buffer line after it has been freed in old regexp engine.
Solution:   After getting mark get the line again.
b55986c52d
2022-03-30 07:44:12 +08:00
e7ac16425c vim-patch:8.2.4473: Coverity warns for not checking return value of ftell() (#17914)
Problem:    Coverity warns for not checking return value of ftell().
Solution:   Bail out if ftell() returns a negative value.
416b5f4894
2022-03-30 05:54:02 +08:00
a9665bb12c fix(event-loop): duplicate display updating logic in vgetorpeek() (#17913) 2022-03-30 05:25:00 +08:00
f4693d99df test: don't print NVIMLOG on success 2022-03-29 22:50:39 +02:00
29aa08a09d vim-patch:8.2.3449: sort fails if the sort compare function returns 999 (#17909)
Problem:    Sort fails if the sort compare function returns 999.
Solution:   Adjust value to -1 / 0 / 1. (Yasuhiro Matsumoto, closes vim/vim#8884)
c04f62346b
2022-03-30 04:14:37 +08:00
7a6978ba29 vim-patch:8.2.3551: checking first character of url twice (#17910)
Problem:    Checking first character of url twice.
Solution:   Only check once. (closes vim/vim#9026)
94e7d345c1
2022-03-30 02:23:58 +08:00
f1d5a2e82d chore: add .mailmap (#17453)
Consolidate commit author details

- Prefer user/email with either most commits or most recent commit
- Generally less preference for @users.noreply.github.com emails
- Avoided consolidating common names
2022-03-29 19:44:35 +02:00
524f6294a3 build(clint): link to wiki when accessing list_T internals directly (#17876) 2022-03-29 22:27:57 +08:00
ba257d74b1 fix(decorations): do not put empty virt_text (#17872) 2022-03-29 19:56:45 +08:00
81d7628c3f vim-patch:8.2.4644: redrawing too often when 'relativenumber' is set (#17756)
Problem:  Redrawing too often when 'relativenumber' is set.
Solution: Only redraw when the cursor line changed. (Lewis Russell,
          closes vim/vim#10040)
1624639ec8
2022-03-29 19:37:42 +08:00
d89a80fafc docs: update hl-Whitespace documentation (#17901) 2022-03-29 07:38:29 +02:00
3cc6cfecf3 vim-patch:8.2.4640: some boolean options use "long" instead of "int" (#17896)
Problem:    Some boolean options use "long" instead of "int".
Solution:   Adjust the type. (James McCoy, closes vim/vim#10033)
8be423b7ac

N/A patches for version.c:

vim-patch:8.2.4641: may mark the wrong window for redrawing

Problem:    May mark the wrong window for redrawing.
Solution:   Use redraw_win_later(). (closes vim/vim#10032)
471b3aed3e
2022-03-29 11:57:04 +08:00
4d3acd6beb fix(lsp): use "text" filetype for plaintext (#17898) 2022-03-28 09:16:11 -07:00
e55ba16a0e Merge pull request #17891 from casswedson/label-as-build
ci: label changes to Makefiles as build
2022-03-28 06:14:26 -04:00
595c1a724a perf: only redraw concealed line if cursor has moved horizontally
Building upon #17889, this moves conceal redrawing logic into move.c, so
that concealed line is only redrawn if cursor has moved horizontally.
2022-03-28 10:23:32 +08:00
9ce2c73180 revert: "Fix redraw regression with w_p_cole in visual mode"
Revert the code change from b7d6caaa03.
The test is kept.
The glitch was fixed by #17864, so this workaround is no longer needed.
2022-03-28 10:23:17 +08:00
02bac30928 ci: label changes to Makefiles as build
Makefiles are used for builds, so why not label changes to these
files as build
2022-03-27 19:20:15 -05:00
79dcd045d3 Merge pull request #17889 from zeertzjq/vim-8.2.4638
vim-patch:8.2.{4638,4630}: cursorlineopt=screenline redrawing
2022-03-28 06:40:00 +08:00
ab02b28b4e vim-patch:8.2.4630: 'cursorline' not always updated with 'culopt' is "screenline"
Problem:    'cursorline' not always updated with 'cursorlineopt' is
            "screenline".
Solution:   Call check_redraw_cursorline() more often. (closes vim/vim#10013)
bf269ed0b0

Code was reverted in patch 8.2.4638, so this just ports the test.
2022-03-28 06:15:26 +08:00
4baeb96c1b vim-patch:8.2.4638: superfluous check if a redraw is needed for 'cursorline'
Problem:    Superfluous check if a redraw is needed for 'cursorline'.
Solution:   Remove check_redraw_cursorline(). (closes vim/vim#10030, closes vim/vim#10029)
3e559cd884

redraw_after_callback() is N/A.
Omits changes that just revert code from patch 8.2.4630.
2022-03-28 06:15:26 +08:00
a201dd265f Merge pull request #17887 from dundargoc/ci/commitlint
ci(commitlint): use -u NONE instead of --clean
2022-03-27 17:11:11 -04:00
da3ef2a538 ci: remove reviewers when drafting or closing a PR 2022-03-27 22:35:26 +02:00
b66cc0f569 Merge pull request #17873 from muniter/jl-apidocs-improvementes
ci(doc): improve missing docs workflow
2022-03-27 16:21:02 -04:00
f61841b8cc docs: .git-blame-ignore-revs #16174 2022-03-27 20:00:39 +00:00
72652cbc46 feat(test): use nvim_exec in helpers.source() #16064
helpers.source() was a hack to work around the lack of anonymous
:source. Its "create tempfile" behavior is not a required part of most
tests that use it.

Some tests still need the old "create tempfile" behavior either because
they test SID behavior, or because of missing nvim_exec features: #16071
2022-03-27 10:25:55 -07:00
680970bfbc ci(commitlint): use -u NONE instead of --clean
I get a weird error about syntax.vim not being installed when using
--clean when running it locally.
2022-03-27 18:28:11 +02:00
05edab85d7 refactor: assume STATUS_HEIGHT to be 1 (#17804)
Since https://github.com/neovim/neovim/pull/17790 being merged means we can assume the value of `STATUS_HEIGHT` to always be 1, this commit removes code that's unnecessary if `STATUS_HEIGHT` is 1.
2022-03-27 08:33:54 -07:00
a8e2c45b94 fix(diagnostic): make open_float respect global diagnostic options (#17879)
* make `open_float` respect `scope` option set in `vim.diagnostic.config`
* Closes #17878
2022-03-27 08:10:03 -06:00
a86d3d3780 docs: correct CursorMoved documentation (#17880)
behavior was changed in https://github.com/neovim/neovim/pull/9807
2022-03-27 11:02:44 +02:00
71b4c30ad6 Merge pull request #17877 from zeertzjq/vim-8.2.4631
vim-patch:8.2.4631: crash when switching window in BufWipeout autocommand
2022-03-27 10:33:05 +08:00
ae0a43ec23 fix(tabpage): correct check for failure to close window
Avoid closing window 999 times.
2022-03-27 10:01:35 +08:00
f4f18a9833 vim-patch:8.2.4631: crash when switching window in BufWipeout autocommand
Problem:    Crash when switching window in BufWipeout autocommand.
Solution:   Put any buffer in the window to avoid it being NULL.
            (closes vim/vim#10024)
347538fad0

win_init_empty() cannot be made static because it is used in autocmd.c
2022-03-27 10:01:07 +08:00
45dbb78747 ci(doc): improve missing docs workflow
1. Add new pattern `runtime/doc/**`. This is a common case were the
   contributor modifies only the help file but the doc gen would discard
   their changes.

2. Add to the output what the changes after running doc gen would be.

[skip ci]
2022-03-26 12:38:36 -05:00
a490db5ba8 refactor!: rename nvim_do_autocmd to nvim_exec_autocmd (#17854)
according to established code standards (`:h dev-api`)
2022-03-26 15:34:56 +01:00
111dd6c322 Merge pull request #17869 from dundargoc/vim-8.2.3943
vim-patch:8.2.3943: compiler warning from gcc for uninitialized variable
2022-03-26 22:27:03 +08:00
66fff788f2 Merge pull request #17857 from muniter/jl-breaking-change-label
ci: automatic breaking change label
2022-03-26 09:45:54 -04:00
85821d8b6f docs(api): fix wrong documentation of nvim_create_autocmd (#17870)
also add doc changes from typofix PR
2022-03-26 13:21:32 +01:00
ca7d633eaf ci: automatic breaking change label
When the PR title contains the breaking change format apply the
breaking-change label.
2022-03-26 07:18:00 -05:00
82304038a2 vim-patch:8.2.3943: compiler warning from gcc for uninitialized variable
Problem:    Compiler warning from gcc for uninitialized variable.
Solution:   Initialize variable. (closes vim/vim#9429)
491669701c
2022-03-26 12:12:03 +01:00
fb5587d2be Merge pull request #17839 from zeertzjq/vim-8.2.4281
vim-patch:8.2.{4281,4327}: fix two crashes with quickfix and wiping buffer
2022-03-26 12:59:34 +08:00
a70b39965b fix(tui): avoid using uninitialized memory in kitty (#17866) 2022-03-26 10:48:31 +08:00
d8b4f3e3b8 vim-patch:8.2.4327: may end up with no current buffer
Problem:    May end up with no current buffer.
Solution:   When deleting the current buffer to not pick a quickfix buffer as
            the new current buffer.
e3537aec2f

The test cannot be ported as-is because Nvim doesn't support "-Z"
command line argument. Just use only "--clean" instead.
2022-03-26 09:51:59 +08:00
19bbc43947 vim-patch:8.2.4281: using freed memory with :lopen and :bwipe
Problem:    Using freed memory with :lopen and :bwipe.
Solution:   Do not use a wiped out buffer.
9b4a80a665

Cherry-pick some indent changes from patch 8.2.1432.
2022-03-26 09:02:42 +08:00
9530c2d6d8 vim-patch:8.2.4626: Visual area not updated when removing sign in Visual mode (#17864)
Problem:    Visual area not fully updated when removing sign in Visual mode
            while scrolling.
Solution:   Adjust check for topline. (closes vim/vim#10017)
abb6fbd14d
2022-03-26 08:52:54 +08:00
c2378be3dd vim-patch:8.2.3453: autocmd not executed when editing a directory (#17846)
Problem:    Autocmd not executed when editing a directory ending in a path
            separator inside try block.
Solution:   Return NOTDONE instead of FAIL. (closes vim/vim#8885)
40fa12aea3
2022-03-26 08:27:29 +08:00
876d22fca9 fix(clang/'Dead store'): do not assign endcol (#17788) 2022-03-25 18:02:42 -06:00
61205c1def chore: fix typos (#17755)
Co-authored-by: Jordan Haine <jhaine@securitycompass.com>
2022-03-25 19:57:59 +01:00
174deafcef docs(api): improve autocommand docs (#17545)
[skip ci]
2022-03-25 19:24:53 +01:00
5e64d65df6 fix(filetype.lua): always return a string in getline helper function (#17852)
Uses of `getline` in `filetype.lua` currently assume it always returns a
string. However, if the buffer is unloaded when filetype detection runs,
`getline` returns `nil`. Fixing this prevents errors when filetype
detection is run on unloaded buffers.
2022-03-25 12:12:00 -06:00
d72e82d3db build(deps): bump luajit to commit e2c312e (#17111)
bump bundled LuaJIT to e2c312e0de
2022-03-25 17:42:32 +01:00
b81c310d49 fix(tui): correct CSI sequence (#17844)
Follow up to #17771. The sequence `CSI > 4 ; 1 m` does not enable
distinguishing all available keys; notably, it excludes `<Tab>`. Using
`CSI > 4 ; 2 m` tells the terminal to disambiguate *all* keys, which is
much more useful.

The meaning of the final parameter is documented [here][1].

[1]: https://invisible-island.net/xterm/manpage/xterm.html#VT100-Widget-Resources:modifyOtherKeys
2022-03-24 13:11:04 -06:00
69f1de86dc feat: add vim.tbl_get (#17831)
vim.tbl_get takes a table with subsequent string arguments (variadic) that
index into the table. If the value pointed to by the set of keys exists,
the function returns the value. If the set of keys does not exist, the
function returns nil.
2022-03-24 12:01:04 -07:00
39af40580a Merge pull request #17809 from dundargoc/PVS/V1019
fix(PVS/V1019): compound assignment expression is used inside condition
2022-03-24 18:37:23 +01:00
27fccb295c Merge pull request #17771 from gpanders/extendedkeys
feat(tui): enable CSI u keys
2022-03-24 18:13:32 +01:00
93e0d9b556 fix(PVS/V1019): compound assignment expression is used inside condition 2022-03-24 17:57:36 +01:00
02fd00c042 feat(runtime): include Lua in C++ ftplugin (#17843) 2022-03-24 08:05:13 -06:00
58140a9428 feat(keymap): return nil from an expr keymap
For Lua callback expr keymaps, returning `nil` or `false` is equivalent
to an empty string
2022-03-24 13:59:20 +00:00
b438251a0e Merge pull request #17838 from zeertzjq/ci-docgen-no-src-lua
ci: remove src/nvim/**.lua from docgen pattern
2022-03-24 14:20:03 +01:00
a11ff55555 feat(tui): enable CSI u keys
On TUI startup write the CSI sequence that signals to the controlling
terminal that Neovim supports the CSI u scheme for encoding modifiers
documented in [1].

This is similar to, but distinct from, Vim's usage of the `t_TI` and
`t_TE` variables to handle Xterm's `modifyOtherKeys` setting. For a
longer explanation on those differences see [2]. Since Neovim uses
libtermkey for key input handling, we use the CSI u encoding rather than
Xterm's modifyOtherKeys encoding.

[1]: http://www.leonerd.org.uk/hacks/fixterms/
[2]: https://invisible-island.net/xterm/modified-keys.html
2022-03-24 07:13:49 -06:00
3b28bd57f9 Merge pull request #17821 from zeertzjq/vim-patch-cursorline
vim-patch:8.2.{4591,4614}: cursorline redrawing
2022-03-24 20:28:46 +08:00
1194856b31 Merge pull request #17740 from dundargoc/doxygen/memline
refactor(memline): convert function comments to doxygen format
2022-03-24 13:15:20 +01:00
4a11c7e56f chore(nvim_paste): assert the correct String (#17752) 2022-03-24 19:40:00 +08:00
534f5a419d refactor: convert function comments to doxygen format (#17710) 2022-03-24 12:17:21 +01:00
fcd57980f9 chore: add additional compiler flags (#17815)
Added:
  - -Wdouble-promotion
  - -Wmissing-noreturn
  - -Wmissing-format-attribute
  - -Wsuggest-attribute={pure,const,malloc,cold}

Resolves: #343
2022-03-24 12:14:04 +01:00
0c45753119 Merge pull request #17825 from bfredl/ctrl2
feat(input)!: distinguish ctrl input pairs (always)
2022-03-24 12:05:36 +01:00
8b7f818ee7 refactor(memline): convert function comments to doxygen format 2022-03-24 11:19:15 +01:00
ed88ca7503 feat(input): enable <tab>/<c-i>, <cr>/<c-m>, <esc>/<c-[> pairs unconditionally 2022-03-24 11:02:39 +01:00
d7488bf386 feat(input)!: delay some conversions to vgetc() 2022-03-24 11:02:39 +01:00
c29a14d1fa perf(screen): reduce cursorline redrawing when jumping around
vim-patch:8.2.4614: redrawing too much when 'cursorline' is set

Problem:    Redrawing too much when 'cursorline' is set and jumping around.
Solution:   Rely on win_update() to redraw the current and previous cursor
            line, do not mark lines as modified. (closes vim/vim#9996)
c20e46a4e3

This doesn't match the patch exactly, because I missed some lines when
porting patch 8.1.2029, and these lines were removed in this patch.

This also makes win_update() always update for 'concealcursor' like how
it always updates for 'cursorline', as 'cursorline' and 'concealcursor'
redrawing logic has been unified in Nvim.

As redrawing for 'cursorline' now always only requires VALID redraw
type, it is no longer necessary to call redraw_for_cursorline() in
nvim_win_set_cursor().
2022-03-24 16:08:59 +08:00
3e9b4e917d vim-patch:8.2.4591: cursor line not updated when a callback moves the cursor
Problem:    Cursor line not updated when a callback moves the cursor.
Solution:   Check if the cursor moved. (closes vim/vim#9970)
e7a74d5375

redraw_after_callback() is N/A. Nvim handles timers on the main loop.
2022-03-24 16:08:59 +08:00
a72f338d76 fix(float): do not switch window before deleting last listed buffer (#17840)
Just allow close_windows() to close the current window instead.
This fixes wrong working directory or autocommands not being triggered.
2022-03-24 14:53:20 +08:00
ff82b2785f fix(float): don't always switch window when deleting last listed buffer (#17836) 2022-03-24 11:56:22 +08:00
fc3bff6b7e ci: remove src/nvim/**.lua from docgen pattern
After #17623 this pattern is no longer necessary.
2022-03-24 11:35:24 +08:00
2e36117840 test: add test for deleting last listed buffer when there are floats (#17833) 2022-03-24 09:28:23 +08:00
d3af109d10 fix(PVS/V560): ignore false "conditional expression is always false" (#17830)
"'qi' points to the global variable 'ql_info' or the window local location list stack 'wp->w_llist'.  The contents of these structures can be changed out-of-band by an autocmd."

https://github.com/vim/vim/pull/9993#issuecomment-1076544168
2022-03-24 06:25:20 +08:00
06131370a4 refactor(memline.c): make swapfile_unchanged() return bool (#17827)
vim-patch:8.2.4613: return type of swapfile_unchanged() is wrong

Problem:    Return type of swapfile_unchanged() is wrong.
Solution:   Use "int". (closes vim/vim#10000  Yeah!)
3c5999e53d
2022-03-23 22:33:34 +08:00
52fe8eae07 fix(screen): do not update syntax_last_parsed when drawing folded line (#17826) 2022-03-23 20:23:41 +08:00
f5a3edb0c0 refactor: remove cpo-& behavior (#17745)
cpo-& has been removed, but its behavior was accidentally made the
default behavior. That should be removed instead.
2022-03-23 19:52:50 +08:00
0621cd3112 Merge pull request #17806 from zeertzjq/win-close-float-fix
Fix some bugs with closing window or buffer when there are floating windows
2022-03-23 18:05:31 +08:00
a9359dca37 fix(float): make laststatus=1 behave consistently with floating windows 2022-03-23 09:07:21 +08:00
3fdb7b528d fix(float): handle buffer deletion with floating windows 2022-03-23 09:07:21 +08:00
3539456f49 fix(win_close): count the window the be closed instead of curwin 2022-03-23 09:07:21 +08:00
89712dcbf8 fix(aucmd_win): always make aucmd_win the last window 2022-03-23 09:07:21 +08:00
7735163652 fix(screen): do not do syntax highlighting at filler or folded lines (#17818) 2022-03-23 07:07:34 +08:00
159111f9a5 refactor(ui_refresh): only save/restore p_lz if calling screen_resize() (#17794) 2022-03-23 06:34:45 +08:00
7863e6b709 vim-patch:8.2.1078: highlight and match functionality together in one file (#17805)
Problem:  Highlight and match functionality together in one file.
Solution: Move match functionality to a separate file. (Yegappan Lakshmanan,
          closes vim/vim#6352)

06cf97e714
2022-03-23 06:31:50 +08:00
f63a52a0db vim-patch:8.1.1608: the evalfunc.c file is too big (#17807)
Problem:    The evalfunc.c file is too big.
Solution:   Move sign functionality to sign.c.

b60d8514b8
2022-03-23 06:31:06 +08:00
04d2476d3a Merge pull request #17813 from muniter/jl-ci-api-docs-permissions
fix(ci): provide necessary permissions for calling workflow
2022-03-22 06:52:09 -04:00
b55e65980a fix(ci): provide necessary permissions for calling workflow
Also error on the side of security adding an extra check on the
automatic PR step.
2022-03-21 22:40:24 -05:00
0c02e8a62b Merge pull request #17768 from muniter/jl-genvimdoc-ci 2022-03-21 11:41:19 -04:00
50f3bb7e57 Merge pull request #17491 from neovim/marvim/api-doc-update/master 2022-03-21 11:40:56 -04:00
e9b53f3fb5 fix(PVS/V583): the '?:' operator always returns one and the same value (#17790) 2022-03-20 17:25:03 -06:00
18900758c3 Merge pull request #17760 from lewis6991/vim-patch-8.1.1734
vim-patch:8.1.{1734,1742,1743}: highlight, match and screen.c refactoring
2022-03-21 07:21:04 +08:00
087a9603d0 vim-patch:8.1.1743: 'hlsearch' and match highlighting in the wrong place
Problem:  'hlsearch' and match highlighting in the wrong place.
Solution: Move highlighting from inside screen functions to highlight.c.

bbca7732e8
2022-03-20 22:01:56 +00:00
3c62a3f9dd vim-patch:8.1.1742: still some match functions in evalfunc.c
Problem:    Still some match functions in evalfunc.c.
Solution:   Move them to highlight.c.

7dfb016d25
2022-03-20 22:01:56 +00:00
6566a4bdbd vim-patch:8.1.1734: the evalfunc.c file is too big
Problem:    The evalfunc.c file is too big.
Solution:   Move some functions to other files.

29b7d7a9aa
2022-03-20 22:01:56 +00:00
809dd65396 docs: regenerate [skip ci] 2022-03-20 18:00:30 +00:00
e7391191e2 Merge pull request #17776 from bfredl/tsconceal
feat(ui): allow conceal to be defined in decorations
2022-03-20 18:59:20 +01:00
af427dedf6 fix(lsp): set tabSize from 'shiftwidth', not 'softtabstop' (#17787)
The use of 'softtabstop' to set tabSize was introduced in 5d5b068,
replacing 'tabstop'.  If we look past the name tabSize and at the actual
purpose of the field, it's the indentation width used when formatting.
This corresponds to the Vim option 'shiftwidth', not 'softtabstop'.
The latter has the comparatively mundane purpose of controlling what
happens when you hit the tab key (and even this is incomplete, as it
fails to account for 'smarttab').
2022-03-20 10:41:46 -07:00
6eca9b69c4 feat(ui): allow conceal to be defined in decorations
Unlike syntax conceal, change highlight of concealed char

Can be used in tree-sitter using "conceal" metadata.
2022-03-20 18:02:41 +01:00
463738938d Merge pull request #17785 from muniter/jl-fix-doxygen-destroyer
docs: properly escape to avoid doxygen weirdness
2022-03-20 10:35:27 -04:00
315858bf67 fix(termdebug): handle exiting during startup properly (#16790)
s:EndTermDebug should only be called when exiting if the debugger started
without error, otherwise the plugin breaks.

Vim handles this by using job_setoptions to set the on_exit callback to
s:EndTermDebug after startup succeeds. However, Nvim does not have such
functionality; instead; use s:starting to mimic this behaviour.

Also, introduce s:running to fix s:CheckGdbRunning; it did not work correctly
due to the "[Process exited X]" message keeping the job's channel alive (though
the stream is closed). This means nvim_get_chan_info cannot be used to check if
the debugger has exited, as it may still return a non-empty dict.
2022-03-20 10:10:01 +00:00
75157d2572 vim-patch:47c532e2bc55 (#17780)
Update runtime files
47c532e2bc
2022-03-20 10:48:10 +01:00
54f15a9e47 Merge pull request #17772 from zeertzjq/vim-8.2.2716
vim-patch:8.2.{2716,4546}: the equivalent class regexp is missing some characters
2022-03-20 12:31:11 +08:00
be35d3c5ad feat(api): remove Lua autocommand callbacks when they return true (#17784)
This copies the semantics of nvim_buf_attach callbacks, and is a
convenient way to create oneshot autocommands gated by some condition.
2022-03-19 18:57:58 -06:00
77eb6f9dc7 fix(api, lua): return NIL on failure to find converted function (#17779) 2022-03-20 08:08:50 +08:00
b1207e5080 docs: properly escape to avoid doxygen weirdness
If this is not properly escaped doxygen 1.9.3 will not work correctly,
and the documentation generated in local machines will differ with what
is generated in CI.
2022-03-19 15:32:18 -05:00
2ab52bd988 refactor(tinput_wait_enqueue): use rbuffer_read() when pasting (#17754)
When pasting, all of key buffer can be consumed, and in case of phase 3
the paste event must be put exactly once, so using rbuffer_read() should
be better here.
2022-03-19 21:56:47 +08:00
536dc391f6 vim-patch:8.2.4593: unnecessary call to redraw_later() (#17775)
Problem:    Unnecessary call to redraw_later().
Solution:   Remove the call to redraw_later() in op_yank(). (closes vim/vim#9971)
95d2e7634c
2022-03-19 20:18:45 +08:00
c4624b9543 vim-patch:8.2.4546: duplicate #undef
Problem:    Duplicate #undef.
Solution:   Remove one #undef. (closes vim/vim#9932)
0a4e098f32
2022-03-19 17:12:29 +08:00
81648fd277 vim-patch:8.2.2716: the equivalent class regexp is missing some characters
Problem:    The equivalent class regexp is missing some characters.
Solution:   Update the list of equivalent characters. (Dominique Pellé,
            closes vim/vim#8029)
0b94e297af

Match upstream's indent in s:equivalence_class().
2022-03-19 17:12:29 +08:00
f2e5f509d9 docs: reword description for nvim_buf_line_count() (#17766)
This adds a few more keywords to make the function easier to find.
2022-03-18 19:58:00 +01:00
e0fe91f6a3 fix(translation): po file for Russian (#17767) 2022-03-18 19:48:20 +01:00
9191401025 ci(docs): add a check for PR's to commit their doc changes
Repurpose the api-docs workflow to also run in all PR's but work only as
a check, if the changes in the PR introduce doc changes that are not
committed fail.

[skip ci]
2022-03-18 13:29:55 -05:00
c2fa3af41f Merge pull request #17719 from dundargoc/doxygen/ex_docmd
refactor(ex_docmd): convert function comments to doxygen format
2022-03-18 19:05:24 +01:00
9e66d27d37 fix(syntax.c): correct hunk from Vim patch 8.0.0647 (#17761) 2022-03-18 21:15:18 +08:00
0a81a33a9d Merge pull request #17694 from lewis6991/fix_signcol
fix(signcol): always trigger a redraw
2022-03-18 11:07:13 +01:00
00effff569 vim-patch:8.1.1693: syntax coloring and highlighting is in one big file (#17721)
Problem:    Syntax coloring and highlighting is in one big file.
Solution:   Move the highlighting to a separate file. (Yegappan Lakshmanan,
            closes vim/vim#4674)

f9cc9f209e

Name the new file highlight_group.c instead.

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-03-18 12:47:08 +08:00
c1b98cfa5e Merge pull request #17459 from rktjmp/lua-error-tostring
feat: __tostring lua errors if possible before showing in messages
2022-03-18 00:57:48 +01:00
cac90d2de7 feat(api, lua): support converting nested Funcref back to LuaRef (#17749) 2022-03-17 20:21:47 +01:00
09a3b33d36 Merge pull request #17747 from bfredl/ui_input
feat(ui_client): input and resize
2022-03-17 20:17:38 +01:00
3c7e937a89 Merge pull request #17266 from famiu/feat/ui/global-statusline
feat(statusline): add global statusline
2022-03-17 20:16:39 +01:00
55b6ade7fe feat(ui_client): implement async paste handling 2022-03-17 19:39:06 +01:00
5ab1229174 feat: add support for global statusline
Ref: #9342

Adds the option to have a single global statusline for the current window at the bottom of the screen instead of a statusline at the bottom of every window. Enabled by setting `laststatus = 3`.

Due to the fact that statuslines at the bottom of windows are removed when global statusline is enabled, horizontal separators are used instead to separate horizontal splits. The horizontal separator character is configurable through the`horiz` item in `'fillchars'`. Separator connector characters are also used to connect the horizontal and vertical separators together, which are also configurable through the `horizup`, `horizdown`, `vertleft`, `vertright` and `verthoriz` items in `fillchars`.

The window separators are highlighted using the `WinSeparator` highlight group, which supersedes `VertSplit` and is linked to `VertSplit` by default in order to maintain backwards compatibility.
2022-03-18 00:21:41 +06:00
c6640d0d70 feat(ui_client): handle resize events 2022-03-17 19:20:20 +01:00
6636160338 feat(ui_client): pass user input to remote server 2022-03-17 19:20:13 +01:00
d238b8f600 chore: fix typos (#17670)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-03-17 13:21:24 +08:00
746a29c580 Merge pull request #17707 from tesaguri/refactor-gen_vimdoc 2022-03-16 16:13:59 -04:00
aeae88f32a Merge pull request #17739 from dundargoc/doxygen/ex_cmds
refactor(ex_cmds): convert function comments to doxygen format
2022-03-16 20:52:40 +01:00
4c7e2ab12e Merge pull request #17741 from dundargoc/doxygen/message
refactor(message): convert function comments to doxygen format
2022-03-16 20:11:43 +01:00
b9c3b617ba Merge pull request #17732 from dundargoc/doxygen/fold
refactor(fold): convert function comments to doxygen format
2022-03-16 19:31:48 +01:00
a41321a8a2 refactor(ex_cmds): convert function comments to doxygen format 2022-03-16 18:32:15 +01:00
4e5e0076cb Merge pull request #17708 from bfredl/ui_client
feat(ui): UI client episode II: event handlers
2022-03-16 16:05:40 +01:00
6435a94d62 refactor(message): convert function comments to doxygen format 2022-03-16 14:06:42 +01:00
1784842899 refactor(ex_docmd): convert function comments to doxygen format 2022-03-16 13:46:14 +01:00
fa79a016bc chore(checkhealth/provider): style fixes (#17738) 2022-03-16 09:46:14 +00:00
33ada232c7 fix(checkhealth): make provider checkhealth output more consistent (#17722)
Change missing provider plugins from errors to warnings for python and
perl. Also give proper advice under the ADVICE section instead of just
the errors.
2022-03-16 09:36:26 +01:00
72ed4a547a refactor(fold): convert function comments to doxygen format 2022-03-16 09:22:19 +01:00
5a8bf31d32 vim-patch:8.2.4571: not all gdb files are recognized (#17727)
Problem:    Not all gdb files are recognized.
Solution:   Add a few more patterns for gdb.
            (closes https://github.com/vim/vim/pull/9956)
8d5e514d77
2022-03-15 22:46:32 +01:00
a1a8cbe9e4 Merge pull request #17731 from dundargoc/doxygen/ex_eval
refactor(ex_eval): convert function comments to doxygen format
2022-03-15 21:18:08 +01:00
f01d203b70 refactor(ui): make auto-generated ui client handlers typesafe 2022-03-15 19:55:34 +01:00
c0b4d931e1 refactor(ui): make ui_client_event_grid_line typesafe 2022-03-15 19:55:34 +01:00
ca23f2ed30 refactor(ui): use "ui_client" instead of "redraw" as general prefix 2022-03-15 19:55:34 +01:00
534edce3c4 feat(ui): invoke ui client handlers 2022-03-15 19:55:34 +01:00
794d2744f3 feat(ui): implement ui_client event handlers 2022-03-15 19:55:34 +01:00
2aa473593f refactor: convert function comments to doxygen format 2022-03-15 19:44:44 +01:00
aa35d15a0d Merge pull request #17709 from seandewar/vim-8.2.4559
vim-patch:8.2.{4555,4559,4568,4569}: make `getmousepos()` return the text column
2022-03-15 11:45:53 +00:00
716df377b4 vim-patch:8.2.4568: getmousepos() does not compute the column below the last line
Problem:    getmousepos() does not compute the column below the last line.
Solution:   Also compute the column when the mouse is below the last line.
            (Sean Dewar, closes vim/vim#9946)
10792feebd

test_setmouse is N/A.
2022-03-15 11:41:13 +00:00
4a8b6bde01 vim-patch:8.2.4559: getmousepos() returns the screen column
Problem:    getmousepos() returns the screen column. (Ernie Rael)
Solution:   Return the text column, as documented.
533870a985

Re-introduce vcol2col, which was removed in 71b1f4e for being unused.
Move it to mouse.c (like in v8.1.2062, which hasn't been ported yet).
2022-03-15 11:41:13 +00:00
6906c5759d vim-patch:8.2.4555: getmousepos() returns the wrong column
Problem:    getmousepos() returns the wrong column. (Ernie Rael)
Solution:   Limit to the text size, not the number of bytes.
986b0fd0c5

test_setmouse is N/A; adjust test for Nvim.

N/A patches for version.c:

vim-patch:8.2.4569: Coverity warning for not using a return value

Problem:    Coverity warning for not using a return value.
Solution:   Add "(void)".
977525fea6
2022-03-15 11:39:38 +00:00
9a9b93c485 Merge pull request #16585 from zeertzjq/lua-paste-eol
vim.paste() fixes
2022-03-15 18:41:03 +08:00
e263afc0e9 fix(paste): escape control characters in Cmdline mode 2022-03-15 18:15:18 +08:00
3470a9c3de test(paste): add tests with virtualedit=onemore 2022-03-15 18:15:18 +08:00
e4ec8d7d50 test(paste): reorganize tests and add tests for linewise Visual mode 2022-03-15 18:15:18 +08:00
a6eafc77ce fix(paste): deal with trailing new line in chunk 2022-03-15 18:15:18 +08:00
fcc6f66cf2 fix(paste): avoid edges cases caused by empty chunk 2022-03-15 18:15:18 +08:00
21ba2d81a8 refactor(paste): do not print dots in cmdline mode 2022-03-15 18:15:18 +08:00
bfb7754442 fix(paste): deal with eol and eof in Visual mode 2022-03-15 18:15:18 +08:00
2601e0873f fix(paste): don't move cursor past the end of pasted text in Normal mode 2022-03-15 18:15:18 +08:00
9b1e1fbc9f fix(paste): use getcmdtype() to determine whether in cmdline mode 2022-03-15 18:15:18 +08:00
bef7552f70 Merge pull request #17725 from zeertzjq/vim-8.2.4566
vim-patch:8.2.4566: check for existing buffer in session file may not work
2022-03-15 10:20:00 +08:00
2ea16f7354 vim-patch:8.2.4566: check for existing buffer in session file may not work
Problem:    Check for existing buffer in session file does not work for files
            in the home directory.
Solution:   Use fnamemodify(). (James Cherti, closes vim/vim#9945)  Add a test.
7d42840033
2022-03-15 08:25:39 +08:00
61126fcc69 Merge pull request #17718 from dundargoc/doxygen/eval_c
refactor(eval): convert function comments to doxygen format
2022-03-14 20:59:57 +01:00
2fbbd3258e Merge pull request #17488 from seandewar/vim-8.2.4428
vim-patch:8.2.{1401,1413,4428,4432,4434,4438,4442,4444,4445,4454}: tabpage patches
2022-03-14 13:55:12 +00:00
378db4f32a refactor(eval): convert function comments to doxygen format 2022-03-14 14:22:58 +01:00
365a9b074f vim-patch:8.2.1413: previous tab page not usable from an Ex command
Problem:    Previous tab page not usable from an Ex command.
Solution:   Add the "#" argument for :tabnext et al. (Yegappan Lakshmanan,
            closes vim/vim#6677)
94f4ffa770

Do not rename old_curtab to prev_tp in win_new_tabpage, this can be confused
with the previous tabpage (`:tabprevious`).

Cherry-pick ex_errmsg from v8.2.1280.
8930caaa1a
2022-03-14 13:10:57 +00:00
c5f190e0c2 vim-patch:8.2.1401: cannot jump to the last used tabpage
Problem:    Cannot jump to the last used tabpage.
Solution:   Add g<Tab> and tabpagnr('#'). (Yegappan Lakshmanan, closes vim/vim#6661,
            neovim #11626)
62a232506d

Nvim implemented this feature before Vim, but Vim made some useful changes (e.g:
beeping on failure). Port the changes to closer match Vim (also makes porting
future patches easier).

Also note that because CHECK_CMDWIN was added to goto_tabpage_tp, there is no
need to do the extra work with tabpage_index and goto_tabpage inside
goto_tabpage_lastused to fix cmdwin issues any more (#11692).
Note that while goto_tabpage_tp doesn't check for textlock like goto_tabpage
does, it shouldn't matter as it is already checked for earlier.

Add tags for <C-Tab> to tabpage.txt, and refer to <C-Tab> over CTRL-Tab to be
consistent with other docs like the patch.
Remove mention of "previous tabpage" (it can be confused with the tabpage to the
left, e.g: `:tabprevious`).
Similarly, don't rename old_curtab to last_tab in enter_tabpage (it might be
confused with the right-most tabpage, e.g: `:tablast`).

Cherry-pick Test_tabpage change from v8.2.0634.
92b83ccfda
2022-03-14 13:10:57 +00:00
7e19c18a54 vim-patch:8.2.4454: resetting cmdwin_type only for one situation
Problem:    Resetting cmdwin_type only for one situation.
Solution:   Reset cmdwin_type before closing windows. (closes vim/vim#9822)
6a8b13614e

Move the check to win_free_all to match Vim.
2022-03-14 13:10:57 +00:00
70582bd925 vim-patch:8.2.4445: exit test fails on MS-Windows anyway
Problem:    Exit test fails on MS-Windows anyway.
Solution:   Skip the test on MS-Windows.
29a9e69718
2022-03-14 13:10:57 +00:00
0412dba456 vim-patch:8.2.4444: beep caused by test
Problem:    Beep caused by test.  ASAN reports leaks.
Solution:   Do not put a NL at the end of the script.  Make the text work on
            MS-Windows.  Do not run the test with ASAN.
68eab67119

The test is skipped, but cherry-pick CheckNotAsan from v8.2.2424 anyway.
97202d9516
2022-03-14 13:10:56 +00:00
fe53182934 vim-patch:8.2.4442: test for error reading input fails on MS-Windows
Problem:    Test for error reading input fails on MS-Windows.
Solution:   Don't run the test on MS-Windows.
70b9e4f4c3
2022-03-14 13:10:56 +00:00
7519af4f0f vim-patch:8.2.4438: crash on exit when using cmdline window
Problem:    Crash on exit when using cmdline window.
Solution:   Reset "cmdwin_type" before exiting. (closes vim/vim#9817)
ca0c1caa36

Bram also went with the cmdwin_type = 0 solution, but putting it in
read_error_exit isn't ideal and only fixes one specific variant of the bug, so
don't port that change.

Port the test only, but skip it as Nvim does not exit after stdin is exhausted.
Using -es instead does exit, but read_error_exit does not run preserve_exit in
that case, and does not have issues exiting even without resetting cmdwin_type.

Note that the test has problems and is fixed in later patches.
2022-03-14 13:10:56 +00:00
490874f3da vim-patch:8.2.4432: cannot use settabvar() while the cmdline window is open
Problem:    Cannot use settabvar() while the cmdline window is open.
Solution:   Only give an error when actually switching tabpage.
            (closes vim/vim#9813)
592f625001
2022-03-14 13:10:56 +00:00
880d3537d0 vim-patch:8.2.4428: crash when switching tabpage while in the cmdline window
Problem:    Crash when switching tabpage while in the cmdline window.
Solution:   Disallow switching tabpage when in the cmdline window.
0f6e28f686

Ensure cmdline window doesn't stop us from closing tabs with EXITFREE.
mem_free_all -> win_free_all -> tabpage_close -> ... -> goto_tabpage_tp
-> CHECK_CMDWIN can cause an infinite loop if Nvim is exited without using
standard methods such as :qa! and friends (e.g: killed via a signal).
This issue had caused the ASAN CI's functionaltests to timeout.

Cherry-pick Test_cmdwin_tabpage from v8.2.4463.
38b85cb4d7
This bug was already fixed in Nvim. Note that g<Tab> inside cmdwin is already
tested for in tabnewentered_spec.lua anyway.

E492 is thrown after E11 when using ":norm" in assert_fails for some reason
(except after v8.2.1919, which isn't ported yet).
As v8.2.1183 isn't ported yet, so we cannot assert E11 directly.
Modify the test to check for E11 and E492 seperately; when v8.2.1183 is ported,
the assertion for E492 will fail and the changes can be reverted to match
upstream.

Remove redundant CHECK_CMDWIN from goto_tabpage; it's handled with text_locked()
and text_locked_msg() above:

vim-patch:8.2.4434: duplicate check for cmdline window

Problem:    Duplicate check for cmdline window.
Solution:   Remove the second check. (Sean Dewar, closes vim/vim#9816)
16b51d26fe
2022-03-14 13:10:20 +00:00
895ca52e4c Merge pull request #17717 from dundargoc/doxygen/eval/funcs
refactor(eval/funcs): convert function comments to doxygen format
2022-03-14 13:38:38 +01:00
4d6863554b refactor(eval/funcs): convert function comments to doxygen format 2022-03-14 13:08:52 +01:00
ecc36c3d1c docs: remove extra whitespaces 2022-03-14 08:16:01 +09:00
be2def4100 chore(gen_vimdoc): fall back to brief_desc_node when desc_node is empty 2022-03-14 07:53:42 +09:00
334a16c791 refactor(gen_vimdoc): simplify files in CONFIG 2022-03-14 07:53:42 +09:00
cf4786ddfa chore(gen_vimdoc): call delete_lines_below only if the file exists
Previously, `delete_lines_below` would raise `FileNotFoundError` when
adding a new file to `CONFIG` and you had to manually write a file with
help tag of the first section as placeholder. This change relieves you
of that need.
2022-03-14 07:53:41 +09:00
2d28c40ef9 refactor(gen_vimdoc): detect section_start_token automatically 2022-03-14 07:53:41 +09:00
6dc2c82931 Merge pull request #17696 from dundargoc/refactor/minimize-scope
refactor: minimize variable scope and eliminate empty declarations
2022-03-13 23:17:57 +01:00
f9f843e02e refactor: use Lua autocommands in filetype.lua (#17711) 2022-03-13 15:52:41 -06:00
198bf3a8f2 refactor: minimize variable scope and eliminate empty declarations 2022-03-13 20:44:53 +01:00
ce537bb232 Merge pull request #17697 from lewis6991/screenrefactor
refactor: column drawing
2022-03-13 23:07:50 +08:00
f3f67da340 refactor: column drawing
- move some logic out of win_line into specific easy to read
  sub-functions.

- remove drawing logic from get_sign_display_info.
2022-03-13 22:41:31 +08:00
6e1caeaf3a vim-patch:8.2.4557: confusing comment about 'cursorlineopt'
Problem:    Confusing comment about 'cursorlineopt'.
Solution:   Adjust comment.  (closes vim/vim#9939)  Add parenthesis around logical
            OR.
754d2b4036
2022-03-13 22:28:37 +08:00
4ba12b3dda refactor: fix clint warnings (#17682) 2022-03-13 22:11:17 +08:00
4ede2ea4b2 test: fix runnvim.sh (#17690) 2022-03-13 22:07:22 +08:00
c45644f994 test(python3_spec): use a pattern to match SyntaxError message (#17705) 2022-03-13 22:05:56 +08:00
9e6bc228ec docs(api): improve section on nvim_set_hl (#17692) 2022-03-13 06:42:12 -06:00
c9b94188d5 Merge pull request #17702 from zeertzjq/vim-8.1.0877
vim-patch:8.1.{0877,0892,1015},8.2.{3759,3762}: quickfix patches
2022-03-13 14:21:37 +08:00
ff48e61ec9 vim-patch:8.2.3762: if quickfix buffer is wiped out getqflist() still returns it
Problem:    If the quickfix buffer is wiped out getqflist() still returns its
            number.
Solution:   Use zero if the buffer is no longer present. (Yegappan Lakshmanan,
            closes vim/vim#9306)
56150da687
2022-03-13 13:17:28 +08:00
c5e47e44aa vim-patch:8.2.3759: quickfix buffer becomes hidden while still in a window
Problem:    Quickfix buffer becomes hidden while still in a window.
Solution:   Check if the closed window is the last window showing the quickfix
            buffer. (Yegappan Lakshmanan, closes vim/vim#9303, closes vim/vim#9300)
78a61068cf
2022-03-13 13:17:28 +08:00
dc32a20503 test(old): add some missing tests from Vim patches 8.1.2320 and 8.1.2360 2022-03-13 13:17:28 +08:00
163ec00f44 vim-patch:8.1.1015: quickfix buffer shows up in list, can't get buffer number
Problem:    Quickfix buffer shows up in list, can't get buffer number.
Solution:   Make the quickfix buffer unlisted when the quickfix window is
            closed.  get the quickfix buffer number with getqflist().
            (Yegappan Lakshmanan, closes vim/vim#4113)
647e24ba3d
2022-03-13 13:17:28 +08:00
6c26ab71ce vim-patch:8.1.0892: failure when closing a window when location list is in use
Problem:    Failure when closing a window when location list is in use.
Solution:   Handle the situation gracefully. Make sure memory for 'switchbuf'
            is not freed at the wrong time. (Yegappan Lakshmanan,
            closes vim/vim#3928)
eeb1b9c7ed
2022-03-13 13:17:28 +08:00
91ac0088e1 vim-patch:8.1.0877: new buffer used every time the quickfix window is opened
Problem:    New buffer used every time the quickfix window is opened.
Solution:   Reuse the buffer. (Yegappan Lakshmanan, closes vim/vim#3902)
ee8188fc74
2022-03-13 13:17:28 +08:00
0cf2dc63bf fix(win_split_ins): do not fail when oldwin is not valid
Ref #14240
2022-03-13 13:17:22 +08:00
d33aebb821 feat(runtime): import cleanadd.vim from Vim (#17699)
Latest version from Vim v7.2a.
Closes https://github.com/neovim/neovim/issues/12875
2022-03-13 04:52:45 +00:00
f291a0339c fix: use normal! <C-L> in default <C-L> mapping (#17695) 2022-03-12 17:56:53 -07:00
356631cba0 Merge pull request #17687 from zeertzjq/fix-channel-consistency
fix(channel): fix channel consistency
2022-03-13 05:44:50 +08:00
36ca585d2f Merge pull request #17691 from bfredl/serverconnect
feat(ui): connect to remote ui (beginning of ui client)
2022-03-12 21:11:37 +01:00
a4400bf8cd feat(ui): connect to remote ui (only debug messages for now)
co-authored-by: hlpr98 <hlpr98@gmail.com>
2022-03-12 19:24:46 +01:00
8ba8f1a018 fix(signcol): always trigger a redraw
Whenever we change the size of the buffer signcol value, always trigger
a redraw.

Fixes: #17693
2022-03-12 16:27:11 +00:00
3a12737e6c refactor(main): separate connection code from --remote execution code 2022-03-12 15:06:53 +01:00
f1c9065b0e test: improve terminal channel tests 2022-03-12 19:23:45 +08:00
5051510ade fix(channel): fix channel consistency
- Fix the problem that chanclose() does not work for channel created by
  nvim_open_term().
- Fix the problem that the loopback channel is not released.
- Fix the error message when sending raw data to the loopback channel.
2022-03-12 19:23:45 +08:00
ab456bc304 vim-patch:8.2.3779: using freed memory when defining a user command recursively (#17688)
Problem:    Using freed memory when defining a user command from a user
            command.
Solution:   Do not use the command pointer after executing the command.
            (closes vim/vim#9318)
205f29c3e9
2022-03-12 08:25:28 +00:00
08d9d74fd9 Merge pull request #17680 from zeertzjq/vim-8.2.4440
vim-patch:8.2.{4440,4443}: crash with specific regexp pattern and string
2022-03-12 08:08:31 +08:00
d4982e152c vim-patch:partial:a2baa73d1d33 (#17675)
Update runtime files.
a2baa73d1d

Cherry-pick tabpage.txt changes from patch 8.2.1413.
Skip digraph functions: included in #17440.
Skip many error codes as they haven't been ported yet.
2022-03-12 06:52:54 +08:00
84af45f59f docs: remove "not in vi" notes (#17678)
[skip ci]
2022-03-11 22:25:59 +00:00
965f1fd6fd Merge pull request #17439 from groves/1750
feat: restore --remote
2022-03-11 19:47:24 +01:00
1201145b68 fix(remote): use STATIC_CSTR_AS_STRING 2022-03-11 13:05:40 -05:00
1dbf8675c7 fix(remote): respect silent in error reporting 2022-03-11 11:16:46 -05:00
2be938a251 fix(remote): report connection error, missing return values 2022-03-11 11:16:46 -05:00
29c3632285 fix(remote): report on missing wait commands, typecheck lua results
Clean up lint errors, too
2022-03-11 11:16:46 -05:00
e095a868cb docs(remote): update remote.txt for current nvim implementation 2022-03-11 11:16:46 -05:00
fcdb1f372b docs(remote): restore remote.txt from removal in f2205b83c5 2022-03-11 11:16:46 -05:00
039e94f491 test(remote): add tests for --remote
This also fixes a fair number of issues found in running the tests
2022-03-11 11:16:46 -05:00
70d2ab1583 fix(remote): make compile again 2022-03-11 11:16:46 -05:00
5862176764 feat(remote): add basic --remote support
This is starting from @geekodour's work at
https://github.com/neovim/neovim/pull/8326
2022-03-11 11:16:46 -05:00
a6e72aa295 vim-patch:8.2.4443: regexp pattern test fails on Mac
Problem:    Regexp pattern test fails on Mac.
Solution:   Do not use a swapfile for the buffer.
2457b2bbc2
2022-03-11 23:01:33 +08:00
d0b5c1f696 vim-patch:8.2.4440: crash with specific regexp pattern and string
Problem:    Crash with specific regexp pattern and string.
Solution:   Stop at the start of the string.
6456fae9ba
2022-03-11 23:01:02 +08:00
76769b8a1f Merge pull request #17673 from dundargoc/refactor/clint
refactor: fix all clint warnings from buffer
2022-03-11 15:23:51 +01:00
c2ab922f0a Merge pull request #17663 from dundargoc/refactor/uncrustify
refactor: apply uncrustify
2022-03-11 15:07:49 +01:00
c3a6ff6aa3 fix(coverity): dead code and operands don't affect result #17662
* fix(coverity/349942): structurally dead code

* fix(coverity/331396): operands don't affect result

* fix(coverity/331393): operands don't affect result

* fix(coverity/331392): operands don't affect result

* fix(coverity/331384): operands don't affect result

* fix(coverity/331374): operands don't affect result

* fix(coverity/331372): operands don't affect result

* fix(coverity/331371): operands don't affect result

* fix(coverity/331364): operands don't affect result

* fix(coverity/105585): operands don't affect result
2022-03-11 15:04:48 +01:00
9ff4acbb36 refactor: fix all clint warnings from buffer.c 2022-03-11 14:47:18 +01:00
19858288b4 Merge pull request #17672 from lewis6991/refactorprovider
refactor(decorations): move provider code
2022-03-11 13:01:33 +01:00
abbc9148db Merge pull request #17665 from clason/bump-libuv
build(deps): bump libuv to 1.44.1
2022-03-10 18:45:12 -05:00
8a5f0559cc Merge pull request #17604 from dundargoc/ci/better-error-output
Better CI error output
2022-03-10 18:42:02 -05:00
4be92ba90d refactor(decorations): unglobal decor_providers
Now all the decoration provider code is in one place, decor_providers no
longer need to be global.
2022-03-10 22:41:21 +00:00
1b054119ec refactor(decorations): move provider code
Move decoration provider code to a separate file.
2022-03-10 22:41:20 +00:00
1e7ba7ea6b build(deps): bump libuv to 1.44.1 2022-03-10 16:48:49 +01:00
6170574d2f Merge pull request #17660 from bfredl/luacomplete
feat(lua): handle lazy submodules in `:lua vim.` wildmenu completion
2022-03-10 15:46:18 +01:00
3a32aa9615 Merge pull request #17671 from zeertzjq/vim-8.2.3949
vim-patch:8.2.{3949,3950}: fix two crashes with /\%V
2022-03-10 20:32:13 +08:00
a80ec88906 test: add a test for #17489 2022-03-10 17:22:39 +08:00
c3208feb72 vim-patch:8.2.3950: going beyond the end of the line with /\%V
Problem:    Going beyond the end of the line with /\%V.
Solution:   Check for valid column in getvcol().
94f3192b03
2022-03-10 17:22:39 +08:00
d2d3be0a4a vim-patch:8.2.3949: using freed memory with /\%V
Problem:    Using freed memory with /\%V.
Solution:   Get the line again after getvvcol().
4c13e5e676
2022-03-10 16:43:27 +08:00
815ba835a3 ci: refactor and simplify CI process 2022-03-10 09:21:41 +01:00
d47714d87c ci: remove function run_suite 2022-03-10 09:21:41 +01:00
7a0fd7a288 ci: remove variable FAIL_SUMMARY
On GitHub Actions it just repeats the summary that is shown just after.
When run outside of GitHub Actions it erroneously shows the summary of
the previous suites.
2022-03-10 09:21:41 +01:00
fbcbd1d05e ci: remove variable NVIM_TEST_CURRENT_SUITE
We always know where in the test we are anyway, it's just needless
repetition.
2022-03-10 09:21:41 +01:00
17ecb60c58 ci: remove fail character from fail function 2022-03-10 09:21:40 +01:00
7e3bdc75e4 refactor(uncrustify): format all c files 2022-03-10 09:14:12 +01:00
d0cb8744d8 refactor(uncrustify): disable uncrustify for misformatted code sections
Uncrustify version 0.74 has a bug that deindents and misformats the
entire fileio.c.
2022-03-10 09:14:12 +01:00
9e9322b222 Merge pull request #17653 from dundargoc/chore/lgtm
fix lgtm warnings
2022-03-10 15:01:02 +08:00
a7b1c8893c chore: fix typos (#17331)
Co-authored-by: Hongyi Lyu <hongyi.lyu95@gmail.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: notomo <notomo.motono@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-03-10 14:34:55 +08:00
487f52c9d2 chore(regexp.c): correctly align META_flags (#17668) 2022-03-10 13:53:57 +08:00
0115b3f023 Merge pull request #16336 from kylo252/vim-8.1.2005
vim-patch:8.1.{2005,2010}: the regexp.c file is too big
2022-03-10 12:49:31 +08:00
d6fe06b0a6 Merge pull request #17666 from zeertzjq/api-statusline-fillchar-relax
feat(api): relax statusline fillchar width check
2022-03-10 10:39:14 +08:00
4fed1bf7e5 vim-patch:8.1.2005: the regexp.c file is too big
Problem:    The regexp.c file is too big.
Solution:   Move the backtracking engine to a separate file. (Yegappan
            Lakshmanan, closes vim/vim#4905)
6d7d7cf750

vim-patch:8.1.2010: new file uses old style comments

Problem:    New file uses old style comments.
Solution:   Change to new style comments. (Yegappan Lakshmanan, closes vim/vim#4910)
9490b9a61c
2022-03-10 10:09:28 +08:00
3011794c86 feat(api): relax statusline fillchar width check
Treat fillchar as single-width even if it isn't.
2022-03-10 07:40:52 +08:00
5ed60804fe feat(lua): handle lazy submodules in :lua vim. wildmenu completion 2022-03-09 15:25:06 +01:00
a978d7689d Merge pull request #17640 from lewis6991/virttextfix
fix(extmarks): fix signs
2022-03-09 13:41:13 +01:00
14859f49ae Merge pull request #17600 from kylo252/clang-format-update
chore: align clang-format configuration with clint
2022-03-09 19:54:30 +08:00
ac91c56085 chore: align clang-format configuration with clint
Some additional tweaks to make clang-format more compatible with
`clint.py` rules.
This is especially useful for range-formatting with `clangd`.
2022-03-09 19:44:03 +08:00
d2d64b1f72 Merge pull request #17643 from dundargoc/chore/remove-stripdecls
chore(stripdecls): remove unused and no longer functional script
2022-03-09 11:41:45 +01:00
c7512611bf Merge pull request #17502 from zeertzjq/vim-8.1.0999
vim-patch:8.1.0999: use register one too often and not properly tested
2022-03-09 16:55:07 +08:00
46a0cec3a6 chore(stripdecls): remove unused and no longer functional script 2022-03-09 09:30:26 +01:00
05f643f9d2 chore(lgtm): fix "empty block without comment" warnings 2022-03-09 09:29:57 +01:00
f27068caad chore(lgtm): ignore "__eq__ not overridden" warning 2022-03-09 09:29:57 +01:00
5ad63c3d98 Merge pull request #16730 from VVKot/vim-8.1.0136
vim-patch:8.1.{136, 139, 164, 300, 672, 748}
2022-03-09 16:13:20 +08:00
b743e415fe vim-patch:partial 1588bc8ebee2 (#17657)
Update runtime files
1588bc8ebe

docs only

skip :argdedupe changes (need v8.2.3888)
skip sound_playfile changes (need +sound)
skip fuzzy-matching changes in *command-attributes* (need #17536)
2022-03-09 08:44:28 +01:00
a681b5eaca vim-patch:partial 1588bc8ebee2 (#17656)
Update runtime files
1588bc8ebe

omit: doc updates
2022-03-09 08:40:16 +01:00
5ac30eacf4 vim-patch:8.1.0999: use register one too often and not properly tested
Problem:    Use register one too often and not properly tested.
Solution:   Do not always use register one when specifying a register.
            (closes vim/vim#4085)  Add more tests.
9d7fdd403a
2022-03-09 13:32:50 +08:00
f6d507f5ba refactor(ops): use op_yank_reg() instead of op_yank() when deleting
Needed for Vim patch 8.1.0999.
2022-03-09 10:02:16 +08:00
ee903e86fd vim-patch:8.1.0748: using sprintf() instead of semsg()
Problem:    Using sprintf() instead of semsg().
Solution:   Use semsg().  Fix bug with E888. (Ozaki Kiichi, closes vim/vim#3801)
1be45b2ea7

vim-patch:8.1.0136: Lua tests don't cover new features

Problem:    Lua tests don't cover new features.
Solution:   Add more tests. (Dominique Pelle, closes vim/vim#3130)
2f362bf7f9

vim-patch:8.1.0139: Lua tests fail on some platforms

Problem:    Lua tests fail on some platforms.
Solution:   Accept a hex number with and without "0x". (Ken Takata,
            closes vim/vim#3137)
a8a60d0c6b

vim-patch:8.1.0164: luaeval('vim.buffer().name') returns an error

Problem:    luaeval('vim.buffer().name') returns an error.
Solution:   Return an empty string. (Dominique Pelle, closes vim/vim#3167)
fe08df452a

vim-patch:8.1.0300: the old window title might be freed twice

Problem:    The old window title might be freed twice. (Dominique Pelle)
Solution:   Do not free "oldtitle" in a signal handler but set a flag to have
            it freed later.
d8f0cef2bd

vim-patch:8.1.0672: the Lua interface doesn't know about v:null

Problem:    The Lua interface doesn't know about v:null.
Solution:   Add Lua support for v:null. (Uji, closes vim/vim#3744)
9067cd6cdf
2022-03-09 09:22:26 +08:00
205b3765f2 Merge pull request #17622 from dundargoc/refactor/clang-tidy/remove-redundant-casts
refactor/clang tidy/remove redundant casts
2022-03-09 08:15:18 +08:00
f33cea4682 Merge pull request #17505 from zeertzjq/vim-8.2.0997
vim-patch:8.2.0997: cannot execute a register containing line continuation
2022-03-09 06:54:35 +08:00
165cf1b48e vim-patch:8.2.0997: cannot execute a register containing line continuation
Problem:    Cannot execute a register containing line continuation.
Solution:   Concatenate lines where needed. (Yegappan Lakshmanan,
            closes vim/vim#6272)
856c1110c1

According to #2542 the "Future:" part was removed intentionally.
Use size_t in more places to reduce type casts.
2022-03-09 06:25:31 +08:00
2ab2af598e fix(extmarks): fix signs
Don't add sign extmarks to state->active. Instead when drawing signs,
perform a full line scan for sign marks. This allows decor_redraw_line
to be moved back inside the `!number_only` block in screen.c, which
prevents decor scans when redrawing the number column when
'relativenumber' is set.

Fixes: #17638
2022-03-08 22:08:57 +00:00
f24121ad96 fix(line continuation): set growsize to correct value (#17655)
Using MAX always sets growsize to 8000, unless ga_len is larger...
2022-03-08 21:38:10 +00:00
4632729459 Merge pull request #17585 from zeertzjq/ci-freebsd-oldtests 2022-03-08 14:42:56 -05:00
4f007a7f65 fix: do not pass aucmd to the callback (#17650) 2022-03-08 16:27:11 +00:00
bce1fd2218 chore(aucmd): remove left-over debug log (#17649) 2022-03-08 12:56:45 +01:00
2783f4cc4a feat(api): autocmd group can be either name or id (#17559)
* feat(api): `group` can be either string or int

This affects the following API functions:
- `vim.api.nvim_create_autocmd`
- `vim.api.nvim_get_autocmds`
- `vim.api.nvim_do_autocmd`

closes #17552

* refactor: add two maps for fast lookups

* fix: delete augroup info from id->name map

When in "stupid_legacy_mode", the value in name->id map would be updated
to `AUGROUP_DELETED`, but the entry would still remain in id->name. This
would create a problem in `augroup_name` function which would return the
name of the augroup instead of `--DELETED--`.

The id->name map is only used for fast loopup in `augroup_name` function
so there's no point in keeping the entry of deleted augroup in it.

Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>
2022-03-07 23:15:43 -05:00
3cc48e6273 Merge pull request #17631 from zeertzjq/vim-8.2.4520
vim-patch:8.2.4520: using wrong highlight for cursor line number
2022-03-08 10:54:01 +08:00
2adc24b18b test: add a Lua screen test for CursorLineNr in diff mode
Remove a useless test added in #14190
2022-03-08 10:11:20 +08:00
ec3f93ff88 vim-patch:8.2.4520: using wrong highlight for cursor line number
Problem:    Using wrong highlight for cursor line number.
Solution:   Take filler lines into account when using CursorLineNr.
            (closes vim/vim#9897)
127969cf98
2022-03-08 10:09:22 +08:00
bcda54b30e Merge pull request #17642 from dundargoc/ci/macos/reduce-brew-output
ci(macos): minimize log output from brew update
2022-03-07 18:59:50 -05:00
917dfa510a ci(freebsd): enable oldtests 2022-03-08 07:00:40 +08:00
d15558bfa3 ci(macos): minimize log output from brew update
Also remove perl from brew install to prevent a warning that states it's
already installed.
2022-03-07 23:49:52 +01:00
8bae974da3 build(deps): bump tree-sitter to 0.20.6 (#17587) 2022-03-07 23:48:33 +01:00
c400688752 build(deps): bump libuv to 1.44.0 (#17613) 2022-03-07 22:49:35 +01:00
26e713797b Merge pull request #17635 from dundargoc/ci/freebsd/bump-to-latest 2022-03-07 16:47:14 -05:00
caffee0b67 Merge pull request #17641 from dundargoc/ci/document-jobs 2022-03-07 14:21:36 -05:00
57fee60c76 Merge pull request #17636 from bfredl/luacrash 2022-03-07 14:05:20 -05:00
242183585c ci: document the purpose of some non-obvious jobs 2022-03-07 14:18:11 +01:00
824f24a6b0 ci(freebsd): use image freebsd/latest 2022-03-07 12:21:43 +01:00
147908336e fix(lua): don't use nlua_error when exiting early
Screen state is not initialized yet. Print directly to stderr instead.
2022-03-07 11:04:36 +01:00
c3cc17f0e6 Merge pull request #17621 from bfredl/luaindex
refactor(lua): make vim submodule lazy loading declarative
2022-03-07 11:01:50 +01:00
5f3fff62a8 chore(flake): bump flake (#17632)
it was 6 months old
2022-03-07 10:57:08 +01:00
f39a12d629 refactor(lua): make vim submodule lazy loading declarative
This will allow us to also use the same logic for lua threads and
processes, later.
2022-03-07 09:59:22 +01:00
5760cf87b6 Merge pull request #17626 from dundargoc/ci/openbsd/bump-to-latest
ci(openbsd): use latest image
2022-03-06 20:06:36 -05:00
a7c999523d Merge pull request #17630 from kchibisov/fix-underline-regression
fix(api): highlight attribute for underline
2022-03-06 18:43:02 -05:00
40e3668e54 Merge pull request #17616 from zeertzjq/vim-8.2.3739
vim-patch:8.2.{3739,3745,3920,4060,4513}
2022-03-07 07:10:48 +08:00
194411d18a test: add a test for #17609 2022-03-07 06:43:03 +08:00
0442635a50 test(autochdir_spec): use better patterns 2022-03-07 06:43:03 +08:00
eb70540ff0 vim-patch:8.2.4513: window-local directory is not applied if 'acd' fails
Problem:    Window-local directory is not applied if 'acd' fails.
Solution:   Don't call do_autochdir(). (closes vim/vim#9891)
b29ae15977
2022-03-07 06:43:03 +08:00
8e06377bc6 vim-patch:8.2.4060: win_execute() slow on systems where getcwd()/chdir() is slow
Problem:    win_execute() is slow on systems where getcwd() or chdir() is
            slow. (Rick Howe)
Solution:   Avoid using getcwd() and chdir() if no local directory is used and
            'acd' is not set. (closes vim/vim#9504)
d6f27c66cc
2022-03-07 06:43:03 +08:00
da9bc96152 vim-patch:8.2.3920: restoring directory after using another window is inefficient
Problem:    Restoring directory after using another window is inefficient.
Solution:   Only restore the directory for win_execute().  Apply 'autochdir'
            only when needed.
90c317f224
2022-03-07 06:43:03 +08:00
1a5409db0d vim-patch:8.2.3745: autochdir test fails without the +channel feature
Problem:    Autochdir test fails without the +channel feature.
Solution:   Remove the ch_logfile() call. (Dominique Pellé, closes vim/vim#9281)
f661cee847
2022-03-07 06:43:03 +08:00
8262de0b48 vim-patch:8.2.3739: in wrong directory when using win_execute() with 'acd' set
Problem:    In wrong directory when using win_execute() with 'acd' set.
Solution:   Restore the directory when returning to the window. (closes vim/vim#9276)
dea4a61637
2022-03-07 06:43:03 +08:00
04ae502691 ci(openbsd): use latest image 2022-03-06 23:02:28 +01:00
ff032f2710 refactor: remove redundant casts 2022-03-06 23:02:10 +01:00
918ab6bf00 ci(clint): remove "Unknown NOLINT error category" warning
Clang-tidy also uses "NOLINT" to suppress warnings which causes a
conflict.
2022-03-06 23:02:10 +01:00
8e7446b3cb refactor(signcol): smarter invalidation (#17533)
Previously b_signcols was invalidated whenever a sign was added/removed
or when a buffer line was added/removed.

This change introduces a sentinel linenr_T into the buffer state which
is a line number used to determine the signcolumn. With this
information, we can invalidate the signcolumn less often. Now the
signcolumn is only invalidated when a sign or line at the sentinel line
number is removed.
2022-03-06 22:45:26 +01:00
5400017020 Merge pull request #17628 from jamessan/bsd-gdb
ci(bsd): install gdb to get backtraces from cores
2022-03-06 16:09:39 -05:00
96bb1784a6 fix(api): highlight attribute for underline
This commit fixes regression introduced in c365de1 when checking for
highlight attribute for underline was returning '0' when it was present

Fixes #17624.
2022-03-06 23:51:25 +03:00
0b53645596 test(sr.ht): skip luamod-dev test which crashes nvim 2022-03-06 15:44:54 -05:00
92349b1db0 feat(api): add 'buffer' argument to nvim_get_autocmds (#17594)
This enables retrieving autocommands defined in the given buffers. Under
the hood this simply translates the buffer numbers into '<buffer=%d>'
patterns.
2022-03-06 12:35:14 -07:00
ee1112f1b7 ci(bsd): install gdb to get backtraces from cores 2022-03-06 13:58:21 -05:00
3800615da9 fix(lsp): handle insertion of previous line (#17618) 2022-03-06 07:52:11 -08:00
24d56116f7 Merge pull request #17623 from zeertzjq/lua-editor-mentions
docs(lua): reference runtime/lua/vim/_editor.lua
2022-03-06 23:05:44 +08:00
80e6f81862 docs(lua): reference runtime/lua/vim/_editor.lua 2022-03-06 22:32:22 +08:00
72a04bda90 Merge pull request #16897 from lewis6991/signs
feat(decorations): support signs
2022-03-06 14:09:01 +01:00
8ed9c84481 Merge pull request #17597 from dundargoc/build/cmake/fix-warnings
fix cmake warnings
2022-03-05 15:02:01 -05:00
c365de1d22 Merge pull request #17589 from kchibisov/add-dashed-dotted-underline
Add support for double, dashed, and dotted underlines
2022-03-05 15:00:07 -05:00
d557a45571 Merge pull request #17538 from dundargoc/refactor/bugprone-signed-char-misuse
refactor: fix clang-tidy bugprone-signed-char-misuse warnings
2022-03-05 19:39:36 +01:00
2de4d3c7ac Merge pull request #17603 from bfredl/luaworld
refactor(lua): move only runtime lua file in src/ to runtime/lua
2022-03-05 19:21:34 +01:00
a5e475fcc2 fix(lsp): start incremental sync range at previous newline character (#17610)
This change forces the start of an incremental sync range to begin always on an existing line.
2022-03-05 09:17:56 -08:00
30e4cc3b3f feat(decorations): support signs
Add the following options to extmarks:
  - sign_text
  - sign_hl_group
  - number_hl_group
  - line_hl_group
  - cursorline_hl_group

Note: ranges are unsupported and decorations are only applied to
start_row
2022-03-05 16:51:59 +00:00
7fd1182c62 fix: bounds check for underdot 2022-03-05 19:16:14 +03:00
228ea78622 Merge pull request #17611 from zeertzjq/vim-patch-pr-args
feat(vim-patch.sh): support additional args for -s
2022-03-05 11:04:30 -05:00
fff527b88d test(strcase_save): test overlong UTF8-encoding 2022-03-05 16:40:03 +01:00
0ec92bb463 feat(vim-patch.sh): support additional args for -s
This allows creating a draft vim-patch PR.
2022-03-05 10:12:17 +08:00
4d2744ffe3 refactor: fix clang-tidy bugprone-signed-char-misuse warnings
Prefer to declare variables with correct type instead of explicit casts
wherever possible.
2022-03-04 19:52:41 +01:00
eb4ae060bc build(cmake): remove unused variable CMAKE_CXX_COMPILER to fix warning 2022-03-04 19:21:35 +01:00
186a559818 refactor(lua): move only runtime lua file in src/ to runtime/lua
reorganize so that initialization is done in lua
2022-03-04 19:07:42 +01:00
6379389cbb build(cmake): fix policy warning 2022-03-04 17:16:40 +01:00
83fc914337 Merge pull request #17601 from dundargoc/revert/libuv 2022-03-04 11:04:17 -05:00
f9a8a811c7 revert: "build(deps): bump libuv to 1.43.0+7ae0c95"
This reverts commit 2da9450de5.
2022-03-04 16:24:17 +01:00
6795c9772b fix(syntax): remove trailing spaces in vim.vim 2022-03-04 15:35:44 +03:00
6b6e64dfeb Merge pull request #17598 from dundargoc/ci/reviewer/update-reviewers
ci(reviews): update reviewers
2022-03-04 06:18:14 -05:00
b842f5491f ci(reviews): update reviewers 2022-03-04 11:28:32 +01:00
ead0a5a464 Merge pull request #17596 from zeertzjq/autocmd-comment
chore(autocmd): move comment to the right place
2022-03-04 17:14:52 +08:00
08cf3fb099 chore(autocmd): move comment to the right place 2022-03-04 16:39:55 +08:00
d5bd7ffe51 fix(autocmd): clean up autocmds only when needed (#17593) 2022-03-04 09:25:09 +01:00
4472820182 fix(docs): spelling in new underlines docs 2022-03-04 00:35:51 +03:00
f89fb41a7a feat(tui): add support for CSI 4 : [2,4,5] m
This commit finishes support for colored and styled underlines adding
`CSI 4 : [2,4,5] m` support providing double, dashed, and dotted
underlines

Fixes #17362.
2022-03-03 23:35:36 +03:00
e23af71d35 Merge pull request #17567 from bfredl/preload
refactor(lua): regularize builtin modules, phase 1
2022-03-03 21:00:00 +01:00
f9faba88fd refactor(lua): reorganize builtin modules, phase 1 2022-03-03 20:03:30 +01:00
13cabfedb2 Merge pull request #17568 from groves/respect_os_proc_children_rv 2022-03-03 12:27:37 -05:00
0733f72616 Merge pull request #17564 from dundargoc/ci/freebsd/remove-deprecated-port
ci(freebsd): remove deprecated package sha to fix warning
2022-03-03 10:32:52 -05:00
e8d047df81 Merge pull request #17591 from zeertzjq/vim-8.2.4498
vim-patch:8.2.4498: using <Plug> with "noremap" does not work
2022-03-03 23:18:46 +08:00
ff20d9b106 Merge pull request #17590 from bfredl/cbfree
refactor(autocmd): simplify check for freed callback
2022-03-03 15:41:38 +01:00
e8107f0748 vim-patch:8.2.4498: using <Plug> with "noremap" does not work
Problem:    Using <Plug> with "noremap" does not work.
Solution:   Always remap <Plug>. (closes vim/vim#9879, closes vim/vim#9789)
1fc34225ac
2022-03-03 22:41:09 +08:00
dcd03f5d9d refactor(autocmd): simplify check for freed callback
When a callback is freed the type is always set to kCallbackNone.
2022-03-03 14:29:26 +01:00
7211d8ef21 Merge pull request #17584 from zeertzjq/test-pending-win32
test: use helpers.pending_win32(pending) in buffer_updates_spec
2022-03-03 16:39:24 +08:00
f8b3a1691f test: use helpers.pending_win32(pending) in buffer_updates_spec 2022-03-03 16:07:39 +08:00
f9db491a64 Merge pull request #17583 from zeertzjq/test-old-missing
test(old): add more missing test files and run more tests alone
2022-03-03 13:52:49 +08:00
78bb8c4ee7 test(old): add more missing test files and run more tests alone
Copy four files from Vim v8.2.1432.
Try to match Vim's test_alot.vim.
This marks Vim patch 8.2.0164 as ported:

vim-patch:8.2.0164: test_alot takes too long

Problem:    Test_alot takes too long.
Solution:   Run several tests individually.
842931cd7a
2022-03-03 13:23:08 +08:00
5d6006f9bf feat(diagnostic): add "code" to the diagnostic structure (#17510) 2022-03-02 18:42:27 -07:00
051a0514dc Merge pull request #17579 from zeertzjq/ci-win-fail
ci: show failed message on Windows
2022-03-02 20:21:13 -05:00
f015994a42 Merge pull request #17571 from zeertzjq/pvs-autocmd
Some clang and PVS fixes
2022-03-03 08:25:28 +08:00
1495c4d166 ci: show failed message on Windows 2022-03-03 08:16:31 +08:00
85de9b06ed Merge pull request #17578 from zeertzjq/test-warning-poke
test: mention poke_eventloop() instead of wait()
2022-03-03 06:23:10 +08:00
d477788cd5 fix(lsp): respect all of 'fixeol', 'eol', and 'binary' applying edits (#17574) 2022-03-02 11:33:02 -08:00
482ea0cc17 Merge pull request #17575 from zeertzjq/pty-did-eof
fix(pty_process_win/wait_eof_timer_cb): also check for proc->out.did_eof
2022-03-02 11:57:19 -05:00
ede4eac61f test: mention poke_eventloop() instead of wait() 2022-03-02 22:31:20 +08:00
bc04c3d1ba revert: "ci(windows): skip oldtest on windows until failing tests are fixed"
This reverts commit 07d3fb6e3b.
2022-03-02 21:28:41 +08:00
4154bf9b59 fix(pty_process_win/wait_eof_timer_cb): also check for proc->out.did_eof 2022-03-02 21:28:36 +08:00
0e02a5f109 Merge pull request #17572 from bfredl/testfix
fix(test): only use buffer completion in popupmenu timer test
2022-03-02 10:38:37 +01:00
5ecb2cb539 fix(test): only use buffer completion in popupmenu timer test 2022-03-02 09:15:49 +01:00
3763d7d2d5 refactor(clang): dead assignment buflocal_nr = 0 2022-03-02 15:17:50 +08:00
8ba47a6457 refactor(PVS/V547): aucmd.type == CALLABLE_NONE is always false 2022-03-02 15:14:52 +08:00
22d1b2423f refactor(PVS/V560): ap == NULL is always false 2022-03-02 15:14:11 +08:00
4b3f920477 Merge pull request #16804 from zeertzjq/ui-aucmd-docs
docs: clarify UIEnter and UILeave docs
2022-03-02 15:05:19 +08:00
4c24fcb91f Merge pull request #17570 from zeertzjq/pvs-autocmd-header
chore(PVS): add PVS header to api/autocmd.c
2022-03-02 09:02:28 +08:00
55a189583e chore(PVS): add PVS header to api/autocmd.c 2022-03-02 08:50:15 +08:00
1fdf903911 Merge pull request #17569 from zeertzjq/test-mapping
test: move two mapping tests to ex_cmds/map_spec.lua
2022-03-02 08:45:41 +08:00
9a5a3c699e test: move two mapping tests to ex_cmds/map_spec.lua 2022-03-02 08:15:29 +08:00
045422e4a0 fix: respect os_proc_children rv of pid not found
os_proc_children returns 2 if there's a failure in the underlying
syscall. Only shell out to pgrep in that case.

It returns 1 if the pid isn't found. In that case, we can roll forward
with returning an empty list.
2022-03-01 16:13:23 -05:00
ed1a9c310d fix: enable filetype detection and syntax highlighting with --clean (#17566)
--clean is supposed to emulate a "fresh install" and since Neovim
enables filetype detection and syntax highlighting by default, these
should be enabled when using --clean as well.
2022-03-01 10:47:20 -07:00
770b9f3c3b Merge pull request #17542 from dundargoc/ci/skip-oldtest-on-windows 2022-03-01 11:37:50 -05:00
07d3fb6e3b ci(windows): skip oldtest on windows until failing tests are fixed
The oltests hang on windows, making all CI runs fail.
2022-03-01 17:03:13 +01:00
7737a273b2 ci(freebsd): remove deprecated package sha to fix warning
It's already included by default, no need to replace it.
2022-03-01 15:20:36 +01:00
a7bc3e0f7b Merge pull request #17556 from zeertzjq/remove-unused-k-aucmd-special
refactor: remove unused K_AUCMD_SPECIAL
2022-03-01 13:16:45 +01:00
0a9b00913f Merge pull request #15079 from shadmansaleh/feat/verbose_lua
feat(lua): add :verbose support for lua config
2022-03-01 13:13:11 +01:00
37a86a2f96 fix(api): include event in get_autocmds (#17553) 2022-03-01 09:07:41 +01:00
01139ec82c Merge pull request #17557 from zeertzjq/clarify-plug
docs: clarify actual behavior of <Plug>
2022-03-01 09:44:40 +08:00
0cb9a577ed docs: clarify actual behavior of <Plug> 2022-03-01 09:28:27 +08:00
fed515d9e7 refactor: remove unused K_AUCMD_SPECIAL 2022-03-01 07:32:04 +08:00
cf0266fae1 Merge pull request #17551 from bfredl/lua_autocmd_rebase
feat(lua_autocmd): episode III (the autocmds strike back)
2022-02-28 20:57:24 +01:00
0f613482b3 feat(lua): add missing changes to autocmds lost in the rebase
Note: some of these changes are breaking, like change of API signatures
2022-02-28 19:53:50 +01:00
6732cd9e57 Merge pull request #17529 from seandewar/api-string-oopsie
fix(api): convert blob to NUL-terminated API string
2022-02-28 14:59:52 +01:00
cca08d0f3b Merge pull request #17476 from dundargoc/test/emmylua
test: correct emmylua annotations
2022-02-28 21:21:41 +08:00
7b6ee3ef0a fix: anonymous sid not working 2022-02-28 19:18:49 +06:00
ebfe083337 feat(lua): show proper verbose output for lua configuration
`:verbose` didn't work properly with lua configs (For example:
    options or keymaps are set from lua, just say that they were set
    from lua, doesn't say where they were set at.

This fixes that issue. Now `:verbose` will provide filename and line no
when option/keymap is set from lua.

Changes:
  - compiles lua/vim/keymap.lua as vim/keymap.lua
 - When souring a lua file current_sctx.sc_sid is set to SID_LUA
 - Moved finding scripts SID out of `do_source()` to `get_current_script_id()`.
   So it can be reused for lua files.
 - Added new function `nlua_get_sctx` that extracts current lua scripts
   name and line no with debug library. And creates a sctx for it.
     NOTE: This function ignores C functions and blacklist which
     currently contains only vim/_meta.lua so vim.o/opt wrappers aren't
     targeted.
 - Added function `nlua_set_sctx` that changes provided sctx to current
   lua scripts sctx if a lua file is being executed.
 - Added tests in tests/functional/lua/verbose_spec.lua
 - add primary support for additional types (:autocmd, :function, :syntax) to lua verbose
    Note: These can't yet be directly set from lua but once that's possible
    :verbose should work for them hopefully :D
 - add :verbose support for nvim_exec & nvim_command within lua
    Currently auto commands/commands/functions ... can only be defined
    by nvim_exec/nvim_command this adds support for them. Means if those
    Are defined within lua with vim.cmd/nvim_exec :verbose will show their
    location . Though note it'll show the line no on which nvim_exec call was made.
2022-02-28 19:18:49 +06:00
e383543342 Merge pull request #17544 from r0x0d/update-readme-for-fedora-link
Fix fedora broken link
2022-02-28 09:38:00 +08:00
43c495b183 docs: fix fedora broken link in readme
The link to the neovim fedorapackage.org in the README.md was broken.

Signed-off-by: Rodolfo Olivieri <rodolfo.olivieri3@gmail.com>
2022-02-27 22:19:16 -03:00
fad33b095f Merge pull request #14661 from tjdevries/tjdevries/lua_autocmd_v2
lua: autocmds take 2: electric autoroo
2022-02-28 00:07:31 +01:00
991e472881 feat(lua): add api and lua autocmds 2022-02-27 22:04:55 +01:00
1b5767aa34 feat(lua): add <f-args> to user commands callback (#17522)
Works similar to ex <f-args>. It only splits the arguments if the
command has more than one posible argument. In cases were the command
can only have 1 argument opts.fargs = { opts.args }
2022-02-27 12:35:06 -07:00
c65d93e60a Merge pull request #16969 from shadmansaleh/enhance/ingore_nore_on_plug_keymaps
feat: ignore nore on <Plug> maps
2022-02-27 16:47:55 +01:00
243869658e Merge pull request #17540 from jamessan/luv-bump-fix
ci(lint): use bundled luv until system packages are updated
2022-02-27 09:16:50 -05:00
97ed3effff ci(lint): re-add building of third-party 2022-02-27 09:07:11 -05:00
8d8288461a ci(lint): use bundled luv until system packages are updated 2022-02-27 09:07:11 -05:00
55ab76a1c0 build: bump minimum version of luv to 1.43.0
This is required for the recent addition of lua loop threading
(luv_set_thread).
2022-02-27 09:06:55 -05:00
9d3370a144 vim-patch:c51cf0329809 (#17530)
Update runtime files.
c51cf03298
2022-02-27 11:56:30 +01:00
7dd2b0b79a Merge pull request #17386 from bfredl/neothread
support threads in lua
2022-02-27 09:41:02 +01:00
8bf3a3e303 Merge pull request #17432 from zeertzjq/vim-8.1.2336
vim-patch:8.1.2336,8.2.{4338,4401}: mapping cursor and redrawing patches
2022-02-27 10:51:11 +08:00
c031e038df chore: remove <Plug> detection from vim.keymap 2022-02-27 08:21:21 +06:00
0347875a5c feat: ignore nore on <Plug> maps 2022-02-27 08:21:21 +06:00
84812bcc2c Merge pull request #17531 from dundargoc/refactor/coverity/big-parameter-passed-by-value 2022-02-26 19:41:22 -05:00
e47cdb4268 Merge pull request #17535 from dundargoc/test/ci-fold 2022-02-26 19:39:51 -05:00
24557a7f63 test(ci): remove non-existent ci-fold from tests 2022-02-27 01:02:58 +01:00
525a3a90bc Merge pull request #17525 from lf-/hardcopy-truecolor
feat(hardcopy): check gui colours for highlights first
2022-02-26 23:57:27 +01:00
da89725f34 fix(coverity/175977): big parameter passed by value 2022-02-26 21:46:05 +01:00
c26ef6bcd4 Merge pull request #17532 from dundargoc/ci/add-timeout
ci: add timeout to all jobs
2022-02-26 12:32:37 -05:00
80c3d042ed ci: add timeout to all jobs 2022-02-26 16:57:47 +01:00
f6cc604af2 fix(api): convert blob to NUL-terminated API string
Looks like I did an oopsie; although API strings carry a size field, they should
still be usable as C-strings! (even though they may contain embedded NULs)
2022-02-26 14:18:34 +00:00
850b3e19c9 refactor(lua): cleanup and docs for threads 2022-02-26 15:00:13 +01:00
639ec044b7 Merge pull request #16845 from seandewar/floaty-aucmd-win
fix(aucmd_win): ensure aucmd_win stays floating
2022-02-26 14:53:50 +01:00
4b834a9f7c Merge pull request #17414 from zeertzjq/api-set-cursor-redraw
fix(api): nvim_win_set_cursor() redraw for cursorline and statusline
2022-02-26 14:52:24 +01:00
634c3addd2 Merge pull request #17337 from dundargoc/refactor/pvs/v560
refactor(PVS/V560): part of conditional expression is always true/false
2022-02-26 14:48:12 +01:00
41f309adeb Merge pull request #17527 from zeertzjq/test-pending-win32
test: use helpers.pending_win32(pending) instead of iswin()
2022-02-26 21:17:38 +08:00
acf38245d8 refactor(lua): use references directly on main thread 2022-02-26 14:01:38 +01:00
b87867e69e feat(lua): add proper support of luv threads 2022-02-26 14:01:38 +01:00
d0f8f76224 vim-patch:8.2.4464: Dtrace files are recognized as filetype D (#17518)
Problem:    Dtrace files are recognized as filetype D.
Solution:   Add a pattern for Dtrace files. (Teubel György, closes vim/vim#9841)
            Add some more testing.
4d56b971cb
2022-02-26 14:01:37 +01:00
2703cf95dd Merge pull request #17219 from clason/bump-luvit
build(deps): bump libuv and luv
2022-02-26 14:00:46 +01:00
cfcc40cd48 Merge pull request #17479 from dundargoc/docs/usr04/update-Y-description
docs: update explanation of Y to reflect new defaults
2022-02-26 20:51:47 +08:00
8dd3d40f5c Merge pull request #17472 from lewis6991/signcol_improvements
signcol improvements
2022-02-26 13:37:01 +01:00
0545bd2180 test: use helpers.pending_win32(pending) instead of iswin() 2022-02-26 19:40:11 +08:00
2da9450de5 build(deps): bump libuv to 1.43.0+7ae0c95 2022-02-26 12:06:02 +01:00
b857bc770b build(deps): bump luv to 1.43.0-0 2022-02-26 12:00:45 +01:00
e5b5cbd19c feat(hardcopy): check gui colours for highlights first
Previously, :hardcopy would only use terminal highlight colours, with a
fixed mapping table, despite internally supporting true colour. This
patch looks at the guifg colour first while coming up with the printing
highlight colours, then falls back to the terminal ones.

I have passed through the modec argument in this change because it was
there before, but it could be deleted and hardcoded to 'c' since nobody
sets it to anything else anywhere.
2022-02-25 18:51:16 -08:00
005a7aa167 Merge pull request #17467 from dundargoc/ci/remove-failing-windows
ci: remove failing windows CI tests
2022-02-25 07:10:29 -05:00
81bffbd147 feat: call __tostring on lua errors if possible before reporting to user 2022-02-25 11:17:58 +11:00
9d53791cf8 fix(signcol): update cursor when signcol changes
Fixes #14195
2022-02-24 22:36:00 +00:00
eb6e5d0991 refactor(signcol): store signcol in win_T 2022-02-24 22:36:00 +00:00
e67cd22c38 fix(signcol): handle edge case with maximum value
50250542 failed to consider that the maximum passed to buf_signcols
is window scoped whereas the signcols value is buffer scoped. This can
lead to a bug where the signcolumn becomes incorrect if:
- global signcolumn is set to auto:N
- signcolumn in a window is changed locally to auto:M where M > N
- the buffer has a line with M or greater signs.
2022-02-24 22:35:59 +00:00
fdea15723f feat(filetype): support scripts.vim with filetype.lua (#17517)
When filetype.vim is disabled, create the autocommand that runs
scripts.vim in filetype.lua.
2022-02-24 10:02:17 -07:00
b5bf4877c0 feat(highlight): support for blend in nvim_set_hl (#17516) 2022-02-24 09:50:05 -07:00
73da7cef7b Merge pull request #17390 from RenFraser/feature/packaging
ci: improve cpack packaging
2022-02-24 06:46:07 -05:00
1630ec742d docs: update explanation of Y to reflect new defaults
Closes https://github.com/neovim/neovim/issues/17435
2022-02-24 18:13:44 +08:00
087aad3dcd ci: improved cpack packaging
Addresses: #12571

- Added the following installers through CMake files:
    - Windows NSIS.
    - Windows MSI.
    - Windows zip.
    - MacOs tarball.
    - Linux tarball.
    - Linux Deb package.
- Tweaked pipeline CPack commands to build using new CMakeLists.txt configuration file.
- Added icons and relevant packaging files.
- Updated notes.md to reflect new installation instructions.

This isn't meant to be the perfect solution, it's simply a first pass at using a
simple packaging system to build Windows installers. A Debian package has also
been added since it's very easy but other packages have been left out due to
limiting the scope. Hopefully we can build further upon this and improve it
over time with code signing, better icons and more user-friendly installation
graphics and so on.
2022-02-24 19:54:44 +10:00
15004473b5 fix(api)!: correctly handle negative line numbers for nvim_buf_set_text (#17498)
nvim_buf_set_text does not handle negative row numbers correctly: for
example,

    nvim_buf_set_text(0, -2, 0, -1, 20, {"Hello", "world"})

should replace the 2nd to last line in the buffer with "Hello" and the
first 20 characters of the last line with "world". Instead, it reports
"start_row out of bounds". This happens because when negative line
numbers are used, they are incremented by one additional number to make
the non-negative line numbers end-exclusive. However, the line numbers
for nvim_buf_set_text should be end-inclusive.

In #15181 we handled this for nvim_buf_get_text by adding a new
parameter to `normalize_index`. We can solve the problem with
nvim_buf_set_text by simply availing ourselves of this new argument.

This is a breaking change, but makes the semantics of negative line
numbers much clearer and more obvious (as well as matching
nvim_buf_get_text).

BREAKING CHANGE: Existing usages of nvim_buf_set_text that use negative
line numbers will be off-by-one.
2022-02-23 22:19:47 +00:00
c07b5b5de6 vim-patch:partial 944697ae196 (#17493)
Update runtime files
944697ae19

Doc changes:

Include remote_*() (even though +clientserver and remote.txt isn't ported yet)
Omit screenpos() (need v8.2.4389)
Other changes are N/A or cannot be directly applied
2022-02-23 12:22:18 +00:00
430371da5b refactor(aucmd_win): remove need to restore window layout
There are some places that mess with the window layout in preparation for moving
a window to a different split (win_split_ins called with new_wp != NULL).

This means the window layout can change slightly even if win_split_ins fails.

This is why it was still needed to restore the window layout in
aucmd_{prep,rest}buf even if we disallow win_split_ins from making aucmd_win
non-floating by moving it into a split.

We can just skip messing with the layout in such places if we're dealing with
the aucmd_win.
2022-02-23 00:13:17 +00:00
2deffb5ea8 fix(aucmd_win): ensure aucmd_win stays floating
Nvim uses a floating window for the autocmd window, but in certain situations,
it can be made non-floating (`:wincmd J`), which can cause issues due to the
previous setup and cleanup logic for a non-floating aucmd_win being removed from
aucmd_prepbuf and aucmd_restbuf.

This can cause glitchiness and crashes due to the aucmd_win's frame being
invalid after closing its tabpage, for example.

Ensure aucmd_win cannot be made non-floating. The only place this happens is in
win_split_ins if new_wp != NULL.
2022-02-23 00:09:27 +00:00
11f7aeed7a feat(api): implement nvim_buf_get_text (#15181)
nvim_buf_get_text is the mirror of nvim_buf_set_text. It differs from
nvim_buf_get_lines in that it allows retrieving only portions of lines.

While this can typically be done easily enough by API clients,
implementing this function provides symmetry between the get/set
text/lines APIs, and also provides a nice convenience that saves API
clients the work of having to slice the result of nvim_buf_get_lines
themselves.
2022-02-22 20:19:21 +00:00
30c9c8815b vim-patch:partial 944697ae1968 (#17490)
Update runtime files
944697ae19

skip: docs
skip: translations
2022-02-21 23:01:22 +01:00
10a46a20ce refactor(highlight)!: optional arguments for highlight.range as table (#17462)
also update documentation

BREAKING CHANGE: signature of highlight.range is now
     vim.highlight.range(bufnr, ns, hlgroup, start, finish,
         { regtype = regtype, inclusive = inclusive, priority = priority })

Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
2022-02-21 21:21:42 +01:00
1e7cb2dcd9 fix(highlight): accept NONE as a color name (#17487)
... for when `ns=0`.

Also update the documentation of nvim_set_hl to clarify the set
behaviour.

Fixes #17478
2022-02-21 13:17:36 -07:00
fc7fc14bd2 Merge pull request #17484 from dundargoc/ci/skip-ci-on-doc-changes
ci: skip ci workflow on only documentation changes
2022-02-21 06:39:59 -05:00
07a5a85323 ci: skip ci workflow on only documentation changes 2022-02-21 10:12:07 +01:00
726ec7fb17 Merge pull request #17403 from zeertzjq/vim-8.1.1955
vim-patch:8.1.{1846,1955},8.2.0156
2022-02-21 08:02:45 +08:00
aeb390e28f docs: clarify ftdetect scripts loading during packadd (#17465)
The old description doesn't match the current behavior anymore.
2022-02-20 15:58:31 -07:00
9fa46d3fd4 Merge pull request #17480 from zeertzjq/vim-8.2.4427
vim-patch:8.2.4427: getchar() may return modifiers if no character is available
2022-02-21 06:46:59 +08:00
3828fb7ea4 vim-patch:8.2.4427: getchar() may return modifiers if no character is available
Problem:    getchar() may return modifiers if no character is available.
Solution:   Do not process modifiers when there is no character. (closes vim/vim#9806)
ad6c45f625
2022-02-21 06:06:01 +08:00
d80c9b9259 fix(diagnostic): use botright copen for qflist (#17475)
This matches the LSP handlers, and forces the qflist for diagnostics to
span across the horizontal space, below all open windows.
2022-02-20 13:44:14 -08:00
864e51a1dd test: correct emmylua annotations
This will fix the warnings sumneko language server outputs.
2022-02-20 21:14:27 +01:00
6a3acccd8b fix(lsp): use botright copen for all handlers (#17471) 2022-02-20 11:09:01 -08:00
4b3fb4b177 Merge pull request #17469 from jamessan/use-sysdeps-for-lint-ci
Use system dependencies for lint CI
2022-02-20 07:35:35 -05:00
13b13dcaa0 Merge pull request #17470 from dundargoc/ci/remove-success
ci: remove success check since it's the default
2022-02-20 07:34:50 -05:00
4ea8201356 ci: remove success check since it's the default 2022-02-20 13:17:55 +01:00
82c5a02050 ci: skip tests that fail on windows 2022-02-20 10:22:39 +01:00
2550212b25 ci(win): use vswhere to automatically setup required vsdev env vars 2022-02-20 10:18:45 +01:00
921162a4b1 ci: bump Windows image to windows-2019
The VS 2019 CMake generator no longer has different generator types for
different architectures.  Now, the architecture is specified via CMake's
`-A` switch.  However, this requires we also propagate
`${CMAKE_GENERATOR_PLATFORM}` to the bundled deps, so they build for the
same architecture as Nvim.
2022-02-20 10:18:45 +01:00
2446b25c6b ci: only cache third-party deps if they exist 2022-02-19 20:36:29 -05:00
0adbe58bb2 ci: ensure ~/.cache exists 2022-02-19 20:36:29 -05:00
0c4c384ed1 ci(lint): explicity build nvim
“make clint-full” bypasses the normal mechanisms used to communicate
build flags in the CI jobs, so explicitly build nvim before running the
lint jobs.
2022-02-19 20:35:05 -05:00
34cb26011e ci(lint): build against system deps 2022-02-19 20:35:04 -05:00
8cd4c11494 ci(lint): install deps via apt instead of building from third-party 2022-02-19 20:35:04 -05:00
8b3799e2c3 Merge pull request #17460 from seandewar/vim-8.2.4419
vim-patch:8.2.{4403,4418,4419,4422}
2022-02-19 22:59:15 +00:00
439a843b80 vim-patch:8.2.4424: ".gts" and ".gjs" files are not recognized (#17464)
Problem:    ".gts" and ".gjs" files are not recognized.
Solution:   Recognize Glimmer flavored typescript and javascript.
            (closes vim/vim#9799)
cdf717283c
2022-02-19 23:41:11 +01:00
791e400858 fix: lsp and diagnostic highlight priority (#17461)
Closes https://github.com/neovim/neovim/issues/17456

* treesitter uses the default highlight priority of 50
* diagnostic highlights have a priority of 150
* lsp reference highlights have a priority of 200

This ensures proper ordering.
2022-02-19 08:38:14 -08:00
9c04285057 vim-patch:8.2.4422: autochdir test fails on MS-Windows
Problem:    Autochdir test fails on MS-Windows.
Solution:   Expecta nother error on MS-Windows.
adbb383e0f
2022-02-19 15:55:17 +00:00
73cc729dbc vim-patch:8.2.4419: illegal memory access when using 20 highlights
Problem:    Illegal memory access when using exactly 20 highlights.
Solution:   Add one more item in the array. (Brandon Richardson,
            closes vim/vim#9800)
a493b6506b
2022-02-19 15:29:17 +00:00
9f4401897a vim-patch:8.2.4418: crash when using special multi-byte character
Problem:    Crash when using special multi-byte character.
Solution:   Don't use isalpha() for an arbitrary character.
5921aeb574

Rename vim_isalpha to mb_isalpha.
2022-02-19 15:29:17 +00:00
30bf40ec4b vim-patch:8.2.4403: ml_get error with nested folds and deleting lines
Problem:    ml_get error with nested folds and deleting lines.
Solution:   Correct the last line number before calling hasFoldingWin().
9437737833
2022-02-19 15:29:17 +00:00
5cb45dffba Merge pull request #17454 from dundargoc/ci/labeler/test
ci(labeler): change "tests" to "test"
2022-02-18 16:55:41 -05:00
f7803c82d4 ci(labeler): change "tests" to "test" 2022-02-18 20:23:22 +01:00
36362ef0ae vim-patch:8.2.4414: solidity files are not recognized (#17451)
Problem:    Solidity files are not recognized.
Solution:   Add the *.sol pattern. (Dundar Goc, closes vim/vim#9792)
97b231541d
2022-02-18 17:08:43 +01:00
5064ff126d Merge pull request #17200 from lewis6991/_loadfile
refactor(lua): call `loadfile` internally instead of `luaL_loadfile`
2022-02-18 15:05:50 +01:00
720bb5844d Merge pull request #17445 from dundargoc/ci/review/use-checkout 2022-02-18 08:36:45 -05:00
ac480ef6b4 Merge pull request #17404 from dundargoc/ci/put-each-test-in-separate-step
ci: run each test suite in a separate github step
2022-02-18 06:42:32 -05:00
3fb9987eef Merge pull request #17450 from dundargoc/ci/lint/fix-key
ci(lint): simplify cache key
2022-02-18 06:14:53 -05:00
40473e55a2 ci(lint): simplify cache key 2022-02-18 11:50:51 +01:00
adad10284d refactor(lua): call loadfile internally
.. instead of luaL_loadfile

allows files to be cached
2022-02-18 10:39:45 +00:00
8b92d71b30 ci: run each test suite in a separate github step
This should help combat some of the lagginess when looking at the CI
logs in the browser.
2022-02-18 11:36:30 +01:00
faeff49cbf Merge pull request #17449 from zeertzjq/vim-8.2.3659
vim-patch:8.2.{3659,3660,3661}: integer overflow with large line number
2022-02-18 10:15:08 +08:00
62a1290758 vim-patch:8.2.3661: test for put with large count fails
Problem:    Test for put with large count fails.
Solution:   Adjust the counts in the test.
8bc07e800c
2022-02-18 09:48:35 +08:00
330b3da51e vim-patch:8.2.3660: overflow check uses wrong number
Problem:    Overflow check uses wrong number.
Solution:   Divide by ten.
9b0e82f35e
2022-02-18 09:48:32 +08:00
3ed800e998 vim-patch:8.2.3659: integer overflow with large line number
Problem:    Integer overflow with large line number.
Solution:   Check for overflow. (closes vim/vim#9202)
03725c5795

Put E1247 in globals.h as E1240 is also there.
Do not make getdigits() abort.
2022-02-18 09:48:00 +08:00
592f4a7c08 Merge pull request #17433 from seandewar/vim-8.2.3492
vim-patch:8.2.{3492,3493,3570,3573,3574,3575,3577,3601}: put overflow checking shenanigans
2022-02-18 00:09:11 +00:00
1d0e38e42c ci: download reviews.js through checkout instead of wget
This makes testing the workflows much smoother.
2022-02-17 23:30:22 +01:00
df0fae2ff7 Merge pull request #17430 from dundargoc/test/remove-travis 2022-02-17 17:25:58 -05:00
1fd106ca88 vim-patch:8.2.4411: bicep files are not recognized (#17447)
Problem:    Bicep files are not recognized.
Solution:   Match *.bicep files. (Dundar Goc, closes vim/vim#9791)
8e5ba693ad
2022-02-17 23:05:48 +01:00
d1e3d8abd6 Merge pull request #17427 from dundargoc/ci/lint/remove-unnecessary-steps 2022-02-17 16:54:11 -05:00
f3e6cc1a23 test: remove checks to see if current CI job is travis or appveyor 2022-02-17 22:43:48 +01:00
58a55e3889 ci(lint): remove unnecessary steps 2022-02-17 22:38:54 +01:00
387f6a9824 Merge pull request #17442 from dundargoc/ci/refactor/move-reviews 2022-02-17 15:56:47 -05:00
3b5d456d3c Merge pull request #17444 from clason/hl-empty-cterm
fix(api): allow empty list for cterm in nvim_set_hl
2022-02-17 19:37:45 +01:00
e35a2d86fc fix(api): allow empty list for cterm in nvim_set_hl
Problem: when accessing `nvim_set_hl` from Lua, empty tables are converted
to empty lists, not dictionaries, resulting in an error for

    :lua vim.api.nvim_set_hl(0, "Comment", { cterm = {} })

Workaround: add an empty array as a special case when checking
`dict->cterm.type` and just set `cterm_mask_provided`.

(Proper solution: handle this in `gen_api_dispatch.lua`.)
2022-02-17 18:07:11 +01:00
41d0e7af20 vim-patch:8.2.3601: check for overflow in put count does not work well
Problem:    Check for overflow in put count does not work well.
Solution:   Improve the overflow check. (Ozaki Kiichi, closes vim/vim#9102)
fa53722367

Add some casts as Nvim uses size_t variables in some places.

We could technically adjust the logic to check for overflow outside of size_t's
range, but it's much easier to just port the patch exactly (also means we can
use the same tests).

v:sizeoflong is N/A, so convert the 64-bit tests to Lua and use the FFI to check
long's size.
2022-02-17 17:06:16 +00:00
8170260bb3 fix(ops): str_to_reg passing NULL to memcpy
Required for the tests introduced in v8.2.3601 to pass ASAN when running
test_alot.vim.

Co-authored-by: erw7 <erw7.github@gmail.com>
2022-02-17 15:00:32 +00:00
308c1952aa vim-patch:8.2.3577: overflow check fails with 32 ints
Problem:    Overflow check fails with 32 ints.
Solution:   Only test with 64 bit ints.
0f0044125c
2022-02-17 14:45:23 +00:00
6890f8774b vim-patch:8.2.3575: overflow check still fails when sizeof(int) == sizeof(long)
Problem:    Overflow check still fails when sizeof(int) == sizeof(long).
Solution:   Use a float to check the result.
e551ccfb93

This approach is... interesting...

Tests fail.
2022-02-17 14:45:23 +00:00
de8e2c61c1 vim-patch:8.2.3574: divide by zero
Problem:    Divide by zero.
Solution:   Don't check for overflow if multiplicand is zero.
8a1962d135
2022-02-17 14:45:22 +00:00
b149665689 vim-patch:8.2.3573: cannot decide whether to skip test that fails with 64 bit
Problem:    Cannot decide whether to skip test that fails with 64 bit ints.
            (closes vim/vim#9072)
Solution:   Add v:sizeofint, v:sizeoflong and v:sizeofpointer.  Improve the
            check for multiply overflow.
69b3072d98

Omit v:sizeof{int,long,pointer} as they're only really used for tests.
2022-02-17 14:45:22 +00:00
a256b710a2 vim-patch:8.2.3570: Test_very_large_count fails on 32bit systems
Problem:    Test_very_large_count fails on 32bit systems.
Solution:   Bail out when using 32 bit numbers. (closes vim/vim#9072)
ec6e63079d
2022-02-17 14:45:22 +00:00
3fba994de8 vim-patch:8.2.3493: large count test fails on MS-Windows
Problem:    Large count test fails on MS-Windows.
Solution:   Skip the test on MS-Windows.
cddd5ac911
2022-02-17 14:45:21 +00:00
ac5856b3f5 vim-patch:8.2.3492: crash when pasting too many times
Problem:    Crash when pasting too many times.
Solution:   Limit the size to what fits in an int. (closes vim/vim#8962)
eeed1c7ae0

Note that this overflow check pretty bad.
It also doesn't work well on Windows (where sizeof(int) == sizeof(long)).
This is all temporary; everything here is rewritten in future patches anyway.

e_resulting_text_too_long was already cherry-picked.

totlen is size_t in Nvim, but is int in Vim. This means we'll need some casts.

We could technically adjust the logic in do_put to use the entire range of
size_t in stuff like totlen, but there's not much gain, and it's much easier to
just port the patch like Vim as was done before (also allows us to use the same
tests).
2022-02-17 14:45:21 +00:00
b877237612 ci(reviews): move reviews.js to .github/scripts 2022-02-17 14:48:14 +01:00
f4e24f1eab Merge pull request #17421 from lewis6991/hl0_clear
fix(highlight): global ns improvements
2022-02-17 14:07:42 +01:00
9938961fd8 test: add more tests for :*map cursor and redrawing 2022-02-17 10:07:42 +08:00
a92046e43f vim-patch:8.2.4401: map listing does not clear the rest of the command line
Problem:    Map listing does not clear the rest of the command line.
Solution:   Call msg_clear_eos(). (closes vim/vim#5623, closes vim/vim#5962)
d288eaad84
2022-02-17 08:45:15 +08:00
80a3018a09 test: add some tests for :*map <expr>
Add tests for:
 - Cursor position restored after :map expr
 - Cursor position restored after :imap expr
 - Error in :cmap expr handled correctly

Cherry-picked from #12837
2022-02-17 08:45:15 +08:00
2ffe66a5a4 vim-patch:8.2.4338: an error from an expression mapping messes up the display
Problem:    An error from an expression mapping messes up the display.
Solution:   When the expression results in an empty string return K_IGNORE.
            In cmdline mode redraw the command line. (closes vim/vim#9726)
74a0a5b26d
2022-02-17 08:45:14 +08:00
c90cf8c77b vim-patch:8.1.2336: when an expr mapping moves the cursor it is not restored
Problem:    When an expr mapping moves the cursor it is not restored.
Solution:   Position the cursor after an expr mapping. (closes vim/vim#5256)
4ebe0e62d0
2022-02-17 08:44:58 +08:00
3230b31486 Merge pull request #17431 from zeertzjq/vim-8.2.4345
vim-patch:8.2.4345
2022-02-17 06:53:15 +08:00
dc24eeb9fe feat(highlight): support color names for cterm 2022-02-16 22:48:34 +00:00
b94b116236 Merge pull request #17429 from zeertzjq/vim-8.2.4400
vim-patch:8.2.{4392,4394,4400}
2022-02-17 06:33:45 +08:00
7b048df4dc vim-patch:8.2.4345: <amatch> is expanded like a file name for DirChangedPre
Problem:    <amatch> is expanded like a file name for DirChangedPre.
Solution:   Do not expand <amatch>. (closes vim/vim#9742)  Also for the User event.
f6246f51e3
2022-02-17 06:19:10 +08:00
4646ea1079 Merge pull request #17363 from zeertzjq/dirchangedpre
feat(events): add DirChangedPre
2022-02-17 06:07:19 +08:00
9c5228f3e7 vim-patch:8.2.4400: MS-Windows: cannot use the mouse in the console with VIMDLL
Problem:    MS-Windows: cannot use the mouse in the console with VIMDLL.
Solution:   use add_char2buf() instead of fix_input_buffer(). (closes vim/vim#9784,
            closes vim/vim#9769)
646bb7247a

N/A patches for version.c:

vim-patch:8.2.4392: MS-Windows with VIMDLL: Escaping CSI is wrong

Problem:    MS-Windows with VIMDLL: Escaping CSI is wrong.
Solution:   Put back #ifdef. (Ken Takata, closes vim/vim#9769)
64d95cfc56

vim-patch:8.2.4394: UTF8 select mode test fails on MS-Windows

Problem:    UTF8 select mode test fails on MS-Windows.
Solution:   Revert the #ifdef change.
9fdde7992a
2022-02-17 06:02:55 +08:00
876aaf2003 fix(highlight): allow globals to be cleared
- and reduce heap allocations

Fixes #17420
2022-02-16 20:22:09 +00:00
8ab5ec4aaa feat(tree-sitter): allow Atom-style capture fallbacks (#14196)
This allows falling back to `@definition` when we have no mapping
`@definition.fancy-specialization`.

This behavior is described in tree-sitter's documentation
(https://tree-sitter.github.io/tree-sitter/syntax-highlighting#theme).

Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/738
2022-02-16 19:38:19 +01:00
9fe8d2c9df Merge pull request #16678 from lewis6991/runtime_file_err
fix(api): re-route nvim_get_runtime_file errors
2022-02-16 10:52:38 +01:00
0852644bee Merge pull request #17424 from zeertzjq/map-followup
follow-up PR to #17423
2022-02-16 17:32:37 +08:00
758f1e5999 refactor: remove NULL check that is always true 2022-02-16 17:01:35 +08:00
cc81a8253b docs: minor changes related to mapping description 2022-02-16 16:58:32 +08:00
9a74c2b04a feat(mappings): considering map description when filtering (#17423) 2022-02-16 16:39:50 +08:00
deb33a9775 Merge pull request #17422 from shadmansaleh/enhance/maps
fix: <Nop> not shown in :map commands
2022-02-16 16:01:17 +08:00
07a98b1a75 fix: <Nop> not shown in :map commands 2022-02-16 13:12:46 +06:00
f5518b78c8 chore: improve lua keymaps internal representation scheme 2022-02-16 11:20:10 +06:00
9ef5696132 Merge pull request #17418 from dundargoc/revert/ci/run-functionaltest-on-draft
revert: "ci: run functionaltest-lua on drafts as well"
2022-02-15 19:02:54 -05:00
d512be55a2 fix(api): re-route nvim_get_runtime_file errors
This allows nvim_get_runtime_file to be properly used via pcall
2022-02-15 23:00:28 +00:00
238b944e58 fix(api): validate command names in nvim_add_user_command (#17406)
This uses the same validation used when defining commands with
`:command`.
2022-02-15 13:08:40 -07:00
3449405f38 Merge pull request #17417 from zeertzjq/vim-8.2.4388
vim-patch:8.2.4388: dead code in op_insert()
2022-02-15 21:12:36 +08:00
a2c3d431d6 vim-patch:8.2.4388: dead code in op_insert()
Problem:    Dead code in op_insert().
Solution:   Remove condition and else block. (closes vim/vim#9782)
7745f14ef3
2022-02-15 21:07:01 +08:00
48108975c9 revert: "ci: run functionaltest-lua on drafts as well"
This reverts commit a91a5c1880.
2022-02-15 14:01:06 +01:00
0072a97b2e Merge pull request #17411 from zeertzjq/vim-8.2.3820
vim-patch:8.2.{3820,3823}: "vrc" does not replace composing characters
2022-02-15 20:36:01 +08:00
8cc881e4f4 Merge pull request #17412 from zeertzjq/vim-8.2.4154
vim-patch:8.2.4154: ml_get error when exchanging windows in Visual mode
2022-02-15 20:35:48 +08:00
e29ba986f5 Merge pull request #17409 from dundargoc/ci/disable-sync
ci(labeler): disable sync that interferes with other jobs
2022-02-15 06:15:15 -05:00
89bff49570 Merge pull request #17405 from dundargoc/ci/add-more-reviewers
ci: add more reviewers
2022-02-15 06:10:41 -05:00
f92e74900f fix(api): nvim_win_set_cursor() redraw for cursorline and statusline 2022-02-15 11:53:12 +08:00
6eec30ccfc vim-patch:8.2.4154: ml_get error when exchanging windows in Visual mode
Problem:    ml_get error when exchanging windows in Visual mode.
Solution:   Correct end of Visual area when entering another buffer.
05b2761548
2022-02-15 10:26:39 +08:00
8f3e56ed3a vim-patch:8.2.3820: "vrc" does not replace composing characters
Problem:    "vrc" does not replace composing characters, while "rc" does.
Solution:   Check the byte length including composing characters.
            (closes vim/vim#9351)
8ee6028de3

vim-patch:8.2.3823: test for visual replace is in wrong function

Problem:    Test for visual replace is in wrong function.
Solution:   Move it to another function.
6ecf58b0d7
2022-02-15 09:35:43 +08:00
1bd6c0a05c Merge pull request #17410 from zeertzjq/test-old-reorder
test(old): reorder test_functions.vim and test_visual.vim to match Vim
2022-02-15 09:25:57 +08:00
9f9ef3e21d test(old): reorder test_functions.vim and test_visual.vim to match Vim 2022-02-15 08:59:46 +08:00
edc5554fc4 Merge pull request #17402 from seandewar/vim-8.2.4120
vim-patch:8.2.{3073,4120,4151,4152}
2022-02-15 00:30:05 +00:00
8051fa1aff Merge pull request #17394 from zeertzjq/vim-8.2.4343
vim-patch:8.2.4343: when reloading not all properties are detected
2022-02-15 08:10:21 +08:00
5aed2e9f27 ci(labeler): disable sync that interferes with other jobs 2022-02-14 21:16:36 +01:00
51cc5c5654 ci: add more reviewers 2022-02-14 18:58:10 +01:00
2b75ac7aa9 vim-patch:8.2.4152: block insert with double wide character fails
Problem:    Block insert with double wide character fails.
Solution:   Adjust the expected output.
fc6ccebea6
2022-02-14 17:29:49 +00:00
afbed8cb75 vim-patch:8.2.4151: reading beyond the end of a line
Problem:    Reading beyond the end of a line.
Solution:   For block insert only use the offset for correcting the length.
57df9e8a9f
2022-02-14 17:29:49 +00:00
e662d86e8d vim-patch:8.2.4120: block insert goes over the end of the line
Problem:    Block insert goes over the end of the line.
Solution:   Handle invalid byte better.  Fix inserting the wrong text.
9f8c304c8a
2022-02-14 17:29:49 +00:00
f8b75e5822 vim-patch:8.2.3073: when cursor is move for block append wrong text is inserted
Problem:    When cursor is move for block append wrong text is inserted.
Solution:   Calculate an offset. (Christian Brabandt, closes vim/vim#8433,
            closes vim/vim#8288)
4067bd3604
2022-02-14 17:29:48 +00:00
d5d51308c0 test(old): cherry-pick test_visual changes from v8.2.2945
59b262362f
2022-02-14 17:29:45 +00:00
b7e6c1b525 test(old): cherry-pick test_visual changes from v8.2.2901
3e72dcad8b
2022-02-14 17:29:41 +00:00
abf42b7ec6 test(old): cherry-pick test_visual changes from v8.2.0369
1671f44881

Omit Test_AAA_start_visual_mode_with_count comment change as it hasn't been
ported yet.
2022-02-14 17:29:35 +00:00
758d7726df Merge pull request #17399 from zeertzjq/ci-review-script 2022-02-14 11:30:39 -05:00
dcefd48c1b vim-patch:8.2.0156: various typos in source files and tests
Problem:    Various typos in source files and tests.
Solution:   Fix the typos. (Emir Sari, closes vim/vim#5532)
4b96df5a01
2022-02-14 18:56:30 +08:00
c9b46f154b vim-patch:8.1.1955: tests contain typos
Problem:    Tests contain typos.
Solution:   Correct the typos. (Dominique Pelle)
1bc353b6f1

Other changes are either N/A or already applied.
2022-02-14 18:56:30 +08:00
8a80ab27bd vim-patch:8.1.1846: inconsistently using GetVimCommand() and v:progpath
Problem:    Inconsistently using GetVimCommand() and v:progpath. (Daniel
            Hahler)
Solution:   Use GetVimCommand(). (closes vim/vim#4806)
93344c2d70

Cherry-pick a change to test_profile.vim from patch 8.1.1544.
Cherry-pick a change to test_vimscript.vim from patch 8.1.1826.

Some of the args are no-op in Nvim, and `-i NONE` and `--headless` are
already added by `GetVimCommand()`. I'll try to match the order of args
in upstream, substituting `--not-a-term` with `--headless`.
2022-02-14 18:56:30 +08:00
5220891571 vim-patch:8.2.4343: when reloading not all properties are detected
Problem:    When reloading not all properties are detected.
Solution:   Add the "edit" value to v:fcs_choice. (Rob Pilling, closes vim/vim#9579)
8196e94a8b

Cherry-pick some test changes from patch 8.1.1826.
2022-02-14 11:35:25 +08:00
29eabbcd07 ci: use a separate script for request review workflow 2022-02-14 07:47:10 +08:00
2ed6b99a42 refactor(PVS/V560): part of conditional expression is always true/false 2022-02-13 17:51:48 +01:00
046950f630 Merge pull request #17154 from neovim/marvim/api-doc-update/master
docs: regenerate [skip ci]
2022-02-13 09:25:05 -05:00
5d6bef0f6e Merge pull request #17374 from zeertzjq/vim-8.2.3510
vim-patch:8.2.{3510,3512,3514,3515,3534}: nanosecond timestamp change detection
2022-02-13 21:58:36 +08:00
45e666fb92 docs: regenerate [skip ci] 2022-02-13 13:44:51 +00:00
e481901748 docs: treesitter.txt - fix overflowing lines, document minimum_language_version (#17286) 2022-02-13 14:43:25 +01:00
c5f5c0d4da Merge pull request #17392 from zeertzjq/ci-review-open-only
ci: only request review on open non-draft PRs
2022-02-13 08:42:47 -05:00
b2606673cc vim-patch:8.2.3534: autoread test is a bit flaky
Problem:    Autoread test is a bit flaky.
Solution:   Wait a brief moment before overwriting the file.
944eeb44fb
2022-02-13 21:33:28 +08:00
0f1c705936 vim-patch:8.2.3515: nano time test fails on Mac and FreeBSD
Problem:    Nano time test fails on Mac and FreeBSD.
Solution:   Also check nano time when not on Linux. (Ozaki Kiichi,
            closes vim/vim#9000)
def69dffb3
2022-02-13 21:33:28 +08:00
21283aa445 vim-patch:8.2.3514: autoread test with nano second time sometimes fails
Problem:    Autoread test with nano second time sometimes fails.
Solution:   Mark the test as being flaky.
eaa006dae3
2022-02-13 21:33:28 +08:00
bad22bd656 vim-patch:8.2.3512: timestamp test fails on some systems
Problem:    Timestamp test fails on some systems.
Solution:   Sleep for a short while.
accf4ed352
2022-02-13 21:33:28 +08:00
03348e5b9d vim-patch:8.2.3510: changes are only detected with one second accuracy
Problem:    Changes are only detected with one second accuracy.
Solution:   Use the nanosecond time if possible.  (Leah Neukirchen,
            closes vim/vim#8873, closes vim/vim#8875)
0a7984af56

In Nvim Test_checktime_fast() is also flaky. Add a delay to avoid that.
2022-02-13 21:33:28 +08:00
1be9549e6b ci: only request review on open non-draft PRs 2022-02-13 19:17:18 +08:00
1b73ae653f Merge pull request #16914 from godlygeek/fix_14587
fix(screen): don't put empty sign text in line number column
2022-02-13 11:41:17 +01:00
2c4efc0347 Merge pull request #17380 from dundargoc/ci/labeler/add-filetype-label
ci(labeler): add filetype label if filetype.lua has changed
2022-02-13 11:11:43 +01:00
f378df846c Merge pull request #17375 from shadmansaleh/fix/vim.g/autoload
fix: autoload variables not loaded with vim.g & nvim_get_var
2022-02-13 10:32:32 +01:00
6f5fae08a3 Merge pull request #17389 from zeertzjq/restore-oldtests
test(old): add test_cdo.vim and test_packadd.vim
2022-02-13 11:37:49 +08:00
b16fae0f26 test(old): add test_cdo.vim and test_packadd.vim
test_cdo.vim is copied from Vim v8.1.1483.
test_packadd.vim is copied from Vim v8.2.0174.
2022-02-13 10:26:11 +08:00
a87eb896a5 Merge pull request #17388 from zeertzjq/test-assert
test(old): move some tests from assert_spec.lua to test_assert.vim
2022-02-13 10:07:09 +08:00
2a6a93b665 test(old): move some tests from assert_spec.lua to test_assert.vim 2022-02-13 09:23:20 +08:00
7a7ac004f0 Merge pull request #17385 from seandewar/vim-8.2.4359
vim-patch:8.2.{4359,4362,4363,4364}: crash when repeatedly using :retab
2022-02-12 22:51:13 +00:00
5c62bce7c1 vim-patch:8.2.4364: MS-Windows: still running out of memory for a very long line
Problem:    MS-Windows: still running out of memory for a very long line.
Solution:   Check for negative length.
4549166078
2022-02-12 22:25:39 +00:00
05f744cfc7 Merge pull request #16643 from zeertzjq/vim-8.1.2184
vim-patch:8.1.2184,8.2.3804: option context is not copied when splitting a window
2022-02-13 06:13:18 +08:00
dc415ce298 vim-patch:8.1.2184: option context is not copied when splitting a window
Problem:    Option context is not copied when splitting a window. (Daniel
            Hahler)
Solution:   Copy the option context, so that ":verbose set" works.
            (closes vim/vim#5066)
cfb381421f

vim-patch:8.2.3804: script context not set when copying 'swf' and 'ts'

Problem:    Script context not set when copying 'swf' and 'ts'.
Solution:   Use COPY_OPT_SCTX with the right argument. (closes vim/vim#9347)
6206877c51
2022-02-13 05:40:13 +08:00
72e3d2c9ba vim-patch:8.2.4363: MS-Windows: running out of memory for a very long line
Problem:    MS-Windows: running out of memory for a very long line.
Solution:   Use a 32 bit value for MAXCOL also when ints are 64 bits.
8e38555ece

This still fails Vim's Windows CI, so let's see what happens...
2022-02-12 21:38:00 +00:00
90a43e846d Merge pull request #17382 from zeertzjq/vim-8.2.2342
vim-patch:8.2.2342: "char" functions may return wrong column in Insert mode
2022-02-13 05:26:15 +08:00
700af0ab1d vim-patch:8.2.4362: :retab may allocate too much memory
Problem:    :retab may allocate too much memory.
Solution:   Bail out when allocating more than MAXCOL bytes.
33f3c59854
2022-02-12 21:23:06 +00:00
f292dd2126 fix: autoload variables not loaded with vim.g & nvim_get_var 2022-02-13 01:23:23 +06:00
f89f4b1e12 Merge pull request #17379 from clason/vim-8.2.4352
vim-patch:8.2.4352: ReScript files are not recognized
2022-02-12 20:10:26 +01:00
1b0d6bcd53 vim-patch:8.2.4359: crash when repeatedly using :retab
Problem:    crash when repeatedly using :retab.
Solution:   Bail out when the line is getting too long.
6e28703a8e

Cherry-pick e_resulting_text_too_long from v8.2.3492; put it in globals.h as
it will eventually be used in other files.

Add a modeline to test_retab.vim
2022-02-12 18:52:34 +00:00
05c3d02380 Merge pull request #17383 from lewis6991/sign_eff
refactor(signs): more efficient signcol calc
2022-02-12 19:40:44 +01:00
50250542c3 refactor(signs): more efficient signcol calc
When iterating signs to calculate the sign column, stop iterating when
we reach the maximum configured from 'signcolumn'.
2022-02-12 17:56:39 +00:00
7db0aa027c Merge pull request #17381 from zeertzjq/vim-8.2.0580
vim-patch:8.2.0580: window size wrong if 'ea' is off and 'splitright' is on
2022-02-12 21:48:20 +08:00
12eca76e2c ci(labeler): add filetype label if any filetype files have changed 2022-02-12 14:32:42 +01:00
ed169d8997 vim-patch:8.2.2342: "char" functions may return wrong column in Insert mode
Problem:    "char" functions return the wront column in Insert mode when the
            cursor is beyond the end of the line.
Solution:   Compute the column correctly. (Yegappan Lakshmanan, closes vim/vim#7669)
9145846b6a
2022-02-12 21:30:28 +08:00
c23ec9d86e vim-patch:8.2.0580: window size wrong if 'ea' is off and 'splitright' is on
Problem:    Window size wrong if 'ea' is off and 'splitright' is on and
            splitting then closing a window.
Solution:   Put abandoned window space in the right place. (Mark Waggoner)
edd327cc07
2022-02-12 21:19:39 +08:00
a1f34b2481 Merge pull request #17377 from clason/keyset-more
feat(highlight): add strikethrough, nocombine to `nvim_set_hl`
2022-02-12 14:05:12 +01:00
cc9d08069a Merge pull request #17269 from seandewar/vim-8.2.0915
vim-patch:8.2.{0915,0918,0922,4355}
2022-02-12 12:28:28 +00:00
e126fbc971 Merge pull request #17376 from dundargoc/ci/reviews/upgrade-to-v6
ci(reviews): upgrade github-script version to v6
2022-02-12 07:09:43 -05:00
dd2c0a7d33 Merge pull request #17371 from dundargoc/revert/continue-on-error
revert: "ci: use continue-on-error instead of "|| true""
2022-02-12 07:08:57 -05:00
db06fb47b9 vim-patch:8.2.0922: search test fails
Problem:    Search test fails.
Solution:   Remove failure tests for calls that no longer fail.
48af321a33
2022-02-12 12:01:30 +00:00
0511a31ca2 vim-patch:8.2.0918: duplicate code for evaluating expression argument
Problem:    Duplicate code for evaluating expression argument.
Solution:   Merge the code and make the use more flexible.
a9c0104947
2022-02-12 12:01:29 +00:00
cdb2c10011 vim-patch:8.2.0915: search() cannot skip over matches like searchpair() can
Problem:    Search() cannot skip over matches like searchpair() can.
Solution:   Add an optional "skip" argument. (Christian Brabandt, closes vim/vim#861)
adc17a5f9d

Enable skip arg usage in autoload/freebasic.vim

evalarg_T doesn't really matter because it's deleted in v8.2.0918 (and
reincarnated for Vim9 script in v8.2.1047), but I found out too late :P Anyway:

- Port evalarg_T into eval.h and use const char * and Callback fields
- Use EVALARG_INIT to initialize
- Return bool over OK/FAIL from evalarg functions
- Remove check from evalarg_clean as callback_free ignores None callbacks anyway
- Move eva_buf field into evalarg_get as a local (not sure what reason it has
  being in the struct)

N/A patches for version.c:

vim-patch:8.2.4355: unnecessary call to check_colorcolumn()

Problem:    Unnecessary call to check_colorcolumn().
Solution:   Remove the call. (Sean Dewar, closes vim/vim#9748)
0f7ff851cb
2022-02-12 12:00:36 +00:00
cb18545253 feat(api): add strikethrough, nocombine to set_hl 2022-02-12 12:05:41 +01:00
3b13c7fc8b vim-patch:8.2.4352: ReScript files are not recognized
Problem:    ReScript files are not recognized.
Solution:   Add the *.res and *.resi patterns. (Ananda Umamil, closes vim/vim#9752)
0c3cc2fec3
2022-02-12 12:04:09 +01:00
f052e0bd11 ci(reviews): upgrade github-script version to v6 2022-02-12 11:20:00 +01:00
0c901baee1 revert: "ci: use continue-on-error instead of "|| true""
This reverts commit 559aa4179c.

I mistakenly believed both ways of writing were equivalent; this is
untrue. Setting continue-on-error to true will make the job pass, but
an error annotation will still be created which is misleading since it's
not actually an error.
2022-02-12 11:03:32 +01:00
a7321e37a7 Merge pull request #17370 from dundargoc/ci/fix-reviews-workflow
ci: fix reviews workflow by sending an artifact with PR number
2022-02-11 20:35:54 -05:00
f6485e9446 Merge pull request #16841 from zeertzjq/vim-8.1.2073
vim-patch:8.1.2073: when editing a buffer 'colorcolumn' may not work
2022-02-12 07:49:09 +08:00
4ca522fd02 test: convert some colorcolumn tests to Lua screen tests 2022-02-12 06:36:17 +08:00
612696bedc vim-patch:8.1.2073: when editing a buffer 'colorcolumn' may not work
Problem:    When editing a buffer 'colorcolumn' may not work.
Solution:   Set the buffer before copying option values. Call
            check_colorcolumn() after copying window options.
010ee9657a
2022-02-12 06:36:17 +08:00
906182065b Merge pull request #17325 from glacambre/stdioopen_doc 2022-02-11 16:21:16 -05:00
46e0f635da Merge pull request #17372 from dundargoc/ci/commitlint/fix-revert-bug 2022-02-11 16:16:37 -05:00
f50a9a4288 ci(commitlint): allow first non-space character to be a quote 2022-02-11 20:02:50 +01:00
8090753880 docs(stdioopen): add missing documentation for on_print param
This commit adds documentation for the feature introduced in #15910.
2022-02-11 19:18:47 +01:00
e3c09cb9ed Merge pull request #17284 from dundargoc/ci/reduce-noise 2022-02-11 11:12:49 -05:00
c373226ee7 ci: disable tracing (set -x) from the shell scripts 2022-02-11 16:53:34 +01:00
4761dd4fc2 Merge pull request #17365 from kevinhwang91/fix-ts-empty-lines
fix(query.lua): check empty table for lines
2022-02-11 15:19:19 +01:00
e957697334 ci: fix reviews workflow by sending an artifact with PR number 2022-02-11 15:12:41 +01:00
f6329ea137 fix(lsp): correct prefix when filterText is present (#17051)
LSP server might return an item which would replace a token to another.
For example in typescript for a `jest.Mock` object `getProductsMock.`
text I get the following response:
```
{
    commitCharacters = {
        ".",
        ",",
        "("
    },
    data = {
        entryNames = {
            "Symbol"
        },
        file = "/foo/bar/baz.service.spec.ts",
        line = 268,
        offset = 17
    },
    filterText = ".Symbol",
    kind = 6,
    label = "Symbol",
    sortText = "11",
    textEdit = {
        newText = "[Symbol]",
        range = {
            end = {
                character = 16,
                line = 267
            },
            start = {
                character = 15,
                line = 267
            }
        }
    }
},
```

In `lsp.omnifunc` to get a `prefix` we call the `adjust_start_col` which
then returns the `textEdit.range.start.character`.
Th `prefix` then be the `.` character. Then when filter the items with
`remove_unmatch_completion_items`, every item will be filtered out,
since no completion word starts `.`.

To fix we return the `end.character`, which in that particular case will
be the position after the `.`.
2022-02-11 14:04:15 +01:00
b981c231e2 Merge pull request #17368 from zeertzjq/test-filechanged-dialog
test: convert Test_file_changed_dialog() to Lua functional test
2022-02-11 21:02:27 +08:00
58d81efcb2 fix: append test for checking zero width node range 2022-02-11 20:59:47 +08:00
5546492c44 test: convert Test_file_changed_dialog() to Lua functional test 2022-02-11 20:37:20 +08:00
2db0a52074 Merge pull request #17360 from lewis6991/fix-window-close
fix: close floating windows when calling win_close()
2022-02-11 10:37:13 +01:00
afcf64479c fix(query.lua): check empty table for lines
The range of node may make `nvim_buf_get_lines` return an empty table.
2022-02-11 14:44:37 +08:00
059d36e326 feat(events): add DirChangedPre
In Nvim, like DirChanged, this also triggers when switching windows.

This marks Vim patch 8.2.4335 as ported.

vim-patch:8.2.4335: no autocommand event triggered before changing directory

Problem:    No autocommand event triggered before changing directory. (Ronnie
            Magatti)
Solution:   Add DirChangedPre. (closes vim/vim#9721)
28e8f73ae2
2022-02-11 12:55:58 +08:00
851252f79d Merge pull request #17012 from EdmundsEcho/fix-checkhealth
prevent checkhealth failure when plugin's check returns void
2022-02-11 05:50:49 +08:00
38bf52821a Merge pull request #17353 from zeertzjq/api-changedir-func
fix(api): use changedir_func() in nvim_set_current_dir()
2022-02-11 03:55:32 +08:00
4d59318ecb Merge pull request #17359 from dundargoc/ci/update-reviewers-on-manual-labeling 2022-02-10 12:31:24 -05:00
b0bcbb08a9 ci: add reviewers if labels are manually added after PR creation 2022-02-10 18:06:36 +01:00
c2ec3664e0 Merge pull request #17322 from dundargoc/ci/simplify-ci-process 2022-02-10 10:54:34 -05:00
85ae04dbfd fix: close floating windows when calling win_close() 2022-02-10 15:26:40 +00:00
a73360a09a Merge pull request #16868 from zeertzjq/vim-8.1.2221
vim-patch:8.1.2221,8.2.4336: filtering for :disp and :scriptnames
2022-02-10 21:04:41 +08:00
2c5382aafa ci: remove function run_test 2022-02-10 09:43:51 +01:00
2f3fb53dbd ci: remove meta-suite "tests" 2022-02-10 09:43:51 +01:00
357234865b ci: remove continue flag from exit_suite since it's always needed 2022-02-10 09:43:51 +01:00
b8529ea9b8 ci: run all tests with run_suite function 2022-02-10 09:43:51 +01:00
3b4bf88710 Merge pull request #17355 from zeertzjq/test-screenpos
test(old): comment out WinBar instead of skipping Test_screenpos()
2022-02-10 14:46:45 +08:00
de328de35b test(old): comment out WinBar instead of skipping Test_screenpos() 2022-02-10 14:06:48 +08:00
23c3f7f572 fix(api): use changedir_func() in nvim_set_current_dir()
Co-Authored-By: smolck <46855713+smolck@users.noreply.github.com>
2022-02-10 09:45:20 +08:00
dba1df6359 Merge pull request #17349 from dundargoc/ci/add-more-reviewers-from-label
ci: add more reviewers based on label
2022-02-09 18:44:01 -05:00
c415e764d4 vim-patch:8.2.4336: using :filter for :scriptnames does not work
Problem:    Using :filter for :scriptnames does not work. (Ben Jackson)
Solution:   Call message_filtered(). (closes vim/vim#9720)
769f5895eb

Cherry-pick a modeline from Vim patch 8.2.1432.
2022-02-10 07:28:54 +08:00
aea889fc06 vim-patch:8.1.2221: cannot filter :disp output
Problem:    Cannot filter :disp output.
Solution:   Support filtereing :disp output. (Andi Massimino, closes vim/vim#5117)
8fc4296436
2022-02-10 07:28:54 +08:00
90f2a851c7 Merge pull request #17342 from zeertzjq/mbyte-const
refactor(mbyte.c): add const qualifiers
2022-02-10 05:10:05 +08:00
aff0ddd784 vim-patch:8.2.4337: part of condition is always true (#17352)
Problem:    Part of condition is always true.
Solution:   Remove that part of the condition. (closes vim/vim#9729)
78a8404f8b
2022-02-09 17:55:01 +00:00
9b0b4829c7 Merge pull request #17345 from zeertzjq/vim-8.2.4329
vim-patch:8.2.4329: no support for end line number and column in 'errorformat'
2022-02-09 21:02:37 +08:00
60e3940b4a Merge pull request #17346 from zeertzjq/vim-8.2.4242
vim-patch:8.2.{4242,4315}: put in Visual mode cannot be repeated
2022-02-09 20:46:30 +08:00
3959f3a9c8 Merge pull request #17350 from zeertzjq/vim-8.2.1316
vim-patch:8.2.{1316,2199,2201,2202}
2022-02-09 20:11:12 +08:00
0675c7de75 vim-patch:8.2.2202: write file test still fails on MS-Windows
Problem:    Write file test still fails on MS-Windows.
Solution:   Set fileformat with the :edit command
16204962c7
2022-02-09 19:24:41 +08:00
2863fac61f vim-patch:8.2.2201: write file test fails on MS-Windows
Problem:    Write file test fails on MS-Windows.
Solution:   Force edit after setting 'fileformat'.
bd318559cf
2022-02-09 19:24:41 +08:00
47a98ab394 vim-patch:8.2.2199: first write after setting 'eol' does not have NL added
Problem:    First write after setting 'eol' does not have NL added. (Tomáš
            Janoušek)
Solution:   Only use b_no_eol_lnum when doing a binary write. (closes vim/vim#7535)
b3c8b1d254
2022-02-09 19:24:41 +08:00
92e4394562 vim-patch:8.2.1316: test 42 is still old style
Problem:    Test 42 is still old style.
Solution:   Turn it into a new style test. (Yegappan Lakshmanan, closes vim/vim#6561)
b61ef01cce

Including the Xtest2 -> Xfile2 change from Vim patch 8.2.1498.
2022-02-09 19:24:41 +08:00
afac1b5d87 ci: add more reviewers based on label 2022-02-09 10:47:14 +01:00
01b748f28f Merge pull request #17347 from zeertzjq/screen-pvs
refactor(PVS/V547): p == NULL is always false
2022-02-09 15:52:00 +08:00
a2a37effc2 refactor(PVS/V547): p == NULL is always false 2022-02-09 15:23:45 +08:00
3fe47647c7 vim-patch:8.2.4315: put in Visual mode not fully tested
Problem:    Put in Visual mode not fully tested.
Solution:   Add a few more test cases. (closes vim/vim#9708)
6bf821e8ab
2022-02-09 14:21:04 +08:00
196160b183 vim-patch:partial:f10911e5db16
Update runtime files
f10911e5db
2022-02-09 14:21:04 +08:00
d9cb3fba92 vim-patch:8.2.4242: put in Visual mode cannot be repeated
Problem:    Put in Visual mode cannot be repeated.
Solution:   Use "P" to put without yanking the deleted text into the unnamed
            register. (Shougo Matsushita, closes vim/vim#9591)
fb55207ed1

Cherry-pick get_y_previous() and set_y_previous() from patch 8.1.1736.
Nvim has removed y_current, so code related to it is N/A.
2022-02-09 14:21:04 +08:00
b9732e555b vim-patch:8.2.4329: no support for end line number and column in 'errorformat'
Problem:    No support for end line number and column in 'errorformat'.
Solution:   Add %e and %k. (closes vim/vim#9624)
e023d49937

Use "\t" to represent a Tab as it looks better.
2022-02-09 13:31:06 +08:00
300b009f47 fix(healthcheck): handle empty reports 2022-02-09 10:18:22 +08:00
07c97fa02d Merge pull request #17321 from dundargoc/refactor/pvs/v547
refactor(PVS/V547): expression is always true/false
2022-02-09 10:08:16 +08:00
ff81725ff0 refactor(mbyte.c): add const qualifiers
This only touches functions that do not return a pointer.
Also add a note about the differences between mb_head_off() and utf_head_off().
2022-02-09 09:52:57 +08:00
e16ec0be22 Merge pull request #17341 from zeertzjq/clang-suppress
chore(clang): suppress "result of operation is garbage"
2022-02-09 09:25:18 +08:00
4ce5d27f46 chore(clang): suppress "result of operation is garbage" 2022-02-09 08:54:54 +08:00
19b2ad0518 Merge pull request #17332 from cryptomilk/asn-vterm-output-callback
feat(term): Use vterm_output_set_callback()
2022-02-08 19:26:38 -05:00
0290889fa9 Merge pull request #17330 from dundargoc/ci/add-reviewer-from-label
ci: add write permissions to add-reviewer job
2022-02-08 18:43:03 -05:00
4d5cd3abe0 Merge pull request #17326 from zeertzjq/vim-8.1.2297
vim-patch:8.1.2297: the ex_vimgrep() function is too long
2022-02-09 07:07:25 +08:00
ef819fc052 vim-patch:8.1.2297: the ex_vimgrep() function is too long
Problem:    The ex_vimgrep() function is too long.
Solution:   Split it in three parts. (Yegappan Lakshmanan, closes vim/vim#5211)
d6a98a3a97

Including a missing change to ex_vimgrep() from patch 8.0.1831.
2022-02-09 06:34:21 +08:00
bcea732997 Merge pull request #17328 from zeertzjq/vim-8.2.0197
vim-patch:8.2.0197: some Ex commands not sufficiently tested
2022-02-09 04:40:15 +08:00
46c93b4304 Merge pull request #16553 from seandewar/vim-8.2.0878
vim-patch:8.2.{0882,1051,1083}: port `reduce()` function
2022-02-08 17:05:27 +00:00
79bacb0973 ci: add write permissions to add-reviewer job 2022-02-08 14:56:46 +01:00
cfed5baa38 refactor(PVS/V547): expression is always true/false 2022-02-08 14:52:31 +01:00
1a5e893cee Merge pull request #17334 from zeertzjq/vim-8.2.4326
vim-patch:8.2.4326: "o" and "O" copying comment not sufficiently tested
2022-02-08 21:45:39 +08:00
3c75e63bf6 vim-patch:8.2.4326: "o" and "O" copying comment not sufficiently tested
Problem:    "o" and "O" copying comment not sufficiently tested.
Solution:   Add a test case. (closes vim/vim#9718)
51ab7c7d0d

Fix a mistake when porting Vim patch 8.2.3934
2022-02-08 21:10:32 +08:00
7813b48645 feat(term): use vterm_output_set_callback() 2022-02-08 11:18:49 +01:00
40c36efdee chore(deps): use https for downloading libvterm and libtermkey 2022-02-08 11:18:49 +01:00
51b432a7d1 Merge pull request #17327 from zeertzjq/test-ex-mode
test: add Lua functional tests for Ex mode
2022-02-08 15:21:18 +08:00
f8b40694b1 vim-patch:8.2.0197: some Ex commands not sufficiently tested
Problem:    Some Ex commands not sufficiently tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5565)
ea3db914c0
2022-02-08 15:09:54 +08:00
68603998b9 test: add Lua functional tests for Ex mode 2022-02-08 14:47:23 +08:00
01e58fb14d Merge pull request #17324 from zeertzjq/vim-patch-sh-read
chore(vim-patch.sh): use piping instead of here string for `while read`
2022-02-07 21:30:54 -05:00
8ec4410cfb Merge pull request #17323 from dundargoc/ci/add-reviewer-from-label
ci: add reviewers based on label
2022-02-07 21:30:26 -05:00
4d349330a7 chore(vim-patch.sh): use piping instead of here string for while read
Using a here string can cause an error if there are no missing patches:
`./scripts/vim-patch.sh: line 580: runtime_commits: bad array subscript`

Using piping doesn't cause the error.
2022-02-08 10:08:17 +08:00
0a8bfc0214 Merge pull request #17311 from zeertzjq/vim-8.2.4303
vim-patch:8.2.{4303,4307}: a few messages should not be translated
2022-02-08 08:20:10 +08:00
64116d7850 chore: fix typos (#17250)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Dani Dickstein <daniel.dickstein@gmail.com>
Co-authored-by: Axel Dahlberg <git@valleymnt.com>
2022-02-08 08:19:06 +08:00
9259bc6215 Merge pull request #16873 from seandewar/vim-8.2.1665
vim-patch:8.2.{1665,1726,1872,1893,1921,2280,2813}: `matchfuzzy` and friends
2022-02-07 22:57:25 +00:00
fde169f328 ci: add reviewers based on label 2022-02-07 21:25:45 +01:00
02e7431445 docs(fuzzy-match): cherry-pick latest changes
53f7fccc94
1b884a0053
4c295027a4
3ec3217f04
2022-02-07 17:39:50 +00:00
ce797e08f5 vim-patch:8.2.2813: cannot grep using fuzzy matching
Problem:    Cannot grep using fuzzy matching.
Solution:   Add the "f" flag to :vimgrep. (Yegappan Lakshmanan, closes vim/vim#8152)
bb01a1ef3a
2022-02-07 17:20:51 +00:00
715fbcbb8c vim-patch:8.2.2280: fuzzy matching doesn't give access to the scores
Problem:    Fuzzy matching doesn't give access to the scores.
Solution:   Return the scores with a third list. (Yegappan Lakshmanan,
            closes vim/vim#7596)
9d19e4f4ba

Remove seemingly useless NULL checks.
assert that removing the li one wasn't dumb.
2022-02-07 17:20:51 +00:00
712c7e5d5f vim-patch:8.2.1921: fuzzy matching does not recognize path separators
Problem:    Fuzzy matching does not recognize path separators.
Solution:   Add a bonus for slash and backslash. (Yegappan Lakshmanan,
            closes vim/vim#7225)
dcdd42a8cc
2022-02-07 17:20:50 +00:00
30deb14f39 vim-patch:8.2.1893: fuzzy matching does not support multiple words
Problem:    Fuzzy matching does not support multiple words.
Solution:   Add support for matching white space separated words. (Yegappan
            Lakshmanan, closes vim/vim#7163)
8ded5b647a
2022-02-07 17:20:50 +00:00
8313d31e4a vim-patch:8.2.1872: matchfuzzy() does not prefer sequential matches
Problem:    Matchfuzzy() does not prefer sequential matches.
Solution:   Give sequential matches a higher bonus. (Christian Brabandt,
            closes vim/vim#7140)
e9f9f16387
2022-02-07 17:20:50 +00:00
960ea01972 vim-patch:8.2.1726: fuzzy matching only works on strings
Problem:    Fuzzy matching only works on strings.
Solution:   Support passing a dict.  Add matchfuzzypos() to also get the match
            positions. (Yegappan Lakshmanan, closes vim/vim#6947)
4f73b8e9cc

Also remove some N/A and seemingly useless NULL checks -- Nvim allocs can't
return NULL. I'm not sure why the retmatchpos stuff in match_fuzzy checks for
NULL too, given that Vim checks for NULL alloc in do_fuzzymatch; assert that the
li stuff is not NULL as that's the one check I'm ever-so-slightly unsure about.

Adjust tests. Note that the text_cb tests actually throw E6000 in Nvim, but we
also can't assert that error due to v8.2.1183 not being ported yet.
2022-02-07 17:20:49 +00:00
fba00b5e7e vim-patch:8.2.1665: cannot do fuzzy string matching
Problem:    Cannot do fuzzy string matching.
Solution:   Add matchfuzzy(). (Yegappan Lakshmanan, closes vim/vim#6932)
635414dd2f

Adjust Test_matchfuzzy's 2nd assert to expect the last error thrown, as
v8.2.1183 hasn't been ported yet (to be honest, the error message is kinda weird
if the 2nd argument is not convertible to string). We can still port this fully
as porting v8.2.1183 would require removing this change to pass CI.
2022-02-07 17:19:59 +00:00
f30ce7d273 ci: run all suites with run_suite function 2022-02-07 09:57:21 +01:00
f02a5a7bda chore(typval): return NULL over false for pointer return type (#17316)
While we're at it, abort() for an unhandled v_type.
2022-02-07 01:51:09 +00:00
cf86adba61 Merge pull request #17263 from zeertzjq/vim-8.2.0208
vim-patch:8.2.{0208,0215,0942,3824,3939}: fnamemodify() patches
2022-02-07 07:13:13 +08:00
72816136a5 vim-patch:8.2.3939: MS-Windows: fnamemodify('', ':p') does not work
Problem:    MS-Windows: fnamemodify('', ':p') does not work.
Solution:   Do not consider an empty string a full path. (Yegappan Lakshmanan,
            closes vim/vim#9428, closes vim/vim#9427)
5a664fe57f
2022-02-07 06:48:10 +08:00
bfc11e9c64 vim-patch:8.2.3824: no ASAN support for MSVC
Problem:    No ASAN support for MSVC.
Solution:   Add ASAN support and fix a coupld of uncovered problems. (Yegappan
            Lakshmanan, closes vim/vim#9357)
6df0f2759d
2022-02-07 06:48:10 +08:00
53e4434c72 vim-patch:8.2.0942: expanding to local dir after homedir keeps "~/"
Problem:    Expanding to local dir after homedir keeps "~/".
Solution:   Adjust modify_fname(). (Christian Brabandt, closes vim/vim#6205,
            closes vim/vim#5979)
0e390f40e9
2022-02-07 06:48:10 +08:00
f47ba10636 vim-patch:8.2.0215: wrong file name shortening
Problem:    Wrong file name shortening. (Ingo Karkat)
Solution:   Better check for path separator. (Yasuhiro Matsumoto,
            closes vim/vim#5583, closes vim/vim#5584)
a78e9c61a0
2022-02-07 06:48:10 +08:00
d457168e3b vim-patch:8.2.0208: fnamemodify() does not apply ":~" when followed by ":."
Problem:    Fnamemodify() does not apply ":~" when followed by ":.".
Solution:   Don't let a failing ":." cause the ":~" to be skipped. (Yasuhiro
            Matsumoto, closes vim/vim#5577)
d816cd94d8
2022-02-07 06:48:10 +08:00
380bc4fe22 Merge pull request #17299 from zeertzjq/vim-8.1.0711
vim-patch:7.4.{1163,1164,1167,1173,1178,1181,1228},8.1.0711
2022-02-07 06:04:40 +08:00
fe621b4ac0 vim-patch:8.1.0711: test files still use function!
Problem:    Test files still use function!.
Solution:   Remove the exclamation mark.  Fix overwriting a function.
1e1153600c

Some of the changes were already applied previously.
2022-02-07 05:34:20 +08:00
e6e9ffb345 vim-patch:7.4.1228
Problem:    copy() and deepcopy() fail with special variables. (Nikolai
            Pavlov)
Solution:   Make it work.  Add a test.  Closes vim/vim#614.
155500077c

Code is N/A. This only ports the tests.
Comment out tests involving v:none as Nvim has removed it.
2022-02-07 05:34:20 +08:00
a937fc53ef vim-patch:7.4.1181
Problem:    free_tv() can't handle special variables. (Damien)
Solution:   Add the variable type.
6650a69454

Code is N/A. This only ports the tests.
2022-02-07 05:34:20 +08:00
3fa5d50183 vim-patch:7.4.1178
Problem:    empty() doesn't work for the new special variables.
Solution:   Make empty() work. (Damien)
767d8c1a1a

Code is N/A. This only ports the tests.
Comment out tests involving v:none as Nvim has removed it.
2022-02-07 05:34:20 +08:00
bf8f2ebb79 vim-patch:7.4.1173
Problem:    No test for new behavior of v:true et al.
Solution:   Add a test.
65591001e4

Comment out tests involving v:none as Nvim has removed it.
2022-02-07 05:34:20 +08:00
b3a14a71b0 vim-patch:7.4.1167
Problem:    No tests for "is" and "isnot" with the new variables.
Solution:   Add tests.
0436922965

Comment out tests involving v:none as Nvim has removed it.
2022-02-07 05:34:20 +08:00
6a00b16896 vim-patch:7.4.1164
Problem:    No tests for comparing special variables.  Error in jsondecode()
            not reported.  test_json does not work Japanse system.
Solution:   Set scriptencoding. (Ken Takata) Add a few more tests. Add error.
6039c7f053

Code is N/A. This only ports the tests.
Comment out tests involving v:none as Nvim has removed it.
2022-02-07 05:34:20 +08:00
7b8fcf0234 vim-patch:7.4.1163
Problem:    Expressions "0 + v:true" and "'' . v:true" cause an error.
Solution:   Return something sensible when using a special variable as a
            number or as a string. (suggested by Damien)
17a13437c9

Code is N/A. This only ports the tests.
Comment out tests involving v:none as Nvim has removed it.
2022-02-07 05:34:20 +08:00
e2466d84bc Merge pull request #17305 from zeertzjq/vim-8.2.1741
vim-patch:8.2.1741: pathshorten() only supports using one character
2022-02-07 05:21:39 +08:00
f0699f4356 Merge pull request #17279 from zeertzjq/state-enter-vpeekc
fix(event-loop): call vpeekc() directly first to check for character
2022-02-06 19:22:02 +01:00
c7df847c07 Merge pull request #17302 from lewis6991/pkg_ldr
fix(lua): restore priority of the preloader
2022-02-06 15:40:45 +01:00
51444bef24 Merge pull request #17306 from clason/vim-8.2.4305
* Vim 8.2.4305: tex filetype detection fails
* Vim 8.2.4306: no test for fixed perl filetype check
2022-02-06 15:33:39 +01:00
4903949033 Merge pull request #17277 from laomaiweng/windows-debug-symbols
build(win): package the debug symbols (PDB file) along with nvim.exe
2022-02-06 09:32:18 -05:00
2ff4726fae Merge pull request #17310 from jamessan/commitlint
ci(commitlint): use lintcommit.lua from main repo
2022-02-06 09:28:24 -05:00
707cc1a167 ci(commitlint): use lintcommit.lua from main repo
[skip ci]
2022-02-06 08:31:23 -05:00
8f0b3cadbe vim-patch:8.2.4307: a few more messages should not be translated
Problem:    A few more messages should not be translated.
Solution:   Remove _().
0c1550d9e9
2022-02-06 21:13:03 +08:00
daf7c17cdb vim-patch:8.2.4303: a few messages should not be translated
Problem:    A few messages should not be translated.
Solution:   Remove _(). (Dominique Pellé, closes vim/vim#9702)
cd53eed2c5
2022-02-06 21:13:03 +08:00
06d2d271d7 vim-patch:8.2.4306: no test for fixed perl filetype check
Problem:    No test for fixed perl filetype check.
Solution:   Add a test. Sort test functions.
500761b1cf
2022-02-06 12:19:55 +01:00
05f38bbede vim-patch:8.2.4305: tex filetype detection fails
Problem:    Tex filetype detection fails.
Solution:   Check value to be positive. (closes vim/vim#9704)
e5b7897585
2022-02-06 12:10:09 +01:00
d65ee12914 vim-patch:8.2.1741: pathshorten() only supports using one character
Problem:    pathshorten() only supports using one character.
Solution:   Add an argument to control the length. (closes vim/vim#7006)
6a33ef0deb

Cherry-pick a line in test from patch 8.2.0634.
Use Nvim's config paths in docs.

shorten_dir() returning a pointer looks a bit confusing here, as it is
actually the same pointer passed to it, and it doesn't really reduce
much code, so change it back to void.

Assigning rettv->vval.v_string = NULL is not needed if a pointer is
within 64 bits. While this is usually the case, I'm not sure if it can
be taken for granted.
2022-02-06 16:29:12 +08:00
8215c05945 Merge pull request #17194 from zeertzjq/inccommand-prev-sub
fix(inccommand): do not change reg_prev_sub when previewing
2022-02-06 10:18:59 +08:00
28d5face21 Merge pull request #16862 from seandewar/vim-8.2.2658
vim-patch:8.2.{2658,2661,2736}: for loop over strings
2022-02-06 00:02:30 +00:00
b518b577ea fix(lua): restore priority of the preloader
Neovim currently places its own loader for searching runtime files at
the front of `package.loaders`. This prevents any preloaders in
`package.preload` from being used. This change fixes that by moving the
default package preloader to run before Neovim's loader. For example,
LuaJIT provides preloaders for the built-in modules `ffi` and `bit`, so
this optimisation will improve the loading of those.
2022-02-05 21:46:04 +00:00
b17f1e6fe8 Merge pull request #17077 from zeertzjq/vim-8.2.2324
vim-patch:8.2.{1727,2324,2363}: charcol(), getcharpos(), getcursorcharpos(), setcharpos(), setcursorcharpos()
2022-02-06 05:18:02 +08:00
be9dbc925c vim-patch:partial:6aa57295cfbe
Update runtime files
6aa57295cf
2022-02-06 04:46:16 +08:00
46d1b8ed1f vim-patch:partial:2346a6378483
Update runtime files
2346a63784
2022-02-06 04:46:16 +08:00
8c3244c9a1 vim-patch:8.2.2363: curpos() does not accept a string argument as before
Problem:    curpos() does not accept a string argument as before.
solution:   Make a string argument work again. (Yegappan Lakshmanan,
            closes vim/vim#7690
9ebcf231bd
2022-02-06 04:46:16 +08:00
6ab71683d1 vim-patch:8.2.2324: not easy to get mark en cursor posotion by character count
Problem:    Not easy to get mark en cursor posotion by character count.
Solution:   Add functions that use character index. (Yegappan Lakshmanan,
            closes vim/vim#7648)
6f02b00bb0
2022-02-06 04:46:16 +08:00
8ba9f19961 vim-patch:8.2.1727: a popup created with "cursorline" will ignore "firstline"
Problem:    A popup created with "cursorline" will ignore "firstline".
Solution:   When both "cursorline" and "firstline" are present put the cursor
            on "firstline". (closes vim/vim#7000)  Add the "winid" argument to
            getcurpos().
99ca9c4868

Skip popup window related code.
Cherry-pick all of Test_getcurpos_setpos() from patch 8.2.0610.
2022-02-06 04:46:16 +08:00
8adbba7ac3 feat(eval): port emsg from v8.2.3284
80d7395dcf
2022-02-05 19:55:17 +00:00
83a48d7a44 vim-patch:8.2.2661: leaking memory when looping over a string
Problem:    Leaking memory when looping over a string.
Solution:   Free the memory.
bb5d87c850
2022-02-05 19:55:16 +00:00
7002a3433b vim-patch:8.2.2658: :for cannot loop over a string
Problem:    :for cannot loop over a string.
Solution:   Accept a string argument and iterate over its characters.
74e54fcb44

v8.2.2659 is already ported.

N/A patches for version.c:

vim-patch:8.2.2736: Vim9: for loop over string is a bit slow

Problem:    Vim9: for loop over string is a bit slow.
Solution:   Avoid using strlen().
175a41c13f
2022-02-05 19:55:11 +00:00
92e92f02e7 fix(diff): make algorithm work for vim.diff (#17300)
Fixes #17207
2022-02-05 09:49:48 -08:00
cee944e3ee Merge pull request #17199 from glacambre/fix_9358
fix(--headless): do not block on press-enter prompts when no UI
2022-02-05 16:47:51 +01:00
f68d25737f Merge pull request #17020 from seandewar/vim-8.1.2342
vim-patch:8.1.{2342,2343,2356,2357},8.2.0233: `rand` and `srand`
2022-02-05 15:30:09 +00:00
ef6cedf820 Merge pull request #17290 from dundargoc/ci/simplify-ci-process
ci: simplify CI process
2022-02-05 09:16:41 -05:00
4f7a8991a9 vim-patch:8.2.0233: crash when using garbagecollect() in between rand()
Problem:    Crash when using garbagecollect() in between rand().
Solution:   Redesign the rand() and srand() implementation. (Yasuhiro
            Matsumoto, closes vim/vim#5587, closes vim/vim#5588)
4f645c54ef

Omit test_srand_seed.
Unmacroify SHUFFLE_XOSHIRO128STARSTAR and SPLITMIX32 while we're at it (leave
ROTL alone as it's fairly innocent).
2022-02-05 14:01:00 +00:00
cc7ccf6d31 vim-patch:8.1.2357: no test with wrong argument for rand()
Problem:    No test with wrong argument for rand().
Solution:   Add a test case.
68e9e5f7fc
2022-02-05 14:00:59 +00:00
c97614d98f vim-patch:8.1.2356: rand() does not use the best algorithm
Problem:    rand() does not use the best algorithm.
Solution:   use xoshiro128** instead of xorshift. (Kaito Udagawa,
            closes vim/vim#5279)
f8c1f9200c
2022-02-05 14:00:59 +00:00
061b06a8ae docs(rand): cherry-pick changes from rt update 0c0734d
0c0734d527
2022-02-05 14:00:59 +00:00
f6a0d5498b vim-patch:8.1.2343: using time() for srand() is not very random
Problem:    Using time() for srand() is not very random.
Solution:   use /dev/urandom if available
07e4a19795

Use os_open and os_close.

time_settime is N/A, so some parts of the test are disabled.

There's maybe a very, very, very, very small chance the /dev/urandom test fails,
but it shouldn't matter. :P
2022-02-05 14:00:35 +00:00
22f0725aac vim-patch:8.1.2342: random number generator in Vim script is slow
Problem:    Random number generator in Vim script is slow.
Solution:   Add rand() and srand(). (Yasuhiro Matsumoto, closes vim/vim#1277)
06b0b4bc27

Add missing method call usage to builtin.txt.
vim_time and test_settime is N/A.
Add a modeline to test_random.vim.
Use typval_T* over listitem_T* vars so we don't need to use TV_LIST_ITEM_TV all
over the place...
Remove NULL list checks (tv_list_len covers this).
2022-02-05 13:16:34 +00:00
7c8ef809e6 Merge pull request #17274 from dundargoc/chore/correct-minimum-python-version
chore(gen_vimdoc): correct minimum python version
2022-02-05 08:06:58 -05:00
03e189d1a1 chore(gen_vimdoc): correct minimum python version 2022-02-05 13:36:27 +01:00
9d1deed6c8 Merge pull request #17298 from zeertzjq/vim-8.2.4298
vim-patch:8.2.4298: divide by zero with huge tabstop value
2022-02-05 20:33:11 +08:00
e6cfd20b7f vim-patch:8.2.4298: divide by zero with huge tabstop value
Problem:    Divide by zero with huge tabstop value.
Solution:   Reject tabstop value that overflows to zero.
fc88df42f1
2022-02-05 20:05:04 +08:00
5b34c2ab73 fix(--headless): do not block on press-enter prompts when no UI
This commit fixes #9358, where emitting multiple messages with 'echo' or
a single one with 'echom' or 'echoerr' would result in a press-enter
prompt that couldn't be dismissed by pressing enter.

This requires adapting a few tests to spawn a UI before testing whether
press-enter prompts are blocking.

It also fixes #11718, as when combined with #15910 it enables making
sure that neovim never blocks and emits messages on startup.
2022-02-05 13:02:33 +01:00
806a7c976d Merge pull request #17275 from bfredl/keysethl
refactor(api): use a keyset for highlight dicts
2022-02-05 10:18:47 +01:00
741b4d6262 Merge pull request #17297 from zeertzjq/test-expand
test(old): add test_expand.vim
2022-02-05 17:15:42 +08:00
a4078fa57e test(old): add test_expand.vim
This removes expand_spec.lua and copies test_expand.vim from Vim at
version v8.1.2278.

The rest of patch 8.1.2278 were already applied in #15952, so this marks
that patch as fully ported.

vim-patch:8.1.2278: using "cd" with "exe" may fail

Problem:    Using "cd" with "exe" may fail.
Solution:   Use chdir() instead.
3503d7c94a
2022-02-05 16:41:23 +08:00
fa192e97d5 ci: simplify CI process 2022-02-04 23:51:51 +01:00
dcbf9f93e9 Merge pull request #17288 from zeertzjq/vim-8.2.1128
vim-patch:8.2.1128: the write message mentions characters, but it's bytes
2022-02-04 23:07:21 +08:00
c50cea3de4 Merge pull request #17287 from zeertzjq/vim-8.1.2133
vim-patch:8.1.2133: some tests fail when run as root
2022-02-04 22:24:38 +08:00
9b0363d365 vim-patch:8.2.1128: the write message mentions characters, but it's bytes
Problem:    The write message mentions characters, but it's actually bytes.
Solution:   Change "C" to "B" and "characters" to "bytes".
3f40ce78f5
2022-02-04 22:17:25 +08:00
041b2d6f1e vim-patch:8.1.2133: some tests fail when run as root
Problem:    Some tests fail when run as root.
Solution:   Add CheckNotRoot and use it. (James McCoy, closes vim/vim#5020)
07282f01da

Skip test_terminal.vim and test_viminfo.vim: N/A
2022-02-04 21:52:44 +08:00
cb863d4e1f Merge pull request #17152 from zeertzjq/vim-8.2.3583
vim-patch:8.2.3583: the "gd" and "gD" commands do not update search stats
2022-02-04 19:10:50 +08:00
2fd0720de2 test: convert some search stat screendump tests to Lua screen tests 2022-02-04 18:47:20 +08:00
ab7ae8806e vim-patch:8.2.3583: the "gd" and "gD" commands do not update search stats
Problem:    The "gd" and "gD" commands do not update search stats. (Gary
            Johnson)
Solution:   Clear search stats.
0c71114aed
2022-02-04 18:47:20 +08:00
b9def4ae10 test(old): fix test order in test_search_stat.vim
Also avoid unnecessary divergences from upstream and add a modeline.
2022-02-04 18:47:20 +08:00
6bee2bf790 Merge pull request #17272 from zeertzjq/vim-8.1.0846
vim-patch:8.1.{0846,0878,0884,2358},8.2.{0305,0352,0687,3797}
2022-02-04 09:48:48 +08:00
6775a7d98f vim-patch:8.2.3797: no good reason to limit the message history in tiny version
Problem:    No good reason to limit the message history in the tiny version.
Solution:   Always use 200.
1e78deb077
2022-02-04 09:23:54 +08:00
7c3064d46e vim-patch:8.2.0687: some tests do not work on FreeBSD
Problem:    Some tests do not work on FreeBSD.
Solution:   Enable modeline.  Use WaitFor() in more cases. (Ozaki Kiichi,
            closes vim/vim#6036)
41d4299f26
2022-02-04 09:23:54 +08:00
a998b24c56 vim-patch:8.2.0352: FreeBSD: test for sourcing utf-8 is skipped
Problem:    FreeBSD: test for sourcing utf-8 is skipped.
Solution:   Run the matchadd_conceal test separately to avoid that setting
            'term' to "ansi" causes problems for other tests. (Ozaki Kiichi,
            closes vim/vim#5721)
36ddf93831
2022-02-04 09:23:54 +08:00
94eaf3cb2f vim-patch:8.2.0305: relativenumber test fails on some systems
Problem:    Relativenumber test fails on some systems. (James McCoy)
Solution:   Clear the command line.
8040a7147f
2022-02-04 09:23:54 +08:00
1e0613f58c vim-patch:8.1.2358: tests fail on Cirrus CI for FreeBSD
Problem:    Tests fail on Cirrus CI for FreeBSD.
Solution:   Fix a test and skip some. (Christian Brabandt, closes vim/vim#5281)
9134f1ecd4

Skip test_normal.vim: already applied in #11483.
2022-02-04 09:23:54 +08:00
5a9e5b6c38 vim-patch:8.1.0884: double check for bsd systems
Problem:    Double check for bsd systems.
Solution:   Delete the old line.
af630d4f7f
2022-02-04 09:23:54 +08:00
22a7693915 vim-patch:8.1.0878: test for has('bsd') fails on some BSD systems
Problem:    Test for has('bsd') fails on some BSD systems.
Solution:   Adjust the uname match. (James McCoy, closes vim/vim#3909)
a02e3f65c5
2022-02-04 09:23:54 +08:00
4c4a80950e docs: update feature-list
Add "linux", "sun".
Remove "+shellslash" as it should be passed to exists().
Sort alphabetically and consistently use Tabs for indent.
2022-02-04 09:23:54 +08:00
f25ab39faa vim-patch:8.1.0846: not easy to recognize the system Vim runs on
Problem:    Not easy to recognize the system Vim runs on.
Solution:   Add more items to the features list. (Ozaki Kiichi, closes vim/vim#3855)
39536dd557

Some doc changes have already been applied. Some others are N/A.
"moon" was removed in patch 8.2.0427 so I did not add it.
2022-02-04 09:23:54 +08:00
b667bb355d Merge pull request #17283 from dundargoc/ci/reduce-log-output
ci: only show last 100 lines of log on error
2022-02-03 17:11:18 -05:00
4fa8c66bc6 ci: only show last 100 lines of log on error 2022-02-03 22:30:51 +01:00
59fa5f4ecf Merge pull request #17282 from dundargoc/chore/remove-duplicate-entry
chore(gen_vimdoc): remove duplicate extmark.c entry
2022-02-03 14:11:26 -05:00
de672b6d7a chore(gen_vimdoc): remove duplicate extmark.c entry 2022-02-03 18:56:32 +01:00
9efdd927ff Merge pull request #16976 from seandewar/vim-8.2.4018
vim-patch:8.2.{4018,4026,4028} & `nvim_win_call` fixes
2022-02-03 16:44:42 +00:00
452b46fcf7 fix(api/nvim_win_call): share common win_execute logic
We have to be sure that the bugs fixed in the previous patches also apply to
nvim_win_call.

Checking v8.1.2124 and v8.2.4026 is especially important as these patches were
only applied to win_execute, but nvim_win_call is also affected by the same
bugs. A lot of win_execute's logic can be shared with nvim_win_call, so factor
it out into a common macro to reduce the possibility of this happening again.
2022-02-03 15:03:08 +00:00
6820420d3e vim-patch:8.2.4028: ml_get error with :doautoall and Visual area
Problem:    ml_get error with :doautoall and Visual area. (Sean Dewar)
Solution:   Disable Visual mode while executing autocommands.
cb1956d6f2

This should also fix #16937 for nvim_buf_call, so test for it.
2022-02-03 15:03:08 +00:00
d984a8d130 vim-patch:8.2.4026: ml_get error with specific win_execute() command
Problem:    ml_get error with specific win_execute() command. (Sean Dewar)
Solution:   Check cursor and Visual area are OK.
e664a32701
2022-02-03 15:03:08 +00:00
f326c9a77d vim-patch:8.2.4018: ml_get error when win_execute redraws with Visual selection
Problem:    ml_get error when win_execute redraws with Visual selection.
Solution:   Disable Visual area temporarily. (closes vim/vim#9479)
18f4740f04

{switch_to/restore}_win_for_buf is N/A (marked as such in v8.0.0860; currently
only used in Vim's if_py).

Add a modeline to test_execute_func.vim.
2022-02-03 15:02:57 +00:00
f5c4c1d768 Merge pull request #16818 from zeertzjq/vim-8.2.3454
vim-patch:8.2.{3454,3455,3497,3540,3581,3678}: some "p" and "gp" patches
2022-02-03 22:22:00 +08:00
89e308d7da Merge pull request #17226 from dundargoc/refactor/remove-redundant-code
vim-patch:8.2.4241: some type casts are redundant
2022-02-03 20:47:29 +08:00
02d4c91588 Merge pull request #17268 from zeertzjq/health-noshell
fix(health): do not run external processes in a shell
2022-02-03 19:29:24 +08:00
a87ecf5d08 fix(health): do not run external processes in a shell 2022-02-03 18:38:37 +08:00
5fe6bbae2d build(win): don't try to package a PDB if not building with MSVC…
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-02-03 07:52:27 +01:00
74998b0449 fix(event-loop): call vpeekc() directly first to check for character
Expand mappings first by calling `vpeekc()` directly.
2022-02-03 13:43:48 +08:00
f70d1442be build(win): package the debug symbols (PDB file) along with nvim.exe 2022-02-03 01:40:40 +01:00
0bafa44f8b refactor(api): use a keyset for highlight dicts 2022-02-02 23:18:25 +01:00
21cdecc8e0 Merge pull request #17245 from zeertzjq/vim-8.2.3219
vim-patch:8.2.3219: :find searches non-existing directories
2022-02-02 22:31:14 +08:00
0c66c7dafd Merge pull request #17271 from zeertzjq/vim-8.2.3947
vim-patch:8.2.{3947,4283}: changedir_func() refactoring
2022-02-02 22:01:59 +08:00
cd44f0a401 vim-patch:8.2.4283: using a variable for the return value is not needed
Problem:    Using a variable for the return value is not needed.
Solution:   Return the value directly. (closes vim/vim#9687)
73257149d7

Also move down variable declarations in changedir_func().
vim_chdirfile() doesn't need change.
2022-02-02 21:33:46 +08:00
1bce6d6e16 vim-patch:8.2.3947: unnecessary check for NULL pointer
Problem:    Unnecessary check for NULL pointer.
Solution:   Remove the check. (closes vim/vim#9434)
f38aad85cf

Reorder the two if branches to match upstream.
2022-02-02 21:33:46 +08:00
2559359035 Merge pull request #16879 from zeertzjq/vim-8.2.3966
vim-patch:8.2.3966: when using feedkeys() abbreviations may be blocked
2022-02-02 10:11:09 +08:00
3e68973755 vim-patch:8.2.3966: when using feedkeys() abbreviations may be blocked
Problem:    When using feedkeys() abbreviations may be blocked.
Solution:   Reset tb_no_abbr_cnt when running out of characters.
            (closes vim/vim#9448)
b37a65e4bf
2022-02-02 09:46:25 +08:00
5be2cdd913 Merge pull request #17187 from lewis6991/master
feat(highlight): ns=0 to set :highlight namespace
2022-02-01 17:16:14 +01:00
4aa0cdd3aa feat(highlight): ns=0 to set :highlight namespace
Passing ns=0 to nvim_set_hl will alter the `:highlight` namespace.
2022-02-01 11:54:12 +00:00
f4300985d3 Merge pull request #17113 from zeertzjq/vim-8.2.2569
feat(statusline): support multibyte fillchar
2022-02-01 17:57:01 +08:00
7d72076a6f vim-patch:8.2.3219: :find searches non-existing directories
Problem:    :find searches non-existing directories.
Solution:   Check the path is not "..".  Update help. (Christian Brabandt,
            closes vim/vim#8612, closes vim/vim#8533)
7a4ca32175

Change STRNCAT to STRLCAT as clint doesn't like the former.

Include a typo fix from 2f0936cb9a (diff-7e9292cae1f2ba70dd5b17d2d162693a91044ada6ac99e9c3e8917f32878c097)
2022-02-01 17:08:40 +08:00
a562b5771e vim-patch:8.2.4274: Basic and form filetype detection is incomplete (#17259)
Problem:    Basic and form filetype detection is incomplete.
Solution:   Add a separate function for .frm files. (Doug Kearns, closes vim/vim#9675)
c570e9cf68
2022-02-01 08:35:28 +01:00
547497b042 Merge pull request #17261 from zeertzjq/vim-8.2.4273
vim-patch:8.2.4273: the EBCDIC support is outdated
2022-02-01 10:43:14 +08:00
bba5003bdb vim-patch:8.2.4273: the EBCDIC support is outdated
Problem:    The EBCDIC support is outdated.
Solution:   Remove the EBCDIC support.
424bcae1fb

Also remove a comment in buf_init_chartab() as it is for enc_dbcs only.

Skip test_expr.vim: the check was already removed when patch 7.4.2265
was first ported.
2022-02-01 10:15:19 +08:00
5205bcc904 Merge pull request #17254 from zeertzjq/vim-8.2.3787
vim-patch:8.2.{3787,3932,3934,3935,3938}: text formatting patches
2022-02-01 04:23:59 +08:00
c00b844988 Merge pull request #17231 from seandewar/vim-8.2.4245
vim-patch:8.2.4245: ":retab 0" may cause illegal memory access
2022-01-31 18:28:56 +00:00
bddce4b0ff vim-patch:c4573eb12dba (#17258)
Update runtime files
c4573eb12d
2022-01-31 18:09:51 +01:00
79b92da0d2 vim-patch:partial:f10911e5db16 (#17248)
Update runtime files
f10911e5db
2022-01-31 15:27:01 +01:00
f195345c93 [RFC] fix: has('python') error (#17252)
* fix: has('python') error

* fix: functional tests
2022-01-31 15:06:46 +01:00
2a58e62145 vim-patch:8.2.4267: unused entry in keymap enum (#17255)
Problem:    Unused entry in keymap enum.
Solution:   Remove the entry.
4c93aff20f
2022-01-31 21:01:04 +08:00
8d99f53f3d vim-patch:8.2.1083: crash when using reduce() on a NULL list
Problem:    Crash when using reduce() on a NULL list.
Solution:   Only access the list when not NULL.
fda20c4cc5

CHECK_LIST_MATERIALIZE hasn't been ported yet, but presumably if it is ported
it'll use tv_list_first to check for range_list_item, which already checks for
NULL, so this should need no extra changes and can be a full port.

We didn't actually crash here due to the use of Nvim's tv_list functions
checking for NULL, but apply these changes to match Vim better anyway.
2022-01-31 17:38:57 +08:00
44a5875b24 vim-patch:8.2.1051: crash when changing a list while using reduce() on it
Problem:    Crash when changing a list while using reduce() on it.
Solution:   Lock the list. (closes vim/vim#6330)
ca275a05d8
2022-01-31 17:38:57 +08:00
af0bae38e2 vim-patch:8.2.0882: leaking memory when using reduce()
Problem:    Leaking memory when using reduce().
Solution:   Free the intermediate value.
48b1c21809
2022-01-31 17:38:57 +08:00
d746f5aa41 feat(eval): partially port v8.2.0878
Problem:    No reduce() function.
Solution:   Add a reduce() function. (closes vim/vim#5481)
85629985b7

Needs CHECK_LIST_MATERIALIZE from v8.2.0751 (and range_list_materialize from
8.2.0149).

Move e_reduceempty to funcs.c, as it's only used there. Make it static.
Use tv_blob_len, tv_list_len == 0 for empty checks.
Replace vim_memset(&funcexe, 0, ...) with FUNCEXE_INIT.
Leave li initially undefined (tv_list_first returns NULL if list is NULL).

This patch has a memory leak fixed by v8.2.0882.
2022-01-31 17:38:45 +08:00
ba2bb6a81b refactor(indent_c.c): add const qualifiers 2022-01-31 15:44:54 +08:00
ae649650de vim-patch:8.2.3938: line comment start is also found in a string
Problem:    Line comment start is also found in a string.
Solution:   Skip line comments in a string.
ba26367fea
2022-01-31 15:44:54 +08:00
f7801fe138 vim-patch:8.2.3935: CTRL-U in Insert mode does not fix the indent
Problem:    CTRL-U in Insert mode does not fix the indent.
Solution:   Fix the indent when 'cindent' is set.
5d20fbf2e7
2022-01-31 15:44:54 +08:00
da3b04a9e0 vim-patch:8.2.3934: repeating line comment is undesired for "O" command
Problem:    Repeating line comment is undesired for "O" command.
Solution:   Do not copy line comment leader for "O". (closes vim/vim#9426)
5ea5f37372
2022-01-31 15:44:54 +08:00
88ba0774e2 vim-patch:8.2.3932: C line comment not formatted properly
Problem:    C line comment not formatted properly.
Solution:   If a line comment follows after "#if" the next line is not the end
            of a paragraph.
264d3ddac0
2022-01-31 15:44:54 +08:00
eda957db10 vim-patch:8.2.3787: no proper formatting of a C line comment after a statement
Problem:    No proper formatting of a C line comment after a statement.
Solution:   Find the start of the line comment, insert the comment leader and
            indent the comment properly.
6e371ecb27
2022-01-31 15:44:54 +08:00
ef5cd99df0 test: remove 003_cindent_spec.lua
This no longer needed as Vim patch 8.1.1434 has been ported.
2022-01-31 15:44:54 +08:00
2870311a37 Merge pull request #17239 from seandewar/vim-8.2.3629
vim-patch:8.2.{3433,3629}
2022-01-31 01:04:10 +00:00
d38f81849b Merge pull request #17068 from VVKot/vim-8.2.3933
vim-patch:8.2.{3933,3973,3978,4013,4032,4048}
2022-01-31 00:42:11 +00:00
62c8715ee9 vim-patch:8.1.2412: crash when evaluating expression with error (#17109) 2022-01-31 08:12:44 +08:00
4dcc7bcbed vim-patch:8.2.3532: the previous '' mark is restored after moving the cursor (#17246) 2022-01-31 08:12:29 +08:00
58d01d3403 vim-patch:8.2.3475: expression register set by not executed put command (#17211) 2022-01-31 08:11:26 +08:00
f19921be0c vim-patch:8.2.3933: after ":cd" fails ":cd -" is incorrect
Problem:    After ":cd" fails ":cd -" is incorrect.
Solution:   Set the previous directory only after successfully changing
            directory. (Richard Doty, closes vim/vim#9419, closes vim/vim#8983)
3d0abad5bf

Adjust the test's error message check due to missing patch

vim-patch:8.2.3973: tiny build fails

Problem:    Tiny build fails.
Solution:   Adjust #ifdefs
0f7a5e758c

vim-patch:8.2.3978: build error when using dynamycally loaded Python 3

Problem:    Build error when using dynamycally loaded Python 3.
Solution:   Adjust #ifdef.
6b1a99dfe3

vim-patch:8.2.4013: build failure without the spell feature

Problem:    Build failure without the spell feature.
Solution:   Adjust #ifdefs.
e60b3c47d7

vim-patch:8.2.4032: ATTRIBUTE_NORETURN is not needed

Problem:    ATTRIBUTE_NORETURN is not needed.
Solution:   Use NORETURN(). (Ozaki Kiichi, closes vim/vim#9487)
e12406526a

vim-patch:8.2.4048: gcc complains about use of "%p" in printf

Problem:    gcc complains about use of "%p" in printf.
Solution:   Add (void *) typecast. (Dominique Pellé, closes vim/vim#9494)
c14f667626
2022-01-31 00:07:32 +00:00
c91fbc1b9e test(oldtest): unskip Test_addr_all
v8.1.0341 has since been ported
2022-01-30 22:25:15 +00:00
796224028b vim-patch:8.2.3629: command completion in cmdline window uses global commands
Problem:    Command completion in cmdline window uses global user commands,
            not local commands for the window where it was opened from.
Solution:   Use local commands. (closes vim/vim#9168)
a119812437
2022-01-30 22:25:15 +00:00
f8f0f14db2 vim-patch:8.2.3433: :delcommand does not take a -buffer option
Problem:    :delcommand does not take a -buffer option.
Solution:   Add the -buffer option.
bdcba24d85
2022-01-30 22:25:08 +00:00
a28a9aec63 Merge pull request #16748 from zeertzjq/vim-8.1.1434
vim-patch:8.1.{1434,1585},8.2.{3482,3625,3876}: some cindent patches
2022-01-31 04:49:54 +08:00
2793fcae0a vim-patch:8.2.4241: some type casts are redundant
Problem:    Some type casts are redundant.
Solution:   Remove the type casts. (closes vim/vim#9643)
420fabcd4f

This is not a literal port but an equivalent one.
2022-01-30 19:16:51 +01:00
46bd48f7e9 docs(tutor): modify for Neovim rather than Vim (#17092) 2022-01-30 13:53:01 +01:00
abde91ecaf docs: add example to vim.ui.select (#17241)
Closes https://github.com/neovim/neovim/issues/17137
2022-01-30 13:32:55 +01:00
9aaf7a2b4d Merge pull request #17244 from zeertzjq/vim-8.2.0092 2022-01-30 13:52:16 +08:00
8a9230db26 vim-patch:8.2.0950: tagjump test fails
Problem:    Tagjump test fails.
Solution:   Adjust expected text of the prompt.
13b8205b44
2022-01-30 13:25:29 +08:00
63173f23c4 vim-patch:8.2.0092: tags functionality insufficiently tested
Problem:    Tags functionality insufficiently tested.
Solution:   Add more tags tests. (Yegappan Lakshmanan, closes vim/vim#5446)
a1353b5352
2022-01-30 13:25:29 +08:00
4a96e7809f chore: typo fixes (#16921)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-01-29 23:15:22 +00:00
d7d015ffff Merge pull request #16975 from dstein64/vim-8.2.3917
vim-patch:8.2.3917: the eval.txt help file is way too big
2022-01-29 23:27:12 +01:00
7b3cfee982 vim-patch:partial:04fb916
Update runtime files
04fb916684
2022-01-29 15:19:30 -05:00
a94632d212 vim-patch:8.2.3917: the eval.txt help file is way too big
Problem:    The eval.txt help file is way too big.
Solution:   Move the builtin function details to a separate file.
1cae5a0a03

Note: Neovim-specific references to |functions| were changed to
|builtin-functions|. This included updates to:
  1. test/functional/vimscript/functions_spec.lua
  2. test/functional/vimscript/eval_spec.lua
  3. runtime/doc/lua.txt
2022-01-29 15:19:29 -05:00
4458413bc0 feat(filetype): convert patterns for mail buffers (#17238) 2022-01-29 12:43:06 -07:00
e0242c4a93 Merge pull request #17222 from bfredl/babajpy2
feat(provider)!: remove support for python2 and python3.[3-6]
2022-01-29 20:22:25 +01:00
baec0d3152 feat(provider)!: remove support for python2 and python3.[3-5]
These versions of python has reached End-of-life. getting rid
of python2 support removes a lot of logic to support two
incompatible python versions in the same version.
2022-01-29 19:49:37 +01:00
4b719e4a16 Merge pull request #17192 from zeertzjq/aucmd-redrawingdisabled
fix: set RedrawingDisabled before entering aucmd_win
2022-01-29 19:16:48 +01:00
49837dc805 Merge pull request #17202 from zeertzjq/unused-orig-rhs
refactor: allocate an empty string as unused orig_rhs for Lua mappings
2022-01-29 19:14:19 +01:00
b2f77c354a vim-patch:8.2.4251: vala files are not recognized (#17235)
Problem:    Vala files are not recognized.
Solution:   Add the *.vala pattern. (closes vim/vim#9654)
97c554d514
2022-01-29 15:40:29 +01:00
5e1c487d99 vim-patch:8.2.4090: after restoring a session buffer order can be quite different (#17112)
Problem:    After restoring a session buffer order can be quite different.
Solution:   Create buffers first. (Evgeni Chasnovski, closes vim/vim#9520)
26ebf1f036

---------------
As in Vim, this basically reverts 8.1.0829 providing different solution
(see vim/vim#9520).

Regarding Neovim, this basically reverts changes from #15062. Test about
restoring same terminals was a bit too restrictive with using actual
buffer ids, which changed with this patch (now they should be in the
same order as at `mksession` call), so I tweaked it.
2022-01-29 14:08:44 +00:00
ed0808412c Merge pull request #17234 from zeertzjq/vim-8.2.4248 2022-01-29 21:32:44 +08:00
950a88d4c2 vim-patch:8.2.4248: no proper test for moving the window separator
Problem:    No proper test for moving the window separator.
Solution:   Add a test.  Add comment in code. (closes vim/vim#9656)
a0c4e2f2d7

Remove the assertion as it is now possible for `fr` to be `NULL`.

The test fails without clearing messages. Not sure if this is a bug.
2022-01-29 20:37:48 +08:00
6dcdec8042 vim-patch:8.2.4052: not easy to resize a window from a plugin (#17028) 2022-01-29 20:37:07 +08:00
cf4d025c5a Merge pull request #17209 from bb010g/patch-1
fix(eval): v:lua support for `-` in module names
2022-01-29 11:45:15 +01:00
8fc9a58256 vim-patch:8.2.0028: searchpairpos() is not tested (#17232) 2022-01-29 16:34:11 +08:00
15c9d88bb7 vim-patch:8.2.4245: ":retab 0" may cause illegal memory access
Problem:    ":retab 0" may cause illegal memory access.
Solution:   Limit the value of 'tabstop' to 10000.
652dee4486

ex_retab change is N/A (+vartabs always available).

Nvim's set_num_option validation logic was refactored, hence why it looks
different from Vim's.

Also use XFREE_CLEAR in other places.
2022-01-29 06:31:51 +00:00
082ff2190c refactor: add static to some functions in funcs.c (#17030) 2022-01-29 08:22:42 +08:00
1ebac3cf4e Merge pull request #17220 from zeertzjq/unget-alt-chord 2022-01-29 06:37:44 +08:00
3adc3fc540 vim-patch:8.2.3678: illegal memory access
Problem:    Illegal memory access.
Solution:   Ignore changed indent when computing byte offset.
85be8563fe
2022-01-29 06:05:39 +08:00
6f04d3f3ef vim-patch:8.2.3581: reading character past end of line
Problem:    Reading character past end of line.
Solution:   Correct the cursor column.
0b5b06cb47
2022-01-29 06:05:39 +08:00
436a470ef5 vim-patch:8.2.3540: the mark '] is wrong after put with a count
Problem:    The mark '] is wrong after put with a count. (Naohiro Ono)
Solution:   Use the right line number. (closes vim/vim#8956)
f47ebf1e1a
2022-01-29 06:05:39 +08:00
5228850749 vim-patch:8.2.3497: put test fails when run by itself
Problem:    Put test fails when run by itself.
Solution:   Source check.vim. (Dominique Pellé, closes vim/vim#8990)
a9173d06f7
2022-01-29 06:05:39 +08:00
7812c6830c vim-patch:8.2.3455: using a count with "gp" leaves '] in wrong position
Problem:    Using a count with "gp" leaves '] in wrong position. (Naohiro Ono)
Solution:   Correct the mark position. (closes vim/vim#8899)
56858e4ed4
2022-01-29 06:05:39 +08:00
fee7d6fba4 vim-patch:8.2.3454: using a count with "gp" leave cursor in wrong position
Problem:    Using a count with "gp" leave cursor in wrong position. (Naohiro
            Ono)
Solution:   Count the inserted lines. (closes vim/vim#8899)
23003e51e1
2022-01-29 06:05:39 +08:00
75f4741db9 fix(input): remove reinterpreted ALT/META chords from recorded macro 2022-01-29 06:05:14 +08:00
af9a2a201d Merge pull request #16951 from zeertzjq/vim-8.2.4007 2022-01-29 06:03:22 +08:00
98fddc1d4c Merge pull request #17213 from zeertzjq/ci-lsan-failure 2022-01-28 13:47:29 -05:00
6fd1b12de1 Merge pull request #17206 from dundargoc/ci/remove-python2 2022-01-28 13:45:32 -05:00
b396387ec8 Merge pull request #16829 from zeertzjq/vim-8.2.2887
vim-patch:8.2.{2887,3414,3999}: fullcommand() follow-up patches
2022-01-29 02:42:14 +08:00
65529dd7a1 Merge pull request #17223 from clason/vim-8.2.4238
vim-patch:8.2.4238: *.tf file could be fileytpe "tf" or "terraform"
2022-01-28 18:44:03 +01:00
fb8cd340dc fix(eval): v:lua support for - in module names 2022-01-28 18:20:26 +01:00
5b9980f01e vim-patch:8.2.4238: *.tf file could be fileytpe "tf" or "terraform"
Problem:    *.tf file could be fileytpe "tf" or "terraform".
Solution:   Detect the type from the file contents. (closes vim/vim#9642)
bd8168c770
2022-01-28 17:01:13 +01:00
6cb670cb2c Merge pull request #17216 from clason/vim-8.2.4233
vim-patch:8.2.{4233,4235,4236,4237}: follow-up patches for recording in Select mode
2022-01-28 14:23:48 +01:00
bea439fe99 vim-patch:8.2.4237: record buffer wrong if character in Select mode was not typed
Problem:    Record buffer wrong if character in Select mode was not typed.
Solution:   Only delete the tail from the record buffer if the character was
            typed. (closes vim/vim#9650)
fbf4f1ca15
2022-01-28 20:53:56 +08:00
ca3e382a4f Merge pull request #17183 from notomo/expose-extmark-right-gravity
feat(api): expose extmark right_gravity and end_right_gravity
2022-01-28 12:38:56 +01:00
175692325b vim-patch:8.2.4236: accessing freed memory
Problem:    Accessing freed memory.
Solution:   Set the bh_curr pointer to NULL.
166788c657
2022-01-28 19:03:39 +08:00
7114764ffb vim-patch:8.2.4235: invalid check for NULL pointer
Problem:    Invalid check for NULL pointer.
Solution:   Remove the check.
37cf413e3e
2022-01-28 19:03:39 +08:00
e691ef338c vim-patch:8.2.4233: crash when recording and using Select mode
Problem:    Crash when recording and using Select mode.
Solution:   When deleting the last recorded character check there is something
            to delete.
a4bc2dd7cc
2022-01-28 19:03:37 +08:00
530c65b17a Merge pull request #16830 from kuuote/vim-8.2.3571 2022-01-28 12:21:15 +08:00
d0493d1104 test(old): reorder test_register.vim according to upstream (#17215) 2022-01-28 09:34:03 +08:00
69f37197c0 fix(completion): update submode message when selecting from API (#17022) 2022-01-28 07:55:10 +08:00
815aa9f642 Merge pull request #16820 from seandewar/vim-8.1.2302
vim-patch:8.1.2302,8.2.{3936,4112}
2022-01-27 23:23:26 +00:00
14751eaf70 Merge pull request #16954 from f380cedric/vim-8.2.3402
vim-patch:8.2.{3402,3403}
2022-01-27 23:05:43 +00:00
503e6f7832 vim-patch:8.2.3403: memory leak for :retab with invalid argument
Problem:    Memory leak for :retab with invalid argument.
Solution:   Free the memory.  Make error messages consistent.
2ddb89f8a9

Changes in ex_retab are N/A (behind a non-FEAT_) and have been dropped.
2022-01-27 23:37:01 +01:00
9779f5c84c vim-patch:8.2.3903: "gM" does not count tabs as expected (#16796) 2022-01-28 06:26:24 +08:00
6eb8c0c0c8 ci: add intercept_tls_get_addr=0 to ASAN_OPTIONS 2022-01-27 23:16:33 +08:00
c5ac04331b vim-patch:8.2.3612: using freed memory with regexp using a mark (#16973)
Problem:    Using freed memory with regexp using a mark.
Solution:   Get the line again after getting the mark position.
64066b9acd
2022-01-27 14:59:30 +01:00
5182627ce9 vim-patch:8.2.3669: buffer overflow with long help argument (#16971)
Problem:    Buffer overflow with long help argument.
Solution:   Use snprintf().
bd228fd097
2022-01-27 14:58:53 +01:00
39d6db3899 docs(helphelp): remove extra backtick interference (#17201)
An extra backtick was explicitly written to show what a backtick looked
like, but it interferes with the syntax highlighting which thinks that
it's a part of a concealed group and couples it with the wrong backtick.
2022-01-27 14:56:18 +01:00
d95bb85024 Merge pull request #17185 from zeertzjq/vim-8.2.3993
vim-patch:8.2.{3993,4002}: when recording a change in Select mode char appears twice
2022-01-27 13:45:34 +01:00
a47fdf8421 Merge pull request #17175 from zeertzjq/vim-8.2.3095
vim-patch:8.2.3095: with 'virtualedit' set to "block" block selection is wrong
2022-01-27 13:44:30 +01:00
7ea09dde5f Merge pull request #17136 from zeertzjq/vim-8.2.4133
vim-patch:8.2.4133: output of ":scriptnames" goes into the message history
2022-01-27 13:43:27 +01:00
8c140be31f feat(ts): expose minimum language version to lua (#17186) 2022-01-27 12:46:56 +01:00
f2d84df4a8 vim-patch:8.2.3095: with 'virtualedit' set to "block" block selection is wrong
Problem:    With 'virtualedit' set to "block" block selection is wrong after
            using "$".  (Marco Trosi)
Solution:   Compute the longest selected line. (closes vim/vim#8495)
b17ab86e7b
2022-01-27 18:55:21 +08:00
d8adb3a721 vim-patch:8.2.4112: function not deleted at end of test
Problem:    Function not deleted at end of test.
Solution:   Delete the function.
d9b74a2a41

oops -- my fault :P
2022-01-27 18:47:55 +08:00
c0ff0cac87 vim-patch:8.2.3936: no proper test for maintaining change mark in diff mode
Problem:    No proper test for maintaining change mark in diff mode.
Solution:   Run the test with internal and external diff. (Sean Dewar,
            closes vim/vim#9424)
ccc1644f95
2022-01-27 18:47:55 +08:00
e8af051f1b test(oldtest): partially port v8.1.2381
Problem:    Not all register related code is covered by tests.
Solution:   Add more test cases. (Yegappan Lakshmanan, closes vim/vim#5301)
54c8d229f5

Can't be fully ported until "set clipboard=autoselect,autoselectplus" is
re-implemented for Test_clipboard_regs (and last visual selection to PRIMARY
selection works).
2022-01-27 18:47:55 +08:00
5864edac7b vim-patch:8.1.2302: :lockmarks does not work for '[ and ']
Problem:    :lockmarks does not work for '[ and '].
Solution:   save and restore '[ and '] marks. (James McCoy, closes vim/vim#5222)
f4a1d1c054

Test_diff_maintains_change_mark doesn't actually fail without these changes.
This is fixed in v8.2.3936.
2022-01-27 18:47:52 +08:00
f9080b24c4 fix(ts): escape lang when loading parsers (#16668)
When trying to load a language parser, escape the value of
the language.

With language injection, the language might be picked up from the
buffer. If this value is erroneous it can cause `nvim_get_runtime_file`
to hard error.

E.g., the markdown expression `~~~{` will extract '{' as a language and
then try to get the parser using `parser/{*` as the pattern.
2022-01-27 10:42:59 +01:00
2320f705c4 Merge pull request #17195 from dundargoc/refactor/assert-include
refactor: include missing assert header
2022-01-27 10:23:36 +01:00
3d0149f984 Merge pull request #17191 from zeertzjq/vim-8.2.4203
vim-patch:8.2.4203: entering a character with CTRL-V may include modifiers
2022-01-27 09:00:01 +01:00
a9f112ce3a vim-patch:8.2.4133: output of ":scriptnames" goes into the message history
Problem:    output of ":scriptnames" goes into the message history, while this
            des not happen for other commands, such as ":ls".
Solution:   Use msg_outtrans() instead of smsg(). (closes vim/vim#9551)
840f16202e
2022-01-27 15:55:06 +08:00
9c4e617064 Merge pull request #17166 from Shougo/vim-8.2.4160
vim-patch:8.2.4160: cannot change the register used for Select mode d…
2022-01-27 08:52:08 +01:00
c4b906f341 Merge pull request #17110 from zeertzjq/vim-8.2.3630
vim-patch:8.2.{3630,3663}: printf() with %S does not handle multi-byte correctly
2022-01-27 08:50:38 +01:00
1270949c11 Merge pull request #17150 from zeertzjq/vim-8.2.4166
vim-patch:8.2.4166: undo synced when switching buffer in another window
2022-01-27 08:48:31 +01:00
618f7079e5 Merge pull request #17135 from seandewar/vim-8.2.0175
vim-patch:8.2.0175: crash when removing list element in map()
2022-01-27 08:47:01 +01:00
95b8a8f6ae Merge pull request #17131 from zeertzjq/vim-8.2.3580
vim-patch:8.2.3580: gj does not move properly with a wide character
2022-01-27 08:41:29 +01:00
480fbbe296 Merge pull request #17145 from zeertzjq/vim-8.2.0128
vim-patch:8.2.0128: cannot list options one per line
2022-01-27 08:37:36 +01:00
0813b9fde4 Merge pull request #17094 from zeertzjq/vim-8.2.4091
vim-patch:8.2.4091: virtcol is recomputed for statusline unnecessarily
2022-01-27 08:35:52 +01:00
d50dd12725 Merge pull request #17095 from zeertzjq/vim-8.2.3227
vim-patch:8.2.{3227,3280,4094}: global-local 'virtualedit'
2022-01-27 08:34:57 +01:00
55ad48d939 Merge pull request #17155 from zeertzjq/vim-8.2.3121
vim-patch:8.2.{3121,3410}: two 'listchars' fixes
2022-01-27 08:32:52 +01:00
47b50d5a1c Merge pull request #17174 from zeertzjq/vim-8.2.3153
vim-patch:8.2.3153: URLs with a dash in the scheme are not recognized
2022-01-27 08:32:02 +01:00
f1b91fcdbd Merge pull request #17102 from zeertzjq/vim-8.2.1762
vim-patch:8.2.1762: when a timer uses :stopinsert completion isn't stopped
2022-01-27 08:31:17 +01:00
00915864f7 Merge pull request #17184 from zeertzjq/vim-8.2.4190
vim-patch:8.2.4190: all conceal tests are skipped without the screendumps feature
2022-01-27 08:30:24 +01:00
81950af22d refactor: allocate an empty string as unused orig_rhs for Lua mappings 2022-01-27 07:24:25 +08:00
b30ac599f8 ci: remove all code containing python2
Also change all mentions of python 3 to just python.
2022-01-26 23:44:02 +01:00
6006e15e7a Merge pull request #17205 from clason/vim-8.2.4214
Vim 8.2.{4214,4215,4217,4219} various illegal memory accesses
2022-01-26 22:39:45 +01:00
540264306b vim-patch:8.2.4219: reading before the start of the line
Problem:    Reading before the start of the line.
Solution:   Check boundary before trying to read the character.
44db8213d3
2022-01-26 22:02:56 +01:00
e9247b0d5d vim-patch:8.2.4217: illegal memory access when undo makes Visual area invalid
Problem:    Illegal memory access when undo makes Visual area invalid.
Solution:   Correct the Visual area after undo.
8d02ce1ed7

vim-patch:8.2.4218: illegal memory access with bracketed paste in Ex mode (N/A)
2022-01-26 22:01:19 +01:00
b2b288f33c vim-patch:8.2.4215: illegal memory access when copying lines in Visual mode
Problem:    Illegal memory access when copying lines in Visual mode.
Solution:   Adjust the Visual position after copying lines.
dc5490e2cb
2022-01-26 22:00:29 +01:00
de673966c3 vim-patch:8.2.4214: illegal memory access with large 'tabstop' in Ex mode
Problem:    Illegal memory access with large 'tabstop' in Ex mode.
Solution:   Allocate enough memory.
85b6747abc
2022-01-26 21:34:26 +01:00
17e2938b10 Merge pull request #17132 from zeertzjq/vim-8.2.3611
vim-patch:8.2.{3494,3611,3613}: two Visual mode crash fixes
2022-01-26 21:33:53 +01:00
b7dc4491a9 refactor: include missing assert header
This will solve the "implicit declaration of function ‘assert’" warning
when running "make lint".
2022-01-26 20:44:45 +01:00
20482a2b83 Merge pull request #17204 from dundargoc/ci/windows/python-version 2022-01-26 13:43:38 -05:00
16d64796f4 ci(windows): use the provided python from github actions
This will prevent future errors whenever support for a specific python
version we rely on is removed.
2022-01-26 16:40:43 +01:00
d11bbacf0f fix(inccommand): do not change reg_prev_sub when previewing 2022-01-25 16:18:58 +08:00
ecec957125 vim-patch:8.2.4196: various file types not recognized (#17182)
Problem:    Various file types not recognized.
Solution:   Add patterns to recognize more file types (closes vim/vim#9607)
428058ab32
2022-01-25 08:22:15 +01:00
dd21e21e97 fix: set RedrawingDisabled before entering aucmd_win 2022-01-25 09:44:37 +08:00
95873aa3eb test: add more tests for Insert mode Ctrl-V 2022-01-25 08:29:04 +08:00
3d9ff675f8 vim-patch:8.2.4203: entering a character with CTRL-V may include modifiers
Problem:    Entering a character with CTRL-V may include modifiers.
Solution:   Reset "mod_mask" when entering a character with digits after
            CTRL-V. (closes vim/vim#9610)
502d8ae3e8

Commenting out test_override() as before.

Commenting out part of CheckNotFeature() because Vim patch 8.2.0427
cannot be ported without breaking a lot of oldtests that check for
removed features.
2022-01-25 08:21:20 +08:00
1b6ae2dbb0 Merge pull request #15910 from glacambre/silent_stdioopen
feat(--headless): do not print anything when stdioopen() has been used
2022-01-24 22:33:55 +01:00
a4069a3eed feat(--headless): add on_print callback to stdioopen
This commit adds an on_print callback to stdioopen's dictionary
argument which lets the caller specify a function called each time
neovim will try to output something to stdout (e.g. on "echo" or
"echoerr" in --headless mode).
2022-01-24 13:59:16 +01:00
1907a94814 Merge pull request #17143 from jamessan/coverity-fixes
Various Coverity fixes
2022-01-24 06:28:09 -05:00
c0a97d982a test(unit): add unit tests for path_with_url 2022-01-24 13:01:35 +08:00
9bb9f17592 vim-patch:8.2.3153: URLs with a dash in the scheme are not recognized
Problem:    URLs with a dash in the scheme are not recognized.
Solution:   Allow for a scheme with a dash, but not at the start or end.
            (Tsuyoshi CHO, closes vim/vim#8299)
7b7a118e74
2022-01-24 13:01:35 +08:00
5c897b6d0c vim-patch:8.2.4002: first char typed in Select mode can be wrong
Problem:    First char typed in Select mode can be wrong.
Solution:   Escape special bytes in the input buffer. (closes vim/vim#9469)
6cac77016b

The `buf` should already be large enough, but I'll change its size
anyway in case future patches change the meaning of `MB_MAXBYTES` macro.

`fix_input_buffer()` cannot be used here because of the `using_script()`
check, and there is already equivalent code in its place.
2022-01-24 12:46:52 +08:00
8f1efb018b vim-patch:8.2.3993: when recording a change in Select mode char appears twice
Problem:    When recording a change in Select mode the first typed character
            appears twice.
Solution:   When putting the character back into typeahead remove it from
            recorded characters. (closes vim/vim#9462)
c88e977862
2022-01-24 12:46:52 +08:00
1b184cea3b vim-patch:8.2.4190: all conceal tests are skipped without the screendumps feature
Problem:    All conceal tests are skipped without the screendumps feature.
Solution:   Only skip the tests that use screendumps. (closes vim/vim#9599)
206919191f
2022-01-24 11:10:37 +08:00
3d9ae9d2da feat(api): expose extmark right_gravity and end_right_gravity 2022-01-24 09:52:13 +09:00
7e2ce35e3b Merge pull request #17156 from zeertzjq/vim-8.2.3584
vim-patch:8.2.{3584,3586,3587}: :command "-keepscript" argument
2022-01-23 19:42:30 +01:00
f20bd439df Merge pull request #17168 from zeertzjq/ins-char-typebuf-mods
fix(input): put modifiers back into typeahead buffer when needed
2022-01-23 19:40:59 +01:00
4ba7fa1700 vim-patch:6f4754b9f725 (#17179)
Update runtime files
6f4754b9f7
2022-01-23 18:38:41 +01:00
28352dc6e5 vim-patch:8.2.4188: not all gitconfig files are recognized (#17178)
Problem:    Not all gitconfig files are recognized.
Solution:   Add a few more patterns. (Tim Pope, closes vim/vim#9597)
bcfa11b7df
2022-01-23 17:50:45 +01:00
ffd9551aa2 vim-patch:8.2.4191: json5 files are not recognized (#17180)
Problem:    json5 files are not recognized.
Solution:   Add a pattern for json5 files. (closes vim/vim#9601)
e15ebeffb3
2022-01-23 16:19:48 +01:00
3d62dd2077 vim-patch:8.2.4187: gnuplot file not recognized (#17177)
Problem:    Gnuplot file not recognized.
Solution:   Recognize ".gnuplot". (closes vim/vim#9588)
ff5cbe8133
2022-01-23 13:52:37 +01:00
0efe1ec6b3 test(input): add more tests for K_SPECIAL escaping in ins_char_typebuf() 2022-01-23 05:58:32 +08:00
818456470c fix(input): put modifiers back into typeahead buffer when needed 2022-01-23 05:58:32 +08:00
7717f38d3f Merge pull request #17169 from clason/bump-treesitter
build(deps): bump tree-sitter to v0.20.3
2022-01-22 18:39:14 +01:00
db9cfb18e1 build(deps): bump tree-sitter to v0.20.3
this version contains massive performance improvements as well as a new
`--abi` flag that allows generating backward compatible parsers
2022-01-22 09:02:06 +01:00
d7ab4e819a vim-patch:8.2.4160: cannot change the register used for Select mode delete
Problem:    Cannot change the register used for Select mode delete.
Solution:   Make CTRL-R set the register to be used when deleting text for
            Select mode. (Shougo Matsushita, closes vim/vim#9531)
4ede01f188
2022-01-22 11:57:06 +09:00
e07a4b97f6 Merge pull request #16936 from zeertzjq/no-escape-csi
input: never escape CSI bytes and clean up related names and comments
2022-01-21 18:04:40 +01:00
be22cc1264 Merge pull request #17076 from notomo/expose-extmark-more-details
feat(api): expose extmark more details
2022-01-21 18:02:47 +01:00
9d02fc4c00 vim-patch:8.2.4172: filetype detection for BASIC is not optimal (#17161)
Problem:    Filetype detection for BASIC is not optimal.
Solution:   Improve BASIC filetype detection. (Doug Kearns)
6517f14165
2022-01-21 16:45:32 +01:00
f2dbeca863 vim-patch:8.2.3587: compiler test fails with backslash file separator
Problem:    Compiler test fails with backslash file separator.
Solution:   Accept slash and backslash.
0a15c7676b
2022-01-21 18:18:18 +08:00
792381e1a0 vim-patch:8.2.3586: command completion test fails
Problem:    Command completion test fails.
Solution:   Add new argument to expected output
326e7da609
2022-01-21 18:18:18 +08:00
8e84d1b930 vim-patch:8.2.3584: "verbose set efm" reports location of the :compiler command
Problem:    "verbose set efm" reports the location of the :compiler command.
            (Gary Johnson)
Solution:   Add the "-keepscript" argument to :command and use it when
            defining CompilerSet.
58ef8a31d7
2022-01-21 18:18:18 +08:00
cb39c825c4 vim-patch:8.2.3410: crash with linebreak, listchars and large tabstop
Problem:    Crash with linebreak, listchars and large tabstop.
Solution:   Account for different size listchars for a tab. (closes vim/vim#8841)
89a54b413a
2022-01-21 18:16:16 +08:00
296b8fbe3b vim-patch:8.2.3121: 'listchars' "exceeds" character appears in foldcolumn
Problem:    'listchars' "exceeds" character appears in foldcolumn. Window
            separator is missing. (Leonid V.  Fedorenchik)
Solution:   Only draw the "exceeds" character in the text area.  Break the
            loop when not drawing the text. (closes vim/vim#8524)
41fb723ee9
2022-01-21 18:16:16 +08:00
6e69a3c3e7 refactor: remove CSI unescaping and clean up related names and comments 2022-01-21 18:08:56 +08:00
8300d337c8 refactor: remove the <xCSI> key
CSI typed directly is now just <CSI>. The <xCSI> key is obsolete.
2022-01-21 18:08:56 +08:00
ff7c3d1275 fix(input): never escape CSI bytes 2022-01-21 18:08:56 +08:00
c977d8b43c docs(lsp): fix on_publish_diagnostics example (#17146) 2022-01-21 08:40:48 +01:00
8e702c14ac feat(lsp): add handler for workspace/workspaceFolders (#17149) 2022-01-21 07:51:34 +01:00
2fa1b4cbff vim-patch:8.2.4166: undo synced when switching buffer in another window
Problem:    Undo synced when switching buffer in another window.
Solution:   Do not sync undo when not needed. (closes vim/vim#9575)
e615db0604
2022-01-21 05:14:40 +08:00
aa4eadd2be vim-patch:8.2.0128: cannot list options one per line
Problem:    Cannot list options one per line.
Solution:   Use ":set!" to list one option per line.
6b915c0c0e
2022-01-20 14:34:24 +08:00
5971b86338 feat(api): expose extmark more details 2022-01-20 13:25:46 +09:00
d224957d30 fix(coverity/188749): nullify pointer to fix use-after-free 2022-01-19 22:47:09 -05:00
e850a92986 fix(coverity/340720): error if nvim_eval_statusline given invalid winid 2022-01-19 21:54:06 -05:00
8f241e535f refactor(coverity/345583): assert fp is non-NULL
Since we already have a typval, we know the lookup will succeed.
2022-01-19 21:43:09 -05:00
0c541ab1f6 refactor(coverity/345582): assert fp is non-NULL
Since we already have a typval, we know the lookup will succeed.
2022-01-19 21:42:23 -05:00
431915fe6a test(put_spec): correctly order parameters to eq() (#17134)
The first parameter to eq() should be the expected value, and the second
parameter should be the actual value.
2022-01-19 13:53:39 -07:00
96aa7dd097 Merge pull request #17130 from clason/bump-treesitter
build(deps): bump tree-sitter
2022-01-19 09:24:20 +01:00
de6f9233ee refactor: source ftplugin.vim separately from filetype.vim (#17129)
This is a follow-on to #17040. The real benefit of #17040 was ensuring
that the ftplugin FileType autocommand was defined first and thus always
fired first. A side effect of the implementation in #17040 was that
setting variables that modified the state of filetype detection (such as
g:did_load_filetypes or g:do_filetype_lua) could no longer be set in the
user's init file. Filetype detection can also no longer be prevented
from loading by using `:filetype off`.

This PR addresses both of those side effects by unconditionally sourcing
ftplugin.vim and indent.vim before the user's init file (which ensures
that these autocommands run first) and sourcing filetype.vim *after* the
user's init file (thus allowing it to be blocked or modified).
2022-01-18 12:46:41 -07:00
1ae73e2d1c vim-patch:8.2.0175: crash when removing list element in map()
Problem:    Crash when removing list element in map().
Solution:   Lock the list. (closes vim/vim#2652)
db661fb95d
2022-01-18 12:49:30 +00:00
5e81687d9a vim-patch:8.2.3402: invalid memory access when using :retab with large value
Problem:    Invalid memory access when using :retab with large value.
Solution:   Check the number is positive.
b7081e135a
2022-01-18 10:04:32 +01:00
45f7fc9b06 build(deps): bump tree-sitter
update tree-sitter to
2346570901
which includes a massive performance improvement to query construction
(bumping ABI compatibility to 14; parsers need to be generated with a
flag to take advantage of this)
2022-01-18 09:07:12 +01:00
dda1c8edda vim-patch:8.2.3613: :find test fails
Problem:    :find test fails.
Solution:   Put length check inside if block.
e015d99abb
2022-01-18 10:05:31 +08:00
ec39e1e421 vim-patch:8.2.3611: crash when using CTRL-W f without finding a file name
Problem:    Crash when using CTRL-W f without finding a file name.
Solution:   Bail out when the file name length is zero.
615ddd5342
2022-01-18 10:05:31 +08:00
0a65d821fc vim-patch:8.2.3494: illegal memory access in utf_head_off
Problem:    Illegal memory access in utf_head_off.
Solution:   Check cursor position when reselecting the Visual area.
            (closes vim/vim#8963)
b07626d4af

Including the XTest_beval -> XTest_block from patch 8.2.3096.
2022-01-18 10:05:31 +08:00
176df92bd7 vim-patch:8.2.3580: gj does not move properly with a wide character
Problem:    gj does not move properly with a wide character.
Solution:   Move one to the right. (Christian Brabandt, closes vim/vim#8702)
aaec1d4fb1
2022-01-18 07:46:46 +08:00
fcf5dd34fd refactor: enable filetype detection before user startup scripts (#17040) 2022-01-17 14:11:59 -07:00
ad2dbd4b5f fix(man.vim): support calling :Man without a section again (#17119)
When `man -w` is called with an empty string as section name, it may
fail with an error code, which causes :Man to no longer work without a
section. Just remove that argument when no section is specified.
2022-01-17 11:45:46 -07:00
70db972e5f Merge pull request #16813 from neovim/marvim/api-doc-update/master
docs: regenerate
2022-01-17 13:37:28 -05:00
64b906a3fa Merge pull request #17125 from jamessan/auto-prs-as-draft
ci: create automated PRs as draft PRs
2022-01-17 13:37:19 -05:00
66076e5e1b ci: create automated PRs as draft PRs
GH workflows aren't allowed to trigger other GH workflows.  Since
commitlint is a required check now, we need something manual to happen
for it to run on vim-patch/api-doc PRs.

Creating these PRs as drafts and then marking them as "ready to review"
when we want to merge them will provide the manual trigger to run
commitlint.

[skip ci]
2022-01-17 13:36:01 -05:00
2c94b75eac docs: regenerate [skip ci] 2022-01-17 18:28:23 +00:00
8f54b88a5e Merge pull request #17122 from dundargoc/ci/remove-non-working-job
ci: remove non-working add-reviewer job
2022-01-17 13:11:46 -05:00
50eabe1c47 Merge pull request #17106 from jamessan/always-run-commitlint
Always run commitlint check
2022-01-17 13:08:27 -05:00
6c1d6f3dd6 ci: remove non-working add-reviewer job 2022-01-17 18:48:08 +01:00
69b2dd175c ci(api-docs): avoid running ci for doc commits 2022-01-17 12:21:16 -05:00
d7e2229b41 ci(commitlint): use pull_request_target to avoid "skip ci" 2022-01-17 12:21:09 -05:00
9055ec5792 perf(lsp): request only changed portions of the buffer in changetracking (#17118)
This commits introduces two performance improvements in incremental sync:

* avoiding expensive lua string reallocations on each on_lines call by requesting
only the changed chunk of the buffer as reported by firstline and new_lastline
parameters of on_lines
* re-using already allocated tables for storing the resulting lines to reduce the load on
the garbage collector

The majority of the performance improvement is from requesting only changed chunks
of the buffer.

Benchmark:

The following code measures the time required to perform a buffer edit to
that operates individually on each line, common to plugins such as vim-commentary.

    set rtp+=~/.config/nvim/plugged/nvim-lspconfig
    set rtp+=~/.config/nvim/plugged/vim-commentary
    lua require('lspconfig')['ccls'].setup({})
    function! Benchmark(tries) abort
        let results_comment = []
        let results_undo = []
        for i in range(a:tries)
            echo printf('run %d', i+1)
            let begin = reltime()
            normal gggcG
            call add(results_comment, reltimefloat(reltime(begin)))
            let begin = reltime()
            silent! undo
            call add(results_undo, reltimefloat(reltime(begin)))
            redraw
        endfor
        let avg_comment = 0.0
        let avg_undo = 0.0
        for i in range(a:tries)
            echomsg printf('run %3d: comment=%fs undo=%fs', i+1, results_comment[i], results_undo[i])
            let avg_comment += results_comment[i]
            let avg_undo += results_undo[i]
        endfor
        echomsg printf('average: comment=%fs undo=%fs', avg_comment / a:tries, avg_undo / a:tries)
    endfunction
    command! -bar Benchmark call Benchmark(10)

All text changes will be recorded within a single undo operation. Both the
comment operation itself and the undo operation will generate an on_lines event
for each changed line. Formatter plugins using setline() have also been found
to exhibit the same problem (neoformat, :RustFmt in rust.vim), as this function
too generates an on_lines event for every line it changes.

Using the neovim codebase as an example (commit 2ecf0a4)
with neovim itself built at 2ecf0a4 with
CMAKE_BUILD_TYPE=Release shows the following performance improvement:

src/nvim/lua/executor.c, 1432 lines:
  - baseline, no optimizations:             comment=0.540587s undo=0.440249s
  - without double-buffering optimization:  comment=0.183314s undo=0.060663s
  - all optimizations in this commit:       comment=0.174850s undo=0.052789s

src/nvim/search.c, 5467 lines:
  - baseline, no optimizations:             comment=7.420446s undo=7.656624s
  - without double-buffering optimization:  comment=0.889048s undo=0.486026s
  - all optimizations in this commit:       comment=0.662899s undo=0.243628s

src/nvim/eval.c, 11355 lines:
  - baseline, no optimizations:             comment=41.775695s undo=44.583374s
  - without double-buffering optimization:  comment=3.643933s undo=2.817158s
  - all optimizations in this commit:       comment=1.510886s undo=0.707928s

Co-authored-by: Dmytro Meleshko <dmytro.meleshko@gmail.com>
2022-01-17 08:19:33 -08:00
3906b2d4fc vim-patch:fd31be29b822 (#17114)
Update runtime files
fd31be29b8
2022-01-17 11:58:36 +01:00
0c0469c4f5 Merge pull request #15242 from dundargoc/docs/vim-patch/move-outsite-of-getting-started
docs: deprioritize vim-patch as a good beginner task
2022-01-16 23:39:38 +01:00
4388793799 docs: deprioritize vim-patch as a good beginner task
Also add a disclaimer where familiarity with vim is strongly suggested.
2022-01-16 22:10:22 +01:00
be15ac06ba feat(statusline): support multibyte fillchar
This includes a partial port of Vim patch 8.2.2569 and some changes to
nvim_eval_statusline() to allow a multibyte fillchar. Literally every
line of C code touched by that patch has been refactored in Nvim, and
that patch contains some irrelevant foldcolumn tests I'm not sure how to
port (as Nvim's foldcolumn behavior has diverged from Vim's).
2022-01-16 19:54:27 +08:00
658ef9c01e vim-patch:8.2.3663: using %S in printf() does not work correctly
Problem:    Using %S in printf() does not work correctly.
Solution:   Fix the problem and add more tests. (closes vim/vim#9208)
1f2453fec6
2022-01-16 17:37:06 +08:00
9afefd32d3 vim-patch:8.2.3630: printf() with %S does not handle multi-byte correctly
Problem:    Printf() with %S does not handle multi-byte correctly.
Solution:   Count cells instead of bytes. (closes vim/vim#9169, closes vim/vim#7486)
d85fccdfed
2022-01-16 17:37:06 +08:00
7085e5b0c8 fix(lsp): avoid nil workspace/symbol query (#17107) 2022-01-15 23:08:35 -08:00
a0201b6ed3 fix(lsp): fetch offset_encoding from client in references (#17104) 2022-01-15 15:49:29 -08:00
561df30981 Merge pull request #16836 from bfredl/mark2
refactor(marks): use a more efficient representation with less pointer indirection
2022-01-15 23:59:40 +01:00
b455e0179b feat: use nvim_buf_set_extmark for vim.highlight (#16963)
Closes https://github.com/neovim/neovim/issues/13647

This allows customizing the priority of the highlights.

* Add default priority of 50
* Use priority of 200 for highlight on yank
* use priority of 40 for highlight references (LSP)
2022-01-15 14:19:20 -08:00
95ab979fde refactor(extmarks): use a more efficient representation
marktree.c was originally constructed as a "generic" datatype,
to make the prototyping of its internal logic as simple as possible
and also as the usecases for various kinds of extmarks/decorations was not yet decided.
As a consequence of this, various extra indirections and allocations was
needed to use marktree to implement extmarks (ns/id pairs) and
decorations of different kinds (some which is just a single highlight
id, other an allocated list of virtual text/lines)

This change removes a lot of indirection, by making Marktree specialized
for the usecase. In particular, the namespace id and mark id is stored
directly, instead of the 64-bit global id particular to the Marktree
struct. This removes the two maps needed to convert between global and
per-ns ids.

Also, "small" decorations are stored inline, i.e. those who
doesn't refer to external heap memory anyway. That is highlights (with
priority+flags) are stored inline, while virtual text, which anyway
occurs a lot of heap allocations, do not. (previously a hack was used
to elide heap allocations for highlights with standard prio+flags)

TODO(bfredl): the functionaltest-lua CI version of gcc is having
severe issues with uint16_t bitfields, so splitting up compound
assignments and redundant casts are needed. Clean this up once we switch
to a working compiler version.
2022-01-15 22:08:12 +01:00
f3193c7b54 Merge pull request #17001 from mjlbach/feat/non-strict-extmarks
feat(extmarks): add strict option
2022-01-15 21:06:04 +01:00
d8eec8e344 Hopefully last attempt 2022-01-15 09:00:01 -08:00
facd07bcf7 Address review r3 2022-01-15 08:37:44 -08:00
8e945c2524 vim-patch:8.2.1762: when a timer uses :stopinsert completion isn't stopped
Problem:    When a timer uses :stopinsert Insert mode completion isn't
            stopped. (Stanley Chan)
Solution:   Call ins_compl_prep(ESC).
d0e1b7103c
2022-01-15 22:33:16 +08:00
c09147aad9 vim-patch:8.2.4095: sed script not recognized by the first line (#17101)
Problem:    Sed script not recognized by the first line.
Solution:   Recognize a sed script starting with "#n". (Doug Kearns)
e3ce17a3ca
2022-01-15 14:47:25 +01:00
6c22e5fd1a vim-patch:8.2.4094: 'virtualedit' is window-local but using buffer-local enum
Problem:    'virtualedit' is window-local but using buffer-local enum.
Solution:   Use window-local enum. (closes vim/vim#9529)
e1833bfd01
2022-01-15 19:21:17 +08:00
87e54f123a vim-patch:8.2.3280: 'virtualedit' local to buffer is not the best solution
Problem:    'virtualedit' local to buffer is not the best solution.
Solution:   Make it window-local. (Gary Johnson, closes vim/vim#8685)
51ad850f5f
2022-01-15 19:21:17 +08:00
d391940b9a vim-patch:8.2.3227: 'virtualedit' can only be set globally
Problem:    'virtualedit' can only be set globally.
Solution:   Make 'virtualedit' global-local. (Gary Johnson, closes vim/vim#8638)
53ba05b090

I changed some macros to unsigned integer literals to avoid compiler warnings.
2022-01-15 19:21:17 +08:00
147f65373e vim-patch:8.2.4091: virtcol is recomputed for statusline unnecessarily
Problem:    Virtcol is recomputed for statusline unnecessarily.
Solution:   Just use "w_virtcol". (closes vim/vim#9523)
0f112052ac
2022-01-15 07:47:13 +08:00
574a582202 feat(lsp): dynamically generate list title in response_to_list (#17081)
This gives quickfix/location lists created by handlers which use
'response_to_list' (textDocument/documentSymbols and workspace/symbol by
default) the ability to set a more useful list title. This commit gives
lists created for documentSymbols a title of the form:

    Symbols in <filename>

and lists for workspace/symbol a title of the form:

    Symbols matching '<query>'

These are more informative than a standard "Language Server" list title
and can help disambiguate results when users have multiple quickfix
lists that they cycle through with `:colder` and `:cnewer`.
2022-01-14 14:20:50 -07:00
59ea8fa322 fix(filetype): expand tildes in filetype patterns (#17091)
This allows patterns like

  ["~/.config/foo"] = "fooscript"

to work.
2022-01-14 14:20:17 -07:00
bac4bb1900 Merge pull request #16998 from zeertzjq/lua-vim-var-funcref
feat(api, lua): more conversions between LuaRef and Vim Funcref
2022-01-14 18:00:20 +01:00
b72aae85fd fix(lsp): always split text edits on \r, \r\n, and \n (#17087)
Closes: https://github.com/neovim/neovim/issues/17053

Servers can return a mix of line endings per the language server
protocol. See:

https://microsoft.github.io/language-server-protocol/specification.html#textDocuments

All should be equally treated as line endings.
2022-01-14 08:02:44 -08:00
a88046fe2d Merge pull request #17086 from zeertzjq/vim-8.1.2375
vim-patch:8.1.2375: no suffucient testing for registers
2022-01-13 21:43:58 -05:00
e1b557d913 vim-patch:8.1.2375: no suffucient testing for registers
Problem:    No suffucient testing for registers.
Solution:   Add more test cases. (Yegappan Lakshmanan, closes vim/vim#5296)
            Fix that "p" on last virtual column of tab inserts spaces.
6f1f0ca3ed

This patch doesn't actually change any behavior in Nvim, because Nvim
always has vartabs feature.

I modified a line in the test because of #6137.
2022-01-14 07:31:21 +08:00
9b04336445 Merge pull request #16978 from gpanders/filetype-updates 2022-01-13 15:58:39 -07:00
6e04c8653c fix(filetype): fix foam pattern detection 2022-01-13 15:32:20 -07:00
c38d602b88 feat(filetype.lua): fix .cc file not detected 2022-01-13 15:32:20 -07:00
7a574e54f2 feat(filetype.lua): add support for files under .git 2022-01-13 15:32:18 -07:00
27b664a2de feat(filetype.lua): add support for patch files 2022-01-13 15:31:59 -07:00
94d5358922 feat(filetype.lua): add support for tmux.conf files 2022-01-13 15:31:59 -07:00
19864bd995 feat(filetype.lua): fix .env file not detected 2022-01-13 15:31:59 -07:00
596c55756a vim-patch:8.2.4077: not all Libsensors files are recognized (#17080)
Problem:    Not all Libsensors files are recognized.
Solution:   Add "sensors.d/*" pattern. (Doug Kearns)
8d9e470aa9
2022-01-13 18:31:15 +01:00
8066abcd65 fix(lsp): forward offset_encoding in rename handler (#17079) 2022-01-13 18:28:27 +01:00
9304ee3874 fix(lsp): forward offset_encoding to apply_text_edits (#17075) 2022-01-13 06:47:35 -08:00
4570df0b43 Merge pull request #17034 from zeertzjq/compl-lua-select
feat(completion): support selecting item via API from Lua mapping
2022-01-13 12:26:34 +01:00
bc722c8a74 fix(lsp): strictly enforce passing offset encoding (#17049)
This removes the "fallback" to utf-16 in many of our helper functions. We
should always explicitly pass these around when possible except in two
locations:

* generating params with help utilities called by buf.lua functions
* the buf.lua functions themselves

Anything that is called by the handler should be passed the offset encoding.
2022-01-13 02:34:04 -08:00
e7cd811567 fix(lsp): handle negative activeSignature in signatureHelp (#17064)
omnisharp-roslyn can send negative values:

    {
      activeParameter = 0,
      activeSignature = -1,
      signatures = { {
          documentation = "",
          label = "TestEntity.TestEntity()",
          parameters = {}
        } }
    }

In 3.16 of the specification `activeSignature` is defined as `uinteger`
and therefore negative values shouldn't be allowed, but within 3.15 it
was defined as `number` which makes me think we can be a bit lenient in
this case and handle them.

The expected behavior is quite clear:

    The active signature. If omitted or the value lies outside the
    range of `signatures` the value defaults to zero or is ignored if
    the `SignatureHelp` has no signatures.

Fixes an error:

    util.lua:1685: attempt to get length of local 'lines' (a nil value)
    util.lua:1685: in function 'trim_empty_lines'
    handlers.lua:334: in function 'textDocument/signatureHelp'
2022-01-13 01:47:36 -08:00
43ef7df22d fix(lsp): fix applying multiple out-of-range TextEdits (#17037) 2022-01-13 10:28:13 +01:00
f9b3b2dcfc Merge pull request #16945 from theHamsta/cached-queries
perf(treesitter): cache query parsing
2022-01-13 08:50:01 +00:00
c8656e44d8 feat(api, lua): more conversions between LuaRef and Vim Funcref 2022-01-13 15:07:40 +08:00
3ee1ba35a7 fix(keywordprg): retain terminal buffer after K (#17046) 2022-01-12 22:04:30 -07:00
2fd8330628 Address review r2 2022-01-12 12:46:31 -08:00
d0d4fb792f Address 'review' 2022-01-12 12:28:18 -08:00
39a35dd006 Merge pull request #17058 from clason/bump-treesitter
build(deps): bump treesitter to commit bf210f0
2022-01-12 17:56:44 +00:00
5d15829c2b build(deps): bump treesitter to commit bf210f0
Update to bf210f0c9e, which is a significant improvement to query performance.
2022-01-12 17:04:00 +01:00
c4ce51478a Merge pull request #17054 from jamessan/debug-publish-issues
ci(release): enable gh's api debug logs when creating the release
2022-01-12 07:15:41 -05:00
5bd7ae5b0f ci(release): enable gh's api debug logs when creating the release
This is intended to help track down why the release is sporadically left
in draft state, rather than being published.

[skip ci]
2022-01-12 07:13:25 -05:00
f92a2457c2 Merge pull request #17045 from gpanders/diagnostic-fixups
Various diagnostic fixups
2022-01-11 19:47:50 -07:00
c915571b99 feat(diagnostic): allow retrieving current diagnostic config 2022-01-11 16:46:42 -07:00
8a27205d09 fix(diagnostic): only set default handler config if unset 2022-01-11 16:44:07 -07:00
984270c09f fix(diagnostic): allow setting arbitrary config values 2022-01-11 16:43:47 -07:00
fc8af96888 fix(diagnostic): resolve nil opts tables
In functions which allow opts to be optional, ensure that the value
actually resolves to a non-nil value.
2022-01-11 16:39:15 -07:00
70fe3ce004 vim-patch:8.2.4064: foam files are not detected (#17041)
* vim-patch:8.2.4064: foam files are not detected

Problem:    Foam files are not detected.
Solution:   Detect the foam filetype by the path and file contents. (Mohammed
            Elwardi Fadeli, closes vim/vim#9501)
2284f6cca3

* Port foam ft detection to filetype.lua

Co-authored-by: Gregory Anders <greg@gpanders.com>
2022-01-11 21:02:58 +01:00
074b033e7e refactor(lsp): debounce timer per buf and unify with non-debounce (#17016)
Part of the `pending_change` closure in the `changetracking.prepare` was
a bit confusing because it has access to `bufnr` and `uri` but it could
actually contain pending changes batched for multiple buffers.

(We accounted for that by grouping `pending_changes` by a `uri`, but
it's not obvious what's going on)

This commit changes the approach to do everything per buffer to avoid
any ambiguity.

It also brings the debounce/no-debounce a bit closer together: The
only difference is now whether a timer is used or if it is triggered
immediately
2022-01-11 18:10:29 +01:00
43b95b5430 Merge pull request #16962 from f380cedric/vim-8.2.3409
vim-patch:8.2.3409
2022-01-11 14:14:27 +00:00
e866da12ee vim-patch:2f0936cb9a2e (#17007)
* vim-patch:2f0936cb9a2e

Update runtime files
2f0936cb9a
2022-01-11 14:14:17 +01:00
25eb7692d8 Merge pull request #16961 from f380cedric/vim-8.2.3582
vim-patch:8.2.3582
2022-01-11 06:50:13 +00:00
c7aa64631d feat(completion): support selecting item via API from Lua mapping 2022-01-11 13:59:39 +08:00
7165e7770d fix(man.vim): fix search function on some systems (#13709)
Fixes man.vim's searching on some systems (namely mandoc) where
previously it would not respect the value of b:man_default_sects. It now
properly parses man pages on these systems.
2022-01-10 09:36:46 -07:00
3f2fbb824e fix(lsp): ensure pending changes are flushed on skipped debounce (#17015)
Follow up to https://github.com/neovim/neovim/pull/16881

Document changes could get sent out of order to the server:

    1. on_lines: debounce > 0; add to pending changes; setup timer
    2. on_lines: debounce = 0; send new changes immediately
    3. timer triggers, sending changes from 1.
2022-01-10 17:33:36 +01:00
69f1f906a0 Merge pull request #17025 from zeertzjq/compl-k-lua
fix(completion): prevent K_LUA from closing pum
2022-01-10 15:50:37 +01:00
42e5fd32b0 fix(completion): prevent K_LUA from closing pum 2022-01-10 21:30:32 +08:00
2818de8b76 Merge pull request #17006 from vigoux/tree-sitter-alloc
feat(treesitter): set allocator when possible
2022-01-10 10:52:23 +00:00
8f27c4a041 Merge pull request #17013 from dundargoc/ci/continue-on-error
ci: add a continue-on-error to the add-reviewer jobs
2022-01-09 15:24:43 -05:00
4b84544d86 Merge pull request #16849 from dundargoc/refactor/pvs/v1048
refactor(PVS/V1048): prevent "variable was assigned the same value" warning
2022-01-09 20:30:47 +01:00
f29a4ec553 ci: add a continue-on-error to the add-reviewer jobs
This is to circumvent a limitation in GitHub Actions that requires
special organization access in order to add any reviewers.
2022-01-09 19:57:25 +01:00
6ecaba510f test: use old style test for testing filetype.lua (#17003)
This is a much better solution than #16942 as it doesn't require copying
every new change from test_filetype.vim into filetype_spec.lua (which is
much more maintainable).
2022-01-09 09:11:09 -07:00
a34652ee84 fix(api): validate user_command name (#17004)
The name argument of nvim_add_user_command must begin with an uppercase
character. Check that is does.
2022-01-09 08:54:03 -07:00
8d5288889a Merge pull request #16965 from dundargoc/ci/add-reviewer-based-on-label
ci: add reviewer based on label
2022-01-09 08:57:13 -05:00
fd71162428 ci: add reviewer based on label
Also remove CODEOWNERS since this is a superior solution.
2022-01-09 11:30:05 +01:00
b1e0aa60f9 feat(treesitter): set allocator when possible
Adds a new cmake check to keep this backwards compatible with the
different versions of tree-sitter.
2022-01-09 10:17:46 +00:00
c7ffe406bc Merge pull request #16983 from dundargoc/test/add-vimruntime-variable
test: add VIMRUNTIME variable to the clear function
2022-01-08 19:31:37 -05:00
2e5bafa04c Merge pull request #17000 from dundargoc/ci/use-continue-on-error
ci: use continue-on-error instead of "|| true"
2022-01-08 16:10:47 -05:00
adf213e05e refactor(PVS/V1048): ignore "assigned the same value" warning 2022-01-08 21:11:43 +01:00
6c4b9c914b Merge pull request #16979 from dundargoc/ci/add-tsan-clang-sanitizer
ci: set CLANG_SANITIZER variable to TSAN when running the tsan job
2022-01-08 15:01:27 -05:00
e41e8b3fda fix(lsp): only send valid params in executeCommand (#16987) 2022-01-08 10:15:41 -08:00
11142f6ffe feat(extmarks): add strict option
The strict option, when set to false, allows placing extmarks on
invalid row and column values greater than the maximum buffer row
or line column respectively.

This allows for nvim_buf_set_extmark
to be a drop-in replacement for nvim_buf_set_highlight.
2022-01-08 08:47:20 -08:00
9386fca597 Merge pull request #16848 from dundargoc/refactor/prevent-overflow-by-casting
refactor: avoid overflow by explicitly casting operand to a wider type
2022-01-08 16:47:23 +01:00
e70ea6ea20 test: remove redundant feed_command('terminal') (#16993)
It just types :terminal<CR> into the terminal, which is redundant.
2022-01-08 08:29:32 -07:00
559aa4179c ci: use continue-on-error instead of "|| true"
The intention is clearer and doesn't rely on shell-isms.
2022-01-08 15:31:14 +01:00
14ec38bcf9 test: add VIMRUNTIME variable to the clear function
Some of the tests will fail if this isn't explicitly set.
2022-01-08 14:40:29 +01:00
3088ac71f9 Merge pull request #16991 from bk2204/ex-mode
Make mode() return correct value in ex mode
2022-01-08 13:13:43 +01:00
b65a23a13a fix(lsp): resolve bufnr for get_lines (#16986)
Closes https://github.com/neovim/neovim/issues/16985

* get_lines checks if buf_loaded using bufnr 0, which is
  typically used as a sentinel value, but here must be resolved
  to the true bufnr
2022-01-08 11:30:59 +01:00
600e7e3b32 fix: make mode() return correct value in ex mode
When the user is in ex mode, a call to mode(1) is documented to return
"cv".  However, it does not currently do so, because the check which
checks for ex mode is nested inside a conditional which is never reached
in ex mode.  Vim uses an explicit check for exmode_active, so let's do
the same thing here.  Add some tests for this case both with a TTY and
in silent mode.
2022-01-08 03:11:50 +00:00
e92b816336 fix(filetype): match negative priority patterns after extensions (#16980)
Negative priority patterns are those that act as catch-alls when all
other attempts at matching have failed (typically the patterns that use
the StarSetf functions).
2022-01-07 19:17:07 -07:00
20122a3590 vim-patch:8.2.4033: running filetype tests leaves directory behind (#16984)
Problem:    Running filetype tests leaves directory behind.
Solution:   Delete the top directory. (closes vim/vim#9483)
a4c96252b1
2022-01-07 19:15:27 -07:00
c2b9dea4ba ci: set CLANG_SANITIZER variable to TSAN when running the tsan job 2022-01-07 20:20:02 +01:00
b4fbb9dcf2 Merge pull request #16970 from dundargoc/ci/serialize-labeler-workflow 2022-01-07 10:33:19 -05:00
df06c36932 ci: run type-scope job after the triage job
This should prevent the scenario of one job accidentally removing a
relevant label from the other.
2022-01-07 13:32:14 +01:00
b680392687 feat(lsp): skip or reduce debounce after idle (#16881)
The idea of the debounce is to avoid overloading a server with didChange
notifications. So far this used a constant value to group changes within
an interval together and send a single notification. A side effect of
this is that when you were idle, notifications are still delayed.

This commit changes the logic to take the time the last notification
happened into consideration, if it has been greater than the debounce
interval, the debouncing is skipped or at least reduced.
2022-01-07 11:56:09 +01:00
bba679c431 vim-patch:8.2.4014: git and gitcommit file types not properly recognized (#16953)
Problem:    Git and gitcommit file types not properly recognized.
Solution:   Adjust filetype detection. (Tim Pope, closes vim/vim#9477)
c689f8c3d9
2022-01-07 10:27:34 +01:00
aa5adef969 vim-patch:8.2.4007: session does not restore help buffer properly
Problem:    Session does not restore help buffer properly when "options' is
            missing from 'sessionoptions'.
Solution:   Use a ":help" command to create the help window. (closes vim/vim#9475,
            closes vim/vim#9458, closes vim/vim#9472)
8e7d9db32b
2022-01-07 13:39:52 +08:00
e58071c92c vim-patch:8.2.0951: search stat test has leftover from debugging (#16967)
Problem:    Search stat test has leftover from debugging.
Solution:   Remove line that writes a file. (Christian Brabandt, closes vim/vim#6224)
6ba24d8763
2022-01-06 18:51:06 -07:00
b435755452 fix(runtime): check markdownError before syn-clear (#16930)
Avoids `E28: No such highlight group name: markdownError` when using a
foreign markdown syntax.
2022-01-06 11:51:47 -07:00
287d3566de fix(lua): print multiple return values with =expr (#16933) 2022-01-06 11:42:31 -07:00
d78e46679d feat(lua): add notify_once() (#16956)
Like vim.notify(), but only displays the notification once.
2022-01-06 11:10:56 -07:00
c6dddc3464 vim-patch:8.2.3582: reading uninitialized memory when giving spell suggestions
Problem:    Reading uninitialized memory when giving spell suggestions.
Solution:   Check that preword is not empty.
15d9890eee
2022-01-06 18:47:31 +01:00
2f779e3361 Merge pull request #16591 from shadmansaleh/feat/lua_keymaps2
feat(lua): add support for lua keymaps
2022-01-06 18:35:31 +01:00
bb7ef83dd3 Merge pull request #16817 from lewis6991/master
vim-patch:8.2.3921: the way xdiff is used is inefficient
2022-01-06 18:26:29 +01:00
9c26939f75 perf(treesitter): cache query parsing 2022-01-06 13:20:22 +01:00
d63284e5a6 vim-patch:8.2.3409: reading beyond end of line with invalid utf-8 character
Problem:    Reading beyond end of line with invalid utf-8 character.
Solution:   Check for NUL when advancing.
65b6056659

Dropped the non-test part, since it is only non-utf8 related.
2022-01-06 13:16:04 +01:00
09d270bcea Merge pull request #16942 from gpanders/test-filetype-lua 2022-01-05 13:21:18 -07:00
ef214e9753 chore: remove lspconfig checkhealth from issue template (#16948) 2022-01-05 12:13:16 -08:00
6c86079fa0 fix(filetype): normalize slashes in file paths 2022-01-05 12:26:43 -07:00
f1590717ac test(filetype): port test_filetype to Lua
Because filetype.lua is gated behind an opt-in variable, it's not tested
during the "standard" test_filetype.vim test. So port the test into
filetype_spec where we enable the opt-in variable.

This means runtime Vim patches will need to update test_filetype in two
places. This can eventually be removed if/when filetype.lua is made
opt-out rather than opt-in.
2022-01-05 10:41:25 -07:00
f40ce34563 fix(filetype): match on <afile> rather than <abuf> (#16943)
Filetype detection runs on BufRead and BufNewFile autocommands, both of
which can fire without an underlying buffer, so it's incorrect to use
<abuf> to determine the file path. Instead, match on <afile> and assume
that the buffer we're operating on is the current buffer. This is the
same assumption that filetype.vim makes, so it should be safe.
2022-01-05 09:50:54 -07:00
55a59e56ed feat(lsp): enable default debounce of 150 ms (#16908) 2022-01-05 08:36:35 -08:00
30547c0d2b vim-patch:8.2.3999: redundant check for NUL byte
Problem:    Redundant check for NUL byte.
Solution:   Remove the check for a NUL byte. (closes vim/vim#9471)
c024ed9233
2022-01-05 22:11:28 +08:00
bfe11dc8d0 vim-patch:8.2.3414: fullcommand() gives wrong name with buffer-local user command
Problem:    fullcommand() gives the wrong name if there is a buffer-local user
            command. (Naohiro Ono)
Solution:   Use a separate function to get the user command name.
            (closes vim/vim#8840)
80c88eac5a
2022-01-05 22:11:28 +08:00
6e1a59da6c vim-patch:8.2.2887: crash when passing null string to fullcommand()
Problem:    Crash when passing null string to fullcommand().
Solution:   Check for NULL pointer. (closes vim/vim#8256)
4c8e8c6e19
2022-01-05 22:11:28 +08:00
f65b0d4236 feat(autocmd): populate v:event in RecordingLeave (#16828) 2022-01-04 18:55:29 -07:00
a45b578dbe feat(filetype.lua): add support for txt files (#16926) 2022-01-04 16:06:57 -07:00
74a90cf098 chore: ignore unused args in filetype functions (#16927)
Also mark the 'getline' helper function as private to avoid docgen.
2022-01-04 15:24:14 -07:00
bb5e03fa4b test: fix absolute paths in filetype_spec (#16920) 2022-01-04 15:21:36 -07:00
60d3bb745d fix(filetype): set default ft_ignore_pat in filetype.lua (#16917)
This default value is also set in filetype.vim, but if filetype.vim is
disabled the variable is never defined, which causes errors in some of
the dist#ft detection functions.
2022-01-04 15:02:01 -07:00
8ade8009ee feat(filetype.lua): Add typescript extension to filetype detection (#16923)
port from `filetype.vim`; also add `getline` convenience function
2022-01-04 22:34:55 +01:00
39238435db fix(api): force redefinition of user commands by default (#16918) 2022-01-04 11:51:45 -07:00
0b0c4f7dfa chore: fix typos (#16816)
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Sebastian Volland <seb@baunz.net>
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-01-04 11:07:40 -07:00
d6f0c9539c fix(lsp): suppress ContentModified errors from UI (#16904)
Fixes https://github.com/neovim/neovim/issues/16900

If clients receive a ContentModified error, it generally should not
show it in the UI for the end-user. Clients can resend the request if
they know how to do so.

https://microsoft.github.io/language-server-protocol/specifications/specification-current/#implementationConsiderations
2022-01-04 09:28:13 -08:00
6d41f65aa4 feat(lua): add vim.keymap
This introduces two new functions `vim.keymap.set` & `vim.keymap.del`

differences compared to regular set_keymap:
- remap is used as opposite of noremap. By default it's true for <Plug> keymaps and false for others.
- rhs can be lua function.
- mode can be a list of modes.
- replace_keycodes option for lua function expr maps. (Default: true)
- handles buffer specific keymaps

Examples:
```lua
vim.keymap.set('n', 'asdf', function() print("real lua function") end)
vim.keymap.set({'n', 'v'}, '<leader>lr', vim.lsp.buf.references, {buffer=true})
vim.keymap.set('n', '<leader>w', "<cmd>w<cr>", {silent = true, buffer = 5 })
vim.keymap.set('i', '<Tab>', function()
  return vim.fn.pumvisible() == 1 and "<C-n>" or "<Tab>"
end, {expr = true})
vim.keymap.set('n', '[%', '<Plug>(MatchitNormalMultiBackward)')

vim.keymap.del('n', 'asdf')
vim.keymap.del({'n', 'i', 'v'}, '<leader>w', {buffer = 5 })
```
2022-01-04 22:31:59 +06:00
3fd454bd4a feat: filetype.lua (#16600)
Adds a new vim.filetype module that provides support for filetype detection in
Lua.
2022-01-04 07:28:29 -07:00
cc62f3d6cb test: make test for #14040 more stable (#16911) 2022-01-04 07:25:28 -07:00
e79a588937 Merge pull request #16912 from shadmansaleh/enhance/lua_cmd_inspect
feat(lua): make :lua =expr print result of expr
2022-01-04 14:34:42 +01:00
d44254641f feat(lua): make =expr print result of expr 2022-01-04 16:08:07 +06:00
4ddd6c53bd fix(screen): don't put empty sign text in line number column
When `signcolumn=number` but no sign on a given line has any text,
display the line's line number instead of the (empty) sign text in the
line number column.
2022-01-04 01:49:40 -05:00
207307d0fa fix(lsp): explicitly pass bufnr in didSave handler (#16906)
Addresses a regression introduced by the stricter type checking
in lua api functions from https://github.com/neovim/neovim/pull/16745
2022-01-03 21:03:16 -05:00
efe6485aca Merge pull request #16903 from dundargoc/ci/install-flake-with-apt
ci: install flake8 with apt instead of pip
2022-01-03 16:23:20 -05:00
ec615abd1f ci: install flake8 with apt instead of pip 2022-01-03 21:54:23 +01:00
1036ca846e Merge pull request #16901 from dundargoc/ci/add-codeowners
ci: add jamessan as codeowner for ci related files
2022-01-03 14:50:40 -05:00
e402103911 chore(build): compile lua only on release builds (#16859) 2022-01-03 12:44:30 -07:00
e6c1545b19 fix(lsp): resolve nil bufnr (#16902)
Related: #16889, #16745
2022-01-03 12:40:09 -07:00
b402cd3315 ci: add jamessan as codeowner for ci related files
[skip ci]
2022-01-03 20:27:31 +01:00
6aeaff1220 vim-patch:8.2.3995: not all sshconfig files are detected as such (#16899)
Problem:    Not all sshconfig files are detected as such.
Solution:   Adjust the patterns used for sshconfig detection. (David Auer,
            closes vim/vim#9322)
9acf2d8be9
2022-01-03 19:29:46 +01:00
be255557ce ci: simplify ci_fold function (#16874) 2022-01-03 11:47:11 -05:00
6ed9ddec29 Merge pull request #16895 from dundargoc/ci/fix-shellcheck-warnings
ci: fix shellcheck errors introduced in version 0.8.0
2022-01-03 11:40:20 -05:00
297ff97647 fix(lua): stricter type check when calling API function (#16745)
Solves #13651

Co-authored-by: Gregory Anders <greg@gpanders.com>
2022-01-03 08:00:50 -07:00
76435c0cfa docs(usr_05): fix section numbers (#16886)
Other refs to 05.3 don't need to be updated as they refer to the simple mappings
section anyway. Seems they weren't updated when the defaults.vim section was
added as 05.3 instead.
2022-01-03 14:52:01 +01:00
36662c9612 fix: resolve nil arguments to API functions (#16889)
As revealed by #16745, some functions pass a nil value to API functions,
which have been implicitly converted to 0. #16745 breaks this implicit
conversion, so explicitly pass a resolved buffer number to these API
functions.
2022-01-03 06:48:01 -07:00
167c10130c ci: fix shellcheck errors introduced in version 0.8.0
Solved following shellcheck warnings:
SC2030
SC2295
SC2015
2022-01-03 12:47:06 +01:00
2f31e7b88b Merge pull request #16890 from dundargoc/ci/nuke-before-install
ci: remove unnecessary before_install script
2022-01-02 20:13:07 -05:00
e71fbf2eb0 ci: remove unnecessary before_install script 2022-01-02 23:46:46 +01:00
b0993bdc45 Merge pull request #16853 from jamessan/clint-master-only
ci: run lint only on master branch
2022-01-02 14:07:01 -05:00
b823ff9a60 Merge pull request #16883 from dundargoc/ci/remove-watchdog
ci: remove watchdog function run_tests_wd
2022-01-02 12:54:42 -05:00
64f23c27e2 ci: remove watchdog function run_tests_wd
It's only used once for running check-single-includes (which I strongly
suspect it doesn't need anyway), its core logic is incorrect since both the
variables "tempsize" and "prev_temsize" are never defined and parsing ps
is incredibly fragile.
2022-01-02 18:23:28 +01:00
e42c906597 fix(lsp): always use target bufnr in location handler (#16876) 2022-01-02 07:55:16 +01:00
838631e29e fix(diagnostic): improve validation for list arguments (#16855)
Function arguments that expect a list should explicitly use tbl_islist
rather than just checking for a table. This helps catch some simple
errors where a single table item is passed as an argument, which passes
validation (since it's a table), but causes other errors later on.
2022-01-01 12:58:34 -07:00
55c4393e9f feat(lua): add support for multiple optional types in vim.validate (#16864) 2022-01-01 12:35:15 -07:00
f86039de1e ci: remove outdated travis-specific code (#16869) 2022-01-01 12:42:26 -05:00
302beaa36b build(deps): bump tree-sitter to v0.20.2 (#16863) 2022-01-01 17:59:00 +01:00
603db555a4 Merge pull request #16870 from dundargoc/refactor/pvs/V009
refactor(PVS/V009): add special comment at top of file required by PVS
2022-01-01 11:55:27 -05:00
e5f7b61136 Merge pull request #16840 from zeertzjq/ci-clang-13
ci: bump clang version to 13 in asan and tsan
2022-01-01 11:43:38 -05:00
273b5c9282 Merge pull request #16871 from bfredl/luaperf
perf(api): elide luaref copy when setting 'callback' in nvim_set_keymap
2022-01-01 17:21:26 +01:00
9f489f591d perf(api): elide luaref copy when setting 'callback' in nvim_set_keymap 2022-01-01 16:41:16 +01:00
68b23b08a0 refactor(PVS/V009): add special comment at top of file required by PVS
More info: https://pvs-studio.com/en/docs/warnings/v009/
2022-01-01 16:23:22 +01:00
a5eadbaf3c test: make some tests more stable (#16860) 2022-01-01 07:28:52 -07:00
5dbc64dced Merge pull request #16857 from dundargoc/vim-8.2.3956
vim-patch:8.2.3956
2022-01-01 14:15:54 +01:00
b0f21adef0 vim-patch:8.2.3964: some common lisp and scheme files not recognized (#16866)
Problem:    Some common lisp and scheme files not recognized.
Solution:   Recognize *.asd as lisp and *.sld as scheme. (Alex Vear,
            closes vim/vim#9447)
654b729c4c
2022-01-01 14:00:33 +01:00
f6c89e03d7 vim-patch:8.2.3956: duplicate assignment
Problem:    Duplicate assignment.
Solution:   Remove the second assignment. (closes vim/vim#9442)
4b1478093e
2022-01-01 12:44:26 +01:00
36a8f31a37 vim-patch:partial 04fb91668482 (#16852)
Update runtime files
04fb916684

omits doc/usr_41.txt (rewritten to focus on vim9script)
2022-01-01 10:56:55 +01:00
3fccdeb326 chore(fixup): bfredl size_t 2022-01-01 02:55:34 +01:00
6fb9c278d8 chore(fixup): zeer
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-01-01 02:52:39 +01:00
6a932f68e6 ci: bump clang version to 13 in asan and tsan 2022-01-01 06:24:48 +08:00
b218d02c44 Merge pull request #16594 from shadmansaleh/feat/api/lua_keymaps
feat(api): add support for lua function & description in keymap
2021-12-31 20:10:35 +01:00
b411f436d3 feat(api): add support for lua function & description in keymap
Behavioral changes:

1. Added support for lua function in keymaps in
--------------------------------------------
- nvim_set_keymap
  Can set lua function as keymap rhs like following:
```lua
vim.api.nvim_{buf_}set_keymap('n', '<leader>lr', '', {callback = vim.lsp.buf.references})
```
  Note: lua function can only be set from lua . If api function being
  called from viml or over rpc this option isn't available.
- nvim_{buf_}get_keymap
  When called from lua, lua function is returned is `callback` key .
  But in other cases callback contains number of the function ref.
- :umap, nvim_del_keymap & nvim_buf_del_keymap clears lua keymaps correctly.
- :map commands for displaing rhs .
   For lua keymaps rhs is displayed as <Lua function ref_no>
   Note: lua keymap cannot be set through viml command / functions.
- mapargs()
  When dict is false it returns string in `<Lua function ref_no>`
  format (same format as :map commands).
  When dict is true it returns ref_no number in `callback` key.
- mapcheck()
  returns string in `<Lua function ref_no>` format (same format as :map commands).

2. Added support for keymap description
---------------------------------------
- nvim_{buf_}set_keymap: added `desc` option in opts table .
 ```lua
vim.api.nvim_set_keymap('n', '<leader>w', '<cmd>w<cr>', {desc='Save current file'})
```
- nvim_{buf_}get_keymap: contains `desc` in returned list.
- commands like `:nmap <leader>w` will show description in a new line below rhs.
- `maparg()` return dict contains `desc`.
2022-01-01 00:26:58 +06:00
5c1b8b77c5 fix(runtime): add missing release metadata 2021-12-31 19:04:37 +01:00
35034da779 ci: run lint only on master branch
The list of known lint issues is only updated for the master branch, so
other branches report lots of false positive issues.
2021-12-31 12:09:23 -05:00
fc62fdd42f Merge pull request #16846 from dundargoc/ci/remove-brew-workaround
ci: remove outdated brew workaround that isn't needed anymore
2021-12-31 11:24:48 -05:00
dc3a16abfc Merge pull request #16851 from zeertzjq/vim-8.2.3952
vim-patch:8.2.3952: first line not redrawn when adding lines to an empty buffer
2021-12-31 15:48:02 +01:00
ba7b30080f vim-patch:8.2.3952: first line not redrawn when adding lines to an empty buffer
Problem:    First line not redrawn when adding lines to an empty buffer.
Solution:   Adjust the argument to appended_lines(). (closes vim/vim#9439,
            closes vim/vim#9438)
1fa3de1ce8
2021-12-31 22:20:31 +08:00
db7fe34017 refactor: avoid overflow by explicitly casting operand to a wider type 2021-12-31 14:45:03 +01:00
2a12e8ddfd ci: remove outdated brew workaround that isn't needed anymore 2021-12-31 13:09:01 +01:00
991e872d80 Merge pull request #16728 from dundargoc/refactor/remove-unused-macros
refactor: remove unused macros
2021-12-30 22:20:10 +01:00
7e9aaf1e0f refactor: remove unused macros
Closes #13505
2021-12-30 21:53:18 +01:00
9d37b0998f vim-patch:8.2.3571: some unicode control characters are considered printable
Problem:    Some unicode control characters are considered printable.
Solution:   Make 0x2060 - 0x2069 not printable.
2021-12-30 12:53:38 +09:00
c46f7caad0 Merge pull request #16373 from zeertzjq/terminal-mouse-release-forward
fix(terminal): correctly forward mouse events
2021-12-28 23:44:17 +01:00
7bb593169e Merge pull request #16752 from gpanders/lua-user-commands
feat(api): implement nvim_{add,del}_user_command
2021-12-28 23:18:07 +01:00
f89989dbf3 vim-patch:8.2.3921: the way xdiff is used is inefficient
Problem:    The way xdiff is used is inefficient.
Solution:   Use hunk_func instead of the out_line callback. (Lewis Russell,
            closes vim/vim#9344)
d9da86e94e
2021-12-28 21:12:44 +00:00
eff11b3c3f feat(api): implement nvim_{add,del}_user_command
Add support for adding and removing custom user commands with the Nvim
API.
2021-12-28 14:08:44 -07:00
08616571f4 chore: fix typos (#16506)
Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Christoph Hasse <hassec@users.noreply.github.com>
Co-authored-by: Alef Pereira <ealefpereira@gmail.com>
Co-authored-by: AusCyber <willp@outlook.com.au>
Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com>
2021-12-28 18:15:16 +01:00
2ff5189d68 chore: fix compiler warning for multi-line comment (#16812) 2021-12-28 15:55:28 +01:00
645b314576 vim-patch:a4d131d11052 (#16811)
Update runtime files
a4d131d110
2021-12-28 12:24:44 +01:00
6e00d4754c vim-patch:8.2.3914 (#16808)
* vim-patch:8.2.3914: various spelling mistakes in comments

Problem:    Various spelling mistakes in comments.
Solution:   Fix the mistakes. (Dominique Pellé, closes vim/vim#9416)
af4a61a85d

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2021-12-28 11:28:48 +01:00
9804a2870f Merge pull request #16805 from clason/vim-8.2.3905
vim-patch:8.2.{3905,3909}: Dockerfile, Containerfile using prefix name not recognized
2021-12-27 12:52:43 +01:00
d54329e1b6 vim-patch:8.2.3909: Containerfile using prefix name not recognized
Problem:    Containerfile using prefix name not recognized.
Solution:   Recognize Containerfile.*.
bbdd3fb804
2021-12-27 12:52:17 +01:00
5743b0345c vim-patch:8.2.3905: Dockerfile using prefix name not recognized
Problem:    Dockerfile using prefix name not recognized.
Solution:   Recognize Dockerfile.*. (closes vim/vim#9410)
c88ac94a0b
2021-12-27 12:52:17 +01:00
f6df44232c docs: clarify UIEnter and UILeave docs 2021-12-27 17:31:32 +08:00
06ca0667a1 Merge pull request #16799 from bfredl/nohlsplash
fix(api): nvim__set_hl_ns causes extra redraws
2021-12-27 08:56:45 +01:00
505c12cb9c fix(api): nvim__set_hl_ns causes extra redraws 2021-12-26 23:43:37 +01:00
e0956f7452 fix(terminal): correctly forward mouse events 2021-12-27 06:08:16 +08:00
56f3c41f5f fix(uri): change scheme pattern to not include the comma character (#16797) 2021-12-26 16:36:14 -05:00
99526dc9b3 Merge pull request #16596 from dm1try/do_not_leave_terminal_mode_after_mouse_activation
do not leave Terminal mode after entering to it using a mouse
2021-12-26 19:11:51 +01:00
457a8ca7a7 Merge pull request #16630 from kylo252/unused-includes
refactor(build): remove unused includes
2021-12-26 19:03:21 +01:00
a23f4a7921 Merge pull request #16792 from zeertzjq/ins-lastc-k-event
fix: do not save K_EVENT as lastc in Insert mode
2021-12-26 18:29:49 +01:00
2b0be9eff8 Merge pull request #16788 from jamessan/strptime-fix
fix(msgpack#strptime): use calendar.timegm to get seconds since epoch
2021-12-26 09:42:52 -05:00
8c720f6b9d vim-patch:partial fa3b72348d88 (#16780)
Update runtime files
fa3b72348d

omit
doc/eval.txt (needs 8.2.3864)
doc/map.txt (needs 8.2.3619)
menu.vim (needs 8.2.0413)
2021-12-26 11:03:25 +01:00
ab1ceaaaa9 fix: do not save K_EVENT as lastc in Insert mode
I'm also gonna move some other K_EVENT-related tests to vim_spec.lua
2021-12-26 16:14:35 +08:00
9dd8557921 Merge pull request #16774 from zeertzjq/vim-8.2.2468
vim-patch:8.2.2468: not easy to get the full command name from a shortened one
2021-12-25 23:26:59 -05:00
333dd6f80b vim-patch:8.1.1412: test 30 is old style (#16768)
Problem:    Test 30 is old style.
Solution:   Turn it into a new style test. (Yegappan Lakshmanan, closes vim/vim#4440)
72fcf07b06
2021-12-25 23:20:03 -05:00
599a3d6abd fixup! vim-patch:8.2.2468: not easy to get the full command name from a shortened one 2021-12-26 11:25:57 +08:00
1dcdf86849 Merge pull request #16618 from zeertzjq/vim-8.2.3780
vim-patch:8.2.{3780,3784}: ":cd" works differently on MS-Windows
2021-12-25 21:10:44 -05:00
8bc7c6fab9 Merge pull request #16767 from zeertzjq/vim-8.2.3879
vim-patch:8.2.{3879,3882}
2021-12-25 19:36:02 -05:00
397201f2c6 Merge pull request #16705 from zeertzjq/vim-8.2.2508
vim-patch:8.2.{2508,2641,3846}
2021-12-25 19:08:36 -05:00
06985fa595 vim-patch:8.2.3883: crash when switching to other regexp engine fails (#16773)
Problem:    Crash when switching to other regexp engine fails.
Solution:   Check for regprog being NULL.
5937c7505f
2021-12-25 19:02:54 -05:00
96230d6c69 Merge pull request #16789 from janlazo/vim-8.1.1184
vim-patch:8.1.{1184,1379}
2021-12-25 18:30:51 -05:00
19ec20700b vim-patch:8.2.3880: Solution filter files are not recognized (#16779)
Problem:    Solution filter files are not recognized.
Solution:   Add pattern *.slnf and use json. (Doug Kearns)
70a120b72b
2021-12-25 18:26:27 -05:00
f7d840e295 Merge pull request #16724 from VVKot/vim-8.2.3850
vim-patch:8.2.{3850,3855}
2021-12-25 18:24:23 -05:00
57337e6814 vim-patch:8.1.1379: filechanged test hangs
Problem:    Filechanged test hangs.
Solution:   Do not check 'autoread'.
8239c62067
2021-12-25 18:01:17 -05:00
2f1e6ca773 vim-patch:8.1.1184: undo file left behind after running test
Problem:    Undo file left behind after running test.
Solution:   Delete the undo file. (Dominique Pelle, closes vim/vim#4279)
137c14bb4f
2021-12-25 17:59:41 -05:00
6b8a365465 test: port test_filechanged.vim
I can't port patch 8.1.0820.
Attempt failed in https://github.com/neovim/neovim/pull/12948.
test_filechanged.vim is required for later patches.
2021-12-25 17:55:52 -05:00
7622f1afe9 test(old): reenable Test_virtual_replace() (#16674) 2021-12-25 17:26:29 -05:00
e11a44aa22 feat(lua): add vim.spell (#16620) 2021-12-25 12:36:56 -07:00
2ae63161e8 Merge pull request #16725 from VVKot/vim-8.1.0040
vim-patch:8.1.0040: warnings from 64-bit compiler
2021-12-25 19:32:13 +01:00
fb14e2a8d6 fix(msgpack#strptime): use calendar.timegm to get seconds since epoch
datetime.datetime.timestamp does not exist on Windows and
datetime.datetiem.strftime('%s') is not supported, since '%s' is a POSIX
format.  Instead, use the recommended `calendar.timegm(obj.utctimetuple())`.
2021-12-25 12:11:34 -05:00
9e93e5c0c8 Merge pull request #16786 from jamessan/cancel-previous-ci
ci: cancel in-progress CI if a PR is updated
2021-12-25 12:03:01 -05:00
094c3f2b54 ci: cancel in-progress CI if a PR is updated
[skip ci]
2021-12-25 11:11:54 -05:00
4f95224907 vim-patch:8.2.3873: go.mod files are not recognized (#16757)
Problem:    go.mod files are not recognized.
Solution:   Check for the file name. (closes vim/vim#9380)
82b3b4c6cf
2021-12-25 15:17:55 +01:00
3e81c1f9b5 Merge pull request #16762 from zeertzjq/grid-truncate-pum-double-width
Truncate double-width character at the end of popup menu correctly
2021-12-25 13:36:37 +01:00
d2f62b3164 chore(editorconfig): set max_line_length for .h and .in files (#16775) 2021-12-24 22:35:38 -07:00
70a68dc2c5 fix(options): disallow empty 'fdc' and 'scl' (#16765)
Empty string values for these options aren't actually allowed, but
check_opt_strings allows empty string options.

It so happens that 'scl' handles empty string like "auto", but empty 'fdc'
causes glitchiness (win_fdccol_count returns an incorrect value).

Just disallow empty string values for these options completely.
2021-12-24 22:30:34 -07:00
a5d3dd9359 vim-patch:partial:0e6adf8a29d5
Update runtime files
0e6adf8a29
2021-12-25 11:31:54 +08:00
cf609ce655 vim-patch:8.2.3784: the help for options is outdated
Problem:    The help for options is outdated.
Solution:   Include all the recent changes.
7b1463bca3

This is the only applicable hunk.
2021-12-25 11:31:54 +08:00
42cf76fd0a vim-patch:8.2.3780: ":cd" works differently on MS-Windows
Problem:    ":cd" works differently on MS-Windows.
Solution:   Add the 'cdhome' option. (closes vim/vim#9324)
29f3a45915
2021-12-25 11:31:54 +08:00
ccc4d83507 vim-patch:partial:6c391a74fe90
Update runtime files
6c391a74fe
2021-12-25 08:36:32 +08:00
7fa8411d8b vim-patch:partial:6aa57295cfbe
Update runtime files
6aa57295cf
2021-12-25 08:32:58 +08:00
8eff0ca6d5 vim-patch:8.2.2468: not easy to get the full command name from a shortened one
Problem:    Not easy to get the full command name from a shortened one.
Solution:   Add fullcommand(). (Martin Tournoij, closes vim/vim#7777)
038e09ee76
2021-12-25 07:42:06 +08:00
903ec5bd85 vim-patch:8.2.3882: more duplicated code in f_getreginfo()
Problem:    More duplicated code in f_getreginfo().
Solution:   Also use getreg_get_regname(). (closes vim/vim#9398)
d3f00f54bf
2021-12-24 21:20:34 +08:00
125e870772 vim-patch:8.2.3879: getreg() and getregtype() contain dead code
Problem:    getreg() and getregtype() contain dead code.
Solution:   Remove the needless check. (closes vim/vim#9392)  Also refactor to put
            common code in a shared function.
51e64b2789
2021-12-24 21:20:34 +08:00
4f70b31f7a refactor(pum_redraw): rename col -> grid_col
This is initialized to `col_off`, while in Vim this variable `col` that
is used in the same places is initialized to `pum_col`. This can cause
confusion in patch porting, and it caused Vim patch 8.2.1995 to be
ported incorrectly. (I reverted the incorrect part in the last commit
though.) Rename it to `grid_col` to make it clear that it is different
from Vim's `col` variable.
2021-12-24 08:06:27 +08:00
e6d35b9e40 fix(pum_redraw): use grid_puts_len() to truncate the text
Nvim already resizes grid to the required width, so there is no need to
truncate the text in pum_redraw(). What's more, truncation is currently
done incorrectly because Vim patch 8.2.1995 was ported incorrectly.

This nearly reverts the truncation part of Vim patch 8.2.1995, but not
the part that reduces unnecessary calls to pum_redraw(). The original PR
https://github.com/vim/vim/pull/7306 didn't explain much about which
part of it actually reduces redraws.
2021-12-24 08:06:27 +08:00
28dadd5a54 fix(screen): truncate when overwriting right half of a double-width char
Unlike the code above, this truncates the character in the same grid.
This is mainly for the pum scrollbar in the next commit.
2021-12-24 08:06:27 +08:00
bc75544fac fix(screen): truncate double-width character correctly
The `c = '>';` is useless here, because it is not used later.
`u8c` should also need to be set to '>', and `u8cc` needs to be cleared.
2021-12-24 08:06:26 +08:00
0d7a97224f chore: set max_line_length in editorconfig (#16755)
We established a while ago that 100 chars is our line length for both C
and Lua. Not all editorconfig plugins support the "max_line_length"
option, but many do (including all of the ones available for Vim/Neovim
to the best of my knowledge).
2021-12-23 06:46:57 -07:00
bc27d807f3 docs: regenerate (#16742)
Co-authored-by: marvim <marvim@users.noreply.github.com>
2021-12-23 13:55:38 +01:00
67bf5c237f vim-patch:8.2.3876: 'cindent' does not recognize inline namespace
Problem:    'cindent' does not recognize inline namespace.
Solution:   Skip over "inline" to find "namespace". (closes vim/vim#9383)
f2f0bddf30
2021-12-23 07:41:23 +08:00
de8a2f20e9 vim-patch:8.2.3625: illegal memory access when C-indenting
Problem:    Illegal memory access when C-indenting.
Solution:   Also set the cursor column.
2de9b7c7c8
2021-12-23 07:41:23 +08:00
6714ea35ac vim-patch:8.2.3482: reading beyond end of line ending in quote and backslash
Problem:    Reading beyond end of line ending in quote and backslash.
Solution:   Check for non-NUL after backslash. (closes vim/vim#8964)
78e0fa4cf4
2021-12-23 07:41:23 +08:00
b8d6ab04a2 vim-patch:8.1.1585: :let-heredoc does not trim enough
Problem:    :let-heredoc does not trim enough.
Solution:   Trim indent from the contents based on the indent of the first
            line.  Use let-heredoc in more tests.
e7eb92708e

This is a missing part of Vim patch 8.1.1585 from #11211.
2021-12-23 07:41:23 +08:00
e3f615b205 vim-patch:8.1.1434: test 3 is old style
Problem:    Test 3 is old style.
Solution:   Turn into a new style test. (Yegappan Lakshmanan, closes vim/vim#4460)
1ab74a5af3
2021-12-23 07:41:23 +08:00
7b8fbbdebe Merge pull request #16754 from jamessan/vim-8.2.3874
vim-patch:8.2.3874
2021-12-22 17:34:36 -05:00
29141fc66a vim-patch:8.2.3874: cannot highlight the number column for a sign
Problem:    Cannot highlight the number column for a sign.
Solution:   Add the "numhl" argument. (James McCoy, closes vim/vim#9381)
a80aad7174
2021-12-22 15:03:32 -05:00
0c35fd5fcc refactor: fix comment spacing in option.h (#16749) 2021-12-21 18:13:17 -07:00
33cd1ba00a fix(api): make nil value in nvim_set_option_value clear local value (#16710)
For special options such as 'undolevels' and 'scrolloff', this sets the
local value to the special "unset" value (e.g. -12345 for 'undolevels').
2021-12-21 14:20:34 -07:00
1b04da52b3 feat(lsp): add buf_detach_client (#16250)
This allows the user to detach an active buffer from the language
client. If no clients remain attached to a buffer, the on_lines callback
is used to cancel nvim_buf_attach.
2021-12-21 10:53:34 -08:00
1062ea2cc5 Merge pull request #16736 from dundargoc/ci/remove-unused-typo-fix
ci: remove unused "squash typo" workflow
2021-12-20 17:52:19 -05:00
89a844a9c7 ci: remove unused "squash typo" workflow 2021-12-20 23:47:04 +01:00
9241c684e1 Merge pull request #16734 from zeertzjq/chdir-refactor
refactor: remove some chdir-related unnecessary calls and checks
2021-12-20 14:28:11 -05:00
9625832372 fix(lsp): fix nil-index behavior for UTF-8 in _str_*index_enc methods (#16731)
Previously, the `_str_utfindex_enc` and `_str_byteindex_enc` helper functions would return `nil` when `offset_encoding == "utf-8"` and `index == nil`. Clearly, this doesn't reflect the expected behavior of the functions they're wrapping which would return the length of the line in this case. This should fix behavior with servers that use UTF-8 `offset_encoding` when applying text edits, formatting a range, and doing range code actions (though this isn't tested currently).
2021-12-20 08:54:05 -08:00
63b21ab30d Merge pull request #16727 from dundargoc/docs/remove-good-first-issue-suggestion
docs: stop suggestion "good first issue" as a good first issue
2021-12-20 11:35:07 -05:00
09c412837f refactor: remove some chdir-related unnecessary calls and checks
xmalloc() always retuns a valid pointer.

Calling os_chdir() with the same directory as the current one doesn't do
anything other than wasting time.
2021-12-20 18:58:13 +08:00
26ced79c3b vim-patch:8.1.0040: warnings from 64-bit compiler
Problem:    Warnings from 64-bit compiler.
Solution:   Add type casts. (Mike Williams)
e31e256ba1
2021-12-20 05:30:15 +00:00
482df82e69 docs: stop suggestion "good first issue" as a good first issue
They're simply too difficult and too niche for an actual newcomer to
solve them. Instead, use the "complexity:low" as a substitute.
2021-12-19 22:15:42 +01:00
67bb01ae27 chore(build): add option to disable Lua bytecode compilation (#16722)
Include a build option to explicitly disable Lua bytecode compilation.
This is needed in some situations where the existing checks are not
sufficient (e.g. cross compilation).
2021-12-19 14:00:53 -07:00
d6b939a13f fix(lsp): avoid attaching to unloaded buffers (#16723)
Closes https://github.com/neovim/neovim/issues/16562 https://github.com/neovim/neovim/issues/16249 https://github.com/neovim/neovim/issues/16297

* buf_attach_client can be called on an unloaded buffer
* on_attach will prematurely fail, while the language server client
  tracks this buffer as attached
* The language server client will track this buffer as attached despite
  textDocument/didChange notifications not being sent to the server
* Instead, check if the buffer is loaded and return early, warning via
  the lsp logger that buf_attach_client was called on an invalid buffer
2021-12-19 12:49:56 -08:00
115d4da882 Merge pull request #16657 from lewis6991/unused_warn
chore(): suppress -Wunused-but-set-variable warns
2021-12-19 21:38:07 +01:00
6f72236a00 vim-patch:8.2.3855: illegal memory access when displaying a blob
Problem:    Illegal memory access when displaying a blob.
Solution:   Append a NUL at the end. (Yegappan Lakshmanan, closes vim/vim#9372)
bc404bfb32
2021-12-19 19:50:59 +00:00
bdfca2028b vim-patch:8.2.3850: illegal memory access when displaying a partial
Problem:    Illegal memory access when displaying a partial.
Solution:   Terminate the string with a NUL. (closes vim/vim#9371)
2de5371a75
2021-12-19 19:48:57 +00:00
e0750f3e8a chore: suppress -Wunused-but-set-variable warns 2021-12-19 13:20:17 +00:00
abdf3a8128 fix(build): check that LuaJIT has required modules for compilation (#16714)
Apparently some installations of LuaJIT do not have the "jit.bcsave"
module which is required for pre-compilation. Check that this module
exists before using LuaJIT as luac and if it doesn't, skip compiling
bytecode.
2021-12-18 20:59:02 -07:00
b42e0c40c8 fix: update last cursor on first CursorMoved (#16698)
Closes https://github.com/neovim/neovim/issues/16625 https://github.com/neovim/neovim/issues/12923

The first defined CursorMoved autocommand will immediately
fire if the cursor has previously moved upon definition
of the autocommand.

Plugins add dummy autocommands such as:

```lua
autocmd CursorMoved * execute ''
```

to avoid this behavior.

Instead, when defining a new CursorHold autocommand, force
update the last cursor position.

See https://github.com/vim/vim/issues/2053
2021-12-18 19:18:47 -08:00
0e18cf4b6d vim-patch:8.2.3846: no error when using control character for 'lcs' or 'fcs'
Problem:    No error when using control character for 'lcs' or 'fcs'.
Solution:   Use char2cells() to check the width. (closes vim/vim#9369)
60618c8f1a
2021-12-19 09:55:17 +08:00
c05e647681 vim-patch:8.2.2641: display test fails because of lacking redraw
Problem:    Display test fails because of lacking redraw.
Solution:   Add a redraw command.
2cec027af4
2021-12-19 09:55:17 +08:00
fd70018e21 vim-patch:8.2.2508: cannot change the character displayed in non existing lines
Problem:    Cannot change the character displayed in non existing lines.
Solution:   Add the "eob" item to 'fillchars'. (closes vim/vim#7832, closes vim/vim#3820)
a98f8a2305

Nvim has already implemented this feature, so this just ports the tests
and docs.
2021-12-19 09:55:17 +08:00
95803f0e90 build(deps): bump luajit to commit 1d20f33 (#16712)
fixes a bug with jit.bcsave on Windows (cf. #16631)
2021-12-18 19:09:00 +01:00
8d22049513 Merge pull request #16294 from zeertzjq/test-fewest-iteration
test: require fewest number of main loop iterations possible
2021-12-18 13:08:28 -05:00
2202400f15 Merge pull request #16707 from jamessan/filter-out-tests
test: allow excluding functional/unti tests using TEST_FILTER_OUT
2021-12-18 13:01:38 -05:00
eceb0b305e fix(build): check for empty value of LUAC_PRG (#16711)
If the LUAC_PRG environment variable is defined, but empty, compilation
would still be attempted but would be malformed. This results in garbage
bytes being included.

Fix this by checking that LUAC_PRG is both defined *and* non-empty.
2021-12-18 10:56:10 -07:00
267ec67fab test: allow excluding functional/unit tests using TEST_FILTER_OUT
Although this can already be done using `BUSTED_ARGS`, it complements
our existing shortcut of `TEST_FILTER.`

[skip ci]
2021-12-18 12:55:09 -05:00
2abd17813e fix(build): install luajit modules on windows (#16658) 2021-12-18 10:53:27 -07:00
ff1b0f632a vim-patch:8.2.3843: dep3patch files are not recognized (#16700)
Problem:    Dep3patch files are not recognized.
Solution:   Recognize dep3patch files by their location and content. (James
            McCoy, closes vim/vim#9367)
647ab4cede
2021-12-18 17:22:09 +01:00
34d88edaec feat(tui): add error logging (#16615) 2021-12-18 09:18:30 -07:00
734fba0d88 feat(runtime): new checkhealth filetype (#16660) 2021-12-18 09:14:42 -07:00
36758ba9a7 autocmd: RecordingEnter, RecordingLeave (#16684) 2021-12-18 08:55:43 -07:00
df50fb5859 test(old): change usage of Q to gQ
test(old) fix Test_ex_mode_count_overflow

test(old) change usage of Q to gQ
2021-12-18 08:54:07 -07:00
684c782546 docs(autocmd): update docs to match implementation
docs(reg_recorded): add links to relevant docs

docs(Recording): update docs to match implementation

docs(Q) update references of Q to be gQ

docs(autocmd) add description about state of reg_record{ing,ed} for RecordingLeave

docs(vim_diff) add Recording{Enter,Leave} to features

docs(index) removed duplicate gQ

docs(options) removed line about gQ erroring in visual mode

Update runtime/doc/vim_diff.txt

Co-authored-by: zeertzjq <zeertzjq@outlook.com>

docs(vim_diff) removed double mention of Q
2021-12-18 08:54:07 -07:00
8a4e26c6fe feat(autocmd): add Recording autocmds
feat(eval): add reg_recorded()

This function is used the get the last recorded register.

style(Recording): rename handler to match suggestions

fix(RecordingLeave): send autocommand earlier

This makes the autocommand fire just before setting reg_recorded to
reg_recording, this way we clearly show that we are actually just before
actually quitting the recording mode.
2021-12-18 10:54:26 +01:00
818ae74eaf fix(diagnostic): respect "if_many" source option for virtual text (#16653)
The `prefix_source` function only evaluates the sources from the
diagnostics passed to it; however, because each namespace draws its own
virtual text, its diagnostics will never contain more than a single
source (by definition). This requires changing the semantics of what
"if_many" means from "multiple sources in a single 'batch' of
diagnostics" to "multiple sources of all diagnostics within a buffer".
2021-12-17 19:38:33 -07:00
36c401db24 fix(lsp): correctly align start and end range to codepoints during incremental sync (#16670)
Closes #16624

Fixes two issues with aligning the start position and end position to
codepoints when calculating the start and end range.

When aligning the start position:
* use aligned byte index to calculate character index rather than 
  the unadjusted byte

When aligning the end position:
* do not adjust the end byte if it falls on a UTF-8 codepoint
* align byte to the first byte of the next codepoint rather than the
  last byte of the current codepoint
* compute character character end range on the aligned byte index

This commit also adds additional test coverage, including multibyte operations
that previously failed before this commit.
2021-12-17 18:05:00 -08:00
6a92a53c02 fix(lsp): call config on_exit handler before context is cleared (#16638)
The on_exit handler provided to the client configuration is called after
the client's context is cleared (e.g. which buffers the client was
attached to). Calling the handler sooner allows these handlers to access
the client object and do their own cleanup with the full context.
2021-12-17 12:06:44 -08:00
51306f98b8 Merge pull request #16681 from zeertzjq/vim-8.2.3825
vim-patch:8.2.3825: various comments could be improved
2021-12-17 07:15:42 -05:00
b1757e1c29 vim-patch:0e6adf8a29d5 (#16682)
Update runtime files
0e6adf8a29
2021-12-16 21:46:13 +01:00
80210c189f refactor(diagnostic): remove hack (#16685)
No longer required since #16548.
2021-12-16 12:13:30 -07:00
b515160cef fix(diagnostic): assert that diagnostics have line number and column (#16683)
Line number and column are required and much of the diagnostic API
assumes that these are both present. When one of the two is missing,
cryptic errors pop up in other parts of the diagnostic subsystem.
Instead, assert that diagnostics are well formed when they are entered
into the cache, which provides a clearer error.
2021-12-16 11:20:18 -07:00
4240ce8eb3 perf: pre-compile embedded Lua source into bytecode (#16631)
The Lua modules that make up vim.lua are embedded as raw source files into the
nvim binary. These sources are loaded by the Lua runtime on startuptime. We can
pre-compile these sources into Lua bytecode before embedding them into the
binary, which minimizes the size of the binary and improves startuptime.
2021-12-16 09:27:39 -07:00
f59f81c32e vim-patch:8.2.3825: various comments could be improved
Problem:    Various comments could be improved.
Solution:   Improve the comments.
52797bae17
2021-12-16 23:05:52 +08:00
56fa08b458 Merge pull request #16617 from pekdon/forkpty
fix: add forkpty for SunOS variants
2021-12-16 08:24:29 -05:00
a402b5e2d5 Merge pull request #16134 from zeertzjq/screenpos-border
fix(screenpos, float): add top and left border adjustment
2021-12-16 12:41:43 +01:00
326e74571b Merge pull request #16666 from mjlbach/fix/bad-cast 2021-12-15 13:56:41 -08:00
4218b7079e docs(options): mention how to disable inccommand preview (#16534)
Co-authored-by: Hitarth Thumma
2021-12-15 22:41:24 +01:00
fcbffcd92a chore: improve naming consistency in str_utf_start 2021-12-15 09:07:23 -08:00
1a887293ef fix: do not cast offset to char_u
* str_utf_start/end both cast the offset into the utf string
to a char_u, a pointer + long is well-defined and the cast is
unnecessary. This previously resulted in issues for offsets greater than
256.
2021-12-15 09:07:23 -08:00
4393360796 docs: regenerate (#16468)
Co-authored-by: marvim <marvim@users.noreply.github.com>
2021-12-15 08:19:54 -07:00
0a1391fdd7 fix(terminal): fix resize crash with pending scrollback (#14891)
refresh_scrollback assumes pending scrollback rows exist only if the
terminal window height decreased (or the screen was full).

However, after accumulating scrollback, it's possible in some cases for
the terminal height to increase before refresh_scrollback is called via
invalidation (especially when the terminal buffer isn't initially
displayed in a window before nvim_open_term), which may crash.

As we'll have enough room for some scrollback rows, just append them to
the top of the buffer until it fills the window, then continue with the
previous logic for any remaining scrollback rows if necessary.
2021-12-15 08:18:06 -07:00
cf65071e2e vim-patch:8.2.3814: .csx files and .sln files are not recognized (#16662)
Problem:    .csx files and .sln files are not recognized.
Solution:   Add filetype patterns. (Doug Kearns)
cfabad9bcf
2021-12-15 16:10:03 +01:00
576408ddde fix(ui): close floating window on BufLeave event (#16557)
When buffer is visible in two splits simultaneously, BufHidden event is
not triggered, causing the floating window to remain on screen after
switching to another buffer.

Remove BufHidden event from close_events defaults, and close the window
if we changed the buffer to something other than the buffer that spawned
the floating window or the floating window buffer itself.
2021-12-15 07:53:09 -07:00
5ba45a7cd6 fix(quickfix): avoid O(N^2) when filling from string typval (#16654)
When filling a quickfix/loclist from a string-typed VimL variable, the
complexity is O(N^2) in the number of lines in the variable.

The problem is caused by using `xstrlcpy(3)` to copy the characters from
the current position up to the next newline into the quickfix/loclist
buffer in a loop.

strlcpy(3) returns the length of `src`, so by necessity it has to
compute `strlen(src)`. This means scanning the full rest of the typval
on every iteration while only copying a small fraction (up to the next
'\n').

This is not a problem whenever the srclen-to-copylen ratio is close to
1, which it usually is. But not in this case. Since we already
calculated exactly how many bytes we want to copy, we should be using
memcpy(3).

This problem is not present in Vim, as it uses `vim_strncpy`, a
`strncpy(3)`-alike, which stops at either `\0` or `n`, whichever comes
first.

The quickfix/loclist window can be filled using a:

  1. File (used by commands like :grep/:make/... to source directly
     from their errorfile)
  2. Buffer (used by :cbuffer and its variants)
  3. Typval
   a. String (used by :cexpr and its variants)
   b. List of strings (used by setqflist(), setloclist(), :cepxr and its
   variants)

This commit optimizes case (3a), especially when the typval is a long
string.

The pathological path is triggered by (e.g.) :grep enhancements as found
in https://gist.github.com/romainl/56f0c28ef953ffc157f36cc495947ab3:

    function! Grep(...)
        return system(join([&grepprg] + a:000), ' '))
    endfunction
    :cgetexpr Grep('foo')

It would've been better for Neovim to use `systemlist` here, before this
commit.
2021-12-15 07:47:11 -07:00
ffe3003e02 fix(screenpos, float): add top and left border adjustment 2021-12-15 22:40:10 +08:00
14ffcd190d test: expect the correct screen in TUI paste: big burst of input (#16656) 2021-12-15 07:35:22 -07:00
bdfea9d9ae Merge pull request #16606 from clason/bump-treesitter
build(deps): bump tree-sitter commit
2021-12-14 15:19:21 +01:00
cc4c8e7af6 vim-patch:8.2.3805: i3config files are not recognized (#16645)
Problem:    i3config files are not recognized.
Solution:   Add patterns to match i3config files. (Quentin Hibon,
            closes vim/vim#7969)
8176be1598
2021-12-14 14:01:37 +01:00
f37c5f180a Merge pull request #16602 from zeertzjq/tui-end-streamed-paste 2021-12-13 09:36:02 -05:00
9a0196d245 Merge pull request #16348 from lewis6991/query
feat(treesitter): Support match queries on multiline nodes
2021-12-13 09:39:34 +01:00
5e1320708d refactor(build): remove unused includes 2021-12-12 19:05:50 +01:00
6e6c36ca5b feat(treesitter): multiline match predicates 2021-12-12 12:16:42 +00:00
2c8f4d0912 fix: add forkpty for SunOS variants
forkpty is missing on Solaris < 11 and Illumos, provide fallback implementation
for non Solaris 11 users.
2021-12-12 11:29:56 +00:00
1f3c0593eb feat(ts): add support for multiline nodes in get_node_text (#14999)
Based on https://github.com/neovim/neovim/pull/14445

This extends `vim.treesitter.query.get_node_text` to return the text
that spans a node's range even if start_row ~= end_row.
2021-12-12 12:05:39 +01:00
3aff3d6349 fix(docs): add bufnr and user_data to diagnostic-structure (#16619) 2021-12-11 16:59:16 +01:00
e93b26eb0e Merge pull request #16613 from bfredl/vim-patch-8.2.3777
vim-patch:8.2.3777: spell file write error not checked
2021-12-11 09:25:09 +01:00
a415a7e672 Merge pull request #16614 from zeertzjq/test-remove-misc1
test: remove references to misc1.c
2021-12-11 09:20:50 +01:00
5b153f5d3d test: remove references to misc1.c 2021-12-11 07:10:01 +08:00
3f8703093d Merge pull request #16607 from bfredl/no2misc1
refactor: get rid of misc1.c ("functions that didn't seem to fit elsewhere")
2021-12-10 23:38:00 +01:00
d23a5da890 vim-patch:8.2.3777: spell file write error not checked
Problem:    Spell file write error not checked.
Solution:   Check writing the prefix conditions. (Björn Linse, closes vim/vim#9323)
2021-12-10 23:30:01 +01:00
53c95ccd1b docs(vim_diff.txt): document SearchWrapped (#16612) 2021-12-10 15:04:11 -07:00
2a9aadd09b refactor: replace deprecated lua functions with their new versions (#16603)
Calling vim.lsp.buf.definition() sometimes gives a deprecation warning.
This will likely solve that.

Co-authored-by: Christian Clason <christian.clason@uni-due.de>
2021-12-10 13:20:30 -07:00
63528f4686 runtime: support once on s:GetAutocmdPrefix (#16457)
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
2021-12-10 12:28:55 -07:00
8ad6015409 feat: add autocommand event when search wraps around (#8487) 2021-12-10 12:28:25 -07:00
df54d82b7c refactor(misc1): move out high-level input functions to a new file: input.c
Possibly dialog code is messages.c could be moved here as well.
misc1.c is now empty, so delete it.
2021-12-10 18:15:33 +01:00
dc37beed75 refactor(misc1): move shell related functions to os/shell.c 2021-12-10 18:08:04 +01:00
29517d95b7 refactor(misc1): move insertmode related function to edit.c 2021-12-10 17:35:06 +01:00
c88555418a refactor(misc1): move way beep functions elsewhere 2021-12-10 17:11:45 +01:00
6dbd4f3787 refactor(misc1): move msgmore function to messages.c 2021-12-10 17:03:22 +01:00
608f74a0de refactor(misc1): move comment related functions to change.c
These are used in various places, but were grouped with open_line()
which has a lot of comment prefix logic originally.
2021-12-10 16:50:09 +01:00
aad2437fc0 build(deps): bump tree-sitter commit
bump tree-sitter to 25f64e1eb6
to fix query performance regression in 0.20.1
2021-12-10 16:07:03 +01:00
8b316b18d2 refactor(misc1): move user related code to os/users.c 2021-12-10 15:52:38 +01:00
22d7dd2aec fix(lsp): create lsp requests with position offsets considering client encoding (#16382)
Co-authored-by: black-desk <clx814727823@gmail.com>
Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
2021-12-10 15:17:50 +01:00
40ed2b51cb fix(tui): end streamed paste correctly when key buffer is empty 2021-12-10 18:09:55 +08:00
26eb605152 Merge pull request #16597 from bfredl/nomisc1
refactor: move out some long-hanging fruit from misc1.c
2021-12-10 10:56:17 +01:00
ac2d140a33 Merge pull request #16541 from jamessan/vim-8.2.3664
vim-patch:8.2.3664,8.2.3743,8.2.3747,8.2.3748,8.2.3757
2021-12-09 21:29:15 -05:00
238da85126 Merge pull request #16524 from dundargoc/ci/optimize-brew
ci: remove "brew upgrade" from macos jobs
2021-12-09 21:15:07 -05:00
b20871526e Merge pull request #16414 from zeertzjq/terminal-no-invalid-rows
fix(terminal): return early if there are no invalid rows
2021-12-09 21:13:16 -05:00
0cf546508d Merge pull request #16547 from pekdon/sunos
Portability improvements, first steps at getting neovim on x86_64 SunOS
2021-12-09 21:09:22 -05:00
27648ee218 Merge pull request #16564 from glacambre/improve_test_harness_perf
test(helpers): optimize read_file_list
2021-12-09 21:06:45 -05:00
a59589ca01 refactor(misc1): move preserve_exit() to related functions in main.c 2021-12-09 23:46:37 +01:00
d9c1669a54 refactor(misc1): move out misc functions which obviously belong elsewhere
Also make some function names more descriptive/regular.
2021-12-09 23:17:29 +01:00
c96f7e29dc fix(terminal): ignore left-release mouse action
if it is not proccesed by the terminal program
to prevent leaving Terminal mode after using
a mouse for window switching

closes #9483
closes #8691
2021-12-10 00:53:30 +03:00
8e64b21fed vim-patch:8.2.3769: zig files are not recognized (#16598)
Problem:    Zig files are not recognized.
Solution:   Add *.zig. (Gregory Anders, closes vim/vim#9313)
4c8c634365
2021-12-09 22:03:25 +01:00
51822f0655 refactor(misc1): move out autocmd related functions 2021-12-09 21:10:58 +01:00
2ec0e0a868 refactor(misc1): move line_breakcheck family of functions to os/input.c 2021-12-09 21:00:04 +01:00
2fe60905f6 Merge pull request #16582 from dundargoc/docs/remove-redundant-help-files
docs: remove redundant help files
2021-12-09 09:23:18 -05:00
6063e07a0f fix(diagnostic): set effective buffer number in autocmd (again) (#16589)
Follow up to #16474.
2021-12-08 21:13:47 -07:00
f3fb77c402 vim-patch:8.2.3757: an overlong highlight group name is silently truncated
Problem:    An overlong highlight group name is silently truncated.
Solution:   Give an error if the name is too long. (closes vim/vim#9289)
f7f7aaf8aa
2021-12-08 21:48:00 -05:00
ed35e20640 test(fold): add test for CursorLineFold 2021-12-08 21:47:59 -05:00
931f499d9a test(sign): add test for culhl option 2021-12-08 21:47:59 -05:00
e9051d965e vim-patch:partial 6304be625ce4
Update runtime files.
6304be625c

Remaining changes left out of 03d250eb45
2021-12-08 21:47:59 -05:00
5fda23c307 vim-patch:8.2.3748: giving an error for an empty sign argument breaks a plugin
Problem:    Giving an error for an empty sign argument breaks a plugin.
Solution:   Do not give an error.
e5710a02cb
2021-12-08 21:47:58 -05:00
4453d4c9f1 vim-patch:8.2.3747: cannot remove highlight from an existing sign
Problem:    Cannot remove highlight from an existing sign. (James McCoy)
Solution:   Only reject empty argument for a new sign.
0bac5fc5e1
2021-12-08 21:47:58 -05:00
d0b3efb7db vim-patch:8.2.3743: ":sign" can add a highlight group without a name
Problem:    ":sign" can add a highlight group without a name.
Solution:   Give an error if the group name is missing. (closes vim/vim#9280)
5e18ccc60b
2021-12-08 21:47:58 -05:00
e8f9262125 vim-patch:8.2.3664: cannot adjust sign highlighting for 'cursorline'
Problem:    Cannot adjust sign highlighting for 'cursorline'.
Solution:   Add CursorLineSign and CursorLineFold highlight groups.
            (Gregory Anders, closes vim/vim#9201)
e413ea04b7
2021-12-08 21:47:58 -05:00
2cd815c0af Merge pull request #16418 from zeertzjq/terminal-coladvance
fix(terminal): use coladvance() to calculate buffer cursor position
2021-12-08 21:17:18 -05:00
be84529190 refactor(diagnostic): remove bufnr parameter from open_float (#16579)
The overwhelming majority of use cases for `open_float` are to view
diagnostics from the current buffer in a floating window. Thus, most use
cases will just `0` or `nil` as the first argument, which makes the
argument effectively useless and wasteful.

In the cause of optimizing for the primary use case, make the `bufnr`
parameter an optional parameter in the options table. This still allows
using an alternative buffer for those that wish to do so, but makes the
"primary" use case much easier.

The old signature is preserved for backward compatibility, though it can
likely be fully deprecated at some point.
2021-12-08 18:44:31 -07:00
fb0399aacc docs: remove redundant help files 2021-12-08 19:48:51 +01:00
c096561041 docs(lsp): fix resolve_capabilities docstring (#16577) 2021-12-08 11:01:07 -07:00
e5f691baef docs: update missing help sections from main help page (#16573)
Also replace non-existent help section remote.txt to remote_plugins.txt
2021-12-08 09:56:11 -07:00
db4bc32c4a fix: check for interrupt in nvim_echo, write_msg and nlua_print (#16537)
Fixes `q` in more pager, where `:highlight` can be quit out of with a
single `q` keystroke, while in `:lua print(vim.inspect(vim))` it just
scrolls down a page.
2021-12-08 09:43:58 -07:00
5b117bbc75 ci: install doxygen with conda instead of apt (#16517)
This provides a newer version of Doxygen (1.9.0 or later)
that fixes a bug in the documentation generator.

Closes #16498
2021-12-08 09:28:25 -07:00
51d5f0517f test(helpers): optimize read_file_list
Read_file_list is used to read back data from the nvim log file as the
testsuite executes. However, the nvim log file can get really big
(each full run of the testsuite appends roughly 150MB of data to this
file). Reading each line of this file can thus be extremely slow, and so
are the repeated table.insert/table.removes that are done for each line.

A solution to this issue is tto only read the end of the file.

This results in a sizeable improvement in testsuite run times in some
cases, e.g. on my computer:

Without this commit:
real	20m0.431s
user	17m11.163s
sys	1m59.422s

With this commit:
real	4m25.356s
user	1m41.673s
sys	1m31.253s
2021-12-08 17:25:48 +01:00
c4d70dae80 refactor(diagnostic): add warning to deprecated functions (#16536) 2021-12-08 08:47:19 -07:00
cf32053d60 fix(api): allow nvim_buf_set_extmark to accept end_row key (#16548)
nvim_buf_get_extmark uses "end_row" rather than "end_line" in its
'details' dict, which means callers must modify the key names if they
want to re-use the information. Change the parameter name in
nvim_buf_set_extmark to "end_row" and use "end_line" as an alias
to make this more consistent.
2021-12-08 08:44:48 -07:00
5abd7c2c14 Merge pull request #16421 from seandewar/vim-8.1.0035
vim-patch:8.1.{35,42,64},8.2.{1781,1783,1976,2014,3671}
2021-12-07 21:17:12 -05:00
c83fedf0bd fix(terminal): return early if there are no invalid rows
Prevent on_lines emitting out-of-bounds line indexes.
2021-12-08 08:41:46 +08:00
2784a5d3d2 fix(terminal): use coladvance() to calculate buffer cursor position 2021-12-08 08:11:27 +08:00
be768be6b7 Merge pull request #16556 from zeertzjq/hl-change-update
fix(highlight): always update window highlight if highlight changed
2021-12-07 18:41:17 +01:00
ddf48193e6 Merge pull request #16559 from zeertzjq/filler-end-row
fix(screen): do not draw filler lines post eof if already at last row
2021-12-07 18:36:58 +01:00
a2db756206 refactor(lsp): remove usage of deprecated function (#16539) 2021-12-07 10:25:21 -07:00
f99f3d9052 feat(lsp): use vim.ui.select for selecting lsp client (#16531) 2021-12-07 18:09:43 +01:00
b326bf5f41 fix(screen): do not draw filler lines post eof if already at last row 2021-12-07 23:19:56 +08:00
23dcef9269 fix(highlight): always update window highlight if highlight changed 2021-12-07 20:48:39 +08:00
361f548437 vim-patch:8.2.3671: restarting Insert mode in prompt buffer too often
Problem:    Restarting Insert mode in prompt buffer too often when a callback
            switches windows and comes back. (Sean Dewar)
Solution:   Do not set "restart_edit" when already in Insert mode.
34c20ff85b

As Test_prompt_switch_windows is skipped, implement it in prompt_buffer_spec.

Replace the 50ms term_wait calls with poke_eventloop (test seems to work anyway
without them, so maybe they're not required?)

The new test does include a duplicate screen test that may generate a "screen
test succeeded immediately" warning, but this is done to match the Vim test.
2021-12-07 11:34:28 +00:00
0f792b284f test(prompt_buffer_spec): include changes from v8.1.1984
I already ported v8.1.1984 previously, but hadn't updated prompt_buffer_spec to
match test_prompt_buffer (which we have but due to Vim features such as
term_sendkeys it's mostly skipped).

Required for v8.2.3671.
2021-12-07 11:34:28 +00:00
d6258a9bad vim-patch:8.2.2014: using CTRL-O in a prompt buffer moves cursor to start
Problem:    Using CTRL-O in a prompt buffer moves cursor to start of the line.
Solution:   Do not move the cursor when restarting edit. (closes vim/vim#7330)
ee8b787bcd

Test_prompt_editing is skipped, so edit the Lua test in prompt_buffer_spec.
2021-12-07 11:34:27 +00:00
c2d0a1041e vim-patch:8.2.1976: cannot backspace in prompt buffer after using cursor-left
Problem:    Cannot backspace in prompt buffer after using cursor-left. (Maxim
            Kim)
Solution:   Ignore "arrow_used" in a prompt buffer. (closes vim/vim#7281)
6f6244855f

cmdchar_todo wasn't adapted properly for Nvim's state system, which caused it to
be a dead store and such was removed in #11900.

Re-introduce cmdchar_todo properly.
2021-12-07 11:34:27 +00:00
a128b64e73 vim-patch:8.2.1783: try-catch test fails
Problem:    Try-catch test fails.
Solution:   Don't call win_enter(), only call enterering_window().
bdf931c25b

v8.2.1781 caused Test_reload_in_try_catch() from v8.2.0004 to fail in Vim, but
it has not been ported yet.
2021-12-07 11:34:27 +00:00
38cd91de5f vim-patch:8.2.1781: writing to prompt buffer interferes with insert mode
Problem:    Writing to prompt buffer interferes with insert mode.
Solution:   Use win_enter() instead of just setting "curwin". (Ben Jackson,
            closes vim/vim#7035)
4537bcc889

Vim test will be skipped, so add a Lua test.
The problem boils down to the use of aucmd_restbuf in a callback, so just test
that (via nvim_buf_set_lines).
2021-12-07 11:34:27 +00:00
1fffccc5d6 vim-patch:8.1.0064: typing CTRL-W in a prompt buffer shows mode "-- --"
Problem:    Typing CTRL-W in a prompt buffer shows mode "-- --".
Solution:   Set restart_edit to 'A' and check for it.
942b4541a2

Nvim already checked for 'i' in showmode(), so this bug was fixed with <C-W>
(though this patch now changes <C-W> to use 'A').

However, the missing changes I ported for v8.1.0036 use 'A' when a callback
leaves the window in insert mode and edit gets restarted, so this bug was
possible there.

Modify showmode() restart_edit condition to match v8.2.1978:
957cf67d50
2021-12-07 11:34:26 +00:00
b9ab4c1dea vim-patch:8.1.0042: if omni completion opens a window Insert mode is stopped
Problem:    If omni completion opens a window Insert mode is stopped.
            (Hirohito Higashi)
Solution:   Only set stop_insert_mode in a prompt buffer window.
f98b845dd1

popupmenu_spec.lua fails without this.
2021-12-07 11:34:26 +00:00
d6ea0741c9 fix(prompt): add missing changes from v8.1.0036
v8.1.0036 is already marked as ported, but missed out changes that depended on v8.1.0035.
2021-12-07 11:34:26 +00:00
28134f4e78 vim-patch:8.1.0035: not easy to switch between prompt buffer and other windows
Problem:    Not easy to switch between prompt buffer and other windows.
Solution:   Accept CTRL-W commands in Insert mode.  Start and stop Insert mode
            as one would expect.
6d41c78e35

Cherry-pick channel.txt change from:
d2f3a8b878

b_prompt_insert was already ported.
2021-12-07 11:34:24 +00:00
05f9f63f24 fix: don't use cfsetspeed, use i and o variants
cfsetspeed is not available on SunOS, use cfsetispeed and cfsetospeed
instead.
2021-12-07 09:56:25 +01:00
435dd04bdb fix: don't include pty.h on SunOS 2021-12-07 09:56:02 +01:00
afaad8b54e Merge pull request #16194 from seandewar/vim-8.1.1925
vim-patch:7.4.1777,8.1.{1925,1995,2011,2012,2013,2166},8.2.{0532,0871,1168,1241,3576}
2021-12-07 01:14:21 -05:00
bf9e8a9df9 Merge pull request #16546 from zeertzjq/vim-8.1.1797
vim-patch:8.1.{1797,1798}: the vgetorpeek() function is too long
2021-12-07 00:15:04 -05:00
18d81a6724 Merge pull request #16107 from zeertzjq/vim-8.1.1542
vim-patch:8.1.1542,8.2.3549: an OptionSet autocommand does not get enough info
2021-12-06 22:35:05 -05:00
67d3c98dac vim-patch:8.1.2104: the normal.c file is too big (#16389)
Problem:    The normal.c file is too big.
Solution:   Move do_pending_operator() to ops.c. (Yegappan Lakshmanan,
            closes vim/vim#4999).
792cf5e1be
2021-12-06 21:45:30 -05:00
afdd9c19aa refactor: fix indent in decode.c (#16543) 2021-12-06 21:23:52 -05:00
296eb7203c vim-patch:8.1.1798: warning for unused variable in tiny version
Problem:    Warning for unused variable in tiny version. (Tony Mechelynck)
Solution:   Move inside #ifdef.  Reformat code.
eda35f7127
2021-12-07 06:47:33 +08:00
95a5912158 vim-patch:8.1.1797: the vgetorpeek() function is too long
Problem:    The vgetorpeek() function is too long.
Solution:   Split off the part that handles mappings, with fix.
edd680f364
2021-12-07 06:47:33 +08:00
8f1fdbc54a fix: add STRNLEN compatability macro
Older SunOS systems come without strnlen, add STRNLEN macro in line with
the other str* compat macros.
2021-12-06 17:34:26 +01:00
0a3826646f vim-patch:4700398e384f (#16538)
Update runtime files
4700398e38

partial skip:
doc/sign.txt
doc/various.txt
doc/motion.txt
2021-12-06 13:55:38 +01:00
8fdf1b265d fix: define NAME_MAX from _XOPEN_NAME_MAX
On SunOS NAME_MAX is not defined, _XOPEN_NAME_MAX is so fall back to
defining NAME_MAX from _XOPEN_NAME_MAX.
2021-12-06 09:19:24 +01:00
b8ae43dd24 fix: skip libutil on SunOS
libutil is not available on Solaris variants, even on Solaris 11 where
forkpty is available.
2021-12-06 08:18:02 +01:00
523f03b506 lint (#16526) 2021-12-05 23:33:22 -05:00
4306b395de refactor: format diagnostic.lua (#16540) 2021-12-05 19:42:31 -07:00
62f0157853 fix(diagnostic): escape special chars in file names (#16527)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
2021-12-05 19:39:00 -07:00
24f9463dd0 refactor: remove unused runtime lua functions (#16535) 2021-12-05 19:11:20 +01:00
9b65a7e064 docs(lsp): re-add client.requests documentation (#16530)
Closes #16528

Added in this PR: d1c470957b (diff-6b5f3071d65558aab177912061ac6a2f5312660655a449276c83697686f28e72R627)

Removed by regeneration in this PR: 2d340a3746 (diff-6b5f3071d65558aab177912061ac6a2f5312660655a449276c83697686f28e72L631)
2021-12-05 14:04:53 +01:00
c5af86b9b9 ci: remove "brew upgrade" from macos jobs
Packages are automatically upgraded on install. This will avoid
upgrading unrelated packages, cutting the macos job time to about a
half.
2021-12-04 23:44:52 +01:00
1e6eeca9d1 Merge pull request #15996 from gpanders/nvim_get_option_value
feat(api): add nvim_{get,set}_option_value
2021-12-04 14:30:27 -07:00
222ef0c00d feat(lsp,diagnostic): open folds in jump-related functions (#16520) 2021-12-04 22:14:38 +01:00
71ac00ccb5 feat(api): add nvim_get_option_value 2021-12-04 14:04:23 -07:00
7b910a1716 chore: bump API version 2021-12-04 14:04:23 -07:00
8dcf45c824 Merge pull request #16518 from dundargoc/ci/use-latest-versions
ci: use tag v2 when using checkout action
2021-12-04 12:50:55 -05:00
8cd1fa8945 ci: use tag v2 when using checkout action
Using v2 automatically fetches the latest minor patch for v2, meaning
free bug fixes without needing to manually update the tag version.
2021-12-04 13:24:46 +01:00
76af219e3e Merge pull request #16411 from dundargoc/refactor/upgrade-uncrustify
refactor: upgrade uncrustify config version to 0.74.0
2021-12-04 12:31:42 +01:00
2ccf6567b7 vim-patch:8.2.3730: "/etc/Muttrc.d/README" gets filetype muttrc (#16515)
Problem:    "/etc/Muttrc.d/README" gets filetype muttrc.
Solution:   Move the Muttrc.d pattern down, add exception for *.rc files.
800b01b0c8
2021-12-04 12:26:37 +01:00
419e0d117d vim-patch:8.2.3729: no support for squirrels (#16513)
Problem:    No support for squirrels. (closes vim/vim#9259)
Solution:   Recognize nuts.
6f42cb6e51
2021-12-03 19:51:30 +01:00
e225397bcb vim-patch:8.2.3726: README file in a config directory gets wrong filetype (#16507)
Problem:    README file in a config directory gets wrong filetype.
Solution:   Match README before patterns that match everything in a directory.
c903695be5
2021-12-03 13:19:17 +01:00
4e352ecc42 Merge pull request #16489 from zeertzjq/patch-1
[skip ci]
2021-12-02 10:33:42 -05:00
cef21e5592 Merge pull request #16408 from jamessan/rm-legacy-test 2021-12-02 10:31:40 -05:00
254c22afc3 fix(diagnostic): clamp diagnostics on negative line numbers (#16496)
Closes https://github.com/neovim/neovim/issues/16492

Despite having logic for setting the maximum diagnostic line
number to at minimum 0, previously the conditional statement only
checked if lnum and end_lnum were greater than the line count.

Fix: also check if lnum and end_lnum are less than 0.
2021-12-02 06:38:44 -08:00
0f82deb2c5 docs(CONTRIBUTING.md): use gh instead of hub; correct uncrustify link 2021-12-02 08:28:05 +08:00
73b35ef10f chore: add default luarc.json for Lua development (#16487)
The Sumneko Lua language server has matured quite a bit and many
Neovim developers use it while working on Neovim. Having a default
configuration for Neovim development is a nice convenience (and
dovetails well with the auto-generated compile_command.json for C
development).

The file is shipped under `contrib` and users can make use of it by
symlinking to `.luarc.json` in the project root.
2021-12-01 12:09:50 -07:00
99f6260f84 fix(diagnostic): set effective buffer number for DiagnosticChanged autocmd (#16474)
This enables use of <abuf> in autocommand handlers for
DiagnosticChanged.
2021-12-01 07:27:17 -07:00
195aec453a chore: remove legacy/059_utf8_spell_checking.vim
The legacy test was converted to a new style Vim test in
8b81218300.
2021-11-30 23:00:48 -05:00
d3585e0ec5 Merge pull request #16478 from jamessan/fragile-server-notifications-test
test(api): mark "notify cancels stale events on channel close" fragile
2021-11-30 22:39:14 -05:00
dd3fe86bbf Merge pull request #16477 from jamessan/backport-action
fix(ci/backport): check for event_name == "pull_request_target"
2021-11-30 22:31:58 -05:00
4342b81e8d test(api): mark "notify cancels stale events on channel close" fragile
This is already skipped in all CI environments, so it should also be
skipped in environments that don't like fragile tests.  Since there's no
convenient way to express these concisely, add the explicit fragile
skip.
2021-11-30 22:27:34 -05:00
50c8cc3020 fix(ci/backport): check for event_name == "pull_request_target"
[skip ci]
2021-11-30 22:20:32 -05:00
828bf128a6 Merge pull request #15840 from vimpostor/vim-8.2.3430
vim-patch:8.2.{3430,3434,3462,3463,3555,3609,3610}: ModeChanged autocmd
2021-11-30 22:13:50 -05:00
2635b77dba Merge pull request #16420 from seandewar/vim-8.1.2136
vim-patch:8.1.2136,8.2.2465
2021-11-30 21:39:22 -05:00
36565c9da2 vim-patch:8.2.2350: using "void" for no reason (#16410)
Problem:    Using "void" for no reason.
Solution:   Use "char *".
033135eb8e
2021-11-30 21:34:33 -05:00
730a9514dc fix(lsp): progress handlers should return vim.NIL on error (#16472) 2021-11-30 21:26:14 -05:00
8ae7dabc10 Merge pull request #16381 from VVKot/vim-8.1.0228
vim-patch:8.1.0228, 8.1.1384, 8.1.1386, 8.1.1393, 8.2.3040
2021-11-30 21:21:36 -05:00
7229afcd60 version bump 2021-11-30 18:38:40 +01:00
e65b724451 NVIM 0.6.0
BREAKING CHANGES

* 32-bit windows builds are no longer provided.

* **build deps**: use libuv 1.42.0 upstream for WIN32 (#15889) (f6c0a37), closes #15889
  * removes Windows 7 support
  * removes support for mouse and alternate buffers in TUI for Windows 8 and 8.1

* **lsp/diagnostic:** highlight groups and signs for LSP diagnostics renamed (e.g. `LspDiagnosticsDefaultWarning` to `DiagnosticWarn`) (a5bbb93)

* **diagnostic:** make DiagnosticChanged a first class autocmd (#16098) (150a592), closes #16098
  * `au User LspDiagnosticsChanged` autocommands are not supported. Use the new first-class DiagnosticChanged event instead.

* **lua**: `register_keystroke_callback` => `on_key` (#15460) (69fe427)
  * **note**: this breaking change was included in 0.5.1

FEATURES

* **:source, nvim_exec:** defer script item creation until s:var access (da9b0ab)
* **:source, nvim_exec:** support script-local variables (d4ed51e), closes #13143 #11507
* **lua:** add trimempty optional parameter to vim.split (5fa26e2)
* **lua:** add vim.str_utf_{start,end} (#16129) (2230b57)
* **lua:** add vim.str_utf_pos function (d752cbc)
* **lsp:** aggregate code actions from all clients (#15121) (c36df20)
* **api:** add lua C bindings for xdiff (#14536) (3d3c0c6)
* **api:** evaluate statusline string #16020 (9086938)
* **api:** named marks set, get, delete #15346 (49fdc62)
* **api:** nvim_get_chan_info: include "argv" for jobs #15537 (0603eba), closes #15440
* **api:** win_viewport also sends line_count #15613 (086631c)
* **api:** support :terminal input callback in lua (9e41e82)
* **ci:** add backport PR action (#14766) (6cc456d)
* **decorations:** allow more than one stacked highlight in a virt_text (1495d36)
* **decorations:** support virtual lines (392c658) (8d7816c)
* **diagnostic:** move vim.lsp.diagnostic to vim.diagostic and support other sources (a5bbb93)
* **diagnostic:** add 'prefix' option to open_float (#16321) (3c74ba4)
* **diagnostic:** add option to include diagnostic source (d43151e)
* **diagnostic:** allow 'prefix' option to return highlight (cc48837)
* **diagnostic:** allow customized diagnostic messages (#15742) (d999c96)
* **diagnostic:** match(), tolist(), fromlist() #15704 (e61ea77)
* **diagnostic:** update jumplist on goto_next/prev (#15942) (b55944e)
* **diagnostic:** use `scope = 'line'` by default for `open_float()` (#16456) (217f9f8), closes #16453
* **diagnostic:** support severity_sort (32c0631)
* **checkhealth:** provide function for command line completion (8b43b07)
* **f_chansend:** support Blob data argument (7e9ea08)
* **job:** add parameter to close stdin (eb7f24b)
* **keywordprg:** use :terminal for external commands #15398 (a90513c), closes #2995 #2761
* **lsp:** add 'focus' option to open_floating_preview (#16465) (fff8827)
* **lsp:** add a registry for client side code action commands (6c03601)
* **lsp:** add client command support to codelens (#15820) (19a77cd)
* **lsp:** add codeAction/resolve support (#15818) (ec4731d)
* **lsp:** add exit_timeout flag (#16070) (80456cf)
* **lsp:** add formatexpr (#16186) (52fa1d2)
* **lsp:** add lsp healthcheck (e268026)
* **lsp:** add per-client commands (#16101) (519d8de)
* **lsp:** add tagfunc (#16103) (f940e7a)
* **lsp:** add warning message for large log size (e6777a7)
* **lsp:** allow configuring zindex for floating windows (#15086) (c487a73)
* **lsp:** allow diagnostics to be disabled for a buffer (#15134) (1aeb945)
* **lsp:** allow root_dir to be nil (#15430) (ff0833c)
* **lsp:** highlight active parameter in signature help (#15018) (af26371)
* **lsp:** improve vim.lsp.util.apply_text_edits (#15561) (41cfba6)
* **lsp:** include original request params in handler ctx (187579f)
* **lsp:** jump to diagnostics by position (#14795) (ea39ff5)
* **lsp:** Make line diagnostics display prettier (e43dbfd)
* **lsp:** make list handlers configurable (#15199) (3e00d4f)
* **lsp:** support textDocument/prepareRename (#15514) (c1f573f)
* **lsp:** use uv_spawn to check if server executable (#16430) (1a60580)
* **lsp:** use vim.ui.select() in codelenses (#16004) (e7ea54a)
* **lsp:** utilize textEdit.range for startbyte in omnifunc (#15957) (e9d6f7c)
* **lua:** add lua-cjson as vendored dependency (8decc9f)
* **lua:** add vim.mpack for msgpack support in lua (eaf661d)
* **lua:** allow passing handles to vim.b/w/t (6c5e7bd)
* **lua:** convert binary string with NULs to Blob (de9df82)
* **lua:** document support of packages with v:lua syntax (9dd371b)
* **lua:** enable stack traces in error output (#16228) (03b805a)
* **lua:** expose lua-cjson as vim.json (30fed27)
* **lua:** make vim.mpack support vim.NIL and vim.empty_dict() (0f59666)
* **match:** allow hl group to be defined after :match command (fca52f5)
* **msgpack:** convert Blobs to BIN strings (af6f454)
* **health:** support lua healthchecks (9249dcd), closes #15632
* **shada:** restore Blob globals properly (ef729fb)
* **terminal:** TermClose: set exit code in v:event.status #15406 (50b30de), closes #4713
* **treesitter:** add next, prev sibling method (1400841)
* **treesitter:** allow to set highlight priority for queries (242608e)
* **ui:** add `opt.kind` to `vim.ui.select` (#15838) (7ae86c1)
* **ui:** add vim.ui.input and use in lsp rename (#15959) (16d4af6)
* **ui:** add vim.ui.select and use in code actions (#15771) (63fde08)
* **vim script:** support calling v:lua as a method (b2994e3)

CHANGES

* **defaults:** auto-create backup dir (4600193)
* **defaults:** inccommand=nosplit #15395 (7215d35)
* **defaults:** set undo points in <C-U> and <C-W> (#15400) (2cb8db3)
* **defaults:** limit syntax cost on CmdwinEnter #15401 (622a36b), closes #6289 #6399
* **defaults:** map CTRL-L to search highlights, update diffs #15385 (0aa8128)
* **defaults:** map Y to y$ #13268 (5a111c1), closes #416 #6289
* **defaults:** remove 'options' from viewoptions #15397 (3954537), closes #6289
* **defaults:** set hidden (f6c72b7)
* **defaults:** set nojoinspaces (d417e67)
* **defaults:** switchbuf=uselast #15394 (4ba7495)
* **runtime:** add packages as `"/pack/*/start/*"` patterns to &rtp (9df7e02)
* **startup:** load builtin plugins with --clean #15893 (c7a63f3), closes #15605
* **terminal:** set cursorlineopt=number in terminal mode (#15493) (c61a386)
* **window:** skip non-focusable floats for :windo (#15378) (e8631cb)

PERFORMANCE IMPROVEMENTS

* **api:** avoid spurious allocations when converting small objects (705e8f1)
* **highlight:** use a hashtable for highlight group names (bb4b4d7)
* **lua:** optimize vim.deep_equal #15236 (4b452d4)
* **lua:** don't use regexes inside lua require'mod' (ea2023f), closes #15147 #15497
* **lsp:** improve json deserialization performance (#15854) (912a6e5)
* **map:** reduce double pointer indirection to single pointer indirection (9e651a9)
* **treesitter:** avoid string lookup of highlight name in hot loop (2460f0a)

FIXES

* **:source, nvim_exec:** handle Vimscript line continuations #14809 (6188926), closes #14807
* **:source:** copy curbuf lines to memory before sourcing #15111 (afdc9e6)
* allow str_utfindex second argument to be an explicit nil  (#16448) (512ec46)
* **api:** fix crash after set_option_value_for() #15390 (8b0e6cc), closes #14097 #13577
* **api:** fix nvim_buf_set_extmark (2338345)
* **autocmd:** fix conditions in block_autocmds, unblock_autocmds #15372 (29712ae), closes #6279
* **buffer_updates:** cleanup test behavior (54b2c68)
* **buffer_updates:** handle :delete of the very last line in buffer (8335e26)
* **buffer_updates:** handle :sort of already sorted buffer (ef687d3)
* **buffer_updates:** make `lockmarks` not affect extmarks and buffer updates. fixes #12861 (7d171b1)
* **bufupdates:** send correct updates for visual paste (1423146)
* **build:** add an env var to re-enable the colors (5087347)
* **build:** call find_package(Threads) before using its variables (f446ab3)
* **build:** export symbols on Windows (aa644b7)
* **build:** fix build failure in MinGW (0503e17)
* **build:** make vendored libmpack and libmpack-lua build properly (2a08aef)
* **channel:** throw error if sending to internal channel w/o terminal (3b89fee)
* **checkhealth:** duplicate checks if module name has "-" #15935 (a36c6e5)
* **checkhealth:** mitigate issues with duplicate healthchecks #15919 (acd5e83), closes #15259
* **ci:** disable broken test on openbsd on all CI due to resource constraints (a3e2636)
* **ci:** re-run GHA for ready_for_review events (#15377) (c6ef956)
* **decorations:** crash when :bdelete (extmark_free_all) after clear_namespace (cd353aa), closes #15212
* **defaults:** "syntax sync maxlines=1" on CmdwinEnter #15552 (5f8518b), closes #15401
* **defaults:** do not map Y in visual-mode #15387 (54726e8), closes #13268
* **diagnostic:** allow floats to be focusable (#16093) (427bac6)
* **diagnostic:** change default severity_sort order (938ed45)
* **diagnostic:** clamp line numbers in setqflist and setloclist (5b0d8f8)
* **diagnostic:** correctly handle folder level diagnostics (f87779a)
* **diagnostic:** deepcopy diagnostics before clamping line numbers (2abc799)
* **diagnostic:** do not focus floats in goto functions (#16433) (b5b025f)
* **diagnostic:** don't clamp line numbers in setqflist (0341c68)
* **diagnostic:** don't return nil when callers expect a table (#15765) (057606e)
* **diagnostic:** don't use nil col if missing from qflist (#16357) (5e46f64)
* **diagnostic:** error on invalid severity value (#15965) (d5dd0aa)
* **diagnostic:** fix navigation with diagnostics placed past end of line (34bb5fa)
* **diagnostic:** fix option resolution in open_float (#16229) (fd34784)
* **diagnostic:** fix wrong data type in setqflist() (3fd1450)
* **diagnostic:** get line count per buffer when clamping (c59f200)
* **diagnostic:** handle an unknown or missing client (#16242) (1fdbd29)
* **diagnostic:** handle diagnostics placed past the end of line (#16095) (a2994c8)
* **diagnostic:** make set() go through cache when calling show() (d93f47d)
* **diagnostic:** only update decorations for loaded buffers (#15715) (924e8e4)
* **diagnostic:** preserve fields from LSP diagnostics via user_data (#15735) (17b7968)
* **diagnostic:** remove useless highlight links (#15683) (c13242c), closes #15585
* disable clipboard when test registers (dd63d93)
* **docgen:** add tagfunc.lua (0746f00)
* **doc:** various fixes #15604 (4eb1ebb)
* **eval:** add the vimscript-1 feature to has() (18b32fc)
* **eval:** checking for a non-empty string is too strict (#15987) (1dbbaf8)
* **eval:** fix has('wsl') #16153 (16d06fa), closes #12642 #16143
* **eval:** fixup for empty modifier in fnamemodify (#16368) (a7ad509), closes #16367
* **extmark:** fix missing virt_lines when using id param of set_extmark (995dbd2)
* **extmarks:** splice extmarks on nv_Undo #15920 (e069361)
* **fileio:** replace characters over INT_MAX with U+FFFD (#16354) (a2e5c2f), closes #11877
* **float:** fix potential heap corruption in win_redr_border (de670f3)
* **float:** redraw if w_border_adj changed (7ff1bc1)
* **heath/provider.vim:** using list as string #16007 (5365f24), closes #15988
* **highlight:** remove syncolor.vim, always include syntax colors (9afa0d2), closes #15176 #12573 #15205
* **inccommand:** ignore trailing commands only for *previewed* command #15638 (1f8c91b), closes #8796 #7494
* include ci/ in exported tarball (d6f03aa), closes #15856
* **input:** never reinterpret unmapped ALT- chrods in Terminal mode (#16222) (5ce35ab)
* **input:** resolve isolated (non-ALT/META) mappings #13109 (c4857b6), closes #13042 #13086 #15869
* **jobwait:** always drain process event queues #15402 (3c081d0), closes #15349
* **lsp_spec:** tests depended on previous session (069d1de)
* **lsp:** accept file URIs without a hostname (a2c2a08)
* **lsp:** add done flag to messages returned in util.get_progress_messages() (#15985) (45fa70a)
* **lsp:** add placeholder cancel function (#16189) (4da0351)
* **lsp:** add textDocument/prepareRename to capability map (#15961) (fcc11d5), closes #15899
* **lsp:** adjust legacy show diagnostic functions to use correct scope (#16106) (dc6c9fe)
* **lsp:** allow diagnostic.clear to accept nil bufnr (#15137) (4ed2d4f)
* **lsp:** avoid duplicates in client attached buffers (#16099) (c5525f2)
* **lsp:** avoid serializing boolean as key (#15810) (96614f8)
* **lsp:** change rpc start notify level to warn (#16467) (04c7b55)
* **lsp:** change signature of buf_highlight_references (#16345) (eb3d591)
* **lsp:** correctly parse LSP snippets #15579 (516775e), closes #15522
* **lsp:** default to UTF-16 in make_position_params (2e3a474)
* **lsp:** do not index nil client in progress (#16262) (8f31b21)
* **lsp:** do not invoke handlers for unsupported methods (#15926) (d288daa)
* **lsp:** don't update active_clients on exit_timeout (#16192) (98f5782)
* **lsp:** enable additional capabilities (#15470) (5d63354)
* **lsp:** ensure buffers are re-attached on rename (#16266) (ee3a58d)
* **lsp:** Ensure users get feedback on references/symbols errors or empty results (256570a)
* **lsp:** expose ContentModified error code to callbacks (#15262) (3f09732)
* **lsp:** fix cursor row after textEdits (#16038) (bd2f61c)
* **lsp:** gracefully handle nil workspaceFolders (#16284) (0ecc58c)
* **lsp:** guard textDocument/codeAction command logic #15769 (433bda4)
* **lsp:** improve symbols_to_items performance (#16197) (5ad15c9)
* **lsp:** Include client name in handler error messages (#15227) (24f2b9e)
* **lsp:** pass bufnr for async formatting (#15084) (c31bc6e)
* **lsp:** persist diagnostic config for clients (bcc9ba5)
* **lsp:** prevent double <text> for cached plaintext markup (910967e)
* **lsp:** restore diagnostics extmarks on buffer changes (#15011) (77b33e4)
* **lsp:** rewrite incremental sync (#16252) (2ecf0a4)
* **lsp:** send buffer contents joined on fileformat-specific linebreak (#16334) (134a638)
* **lsp:** send textDocument/didChange for each buffer (#16431) (3451121)
* **lsp:** support duplicate params in signature help (#15032) (9132b76)
* **lsp:** update lsp-handler signature in call_hierarchy (#15738) (8164adc)
* **lsp:** update workspace/applyEdit handler signature (#15573) (3f526fe)
* **lua:** fix vim.deepcopy for metatables & cycled tables (#16435) (eb876a0)
* **lua:** preserve argument lists which are not lists (6896d22)
* **man.vim:** ensure buftype=nofile after :tag or :stag #15675 (29bc648), closes #15650
* **man.vim:** filetype=man is too eager #15488 (2548a9e), closes #15487 #15487
* **mouse:** fix mouse drag positions on multigrid #12667 (0dcfd0e), closes #15091
* **mouse:** correct dragged position in composed layout (810da1a)
* **multigrid:** mouse events crash neovim (28ac6c0)
* **nvim_open_win:** crash if autocmds delete buffer/window #15549 (0c06da1), closes #15548
* **options:** using :set fillchars should clear local value (7528bce)
* prevent K_EVENT from stopping Select mode CTRL-O #15688 (5f144ef)
* **provider:** compare versions as number, not string (python 3.10 support) #15937 (e16adbf), closes #14586
* **screen:** make display_tick monotonic up to 2^64. fixes #16152 (9e88c9c)
* **screen:** missing search highlights when redrawing from timer #15380 (db695cc), closes #13074 #14064
* **shared:** do not treat empty tables as list in deep extend (#15094) (526fc60)
* **sign:** reset auto sign column with minimum in float win minimal style (c8f57f6)
* **startup:** init.lua: set $MYVIMRC to absolute path #15748 (c76cddf)
* **termdebug:** replace mapset with nvim_set_keymap (#15699) (4d7dcbe)
* **termdebug:** replace term_getline with getbufline #15598 (11289ad)
* **terminal:** close without ! if the job is stopped (55defa1), closes #4683
* **terminal:** free terminal if close_buffer() closes a closed terminal (#16264) (14def4d)
* **test/dumplog:** tostring(rv) before formatting as string (ddaa0cc)
* **tests:** use isolated XDG_DATA_HOME in startup tests (8e663e2)
* **treesitter:** do not map hl_group when no mapping is set (f489d98)
* **treesitter:** run predicates more often in iter_matches (458f2aa)
* **tui:** extend smglr ignores to smglp and smgrp (#16239) (3ba800f)
* **tui:** remove obsolete $NVIM detection #15791 (4414584), closes #12937 #11390
* **tutor:** formatting, layout #15098 (c52ec8f), closes #15088
* **ui:** use nowait for q mapping in floating window (#16427) (c132144)
* **v:lua:** fix emsg when calling v:lua directly (da9005a)
* **vim-patch.sh:** run nvim with -u NONE -n #16179 (97ae0ab)
* **vim.opt:** vimL map string values not trimmed (#14982) (4906156)
* **window:** win_close from other tabpage #15454 (90b2da1), closes #15313
* **windowing:** positioning of relative floats (9065730)
2021-11-30 18:20:42 +01:00
caf41a7ac9 vim-patch:8.2.3703: most people call F# "fsharp" and not "fs" (#16469)
Problem:    Most people call F# "fsharp" and not "fs".
Solution:   Rename filetype "fs" to "fsharp".
53ba95e4f0
2021-11-30 14:51:17 +01:00
04c7b55038 fix(lsp): change rpc start notify level to warn (#16467)
This is less obtrusive, and does not require a confirmation to dismiss
2021-11-30 09:55:42 +01:00
f5fb79733e Merge pull request #16460 from dundargoc/chore/typos
chore: fix typos
2021-11-30 09:28:50 +01:00
d0fbbea62a docs(lsp): do not use nvim_command for Vimscript examples
The examples are relevant and applicable for both Lua and Vimscript
configurations and the `vim.api.nvim_command` prefixes just add noise
that doesn't contribute to the example.
2021-11-30 09:03:41 +01:00
5a24c2c83d docs(lsp): do not use | as argument separator
This translates into a tag in the help doc.
2021-11-30 09:03:41 +01:00
b6e531c1d9 docs(lsp): add annotations for private functions 2021-11-30 09:03:41 +01:00
bc1d13bb36 chore: fix typos
Co-authored-by: ii14 <ii14@users.noreply.github.com>
2021-11-30 09:03:41 +01:00
fff8827908 feat(lsp): add 'focus' option to open_floating_preview (#16465)
When the 'focusable' and 'focus_id' parameters are set,
`open_floating_preview` assumes that it should always move focus to an
existing floating window with the same 'focus_id'. However, there are
cases where we want to make a floating window focusable, but do not want
to focus it upon calling `open_floating_preview`. To distinguish these
cases, add a boolean parameter 'focus' that, when false, prevents
moving focus.
2021-11-29 15:37:55 -07:00
b16b7021ef fix(lsp): do not attempt to index nil client in progress handler (#16463) 2021-11-29 10:03:57 +01:00
6e70b7b31d docs: regenerate (#16461) 2021-11-28 10:47:37 -07:00
217f9f8d1e feat(diagnostic): use scope = 'line' by default for open_float() (#16456)
Closes #16453

Co-authored-by: Cédric Barreteau <cbarrete@users.noreply.github.com>
2021-11-28 09:42:29 -07:00
e4976cbd26 Merge pull request #16452 from clason/vim-8.2.3685
vim-patch:8.2.{3451,3458,3452,3685,3686}: some filetypes are not recognized correctly
2021-11-28 11:57:07 +01:00
1840c82b42 Merge pull request #16451 from clason/vim-8.2.3684
vim-patch:8.2.{3684,3687}: blockwise insert does not handle autoindent properly
2021-11-28 11:47:07 +01:00
2f8ed7b822 vim-patch:8.2.3687: blockwise insert does not handle autoindent properly
Problem:    Blockwise insert does not handle autoindent properly when tab is
            inserted.
Solution:   Adjust text column for indent before computing column.
            (closes vim/vim#9229)
59f4f9505a
2021-11-28 00:47:14 +01:00
07223fae54 Merge pull request #16455 from gpanders/diag-set 2021-11-27 13:11:41 -07:00
6e30461cea test(diagnostic): diagnostics passed to set() should be an array 2021-11-27 12:47:03 -07:00
d93f47dc83 fix(diagnostic): make set() go through cache when calling show()
When `vim.diagnostic.set()` is called, the diagnostics passed to it are
added to the diagnostic cache. `set()` then calls `show()` and passes
those diagnostics along exactly as they were given to `set()`. However,
we sometimes want to do some kind of post-processing on diagnostics when
they come out of the cache, e.g. clamping line numbers. By forwarding
the diagnostics to `show()` verbatim, `set()` skips this post-processing
which can cause other bugs downstream.

Instead of passing the diagnostics directly, make the `show()` call from
within `set()` retrieve diagnostics from the cache. In general, all
diagnostics operations should follow the pattern of "producers put
things in the cache" and "consumers get things out of the cache" and
this change better adheres to that pattern.
2021-11-27 12:32:40 -07:00
03d250eb45 vim-patch:6304be625ce4 (#16450)
Update runtime files.
6304be625c

skip doc/sign.txt (needs 8.2.3664)
2021-11-27 19:39:42 +01:00
ea5699399e vim-patch:8.2.3686: filetype detection often mixes up Forth and F#
Problem:    Filetype detection often mixes up Forth and F#.
Solution:   Add a function to inspect the file contents. (Doug Kearns)
3d14c0f2b9
2021-11-27 19:21:57 +01:00
b51b0aecc9 docs: regenerate (#16390)
Co-authored-by: marvim <marvim@users.noreply.github.com>
2021-11-27 11:26:49 -05:00
caa6992a10 chore: fix typos (#16361)
Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: István Donkó <istvan.donko@gmail.com>
Co-authored-by: Julian Berman <Julian@GrayVines.com>
Co-authored-by: bryant <bryant@users.noreply.github.com>
Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com>
Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com>
Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com>
Co-authored-by: Jesse Wertheim <jaawerth@gmail.com>
Co-authored-by: dm1try <me@dmitry.it>
Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl>
Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com>
Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: István Donkó <istvan.donko@gmail.com>
Co-authored-by: Julian Berman <Julian@GrayVines.com>
Co-authored-by: bryant <bryant@users.noreply.github.com>
Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com>
Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com>
Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com>
Co-authored-by: Jesse Wertheim <jaawerth@gmail.com>
Co-authored-by: dm1try <me@dmitry.it>
Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl>
Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com>
2021-11-27 11:10:48 -05:00
b339cb5aca vim-patch:8.2.3451: not all apache files are recognized
Problem:    Not all apache files are recognized.
Solution:   Adjust the filetype pattern. (Zdenek Dohnal, closes vim/vim#8882)
770ddbe159
2021-11-27 16:26:33 +01:00
47ad1a3584 vim-patch:8.2.3458: not all dictdconf files are recognized
Problem:    Not all dictdconf files are recognized.
Solution:   Adjust the pattern. (Doug Kearns)
be01090efa
2021-11-27 16:26:20 +01:00
c1c5676021 vim-patch:8.2.3452: MPD files are not recognized
Problem:    MPD files are not recognized.
Solution:   Recognize MPD files as XML. (Steven Penny, closes vim/vim#8893)
690c524ce6
2021-11-27 16:24:05 +01:00
b156ffedb6 vim-patch:8.2.3685: Visual studio project files are not recognized
Problem:    Visual studio project files are not recognized.
Solution:   Use the xml file type. (Doug Kearns)
c07f11e42f
2021-11-27 16:23:19 +01:00
512ec4632f fix: allow str_utfindex second argument to be an explicit nil (#16448)
* str_utfindex checks number of arguments only, but ignores the case in
  which the second argument is an explicit nil. Previously this required
  dropping the second argument entirely.
* Modify the C binding to explicitly check if the second argument is nil
2021-11-27 10:07:58 -05:00
a8dd1ea011 vim-patch:8.2.3684: blockwise insert does not handle autoindent properly
Problem:    Blockwise insert does not handle autoindent properly.
Solution:   Adjust text column for indent. (closes vim/vim#9229)
e9b0b40b79
2021-11-27 14:55:40 +01:00
6e3e8c51c0 test(oldtest): uncomment method call syntax uses
We should now be equal with Vim in regards to method call support of already ported built-ins.

Enable all relevant commented-out uses of the syntax in tests that I could grep.
2021-11-26 18:53:12 +00:00
752ca2cb9f fix(eval/method): add missing method support for existing built-ins
These functions were ported with the vim-patch token, but didn't actually port
the method call support that was in their patches (method call syntax wasn't
ported yet).

Add the missing method call support and latest docs for:
 - assert_nobeep:
   5b8cabfef7
 - buffer_name, buffer_number: (obsolete)
   a8eee21e75
 - charidx:
   17793ef23a
 - flatten:
   077a1e670a
 - prompt_getprompt:
   077cc7aa0e
 - searchcount:
   e8f5ec0d30
 - strptime:
   10455d43fe
 - win_gettype:
   00f3b4e007
 - win_splitmove:
   d20dcb3d01

Also fix assert_beeps, assert_nobeep and getenv to accept exactly one argument.
Previously, they could erroneously accept one or more.
2021-11-26 18:53:12 +00:00
7e1a2301ff docs(eval): cherry-pick runtime update 2e693a88b2
2e693a88b2

Mainly to keep the method call docs up-to-date.
Much of this RT update has already been ported.
2021-11-26 18:53:12 +00:00
a0c7fff284 vim-patch:8.2.1241: cannot use getbufinfo() as a method
Problem:    Cannot use getbufinfo() as a method.
Solution:   Support using getbufinfo() as a method. (closes vim/vim#6458)
6434fc574d
2021-11-26 18:53:12 +00:00
2c185a18cd vim-patch:8.2.1168: wrong method argument for appendbufline()
Problem:    Wrong method argument for appendbufline().
Solution:   Use FEARG_3.
92053ce59e

Cherry-pick base change for append (and appendbufline) from v8.2.1167.
These changes have no visible impact, but helps us sync with Vim.

Like Vim, BASE_LAST is now unused after this commit.
Keep it anyway in case it sees use in the future.
Comment-out LAST definition in eval.lua to appease linter.
2021-11-26 18:53:11 +00:00
6bc9af43ce vim-patch:8.2.0871: cannot use getmarklist() as a method
Problem:    Cannot use getmarklist() as a method.
Solution:   Make getmarklist() work as a method.  Add one to the column
            number to match getpos(). (Yegappan Lakshmanan, closes vim/vim#6176)
f17e7ea67a

The rest of this patch was ported in:
a1ed941a78
2021-11-26 18:53:11 +00:00
60f0e18588 vim-patch:8.2.0532: cannot use simplify() as a method
Problem:    Cannot use simplify() as a method.
Solution:   Add FEARG_1. (closes vim/vim#5996)
7035fd9d90
2021-11-26 18:53:11 +00:00
f37f08314d vim-patch:8.1.2166: rubyeval() not tested as a method
Problem:    Rubyeval() not tested as a method.
Solution:   Change a test case.
4a4981b7cd
2021-11-26 18:53:11 +00:00
2ad92e9476 vim-patch:8.1.2013: more functions can be used as methods
Problem:    More functions can be used as methods.
Solution:   Make various functions usable as a method.
f92e58cadb

Cherry-pick s:normalize_fname for tolower test from v8.1.0894 and v8.1.1417 (even though it is
unused for now).

Fix header for win_id2tabwin in eval.txt.
2021-11-26 18:53:11 +00:00
38a831e54a vim-patch:7.4.1777
Problem:    Newly added features can escape the sandbox.
Solution:   Add checks for restricted and secure. (Yasuhiro Matsumoto)
3849992b16

timer_start is missing check_secure.

The timer callback can, for example, call a function defined from outside the sandbox that does
stuff that would be disallowed from inside the sandbox. This is usually not allowed.

Cherry-pick eval.txt change from:
68e6560b84

Required for v8.1.2013.
2021-11-26 18:53:10 +00:00
39776d1a65 vim-patch:8.1.2011: more functions can be used as methods
Problem:    More functions can be used as methods.
Solution:   Make various functions usable as a method.  Make the window
            command test faster.
ce90e36f59

test_* functions in the patch are N/A as they modify internal state.

Include test changes for test_ignore_error and test_feedinput (though they aren't run).
Other changed tests were excluded from previous patches, except test_termcodes.vim, which hasn't
been ported yet.
2021-11-26 18:53:10 +00:00
0f4510cb1a feat(eval/method): partially port v8.1.2004
Problem:    More functions can be used as methods.
Solution:   Make various functions usable as a method.
f6ed61e148

+sound is needed for sound_* functions.

Make swapinfo and swapname take exactly one argument.
Previously, they could erroneously take one or more.
2021-11-26 18:53:10 +00:00
2ee0bc09d9 feat(eval/method): partially port v8.1.1996
Problem:    More functions can be used as methods.
Solution:   Make various functions usable as a method.
aad222c9c9

Partial port as this does not include eval.txt change for listener_add.

Cherry-pick eval.txt changes for:
- bufadd from v8.1.1626:
  5ca1ac373a
- setloclist and setqflist headers from:
  b0d45e7f53

Correct eval.txt typo for settabwinvar method call (matches latest Vim).
2021-11-26 18:52:58 +00:00
aad25ae4fc vim-patch:8.1.1995: more functions can be used as methods
Problem:    More functions can be used as methods.
Solution:   Make sign functions usable as a method.
93476fd634

Make sign_placelist and sign_unplacelist accept exactly one argument.
Before, they erroneously accepted one or more arguments.
2021-11-26 18:33:59 +00:00
4efcb72bb7 feat(eval/method): partially port v8.1.1993
Problem:    More functions can be used as methods.
Solution:   Make various functions usable as a method.
196b466443

server2client requires +clientserver, which hasn't been ported yet.
The eval.txt docs and test_clientserver.vim tests for server2client already exist, so include those
changes.

test_bufline.vim: Test for setbufline requires v8.1.1189 (which was reverted in #10848).
2021-11-26 18:33:59 +00:00
fa9076f276 vim-patch:8.1.1925: more functions can be used as methods
Problem:    More functions can be used as methods.
Solution:   Make various functions usable as a method.
4c313b13fb

The rest of this patch was ported in
3137c7d635

N/A patches for version.c:

vim-patch:8.1.2012: more functions can be used as methods

Problem:    More functions can be used as methods.
Solution:   Make terminal functions usable as a method.  Fix term_getattr().
7ee80f7661

vim-patch:8.2.3576: some functions are not documented for use with a method

Problem:    Some functions are not documented for use with a method.
Solution:   Add examples.  Fix that sign_unplacelist() only takes one
            argument. (Sean Dewar, closes vim/vim#9081)
a63780b977

Addressed in the port of v8.1.1995.
2021-11-26 18:33:58 +00:00
afbf89dc01 vim-patch:8.2.3679: objc file detected as Octave (#16446)
Problem:    objc file detected as Octave. (Antony Lee)
Solution:   Detect objc by preprocessor lines. (Doug Kearns, closes vim/vim#9223,
            closes vim/vim#9220)
7329cfab36
2021-11-26 17:34:45 +01:00
7ded880227 vim-patch:8.2.3676: unused runtime file (#16441)
Problem:    Unused runtime file.
Solution:   Remove rgb.txt.
309ce25189
2021-11-26 17:16:11 +01:00
a31e7523f4 vim-patch:8.2.3677: after a put the '] mark is on the last byte (#16442)
Problem:    After a put the '] mark is on the last byte of a multi-byte
            character.
Solution:   Move it to the first byte. (closes vim/vim#9047)
4d07253a48
2021-11-26 12:16:04 +01:00
eb876a0a6f fix(lua): fix vim.deepcopy for metatables & cycled tables (#16435)
vim.deepcopy previously didn't retain metatables in copies
and caused stackoverflow on recursive tables/cycled tables this
fixes these issues
2021-11-26 11:06:43 +01:00
3451121a4e fix(lsp): send textDocument/didChange for each buffer (#16431)
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
2021-11-26 10:54:58 +01:00
102e7e7929 fix(lsp): require bufnr for apply_text_edits (#16444) 2021-11-26 10:36:37 +01:00
72d62aa6aa chore(docs): clarify vim.notify log_level parameter (#16436) 2021-11-25 20:06:42 +01:00
150a5922aa feat(diagnostic)!: make DiagnosticChanged a first class autocmd (#16098)
This allows users to hook into diagnostic events with finer granularity
(e.g. per-buffer or file).

BREAKING CHANGE: DiagnosticsChanged and LspDiagnosticsChanged user
autocommands are removed.
2021-11-25 11:55:11 -07:00
1a60580925 feat(lsp): use uv_spawn to check if server executable (#16430)
Previously, the built-in language server client checked if the first
argument of cmd was executable via vim.fn.executable. This ignores PATH
injected via cmd_env. Instead, we now start the client via uv.spawn, and
handle the failure mode, reporting the error back to the user.

Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
2021-11-25 07:54:45 -05:00
6ea5e80393 Merge pull request #16434 from gpanders/diagnostic-clampage
fix(diagnostic): line clamping fixes
2021-11-25 07:28:46 -05:00
b5b025f6a3 fix(diagnostic): do not focus floats in goto functions (#16433)
Floating windows opened by `goto_next` and `goto_prev` should not be
focused when repeating the `goto_` function. The float can still be
focused by calling `open_float` with `scope = "cursor"`.
2021-11-24 21:45:42 -07:00
0341c687a3 fix(diagnostic): don't clamp line numbers in setqflist
Reverts 5b0d8f85fd.

Diagnostic producers can send diagnostics for buffers that are not
loaded, for which we cannot retrieve the line count to clamp line
numbers. This means that some diagnostics in the quickfix list could be
line-clamped and others not. The quickfix list can already handle line
numbers past the end of the buffer (i.e. it *already* clamps line
numbers) so just use the "raw" diagnostic positions sent from the
producer.
2021-11-24 20:03:48 -07:00
25ab7c6c0a test(diagnostic): uncomment equality check 2021-11-24 20:03:38 -07:00
c59f2008e0 fix(diagnostic): get line count per buffer when clamping
Fixes a bug when `get_diagnostics` is called with a nil `bufnr`.
Diagnostics should be clamped for the buffer they reside in, not the
current buffer.
2021-11-24 20:03:36 -07:00
f2722884a8 perf(lsp)!: use faster line retrieval for utf-16 to byte idx conversion (#16360) 2021-11-24 20:49:34 -05:00
c132144d24 fix(ui): use nowait for q mapping in floating window (#16427) 2021-11-24 15:57:33 -07:00
dac52e6d04 vim-patch:8.2.2465: using freed memory in :psearch
Problem:    Using freed memory in :psearch. (houyunsong)
Solution:   Check the current window is still valid.  Fix flaky test.
92bb83e41c

Test_cursorhold_insert timer's 100ms delay was already LoadAdjusted, but change
to 200ms (still LoadAdjust) to match Vim anyway.
2021-11-24 05:34:20 +00:00
a2e5c2f7c8 fix(fileio): replace characters over INT_MAX with U+FFFD (#16354)
fixes #11877
credit: @zubairabid https://github.com/neovim/neovim/pull/12010
2021-11-23 21:07:47 -07:00
c366c944c2 vim-patch:8.1.2136: using freed memory with autocmd from fuzzer
Problem:    using freed memory with autocmd from fuzzer. (Dhiraj Mishra,
            Dominique Pelle)
Solution:   Avoid using "wp" after autocommands. (closes vim/vim#5041)
ec66c41d84

Nvim doesn't use Vim's terminal implementation.
Despite this, Nvim has its own *exclusive* way of crashing here.

Requires 'winwidth' > winwidth() and 'nowinfixwidth' to crash; adjust
the test ('nowfw' is the default, but ensure its disabled anyway).
2021-11-24 03:55:02 +00:00
dd8a4e2c22 Merge pull request #16402 from clason/treesitter-bump
build(deps): bump tree-sitter,treesitter-c to v0.20.1 and adapt tests
2021-11-23 20:13:51 +01:00
5676edb86d fix(tests): adapt parser_spec test to tree-sitter bump
Change query to include anonymous nodes (`(_)` -> `[_]`) and
use new syntax (`{vim,lua}.match?`->`#{vim,lua}.match?`)
2021-11-23 18:38:22 +01:00
849f104c27 refactor: upgrade uncrustify config version to 0.74.0
Disable formatting for assert.h since there's a bug that results in a
segmentation fault in uncrustify.
2021-11-23 10:28:49 +01:00
fd6df7481a fix(diagnostic): resolve buffer number in get() (#16407) 2021-11-22 09:22:08 -07:00
e02d4732f2 fix(diagnostics): don't allow 0 bufnr for metatable index (#16405)
04bfd20bb introduced a subtle bug where using 0 as the buffer number in
the diagnostic cache resets the cache for the current buffer. This
happens because we were not checking to see if the _resolved_ buffer
number already existed in the cache; rather, when the __index metamethod
was called we assumed the index did not exist so we set its value to an
empty table. The fix for this is to check `rawget()` for the resolved
buffer number to see if the index already exists.

However, the reason this bug was introduced in the first place was
because we are simply being too clever by allowing a 0 buffer number as
the index which is automatically resolved to a real buffer number.
In the interest of minimizing metatable magic, remove this "feature" by
requiring the buffer number index to always be a valid buffer. This
ensures that the __index metamethod is only ever called for non-existing
buffers (which is what we wanted originally) as well as reduces some of
the cognitive overhead for understanding how the diagnostic cache works.
The tradeoff is that all public API functions must now resolve 0 buffer
numbers to the current buffer number.
2021-11-22 08:47:30 -07:00
33ce02ee4d fix(lsp): avoid indexing vim.NIL for null workspaceFolders (#16404)
* internally represent no workspaceFolders as nil instead of vim.NIL
* rename workspaceFolders -> workspace_folders for consistency
2021-11-22 09:52:24 -05:00
cfa5d06801 docs(man): omit misleading mention of environment for -u NORC (#16379)
The phrase referred specifically to `$VIMINIT` and `$EXRC`, which
are parsed (and available with, e.g., `echo $VIMINIT` if set) but
of course not loaded since _any_ initialization is skipped. Hence
this is redundant and can be misleading.
2021-11-22 12:00:04 +01:00
faae47eddb build(deps): also bump treesitter-c to v0.20.1 2021-11-22 11:05:24 +01:00
e6c46bac3f vim-patch:88a4205f1cfb (#16399)
Update runtime files
88a4205f1c
2021-11-22 10:53:57 +01:00
e1cea4b38d build(deps): bump tree-sitter to 0.20.1 2021-11-22 10:26:17 +01:00
419ebd8ec6 vim-patch:8.2.3549: mistakes in test comments
Problem:    Mistakes in test comments.
Solution:   Fix the comments. (closes vim/vim#9029)
b811de5d49
2021-11-22 15:50:14 +08:00
d40db0edbd vim-patch:8.1.1542: an OptionSet autocommand does not get enough info
Problem:    An OptionSet autocommand does not get enough info.
Solution:   Add v:option_command, v:option_oldlocal and v:option_oldglobal.
            (Latrice Wilgus, closes vim/vim#4118)
d7c9687947
2021-11-22 15:50:14 +08:00
ee99f34438 vim-patch:8.1.1393: unnecessary type casts
Problem:    Unnecessary type casts.
Solution:   Remove type casts from alloc() and lalloc() calls. (Mike Williams)
51e14387f1
2021-11-22 05:44:40 +00:00
6ff3475b42 vim-patch:8.1.1386: unessesary type casts for lalloc()
Problem:    Unessesary type casts for lalloc().
Solution:   Remove type casts.  Change lalloc(size, TRUE) to alloc(size).
18a4ba29ae
2021-11-22 05:44:40 +00:00
c86fb824e0 vim-patch:8.1.1384: using "int" for alloc() often results in compiler warnings
Problem:    Using "int" for alloc() often results in compiler warnings.
Solution:   Use "size_t" and remove type casts.  Remove alloc_check(), Vim
            only works with 32 bit ints anyway.
964b3746b9

N/A commits:

vim-patch:8.1.0228: dropping files is ignored while Vim is busy

Problem:    Dropping files is ignored while Vim is busy.
Solution:   Postpone the effect of dropping files until it's safe.
92d147be95

vim-patch:8.2.3040: GUI: dropping files not tested

Problem:    GUI: dropping files not tested.
Solution:   Add test_gui_drop_files() and tests. (Yegappan Lakshmanan,
            closes vim/vim#8434)
18d46587b9
2021-11-22 05:43:00 +00:00
64abd7be79 Merge pull request #16341 from zeertzjq/vim-8.2.2518
vim-patch:8.2.{2518,2520,3572,3588}: 'listchars' (and 'fillchars'?) fixes
2021-11-21 22:21:32 -05:00
e05db65d2a vim-patch:8.2.3627: difficult to know where the text starts in a window (#16377)
vim-patch:8.2.3627: difficult to know where the text starts in a window

Problem:    difficult to know where the text starts in a window. (Sergey
            Vlasov)
Solution:   Add the "textoff" entry in the result of getwininfo().
            (closes vim/vim#9163)
cdf5fdb294

Fix indent in Test_getbufwintabinfo().
2021-11-21 21:10:03 -05:00
f45b2f313e Merge pull request #16386 from VVKot/vim-8.2.2922
vim-patch:8.2.2922,8.2.3639
2021-11-21 20:41:56 -05:00
04bfd20bb8 fix(diagnostic): remove invalid buffers from cache (#16397)
Errors were being caused by invalid buffers being kept around in
diagnostic_cache, so add a metatable to diagnostic_cache which attaches
to new buffers in the cache, removing them after they are invalidated.

Closes #16391.

Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
2021-11-21 18:40:06 -07:00
0d967f0298 Merge pull request #16362 from zeertzjq/vim-8.2.3617
vim-patch:8.2.{3468,3617,3618,3622}: some other CWD related patches
2021-11-21 17:47:09 -05:00
d99d4af7b1 Merge pull request #16370 from gpanders/diagnostic-column-clamp 2021-11-21 12:06:44 -07:00
85707a3395 vim-patch:8.2.3255: ci" finds following string but ci< and others don't (#16324)
Problem:    ci" finds following string but ci< and others don't.
Solution:   When not inside an object find the start. (Connor Lane Smit,
            closes vim/vim#8670)
b9115da4be
2021-11-21 14:00:50 -05:00
9d0726f6d8 vim-patch:8.1.1606: on a narrow screen ":hi" output is confusing (#16388)
Problem:    On a narrow screen ":hi" output is confusing.
Solution:   Insert a space between highlight group name and "xxx". (Masato
            Nishihaga, closes vim/vim#4599)
548be7f126
2021-11-21 13:10:24 -05:00
9d868317f9 vim-patch:8.2.3638: getcompletion() always passes zero as position (#16387)
Problem:    getcompletion() always passes zero as position to custom
            completion function.
Solution:   Pass the pattern length. (closes vim/vim#9173)
4785fe02bb

Co-authored-by: ii14 <ii14@users.noreply.github.com>
2021-11-21 13:00:51 -05:00
134a6385e2 fix(lsp): send buffer contents joined on fileformat-specific linebreak (#16334) 2021-11-21 12:03:45 -05:00
a2749482d9 chore(lsp): clean up initialization process (#16369)
* send vim.NIL instead of not sending workspaceFolders
* read fallback rootPath and rootUri from workspaceFolders
* update documentation
2021-11-21 11:39:30 -05:00
ad71ecb49b vim-patch:8.2.3639: line commented out accidentally
Problem:    Line commented out accidentally.
Solution:   Uncomment. (Volodymyr Kot, closes vim/vim#9172)
7f0c4b418e
2021-11-21 13:53:50 +00:00
89270346f9 docs(lua): further improve Lua require() docs
Change docs to reflect recent changes to require() search order and add
info on `.` in module names and search order for shared library modules.
2021-11-22 00:43:18 +13:00
0d32e5ba30 docs(lua): fix, clarify Lua require() docs
Corrects lua.txt help file to say that require() searches runtimepath
and loads the first module found, not the last.

Also adds additional clarification on require() and module search order.

Closes #15480
2021-11-21 21:30:13 +13:00
ddc401a91c vim-patch:8.2.2922: computing array length is done in various ways
Problem:    Computing array length is done in various ways.
Solution:   Use ARRAY_LENGTH everywhere. (Ken Takata, closes vim/vim#8305)
eeec254878
2021-11-21 08:20:38 +00:00
120a881630 Merge pull request #14540 from Shougo/fix_vim8.1.1378
[RFC] Improve tests
2021-11-20 22:46:34 -05:00
2bd8f2fb5e vim-patch:8.1.0753: printf format not checked for semsg() (#16378)
Problem:    printf format not checked for semsg().
Solution:   Add GNUC attribute and fix reported problems. (Dominique Pelle,
            closes vim/vim#3805)
b5443cc46d

(Most of the changes do not apply because Neovim already uses PRId64 and other spelling mistakes were already fixed.)
2021-11-20 13:26:16 +01:00
725cbe7d41 refactor: saner options for uncrustify (#16204)
* sp_enum_after_assign = force
* sp_brace_typedef = force
* nl_do_brace = remove
* sp_do_brace_open = force
* sp_brace_close_while = force
* sp_before_semi = remove
* sp_before_semi_for = remove
* sp_before_semi_for_empty = remove
* sp_between_semi_for_empty = remove
* sp_after_semi_for_empty = remove
* sp_before_square = remove
* sp_before_squares = remove
* sp_inside_square = remove
* sp_inside_fparens = remove
* sp_inside_fparen = remove
* sp_inside_tparen = remove
* sp_after_tparen_close = remove
* sp_return_paren = force
* pos_bool = lead
* sp_pp_concat = remove
* sp_pp_stringify = remove
* fixup: disable formatting for the INIT section
2021-11-19 14:21:53 -05:00
5b0d8f85fd fix(diagnostic): clamp line numbers in setqflist and setloclist 2021-11-19 11:49:44 -07:00
34bb5fa5a9 fix(diagnostic): fix navigation with diagnostics placed past end of line 2021-11-19 11:37:45 -07:00
2abc799ffd fix(diagnostic): deepcopy diagnostics before clamping line numbers
The current 'clamp_line_numbers' implementation modifies diagnostics in
place, which can have adverse downstream side effects. Before clamping
line numbers, make a copy of the diagnostic. This commit also merges the
'clamp_line_numbers' method into a new 'get_diagnostics' local function
which also implements the more general "get" method. The public
'vim.diagnostic.get()' API now just uses this function (without
clamping). This has the added benefit that other internal API functions
that need to use get() no longer have to go through vim.validate.

Finally, reorganize the source code a bit by grouping all of the data
structures together near the top of the file.
2021-11-19 11:37:45 -07:00
9ec4417afc Merge pull request #16066 from neovim/marvim/ci-version-update
version.c: update [skip ci]
2021-11-19 11:54:24 -05:00
7942fb7074 Merge pull request #16091 from neovim/marvim/api-doc-update/master
docs: regenerate
2021-11-19 11:53:53 -05:00
a7ad509902 fix(eval): fixup for empty modifier in fnamemodify (#16368)
* fix(eval): fixup for empty modifier in fnamemodify

1dbbaf89bf
erroneously removed a check for empty modifier and a PVS fix. 
Restore that check and fix.

Fixes #16367

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2021-11-19 16:13:49 +01:00
349b9ce9df vim-patch:8.2.3622: "verbose pwd" shows confusing info
Problem:    "verbose pwd" shows confusing info when :lcd does not change
            directory.
Solution:   Clear last_chdir_reason also when the directory does not change.
            (closes vim/vim#9160)
64be6aa3a5

This only ports the tests, as this is already Nvim's behavior.
2021-11-19 20:07:04 +08:00
3d504f27a0 vim-patch:8.2.3618: getcwd() is unclear about how 'autochdir' is used
Problem:    getcwd() is unclear about how 'autochdir' is used.
Solution:   Update the help for getcwd().  Without any arguments always return
            the actual current directory. (closes vim/vim#9142)
851c7a699a
2021-11-19 20:07:04 +08:00
54e9cce612 revert: partially revert #9894
Vim has a solution to #9892 with fewer side-effects in patch 8.2.3618
2021-11-19 20:07:04 +08:00
4785cad8ee vim-patch:8.2.3617: ":verbose pwd" does not mention 'autochdir' was applied
Problem:    ":verbose pwd" does not mention 'autochdir' was applied.
Solution:   Remember the last chdir was done by 'autochdir'.  (issue vim/vim#9142)
0526815c15
2021-11-19 20:07:04 +08:00
0f58ba10e2 vim-patch:8.2.3468: problem with :cd when editing file in non-existent directory
Problem:    Problem with :cd when editing file in non-existent directory. (Yee
            Cheng Chin)
Solution:   Prepend the current directory to get the full path. (closes vim/vim#8903)
c6376c7984
2021-11-19 20:07:04 +08:00
2c431943d6 fix: remove unneeded gzip check 2021-11-19 13:45:41 +09:00
e9819ca709 fix: error 2021-11-19 13:45:41 +09:00
c11cf6b415 test: save clipboard 2021-11-19 13:45:41 +09:00
9bcbb7f9d2 fix: shell problem 2021-11-19 13:45:41 +09:00
cf4af351a6 fix: fix GZIP error 2021-11-19 13:45:41 +09:00
18d7ec36f3 fix: remove unnecessary changes 2021-11-19 13:45:41 +09:00
a11cec08e5 fix: for reviews 2021-11-19 13:45:41 +09:00
dd63d93931 fix: disable clipboard when test registers 2021-11-19 13:45:40 +09:00
77c2edcacb fix: remove previous executed directories to execute tests locally 2021-11-19 13:45:40 +09:00
4cb8a399c7 fix: add cd for local execution 2021-11-19 13:45:40 +09:00
133d79a358 vim-patch:8.2.3616: arglist test does not clear the argument list consistently
Problem:    Arglist test does not clear the argument list consistently.
Solution:   Call Reset_arglist(). (Shougo Matsushita, closes vim/vim#9154)
3cad470385
2021-11-19 13:45:29 +09:00
b43b6efa34 version.c: update [skip ci] 2021-11-19 03:07:56 +00:00
2d340a3746 docs: regenerate 2021-11-18 21:50:55 +00:00
f71be1f87b fix(lsp): improve incremental sync robustness (#16358)
closes https://github.com/neovim/neovim/issues/16352

* improve handling of multi-byte deletions
2021-11-18 16:49:46 -05:00
d249e18bbf fix(uri): use valid EmmyLua annotations (#16359)
See:

- https://emmylua.github.io/annotations/param.html
- https://emmylua.github.io/annotations/return.html
2021-11-18 21:12:21 +01:00
722647dd8c Merge pull request #16356 from clason/bump-luarocks
build(deps): bump luarocks to 3.8.0
2021-11-18 14:41:14 -05:00
5e46f649e2 fix(diagnostic): don't use nil col if missing from qflist (#16357)
If the quickfixlist item doesn't contain a column it is reported as 0.
Rather than using a nil value in such a case (which breaks diagnostics
elsewhere), just keep the 0 value.
2021-11-18 12:27:46 -07:00
a42a9accab Merge pull request #16355 from mjlbach/fix/docgen-again 2021-11-18 11:31:31 -07:00
8081a30ca8 docs: mark tagfunc.lua methods as private 2021-11-18 11:30:09 -07:00
0746f0021f fix(docgen): add tagfunc.lua 2021-11-18 11:30:09 -07:00
cab542c0f9 build(deps): bump luarocks to 3.8.0 2021-11-18 18:55:36 +01:00
f940e7a5b9 feat(lsp): add tagfunc (#16103) 2021-11-18 12:26:26 -05:00
980c68d036 vim-patch:8.2.3610: crash when ModeChanged triggered too early
Problem:    Crash when ModeChanged triggered too early.
Solution:   Trigger ModeChanged after setting VIsual.
a062006b9d
2021-11-18 14:23:33 +01:00
1fb101afe4 vim-patch:8.2.3609: internal error when ModeChanged is triggered recursively
Problem:    Internal error when ModeChanged is triggered when v:event is
            already in use.
Solution:   Save and restore v:event if needed.
3075a45592

In the vim codebase there is no occurrence of get_vim_var_dict(VV_EVENT)
after the above patch, so in order to hold the same invariant in the
neovim codebase we needed to replace more occurrences than the related
vim patch.
2021-11-18 14:23:33 +01:00
fdfd1eda43 feat: trigger ModeChanged for terminal modes 2021-11-18 11:23:18 +01:00
11683193f5 vim-patch:8.2.3555: ModeChanged is not triggered on every mode change
Problem:    ModeChanged is not triggered on every mode change.
Solution:   Also trigger on minor mode changes. (Maguns Gross, closes vim/vim#8999)
25def2c8b8
2021-11-18 11:23:18 +01:00
60c154687a vim-patch:8.2.3463: pattern matching with ModeChanged not tested
Problem:    Pattern matching with ModeChanged not tested.
Solution:   Add a few more test lines. (issue vim/vim#8856)
72d2fa69e5
2021-11-18 11:23:18 +01:00
fc3e5caefd vim-patch:8.2.3462: ModeChanged only uses one character for new_mode and old_mode
Problem:    The ModeChanged event only uses one character for the new_mode and
            old_mode values.
Solution:   Pass one as first argument to mode(). (issue vim/vim#8856)
d85931e673
2021-11-18 11:23:18 +01:00
69bd1e4e36 vim-patch:8.2.3430: no generic way to trigger an autocommand on mode change
Problem:    No generic way to trigger an autocommand on mode change.
Solution:   Add the ModeChanged autocommand event. (Magnus Gross, closes vim/vim#8856)
f1e8876fa2

N/A patches for version.c:

vim-patch:8.2.3434: function prototype for trigger_modechanged() is incomplete

Problem:    Function prototype for trigger_modechanged() is incomplete.
Solution:   Add "void".
28e591dd50

Fixes #4399.
Fixes #7416.
2021-11-18 11:23:18 +01:00
36538417f0 vim-patch:01164a6546b4 (#16335)
missing changes to src/nvim/po/check.vim from 01164a6546 (diff-ed3e88d59856bb5b62b2a394fb8c7293cd5794531e0718c0aa2d3d768d7973d1)
2021-11-17 21:28:20 -05:00
1f68a21d66 vim-patch:8.2.3593: directory is wrong after executing "lcd" with win_execute() (#16314)
Problem:    Directory is wrong after executing "lcd" with win_execute().
Solution:   Correct the directory when going back to the original window.
            (closes vim/vim#9132)
7f13b24ab6
2021-11-17 21:18:55 -05:00
dba3590a0e vim-patch:8.2.3591: no event is triggered when closing a window (#16306)
Problem:    No event is triggered when closing a window.
Solution:   Add the WinClosed event. (Naohiro Ono, closes vim/vim#9110)
23beefed73

Nvim has already implemented this feature, so this only changes tests
and docs.
2021-11-17 21:11:09 -05:00
5ff972cafe vim-patch:8.2.3522: cannot use \x and \u when setting 'listchars' (#16049)
Problem:    Cannot use \x and \u when setting 'listchars'.
Solution:   Support hex and unicode in hex form. (closes vim/vim#9006)
93ff6720fe
2021-11-17 20:55:59 -05:00
eb3d59126e fix(lsp): change signature of buf_highlight_references (#16345)
the prior signature did not assume an active language client
this function can now be used directly by passing an offset encoding
defaults to utf-16 (standard for LSP)
2021-11-17 21:14:45 +01:00
c0efe49e78 vim-patch:519cc559b08b (#16340)
Update runtime files
519cc559b0
2021-11-17 10:02:59 +01:00
145fc69df9 vim-patch:8.2.3588: break statement is never reached
Problem:    Break statement is never reached.
Solution:   Rely on return value of set_chars_option() not changing.
            (closes vim/vim#9103)
606efc7df4
2021-11-17 07:11:46 +08:00
8dbe47a4bc vim-patch:8.2.3572: memory leak when closing window and using "multispace"
Problem:    Memory leak when closing window and using "multispace" in
            'listchars'.
Solution:   Free the memory. (closes vim/vim#9071)
7a33ebfc5b
2021-11-17 07:11:46 +08:00
5ed2a5cf9c vim-patch:8.2.2520: missing tests for 'listchars'
Problem:    Missing tests for 'listchars'.
Solution:   Add a few more checks. (Yegappan Lakshmanan, closes vim/vim#7854)
04ea7e9049
2021-11-17 07:11:46 +08:00
7528bcec42 fix(options): using :set fillchars should clear local value 2021-11-17 07:11:46 +08:00
8c24e1462c vim-patch:8.2.2518: 'listchars' should be window-local
Problem:    'listchars' should be window-local.
Solution:   Make 'listchars' global-local. (Yegappan Lakshmanan, Marco Hinz,
            closes vim/vim#5206, closes vim/vim#7850)
eed9d46293

Nvim already has this feature, but it implements :set listchars the same
as :setglobal listchars, which is incorrect. Vim's implementation of
:set listchars is correct: using :set listchars clears local value.
2021-11-17 07:11:40 +08:00
eba317d7a9 refactor: reduce number of explicit char casts (#16077)
* refactor: reduce number of explicit char casts
2021-11-16 20:27:59 +01:00
99211b008c vim-patch:8.2.3604: not all sudoers files are recognized (#16338)
Problem:    Not all sudoers files are recognized.
Solution:   Add a file pattern. (Doug Kearns, closes vim/vim#1192)
c143fa0778
2021-11-16 18:34:39 +01:00
b5eab2a98a vim-patch:8.2.3603: fish filetype not recognized (#16337)
Problem:    Fish filetype not recognized.
Solution:   Add a file pattern and match script line. (Doug Kearns)
b1b163efd7
2021-11-16 18:26:03 +01:00
8fb09bc512 Merge pull request #16328 from gpanders/diagnostic-prefix-hi 2021-11-16 08:48:26 -07:00
98af683e0f refactor(diagnostic): make bufnr arguments consistent (#16323)
Make the bufnr argument have similar semantics across API functions;
namely, a nil value means "all buffers" while 0 means "current buffer".
This increases the flexibility of the API by allowing functions such as
enable() and disable() to apply globally or per-namespace, rather than
only on a specific buffer.
2021-11-16 08:47:49 -07:00
890f8cd750 Merge pull request #16330 from clason/vim-8.2.3598
vim-patch:8.2.3598,3599,3600: some filetypes are not recognized
2021-11-16 13:38:07 +01:00
75959d04c4 vim-patch:8.2.3600: filetype test fails
Problem:    Filetype test fails.
Solution:   Add missint change.
314b773abb
2021-11-16 13:04:14 +01:00
b20429c8a5 vim-patch:8.2.3599: not all gdbinit files are recognized
Problem:    Not all gdbinit files are recognized.
Solution:   Add "gdbinit". (Doug Kearns)
782b4bbc16
2021-11-16 12:40:50 +01:00
e5ef736dfe vim-patch:8.2.3598: RouterOS filetype is not recognized
Problem:    RouterOS filetype is not recognized.
Solution:   Add file and script patterns. (closes vim/vim#9097)
0818ab82e7
2021-11-15 23:03:10 +01:00
87a053f126 fix(lsp): fix edge cases in incremental sync (#16308) 2021-11-15 08:51:30 -08:00
63413bd047 refactor(diagnostic)!: rename 'show_header' to 'header'
Rename the `show_header` option in `open_float` to simply `header` and
allow users to specify both the header string as well as the highlight
group.
2021-11-15 09:12:27 -07:00
cc48837622 feat(diagnostic): allow 'prefix' option to return highlight
Extend the 'prefix' option for `open_float` to also provide an optional
highlight group for the prefix string.
2021-11-15 09:05:40 -07:00
bd15ff7b84 test: require fewest number of main loop iterations possible
Change exc_exec to pcall_err to reduce one main loop iteration.
No need to call poke_eventloop() unless after nvim_input().
2021-11-15 10:34:43 +08:00
8f984dc1f2 Merge pull request #16047 from mcepl/vim-8.2.3520
vim-patch:8.2.3520: cannot define a function for thesaurus completion
2021-11-14 21:23:42 -05:00
3c74ba4acb feat(diagnostic): add 'prefix' option to open_float (#16321)
The 'prefix' option accepts a function or a string that is used to add a
prefix string to each diagnostic displayed in the floating window.
2021-11-14 18:40:11 -07:00
2f37ffb719 Merge pull request #16316 from bfredl/macroman
refactor(macros): delete multibyte macros which just are aliases
2021-11-14 17:43:21 +01:00
1450a6f753 refactor(macroman): get rid of MB_COPY_CHAR macro
clean up docs for MB_PTR_ADV and MB_PTR_BACK
2021-11-14 17:08:50 +01:00
54ff21a153 refactor(macros): delete multibyte macros which just are aliases 2021-11-14 16:33:12 +01:00
ede00b29d1 Merge pull request #16317 from jamessan/remove-32bit-windows-ci
ci!: remove win32 builds/releases
2021-11-14 09:13:48 -05:00
7bd6f12b3e ci!: remove win32 builds/releases 2021-11-14 08:51:39 -05:00
27f8b04f17 Merge pull request #16315 from bfredl/multibytes
refactor(multibyte): eliminate mb_* aliases for utf_* functions
2021-11-14 13:44:18 +01:00
ee3a58d42e fix(lsp): ensure buffers are re-attached on rename (#16266)
If a LSP server sent a workspace edit containing a rename the buffers
file name changed without the server receiving a close notification for
the old buffer and without the client properly re-attaching on the new
file.

This affected `Move` code-actions in nvim-jdtls, but also
`vim.lsp.buf.rename` on a class level.
2021-11-14 12:55:16 +01:00
71a4d275dc refactor(multibyte): eliminate mb_char2len alias for utf_char2len 2021-11-14 12:49:12 +01:00
0039ba04b0 refactor(multibyte): eliminate mb_ptr2len alias for utfc_ptr2len 2021-11-14 12:49:12 +01:00
9f27e6cbe7 refactor(multibyte): eliminate mb_char2cells alias for utf_char2cells 2021-11-14 12:49:09 +01:00
2ef9d2a663 chore: disable creating a blank issue 2021-11-11 19:41:37 +01:00
e8631cb8a6 fix(float): skip non-focusable windows for :windo (#15378) 2021-11-11 11:05:18 -07:00
9d6a475ced fix(docs): add sync.lua to gen_vimdoc (#16285) 2021-11-11 07:23:52 -07:00
5d653a1344 Merge pull request #16276 from zeertzjq/channel-closed-term-error
Fixes and tests for sending to terminal channel whose terminal has been deleted
2021-11-11 10:57:16 +01:00
0ecc58c277 fix(lsp): gracefully handle nil workspaceFolders (#16284)
* handle when workspaceFolder is nil in buf.list_workspace_folders and buf.add_workspace_folder
2021-11-11 01:15:59 -08:00
8b5c32c8cd test: add tests for freeing channel opened by termopen()
This indirectly covers #16264
2021-11-11 09:34:23 +08:00
a502a7a731 fix(channel): fix channels opened by nvim_open_term() never being freed 2021-11-11 09:34:23 +08:00
3b89fee246 fix(channel): throw error if sending to internal channel w/o terminal
Prevent SIGABRT when sending to a channel created by nvim_open_term()
after the associated terminal has been deleted.
2021-11-11 09:34:23 +08:00
14def4d227 fix(terminal): free terminal if close_buffer() closes a closed terminal (#16264)
Use the (currently unused) 'destroy' field of the terminal struct as a
flag to indicate that the terminal's destruction is imminent (and
therefore it's close callback should not be called again).

Co-authored-by: Gregory Anders <greg@gpanders.com>
2021-11-10 15:28:55 -07:00
2ecf0a4c61 fix(lsp): rewrite incremental sync (#16252)
* use codeunits/points instead of byte ranges when applicable
* take into account different file formats when computing range and
  sending text (dos, unix, and mac supported)
* add tests of incremental sync
2021-11-09 14:37:48 -08:00
953ae71fd3 feat(diagnostic): do not require namespace for hide() and show() (#16261)
Also fix a few other small bugs regarding saving and restoring extmarks.
In particular, now that the virtual text and underline handlers have
their own dedicated namespaces, they should be responsible for saving
and restoring their own extmarks. Also fix the wrong argument ordering
in the call to `clear_diagnostic_cache` in the `on_detach` callback.
2021-11-09 14:33:01 -07:00
8f31b218f9 fix(lsp): do not index nil client in progress (#16262) 2021-11-09 22:05:41 +01:00
4174244d8b docs: update description for 'list' option (#16254)
Neovim has different defaults for 'list' compared to Vim which is why
the documentation needs to be updated.
2021-11-08 08:22:53 -07:00
8cbe100fcc vim-patch:partial 113cb513f76d (#16260)
Update runtime files
113cb513f7

skip doc/eval.txt
skip doc/insert.txt
skip doc/user_06.txt (needs 8.2.3562)
partial skip doc/syntax.txt (needs 8.2.3562)
2021-11-08 00:10:44 +01:00
16d4af6d2f feat(ui): add vim.ui.input and use in lsp rename (#15959)
* vim.ui.input is an overridable function that prompts for user input
* take an opts table and the `on_confirm` callback, see `:help vim.ui.input` for more details
* defaults to a wrapper around vim.fn.input(opts)
* switches the built-in client's rename handler to use vim.ui.input by default
2021-11-07 07:13:53 -08:00
b74916cfd2 fix(lsp): convert range to byte index before highlighting (#16218)
Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com>
2021-11-06 15:05:52 -07:00
77c54fc995 Merge pull request #16155 from zeertzjq/fix-redr-border-corruption
fix(float): fix potential heap corruption in win_redr_border
2021-11-06 22:32:28 +01:00
03b805aee6 feat(lua): enable stack traces in error output (#16228) 2021-11-06 08:26:10 -06:00
2dc0af3a4f vim-patch:8.2.3528: 'thesaurus' and 'thesaurusfunc' do not have the same scope
Problem:    'thesaurus' and 'thesaurusfunc' do not have the same scope.
Solution:   Make 'thesaurusfunc' global-local.
f4d8b76d30
2021-11-06 14:24:46 +01:00
1fdbd29dfa fix(diagnostic): handle an unknown or missing client (#16242)
Sometimes plugins use pseudo-client IDs (e.g. nvim-lint or null-ls) in
order to hook into the LSP infrastructure without being a bona fide LSP
client. In these cases, get_client_by_id() will return nil since the
client ID given does not correspond to a real client recognized by the
LSP subsystem. When this happens, use "unknown" for the client name.
2021-11-05 10:10:27 -06:00
c0ba315b54 Merge pull request #16241 from bfredl/disptick
fix(screen): make display_tick monotonic up to 2^64. fixes #16152
2021-11-05 11:19:46 +01:00
9e88c9c12f fix(screen): make display_tick monotonic up to 2^64. fixes #16152
18446744073709551616 screen redraws should be enough for everyone.
2021-11-05 10:43:19 +01:00
3ba800f153 fix(tui): extend smglr ignores to smglp and smgrp (#16239)
The latter were added for xterm by ncurses 6.3 and are similarly
affected.

Fixes https://github.com/neovim/neovim/issues/16238
2021-11-04 20:36:16 -06:00
5ce35abae6 fix(input): never reinterpret unmapped ALT- chrods in Terminal mode (#16222) 2021-11-04 07:43:05 -06:00
fd347840ba fix(diagnostic): fix option resolution in open_float (#16229) 2021-11-04 06:59:24 -06:00
f26b391317 Merge pull request #16221 from glacambre/fix_13187
fix: remove double slash in sysinit path
2021-11-03 18:24:24 -04:00
2481b18a53 Merge pull request #16055 from doubleloop/config_depends 2021-11-03 08:24:39 -04:00
52efcefcc8 fix: remove double slash in sysinit path
Closes https://github.com/neovim/neovim/issues/13187 .
2021-11-03 07:47:40 +01:00
7899c4099b docs(lsp): correct usage examples of formatexpr (#16216) 2021-11-02 17:02:04 -07:00
487286b621 docs: mention replacement for deprecated vim.lsp.diagnostic.show_* (#16211) 2021-11-02 16:24:05 +01:00
ed2573b7e1 Merge pull request #16207 from jamessan/delete-release-tag
ci(release): delete nightly/stable tag so release recreates it
2021-11-02 07:36:33 -04:00
14716e4619 ci(release): delete nightly/stable tag so release recreates it
Even though the releaes itself gets deleted, if the tag is not, then
creating a new release just re-uses the same tag, even though we're
using “--target <sha>”.

[skip ci]
2021-11-02 07:34:55 -04:00
29cec32f44 Merge pull request #16203 from bfredl/revision
fix(extmark): fix missing virt_lines when using id param of set_extmark
2021-11-01 23:50:19 +01:00
995dbd2ca6 fix(extmark): fix missing virt_lines when using id param of set_extmark 2021-11-01 22:57:33 +01:00
b8eabb37b1 Merge pull request #16131 from jamessan/vim-8.1.0306 2021-11-01 11:27:42 -04:00
961cd83b3b refactor(api/marks)!: add opts param for feature extensibility (#16146)
In the future we might want to extend the concept of named marks and
adding opts reduces the need of changing the function signature in the
furute.
2021-11-01 07:46:26 -06:00
fa97d34858 fix(lsp): pass the enriched ctx to the client-side command (#16201) 2021-11-01 14:29:50 +01:00
9e479ea05e vim-patch:8.2.3561: cscope has a complicated way of giving an error message
Problem:    Cscope has a complicated way of giving an error message.
Solution:   Use semsg(). (James McCoy, closes vim/vim#9038)
3c5904d2a5
2021-11-01 06:41:29 -04:00
502ff11663 vim-patch:8.1.0783: compiler warning for signed/unsigned
Problem:    Compiler warning for signed/unsigned.
Solution:   Add type cast.  Change type of buffer. (Ozaki Kiichi, closes vim/vim#3827)
63c0ccd2b6
2021-11-01 06:41:29 -04:00
e6ff154be6 vim-patch:8.1.0779: argument for message functions is inconsistent
Problem:    Argument for message functions is inconsistent.
Solution:   Make first argument to msg() "char *".
32526b3c18
2021-11-01 06:41:29 -04:00
efa924f66b vim-patch:8.1.0743: giving error messages is not flexible
Problem:    Giving error messages is not flexible.
Solution:   Add semsg().  Change argument from "char_u *" to "char *", also
            for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes
            vim/vim#3302)  Also make emsg() accept a "char *" argument.  Get rid of
            an enormous number of type casts.
f9e3e09fdc
2021-11-01 06:41:28 -04:00
684640f551 vim-patch:8.1.0306: plural messages are not translated properly
Problem:    Plural messages are not translated properly.
Solution:   Add more usage of NGETTEXT(). (Sergey Alyoshin)
da6e8919e7
2021-11-01 06:40:00 -04:00
7f4b7320f6 Merge pull request #16198 from jamessan/limit-ci-branches
ci: limit CI checks to the main dev branches
2021-11-01 06:37:37 -04:00
519d8deb08 feat(lsp): add per-client commands (#16101) 2021-11-01 03:14:59 -07:00
7ae86c1d4c feat(ui): add opt.kind to vim.ui.select (#15838)
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2021-10-31 17:15:09 -07:00
ea2ce90cc6 ci: limit CI checks to the main dev branches
Now that we have various GH actions creating branches in the main repo,
using the generic '**' pattern for the CI workflow is just wasting CI
time and leading to more queued jobs.

[skip ci]
2021-10-31 20:05:52 -04:00
a68faed02d refactor: saner options for uncrustify #16196
* refactor: general good option changes
  sp_deref = remove
  sp_not = remove
  sp_inv = remove
  sp_inside_paren_cast = remove
  mod_remove_duplicate_include = true
  sp_after_semi = add
  sp_after_semi_for = force
  sp_sizeof_paren = remove
  nl_return_expr = remove
  nl_else_brace = remove
  nl_else_if = remove
* refactor: mod_remove_extra_semicolon = true
* refactor: nl_max = 3
* refactor: sp_bool = force
* refactor: sp_compare = force
* refactor: sp_inside_paren = remove
* refactor: sp_paren_paren = remove
* refactor: sp_inside_sparen = remove
* refactor: sp_before_sparen = force
* refactor: sp_sign = remove
* refactor: sp_addr = remove
* refactor: sp_member = remove
* refactor: nl_struct_brace = remove
* refactor: nl_before_if_closing_paren = remove
* refactor: nl_fdef_brace = force
* refactor: sp_paren_comma = force
* refactor: mod_full_brace_do = add
2021-10-31 17:03:08 -07:00
5ad15c9fa1 fix(lsp): improve symbols_to_items performance (#16197)
* use table.insert instead of list_extend to avoid validation overhead

Co-authored-by: Gianmarco Fantinuoli <fanto-dev@hotmail.com>
2021-10-31 15:18:51 -07:00
69e4cb7116 Merge pull request #15907 from black-desk/utf32-to-utf16
fix(lsp): default to UTF-16 in make_position_params
2021-10-31 14:47:08 -07:00
85a8bede45 fix(lsp): default to UTF-16 when lsp client using str_utfindex 2021-10-31 14:15:56 -07:00
2e3a4747e2 fix(lsp): default to UTF-16 in make_position_params 2021-10-31 14:15:56 -07:00
0c1585bc63 Merge pull request #16195 from jamessan/really-fix-win-ci
fix(ci): use correct check for path-existence
2021-10-31 15:11:21 -04:00
98f578293b fix(lsp): don't update active_clients on exit_timeout (#16192) 2021-10-31 12:05:57 -07:00
7126315935 fix(ci): use correct check for path-existence 2021-10-31 14:09:10 -04:00
478748881f Merge pull request #16187 from erw7/fix-build-MinGW
fix(build): fix build failure in MinGW
2021-10-31 12:54:52 -04:00
4445e0230b Merge pull request #16188 from bfredl/packentry
fix(runtime): fix missing packpath entries
2021-10-31 16:19:30 +01:00
0503e17375 fix(build): fix build failure in MinGW
The new MinGW fails to build libuv due to a typedef conflict between
mstcpip.h and src/win/winapi.h. This change avoids conflicts by disabling
typedef in the MinGW header.
2021-11-01 00:07:16 +09:00
e6b8d4f67b fix(runtime): fix missing packpath entries 2021-10-31 15:37:09 +01:00
346227e3ad Merge pull request #16191 from jamessan/fix-cpack-removal
ci(win): only remove choco's cpack.exe if it exists
2021-10-31 10:35:43 -04:00
ec0f4fab48 ci(win): only remove choco's cpack.exe if it exists 2021-10-31 09:41:10 -04:00
52fa1d26db feat(lsp): add formatexpr (#16186)
Co-authored-by: Meck <yesmeck@gmail.com>
Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>
2021-10-31 05:40:26 -07:00
4da0351651 fix(lsp): add placeholder cancel function (#16189)
Fixes a bug introduced by https://github.com/neovim/neovim/pull/15949

When no supported clients for a given method are available, buf_request
returns early with a nil value. If buf_request_sync is called on a
buffer with no clients that support a given method, the returned
`cancel` method (which is nil), is invoked, resulting in an error.

Solution: return an empty function handle
2021-10-31 04:44:45 -07:00
653d963293 Merge pull request #16182 from jamessan/backport-comment
ci(backport): trigger on comments too, so "/backport" works
2021-10-30 16:51:50 -04:00
a1eea968a5 ci(backport): trigger on comments too, so "/backport" works
[skip ci]
2021-10-30 16:50:13 -04:00
91f6c06b52 Merge pull request #16181 from jamessan/backport-perms
ci(backport): add write permissions for contents/pull_requests
2021-10-30 16:35:47 -04:00
9f5e736e5d ci(backport): bump version to v0.0.7
[skip ci]
2021-10-30 16:33:20 -04:00
0c1b80efec ci(backport): add write permissions for contents/pull_requests
The workflow needs to create commits and PRs.

[skip ci]
2021-10-30 16:29:02 -04:00
e501aac7ff Merge pull request #16180 from jamessan/release-workflow
Refactor release workflow to use gh instead of a third-party action
2021-10-30 16:07:31 -04:00
c84b86fe3d ci: make sure choco cpack does not interfere with CMake cpack
[skip ci]
2021-10-30 14:02:04 -04:00
c819ce1fd4 ci(release): do not fail if stable/nightly release doesn't exist
[skip ci]
2021-10-30 14:02:04 -04:00
eede587b06 ci(release): re-publish "stable" release for versioned releases
[skip ci]
2021-10-30 14:02:04 -04:00
0ce800753e ci(release): use gh cli instead of 3rd-party actions
Closes #15709

[skip ci]
2021-10-30 14:01:47 -04:00
2230b578d1 feat: add vim.str_utf_{start,end} (#16129)
vim.str_utf_{start,end} return the offset from the current position to
the start and end of the current utf-character (nearest codepoint)
respectively.
2021-10-30 10:30:40 -07:00
97ae0ab4d8 fix(vim-patch.sh): run nvim with -u NONE -n #16179
Problem:
Because of -u NORC, vim-patch.sh would hang on my machine due to one of my
plugins (start package) waiting for prompt input.

Solution:
- Use -u NONE instead to disable all plugins.
- Also use -n to disable swapfiles. These changes only apply to the --headless
  nvim instances used to process things.
2021-10-30 09:04:04 -07:00
c9e5c778b0 feat(lsp): default to botright for setting qflist (#16177)
* Opens quickfix list spanning the entire nvim window in location
  handlers

closes https://github.com/neovim/neovim/issues/12241
2021-10-30 08:17:00 -07:00
a141f6e922 fix(vim.mpack): rename pack/unpack => encode/decode #16175
Problem:
1. "unpack" has an unrelated meaning in Lua:
   https://www.lua.org/manual/5.1/manual.html#pdf-unpack
2. We already have msgpackparse()/msgpackdump() and
   json_encode()/json_decode(), so introducing another name for the same
   thing is entropy.

Solution:
- Rename vim.mpack.pack/unpack => vim.mpack.encode/decode

Caveat:
This is incongruent with the `Unpacker` and `Packer` functions.
- It's probably too invasive to rename those.
- They also aren't part of our documented interface.
- This commit is "reversible" in the sense that we can always revert
  it and add `vim.mpack.encode/decode` as _aliases_ to
  `vim.mpack.pack/unpack`, at any time in the future, if we want
  stricter fidelity with upstream libmpack. Meanwhile,
  `vim.mpack.encode/decode` is currently the total _documented_
  interface of `vim.mpack`, so this change serves the purpose of
  consistent naming in the Nvim stdlib.
2021-10-30 06:59:59 -07:00
eb6a1039c5 fix(build): remove amalg build target for LuaJIT (#16178)
fixup for #16041 (`amalg` build is recommended by LuaJIT for performance
but this way of doing it breaks parallel build with `make -j`)
2021-10-30 12:10:19 +02:00
e921e98ce3 refactor(diagnostic): make display handlers generic (#16137)
Rather than treating virtual_text, signs, and underline specially,
introduce the concept of generic "handlers", of which those three are
simply the defaults bundled with Nvim. Handlers are called in
`vim.diagnostic.show()` and `vim.diagnostic.hide()` and are used to
handle how diagnostics are displayed.
2021-10-29 18:47:34 -07:00
4472c56d54 refactor: uncrustify #16090 2021-10-29 17:23:20 -07:00
16d06fa3eb fix(eval): fix has('wsl') #16153
Problem:
has('wsl') is decided at build-time.

Solution:
Check os_uname().
Fixes #12642, #16143
2021-10-29 16:55:32 -07:00
ac358bfb2f Merge pull request #16154 from bfredl/neoscript
refactor(api): break out Vim script functions to its own file
2021-10-30 00:05:02 +02:00
615e03c33e build(deps): bump luv to 1.42.0-1 (#16113)
* Use uv_handle_size/uv_req_size instead of sizeof
* LuaJIT: add missing LJ_ENDIAN and LJ_NO_UNWIND checks for DASM [fixes building on aarch64]
2021-10-29 17:55:21 +02:00
6acfbd810d build(deps): bump luajit to latest commit (#16041)
bump LuaJIT to b4b2dce9fc
now requires `-funwind-tables` build flag, which conflicts with
`-DLUA_USE_ASSERT`
2021-10-29 17:54:59 +02:00
a60beeb34f refactor(api): break out Vim script functions to its own file 2021-10-29 16:59:53 +02:00
c3a3e65428 refactor(api): break out vim_to_object/object_to_vim to own file 2021-10-29 15:52:28 +02:00
d1c470957b feat(lsp): track pending+cancel requests on client object #15949 2021-10-29 05:45:01 -07:00
1dbbaf89bf fix(eval): checking for a non-empty string is too strict (#15987)
Cherry-pick check_for_nonempty_string() from patch vim-8.2.2133 and
apply it on the bases of https://github.com/neovim/neovim/pull/13489

2a9d5d386b
2021-10-28 22:13:40 -04:00
bb79e05f81 vim-patch:8.2.3556: filler lines are incorrect for other window in diff mode (#16164)
Problem:    Filler lines are incorrect for other window in diff mode after
            making a change.
Solution:   Copy filler lines from the current window. (closes vim/vim#8809)
841c225b9e
2021-10-28 22:04:57 -04:00
4a618b00bc Merge pull request #16141 from dundargoc/ci/split-jobs 2021-10-28 11:57:17 -04:00
a91a5c1880 ci: run functionaltest-lua on drafts as well 2021-10-28 10:55:26 +02:00
7ff1bc18a9 fix(float): redraw if w_border_adj changed 2021-10-28 06:32:36 +08:00
de670f3809 fix(float): fix potential heap corruption in win_redr_border 2021-10-28 06:32:36 +08:00
d918759dee test(vim_spec): fix MSVC_32 skip for nvim_parse_expression test (#16161)
"works with &opt" is flaky; now it always fails after #15999 for some reason.

This test was skipped in #10773 due to previous flakiness, but after the switch away from appveyor
the check no longer works. Just skip for any CI running the MSVC_32 job.
2021-10-27 16:27:17 -06:00
3e1ef18579 ci: add newly added api file extmark.c to gen-vimdoc (#16158) 2021-10-27 11:42:19 -06:00
a5d6f36fc7 Merge pull request #16125 from dundargoc/refactor/lua/split-executor
refactor: split lua/executor.c into two files
2021-10-26 21:43:13 +02:00
13d331ef0d refactor: split executor.c into two files 2021-10-26 21:04:52 +02:00
6cc456deeb feat(ci): add backport PR action (#14766)
Trigger the backport action upon merge by marking a PR with the label `backport <branchname>` or after merge by applying the label and writing a comment containing `/backport`.
2021-10-26 08:45:15 -07:00
5e207a65e3 Merge pull request #16149 from zeertzjq/man-clean 2021-10-26 10:12:35 -04:00
f75d00456d Merge pull request #16147 from bfredl/neomark
refactor(api): move extmark API to its own file
2021-10-26 10:45:11 +02:00
72309d13b4 docs(manpage): update description of --clean 2021-10-26 07:03:14 +08:00
c8882ca7e7 refactor(api): move extmark API to its own file 2021-10-25 22:33:40 +02:00
09e96fe609 Merge pull request #16124 from mjlbach/feat/bjorn-bait
feat: add vim.str_utf_pos
2021-10-24 16:20:16 +02:00
d752cbc4d2 feat: add vim.str_utf_pos function
vim.str_utf_pos returns the codepoints for all utf-8 chars (only, currently)
in a string
2021-10-24 03:35:38 -07:00
b092171e7c vim-patch:8.2.3525: option variable name does not match option name
Problem:    Option variable name does not match option name. (Christ van
            Willigen)
Solution:   Rename the variable.
d4c4bfa007
2021-10-24 08:57:30 +02:00
6acebb8b56 vim-patch:8.2.3547: opening the quickfix window triggers BufWinEnter twice (#16108)
Problem:    Opening the quickfix window triggers BufWinEnter twice. (Yorick
            Peterse)
Solution:   Only trigger BufWinEnter with "quickfix". (closes vim/vim#9022)
1d30fde3c9
2021-10-23 21:55:04 -04:00
36ff5976b9 vim-patch:8.2.3521: options completion test fails
Problem:    Options completion test fails.
Solution:   Add 'thesaurusfunc' to the results.
abdcfd1c83
2021-10-23 22:30:53 +02:00
cbec765915 vim-patch:8.2.3520: cannot define a function for thesaurus completion
Problem:    Cannot define a function for thesaurus completion.
Solution:   Add 'thesaurusfunc'. (Yegappan Lakshmanan, closes vim/vim#8987,
            closes 8950)
160e994d76
2021-10-23 22:30:50 +02:00
9f392c071a vim-patch:partial 079ba76ae7a7 (#16126)
Update runtime files
079ba76ae7

skip optwin.vim (needs 8.2.3520)
skip doc/options.txt (needs 8.2.1535)
skip doc/insert.txt (needs 8.2.3528)
2021-10-23 22:29:17 +02:00
966e605db9 Merge pull request #16128 from bfredl/vluapack
feat(lua): document support of packages with v:lua syntax
2021-10-23 21:44:30 +02:00
96ce6327a3 vim-patch:8.2.3542: too many comments are old style (#16096)
Problem:    Too many comments are old style.
Solution:   Change comments to // style. (closes vim/vim#9021)
c5935a859e
2021-10-23 13:58:56 -04:00
4a0acd6fac vim-patch:8.2.0026: still some /* */ comments (#16088)
Problem:    Still some /* */ comments.
Solution:   Convert to // comments.
85a2002adb
2021-10-23 13:56:43 -04:00
bb9e6a1583 Merge pull request #16111 from dundargoc/vim-patch/comments
vim-patch:8.1.2368,8.1.2378,8.1.2379,8.1.2380,8.1.2387,8.1.2388,8.1.2392,8.1.2394,8.1.2395,8.1.2396
2021-10-23 13:05:19 -04:00
9dd371bb2e feat(lua): document support of packages with v:lua syntax
this already worked in 0.5 but was not properly documented or tested
2021-10-23 18:24:00 +02:00
fa4b24072e Merge pull request #16029 from bfredl/multiline
feat(decorations): support more than one virt_lines block
2021-10-23 16:54:49 +02:00
8d7816cf27 feat(decorations): support more than one virt_lines block 2021-10-23 14:17:09 +02:00
8ade2f5b04 refactor(decorations): mark decorations directly on the marktree
This allows to more quickly skip though regions which has non-decorative
marks when redrawing. This might seem like a gratuitous
micro-optimization in isolation.

But!

Soon decorations are gonna crop into other hot inner-loop paths,
including the plines.c code for calculating the horizontal and
vertical space of text. Then we want to quickly skip over regions with
"only" overlaying decorations (which do not affect text size)
2021-10-23 11:11:00 +02:00
cb15055c29 fix(lsp): cleanup progress messages for the correct client (#16110) 2021-10-21 09:36:27 -07:00
80456cf836 feat(lsp): add exit_timeout flag (#16070)
* This flag allows customizing the time before sending kill -15 to the
  server. If set to false, neovim exits immediately after sending
  request('shutdown'). Otherwise, polls until all servers have shutdown,
  and then kills remaining servers via kill -15 at exit_timeout
  duration. Defaults to 500 ms.
2021-10-21 09:36:01 -07:00
eaa03b7181 vim-patch:8.2.3550: completion() does not work properly (#16112)
* vim-patch:8.2.3550: completion() does not work properly

Problem:    completion() does not work properly.
Solution:   Set xp_line and add WILD_HOME_REPLACE. (Shougo Matsushita,
            closes vim/vim#9016)
ae38a9db77

Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
2021-10-21 17:46:24 +02:00
e59c0009a7 vim-patch:8.1.2396: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
e38eab22c1
2021-10-21 12:07:15 +02:00
8000f6d566 vim-patch:8.1.2395: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
0d6f5d9740
2021-10-21 12:07:14 +02:00
daf670dde6 vim-patch:8.1.2394: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
63d9e730f7
2021-10-21 12:07:14 +02:00
ce441b8b13 vim-patch:8.1.2392: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
6e0ce171e1
2021-10-21 12:07:14 +02:00
df27579f54 vim-patch:8.1.2388: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
4ba37b5833
2021-10-21 12:07:14 +02:00
1d54153ee0 vim-patch:8.1.2387: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
2ab2e8608f
2021-10-21 12:07:14 +02:00
050130ce12 vim-patch:8.1.2380: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
306139005c
2021-10-21 12:07:14 +02:00
f677ba4dab vim-patch:8.1.2379: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
217e1b8359
2021-10-21 12:07:14 +02:00
122c0dfb5d vim-patch:8.1.2378: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
5d18efecfd
2021-10-21 12:07:14 +02:00
d5894ada70 vim-patch:8.1.2368: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
c667da5185
2021-10-21 12:07:14 +02:00
d0f10a7add Merge pull request #14794 from BK1603/gdbserver_fix
functionaltest: fix running tests under gdbserver
2021-10-20 21:27:40 +02:00
81717d2461 vim-patch:8.1.2243: typos in comments (#16104)
Problem:    Typos in comments.
Solution:   Fix the typos. (Dominique Pelle, closes vim/vim#5160)  Also adjust
            formatting a bit.
32aa10203b
2021-10-20 12:19:14 -07:00
c5525f265b fix(lsp): avoid duplicates in client attached buffers (#16099)
closes https://github.com/neovim/neovim/issues/16058

* add client.attached_buffers
* only update client.attached_buffers in on_attach
* use table instead of list for attached_buffers to avoid duplication
2021-10-20 09:33:09 -07:00
dc6c9fe442 fix(lsp): adjust legacy show diagnostic functions to use correct scope (#16106)
* `where` was renamed to `scope`
2021-10-20 08:27:55 -07:00
f421718d8d Merge pull request #16086 from bfredl/termpipe_input
feat(nvim_open_term): support input callback in lua
2021-10-20 14:27:28 +02:00
9e41e82481 feat(nvim_open_term): support input callback in lua 2021-10-20 13:07:43 +02:00
035d82e0d3 build: update cmake min version to 3.10 #16065
* build(cmake): update cmake min version to 3.10
* ci: test cmake minimum required version
* build(cmake): remove some legacy includes
  * Since version 3.5 cmake_parse_arguments is implemented natively.
2021-10-19 19:19:33 -07:00
427bac6877 fix(diagnostic): allow floats to be focusable (#16093)
Setting focus_id allows the float to be focused by calling the function
a second time (a feature of open_floating_preview).
2021-10-19 16:29:52 -06:00
a2994c82e3 fix(diagnostic): handle diagnostics placed past the end of line (#16095) 2021-10-19 16:27:49 -06:00
208d259e83 Merge pull request #15767 from lewis6991/lua_var_index
feat(lua): allow passing handles to `vim.b/w/t`
2021-10-19 22:21:31 +02:00
dfef90a518 fix(gen_vimdoc.py): spacing around inline elements #16092
The spacing fix drew attention to a couple of places that were using
incorrect formatting such as the key listing for `nvim_open_win`, so
those were fixed too.
2021-10-19 12:55:22 -07:00
6c5e7bde9a feat(lua): allow passing handles to vim.b/w/t
vim.bo can target a specific buffer by indexing with a number, e.g:
`vim.bo[2].filetype` can get/set the filetype for buffer 2. This change
replicates that behaviour for the variable namespace.
2021-10-19 19:47:33 +01:00
064411ea7f refactor(diagnostic)!: replace 'show_*' functions with 'open_float' (#16057)
'show_line_diagnostics()' and 'show_position_diagnostics()' are
almost identical; they differ only in the fact that the latter also
accepts a column to form a full position, rather than just a line. This
is not enough to justify two separate interfaces for this common
functionality.

Renaming this to simply 'show_diagnostics()' is one step forward, but
that is also not a good name as the '_diagnostics()' suffix is
redundant. However, we cannot name it simply 'show()' since that
function already exists with entirely different semantics.

Instead, combine these two into a single 'open_float()' function that
handles all of the cases of showing diagnostics in a floating window.
Also add a "float" key to 'vim.diagnostic.config()' to provide global
values of configuration options that can be overridden ephemerally.
This makes the float API consistent with the rest of the diagnostic API.

BREAKING CHANGE
2021-10-19 11:45:51 -06:00
sim
aa4f0879e3 feat(lsp): set codelens virtual text hl_mode to combine (#16048)
It looks a bit off with the extmark going over the cursorline.

(With hl_mode combine it keeps the background of the cursorline under the codelens virtualtext)
2021-10-19 18:41:57 +02:00
308fd88d0d vim-patch:8.2.3537: wrong mode() during 'operatorfunc' #16087
Problem:    mode() does not return the right value in 'operatorfunc'.
Solution:   Reset finish_op while calling 'operatorfunc'.
75c30e96cf
2021-10-19 07:39:25 -07:00
bdd180b5d2 docs: clarify chdir/CWD behaviors #16083 2021-10-19 07:37:11 -07:00
da7a4684df fix(api/nvim_eval_statusline): allow maxwidth=0 #16080
Allows disabling statusline truncation by allowing maxwidth to be
set to 0 in `nvim_eval_statusline`.
2021-10-19 07:35:44 -07:00
9fb0f12357 feat(man.vim): convert spaces to underscores #16068
PostgreSQL ships with man pages for SQL statements like `CREATE TABLE`,
which are provided with underscores as `man 7 CREATE_TABLE`. This patch
updates `man#open_page` (as used by `:Man`) such that visually selecting
the words `CREATE TABLE` in SQL code and pressing `K` properly opens the
desired man page.

Writing `:Man CREATE TABLE` still does not work, since `CREATE` is
interpreted as a section name. (Similarly, `:Man CREATE TABLE AS` fails
because there are too many arguments to `:Man`.) But this is okay,
because if you're typing it anyway then you can just enter underscores
and also tab-completion properly suggests `:Man CREATE_TABLE(7)`.

This is a bit bespoke, but my box has over 9000 man pages (as reported
by `man -k '' | wc -l`), and not one of them has a space in the man page
name, whereas the Postgres manuals do exist and are actually useful.

Test Plan:
On a machine with Postgres manual pages, running

    nvim -u NORC +'exe "norm iCREATE TABLE foo(x int);" | norm 0veeK'

should open the appropriate man page.

wchargin-branch: man-spaces-to-underscores
2021-10-19 07:24:43 -07:00
aac15cf4ad Merge #16000 refactor: uncrustify 2021-10-19 06:51:42 -07:00
6059784770 refactor: remove space after star 2021-10-19 15:20:33 +02:00
38dd53c525 refactor: make commas trail in enums 2021-10-19 15:20:33 +02:00
f98b8d2d44 refactor: enable formatting for files under lib 2021-10-19 15:20:33 +02:00
29b718d04c docs: regenerate (#15986)
Co-authored-by: marvim <marvim@users.noreply.github.com>
2021-10-19 06:03:20 -07:00
4219cfcb90 Merge pull request #16084 from dundargoc/ci/commitlint/checkout-branch-directly
ci(commitlint): use action to checkout to pr branch directly
2021-10-19 07:30:09 -04:00
9039aa24b6 ci(commitlint): use action to checkout to pr branch directly 2021-10-19 09:58:30 +02:00
9086938f7b feat(api): evaluate statusline string #16020
Adds API function `nvim_eval_statusline` to allow evaluating a
statusline string and obtaining information regarding it.

Closes https://github.com/neovim/neovim/issues/15849
2021-10-18 12:44:17 -07:00
e7ea54a3df feat(lsp): use vim.ui.select() in codelenses (#16004)
Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com> Mathias Fußenegger <mfussenegger@users.noreply.github.com>
2021-10-18 11:52:22 -07:00
bd2f61c6c4 fix(lsp): fix cursor row after textEdits (#16038) 2021-10-18 11:49:33 -07:00
bcc9ba51fa fix(lsp): persist diagnostic config for clients
Persist configuration settings set with `vim.lsp.with` and
`vim.lsp.diagnostic.on_publish_diagnostics` by setting the config for
the namespace associated with the client.
2021-10-18 10:01:41 -06:00
6b0a2e6996 build(install): rescan GLOB files on rebuild 2021-10-18 11:44:15 +02:00
389a898586 Merge pull request #16034 from rcowsill/ci/labeler/no-checkout
ci(labeler): Remove checkout steps
2021-10-17 21:18:27 -04:00
e62cac5be1 refactor: convert to doxygen-style comments #16013 2021-10-17 17:55:27 -07:00
aff444659e fix(PVS/V1028): prevent possible overflow #16023
Full warning: "Possible overflow. Consider casting operands, not the
result."

https://pvs-studio.com/en/docs/warnings/v1028/
2021-10-17 17:11:23 -07:00
ffc28dcbdb Merge pull request #15999 from famiu/fix/build/export-windows-symbols
fix(build): export symbols on Windows
2021-10-17 23:58:14 +02:00
8f9f127274 Merge pull request #15973 from bfredl/luapath
fix(runtime): don't use regexes inside lua require'mod'
2021-10-17 18:35:53 +02:00
a1e8199fff Merge pull request #15952 from zeertzjq/vim-8.1.1291
vim-patch:8.0.{1459,1460,1461,1463},8.1.{0602,0604,1291},8.2.{0189,0876,0909,1411}: chdir and DirChanged related patches
2021-10-17 10:26:11 -04:00
ea2023f689 fix(runtime): don't use regexes inside lua require'mod'
Fixes #15147 and fixes #15497. Also sketch "subdir" caching. Currently
this only caches whether an rtp entry has a "lua/" subdir but we could
consider cache other subdirs potentially or even "lua/mybigplugin/"
possibly.

Note: the async_leftpad test doesn't actually fail on master, at least
not deterministically (even when disabling the fast_breakcheck
throttling). It's still useful as a regression test for further changes
and included as such.
2021-10-17 16:21:42 +02:00
77e6ecf85a Merge pull request #15930 from dundargoc/vim-patch/old-style-c-comments
vim-patch:8.1.2396,8.1.2395,8.1.2394,8.1.2392,8.1.2368,8.1.2388,8.1.2379
2021-10-17 10:21:40 -04:00
d2d30dfabd fix(diagnostic): do not override existing config settings #16043
When using `true` as the value of a configuration option, the option is
configured to use default values. For example, if a user configures
virtual text to include the source globally (using
vim.diagnostic.config) and a specific namespace or producer configures
virtual text with `virt_text = true`, the user's global configuration is
overriden.

Instead, interpret a value of `true` to mean "use existing settings if
defined, otherwise use defaults".
2021-10-17 07:18:35 -07:00
38821cc50e test(dirchanged): add tests for DirChanged pattern "auto" 2021-10-17 22:04:53 +08:00
6004f9137a refactor(dirchanged): tab -> tabpage
Match Vim's behavior.
2021-10-17 22:04:53 +08:00
36290a2ebd vim-patch:8.2.1411: when splitting a window localdir is copied but prevdir is not
Problem:    when splitting a window localdir is copied but prevdir is not.
Solution:   Also copy prevdir. (closes vim/vim#6667)
a9a47d157a
2021-10-17 22:04:53 +08:00
60584c0245 vim-patch:8.2.0909: cannot go back to the previous local directory
Problem:    Cannot go back to the previous local directory.
Solution:   Add "tcd -" and "lcd -". (Yegappan Lakshmanan, closes vim/vim#4362)
002bc79991
2021-10-17 22:04:53 +08:00
34cfe74568 vim-patch:8.2.0876: :pwd does not give a hint about the scope of the directory
Problem:    :pwd does not give a hint about the scope of the directory
Solution:   Make ":verbose pwd" show the scope. (Takuya Fujiwara, closes vim/vim#5469)
950587242c
2021-10-17 22:04:53 +08:00
b1dd90c760 vim-patch:8.2.0189: cd() with NULL argument crashes
Problem:    cd() with NULL argument crashes.
Solution:   Check for NULL. (Ken Takata, closes vim/vim#5558)
7cc96923c4
2021-10-17 22:04:53 +08:00
8a2489d0a4 test: partially port Vim patches 8.1.2278 and 8.2.1432 2021-10-17 22:04:53 +08:00
8727d38012 vim-patch:8.1.1291: not easy to change directory and restore
Problem:    Not easy to change directory and restore.
Solution:   Add the chdir() function. (Yegappan Lakshmanan, closes vim/vim#4358)
1063f3d200

Also includes some documentation changes from patch 8.1.1218.
2021-10-17 22:04:53 +08:00
57651df9c1 vim-patch:8.1.0604: autocommand test fails on MS-Windows
Problem:    Autocommand test fails on MS-Windows.
Solution:   Use pathcmp() instead of strcmp() to check if a directory differs.
9eb76af451
2021-10-17 22:04:53 +08:00
e91dee5c21 vim-patch:8.1.0602: DirChanged is also triggered when directory didn't change
Problem:    DirChanged is also triggered when the directory didn't change.
            (Daniel Hahler)
Solution:   Compare the current with the new directory. (closes vim/vim#3697)
2caad3fbbd
2021-10-17 22:04:53 +08:00
eed89d5e0c vim-patch:8.0.1463: test fails without 'autochdir' option
Problem:    Test fails without 'autochdir' option.
Solution:   Skip test if 'autochdir' is not supported.
ec48a9c589
2021-10-17 22:04:53 +08:00
920473d2f2 vim-patch:8.0.1459: cannot handle change of directory
Problem:    Cannot handle change of directory.
Solution:   Add the DirChanged autocommand event. (Andy Massimino,
            closes vim/vim#888)  Avoid changing directory for 'autochdir' too often.
b7407d3fc9

Only add "auto" pattern. "window" and "global" are already implemented.
Skip `Test_dirchanged_auto` using `CheckFunction test_autochdir`.
Part of PR #15952. More information can be found there.

N/A patches for version.c:

vim-patch:8.0.1460: missing file in patch

Problem:    Missing file in patch.
Solution:   Add changes to missing file.
b5cb65ba2b

vim-patch:8.0.1461: missing another file in patch

Problem:    Missing another file in patch.
Solution:   Add changes to missing file.
15833239a4
2021-10-17 22:04:53 +08:00
30af69509d Merge #15994 feat(:source, nvim_exec): script-local scope 2021-10-17 06:20:35 -07:00
aa644b7fd3 fix(build): export symbols on Windows
Closes https://github.com/neovim/neovim/issues/15063

Allows using Neovim core functions using LuaJIT FFI on Windows.
2021-10-17 18:49:55 +06:00
b98383a250 fixup! vim-patch:8.1.2379: using old C style comments 2021-10-17 12:04:06 +02:00
f19dc06081 vim-patch:8.2.3519: TOML files are not recognized (#16045)
Problem:    TOML files are not recognized.
Solution:   Add filetype patterns for TOML. (Aman Verma, closes vim/vim#8984)
28b6a3bef6
2021-10-16 23:38:05 +02:00
fc1cdb8821 Merge pull request #16042 from clason/vim-2286304cdbba
vim-patch:2286304cdbba
chore(test): adapt healthcheck test to new css syntax
2021-10-16 19:24:19 +02:00
fbc5b7b090 chore(test): adapt healthcheck test to new css syntax
The runtime file update
2286304cdb
added a `syn keyword` for `css`, which affects (via `html` and
`markdown` syntax files) the highlighting of `:checkhealth` output
(before, `ERROR:` was highlighted with `healthError`; now the colon is
no longer included).
2021-10-16 19:17:28 +02:00
0ba77f2f31 vim-patch:2286304cdbba
Update runtime files
2286304cdb
2021-10-16 18:03:51 +02:00
4476d4ef17 fixup! vim-patch:8.1.2388: using old C style comments 2021-10-16 17:53:03 +02:00
88ef0d3de4 fixup! vim-patch:8.1.2379: using old C style comments 2021-10-16 17:50:51 +02:00
46749faac4 fixup! vim-patch:8.1.2396: using old C style comments 2021-10-16 17:35:37 +02:00
1ced6cf08c vim-patch:8.2.3501: tmux filetype dection is incomplete (#16021)
Problem:    tmux filetype dection is incomplete
Solution:   Also use tmux for files having text after .conf. (Eric Pruitt,
            closes vim/vim#8971)
e519eb41c1
2021-10-15 20:01:36 -04:00
68b2a9e569 fix: correctly capture uri scheme on windows (#16027)
closes https://github.com/neovim/neovim/issues/15261

* normalize uri path to forward slashes on windows
* use a capture group on windows that avoids mistaking drive letters as uri scheme
2021-10-15 12:03:41 -07:00
4c4a41c70c ci(labeler): Remove checkout steps
Sets GH_REPO and passes PR number to `gh`, making checkout unnecessary
2021-10-15 15:08:12 +01:00
5fd4557573 Merge pull request #16014 from dundargoc/refactor/reduce-char-casts
refactor: reduce number of unique char casts
2021-10-14 23:48:42 +02:00
da9b0abc67 feat(:source, nvim_exec): defer script item creation until s:var access
For anonymous scripts, defer the creation of script items until an attempt to access a script-local
variable is made. This dramatically reduces the number of script items created when using lots of
vim.cmd and nvim_exec especially.

This will mean <SID> usage fails until a script-local variable access is first made.
2021-10-14 12:50:04 +01:00
88e16a7f30 Merge pull request #16019 from dundargoc/ci/commitlint/downgrade-necessary-git-version
ci: allow older git versions when using lintcommit
2021-10-14 07:10:33 -04:00
35c13620a1 ci: allow older git versions when using lintcommit
More specifically, use "git rev-parse --abbrev-ref HEAD" instead of "git
branch --show-current" to get current branch.
2021-10-14 10:13:56 +02:00
d4ed51eb44 feat(:source, nvim_exec): support script-local variables
Based on #13143 (and #11507) with changes:

 - Omit script_type_E. Use sn_name == NULL to determine anon items.
 - Keep SID_STR. Used by anon :source for .lua files (no item).
 - Show SID in get_scriptname output (:verbose set).
 - Factor item creation into new_script_item.
 - Leave sc_seq = 0 (anon scripts don't re-use the same item when re-sourced).
 - Add tests for anon :source.

Co-authored-by: Vikram Pal <vikrampal659@gmail.com>
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2021-10-14 01:27:10 +01:00
6b9cb665fa Merge pull request #16015 from dundargoc/ci/labeler/breaking-changes 2021-10-13 16:12:22 -04:00
348787a1b7 ci: make labeler also work for breaking changes
This means that

"refactor!: description"

and

"refactor(scope)!: description"

will add the "refactor" label.
2021-10-13 19:55:10 +02:00
24a1880866 refactor: reduce number of unique char casts 2021-10-13 18:26:18 +02:00
33e79237bc build(tests): isolate the user environment XDG_DATA_DIRS #16003
Problem:
Some tests were not passing on my machine, specifically in
`test/functional/api/vim_spec.lua` the two tests under
`describe('nvim_get_runtime_file...`

Solution:
Unset `XDG_DATA_DIRS` in the test runner.
Note: Window CI failed if we set it to the same value as `XDG_DATA_HOME`.
2021-10-12 20:12:11 -07:00
5365f24168 fix(heath/provider.vim): using list as string #16007
Fixes #15988
2021-10-12 20:06:19 -07:00
649b3160a1 refactor: reduce number of unique char casts (#15995) 2021-10-12 17:52:54 +02:00
64f0fdc682 docs: .git-blame-ignore-revs #15775 2021-10-12 08:00:13 -07:00
40be47e0fa refactor: format all C files under nvim/ #15977
* refactor: format all C files under nvim
* refactor: disable formatting for Vim-owned files:
    * src/nvim/indent_c.c
    * src/nvim/regexp.c
    * src/nvim/regexp_nfa.c
    * src/nvim/testdir/samples/memfile_test.c
2021-10-12 07:56:52 -07:00
ee342d3cef fix(lsp): maintain client_ids table structure when filtering (#15991) 2021-10-11 08:52:11 -07:00
d288daac2b fix(lsp): do not invoke handlers for unsupported methods (#15926)
Closes https://github.com/neovim/neovim/issues/15174

Instead of invoking handlers with unsupported methods, pre-compute which
clients support a given method and only notify the user if no clients
support the given method.
2021-10-10 22:32:50 -07:00
b3e0d6708e Merge pull request #15502 from seandewar/vim-8.1.1921
Add method call support for more built-ins: vim-patch:8.1.{1336,1952,1961,1984}
2021-10-10 16:48:24 -04:00
62eec98d5f vim-patch:8.2.3491: xpm2 filetype dection is not so good (#15982)
Problem:    xpm2 filetype dection is not so good.
Solution:   Adjust the check for xpm2. (closes vim/vim#8914)
6e77b88df6
2021-10-10 20:57:09 +02:00
45fa70adcb fix(lsp): add done flag to messages returned in util.get_progress_messages() (#15985) 2021-10-10 11:41:16 -07:00
f4359b5dbd vim-patch:8.2.3461: distinguish Normal and Terminal-Normal mode #15878
Problem:    Cannot distinguish Normal and Terminal-Normal mode.
Solution:   Make mode() return "nt" for Terminal-Normal mode. (issue vim/vim#8856)
72406a4bd2
2021-10-09 18:15:46 -07:00
65b8232260 vim-patch:8.2.{210,424,436,...} #15976
* vim-patch:8.2.1082: Coverity complains about ignoring dict_add() return value

Problem:    Coverity complains about ignoring dict_add() return value.
Solution:   Add (void).
91639195ef

N/A patches for version.c:

vim-patch:8.2.0210: Coverity complains about uninitialized field

Problem:    Coverity complains about uninitialized field.
Solution:   Initialize the field.
eed3571fe0

vim-patch:8.2.0424: checking for wrong return value

Problem:    Checking for wrong return value. (Tom)
Solution:   Invert the check and fix the test.
97acfc781b

vim-patch:8.2.0436: no warnings for incorrect printf arguments

Problem:    No warnings for incorrect printf arguments.
Solution:   Fix attribute in declaration.  Fix uncovered mistakes. (Dominique
            Pelle, closes vim/vim#5834)
db99f9f29a

vim-patch:8.2.0498: Coverity complains about uninitialized field

Problem:    Coverity complains about uninitialized field.
Solution:   Initialize the whole typval_T.
4227c789ff

vim-patch:8.2.0668: compiler warning for int/size_t usage

Problem:    Compiler warning for int/size_t usage.
Solution:   Change "int" to "size_t". (Mike Williams)
7f6f56f43c

vim-patch:8.2.1034: compiler warning for uninitialized variables

Problem:    Compiler warning for uninitialized variables.
Solution:   Add initializations. (John Marriott)
38041da1c2

vim-patch:8.2.1117: Coverity warns for unsing unitialized field

Problem:    Coverity warns for unsing unitialized field.
Solution:   Initialize v_lock.
a9a8e5f0dc

vim-patch:8.2.1148: warning for using int instead of size_t

Problem:    Warning for using int instead of size_t.
Solution:   Change "len" argument to size_t. (Mike Williams)
cbb6bdcd89

vim-patch:8.2.1251: Vim9: warning for pointer usage, test failure undetected

Problem:    Vim9: warning for pointer usage, test failure undetected.
Solution:   Fix pointer indirection.  Give error when executing function
            failed for any reason.  Fix instruction names.
682d0a1546

printable_func_name() is applicable but the vim9 changes are N/A.
Compilers can detect misuse of static functions.

vim-patch:8.2.1275: Vim9: compiler warning for buffer size

Problem:    Vim9: compiler warning for buffer size.
Solution:   Change the offset from 10 to 15. (Dominique Pellé, closes vim/vim#6518)
5a67c37a55

vim-patch:8.2.1443: Vim9: crash when interrupting a nested :def function

Problem:    Vim9: crash when interrupting a nested :def function.
Solution:   Push a dummy return value onto the stack. (closes vim/vim#6701)
cdd70f09a5

vim-patch:8.2.1818: SE Linux: deprecation warning for security_context_t

Problem:    SE Linux: deprecation warning for security_context_t.
Solution:   Use "char *" instead. (James McCoy, closes vim/vim#7093)
8956023920

SELINUX support was removed in commit 1de77bbcec

vim-patch:8.2.2004: compiler warning for uninitialized variable

Problem:    Compiler warning for uninitialized variable.
Solution:   Initialize "ufunc". (John Marriott)
b3a01946b3

vim-patch:8.2.2051: Vim9: crash when aborting a user function call

Problem:    Vim9: crash when aborting a user function call.
Solution:   Do not use the return value when aboring. (closes vim/vim#7372)
34c54eb6cb

vim-patch:8.2.2270: warning for size_t to int conversion

Problem:    Warning for size_t to int conversion. (Randall W. Morris)
Solution:   Add a type cast.
38a434f7ba

vim-patch:8.2.2333: Vim9: warning for uninitialized variable

Problem:    Vim9: warning for uninitialized variable. (Tony Mechelynck)
Solution:   Initialize "res".
cb6cbf29e9

vim-patch:8.2.2460: Coverity warns for unused value

Problem:    Coverity warns for unused value.
Solution:   Do not reset the return value to OK.
fc1dafa91c

vim-patch:8.2.2461: Coverity warns for unchecked return value

Problem:    Coverity warns for unchecked return value.
Solution:   Add "(void)" to avoid the warning.
fef8064b54

vim-patch:8.2.2557: compiler warning for shadowd variable

Problem:    Compiler warning for shadowd variable.
Solution:   Declare "p" only once.
087b5ff35d

vim-patch:8.2.2730: Coverity complains about not restoring character

Problem:    Coverity complains about not restoring character.
Solution:   Also restore the character in case of an error.
c9605f0595

vim-patch:8.2.2795: Coverity warns for not using return value

Problem:    Coverity warns for not using return value.
Solution:   Check the return value of compiling the substitute expression.
169502fb0b

vim-patch:8.2.2995: linker errors with dynamic Python 3.10

Problem:    Linker errors with dynamic Python 3.10.
Solution:   Add a couple of library entries. (Zdenek Dohnal, closes vim/vim#8381,
            closes vim/vim#8356)
90478f35a8

vim-patch:8.2.3000: Vim9: warning for uninitialized variable

Problem:    Vim9: warning for uninitialized variable.
Solution:   Add initialization. (John Marriott)
3b814af7e1

vim-patch:8.2.3014: Coverity warns for freeing static string

Problem:    Coverity warns for freeing static string.
Solution:   Do not assign static string to pointer. (Dominique Pellé,
            closes vim/vim#8397)
6e9695525e

vim-patch:8.2.3205: Coverity reports a null pointer dereference

Problem:    Coverity reports a null pointer dereference.
Solution:   Change the logic to avoid Coverity gets confused.
1b862c466b

vim-patch:8.2.3294: Lua: memory leak when adding dict item fails

Problem:    Lua: memory leak when adding dict item fails.
Solution:   Free the typval and the dict item.
1b6acf02b7

vim-patch:8.2.3302: Coverity is not run from github

Problem:    Coverity is not run from github.
Solution:   Add a coverity script. (James McCoy, closes vim/vim#8714)
d57a6bd98c

vim-patch:8.2.3319: Coverity action on github does not work

Problem:    Coverity action on github does not work.
Solution:   Remove undefined $SRCDIR. (James McCoy, closes vim/vim#8739)
eed9616120

* vim-patch:8.2.1085: Coverity complains about ignoring dict_add() return value

Problem:    Coverity complains about ignoring dict_add() return value.
Solution:   Add (void).
6d90c61c5a
2021-10-09 16:40:11 -07:00
5940a3415b vim-patch:8.2.3490: superfluous return statements #15978
Problem:    Superfluous return statements.
Solution:   Remove superfluous return statements from void functions.
            (closes vim/vim#8977)
3826c0513b
2021-10-09 16:38:50 -07:00
0fc8597f01 refactor: format header files with uncrustify #15877
* refactor: format header files with uncrustify
* fixup(justin): skip formatting of terminfo_defs.h
* fixup: force winsock2 to be included first
* fixup: simplify disable/enable directive to "uncrustify:off/on"
2021-10-09 05:20:16 -07:00
a36c6e5df9 fix(checkhealth): duplicate checks if module name has "-" #15935
Problem:    Some plugins have structure `lua/nvim-someplugin/..`
            Since `-` is not allowed in vim function names, healthcheck names in
            lua and in vim can not have the same name (typically vim will use `_`
            instead of `-`).
Solution:   Normalize the names before checking for duplicates.
2021-10-08 17:36:35 -07:00
f620008e59 ci: disable commit-lint on draft PRs #15958 2021-10-08 17:08:47 -07:00
2f50c7b5a3 ci(squash_typos.py): credit authors #15967 2021-10-08 16:37:45 -07:00
1e876bd9a8 fix(mpack): clang warning: unused variable #15968 2021-10-08 16:05:26 -07:00
4f4dbfe81c fix(lsp): update tests using 0.5.0 handler calls (#15969)
Fixes test regression introduced in https://github.com/neovim/neovim/pull/15262
2021-10-08 14:01:55 -07:00
fcc11d5942 fix(lsp): add textDocument/prepareRename to capability map (#15961)
This is a simple fix for #15899, as it should at least stop calling
`prepareRename` on servers that don't support renaming.

I imagine a better fix would be to inspect the actual value for, but
that requires some plumbing changes on how capabilities are evaluated
before sending requests out.

Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
2021-10-08 11:30:18 -07:00
d5dd0aa1e6 fix(diagnostic): error on invalid severity value (#15965)
Users can pass string values for severities that match with the enum
names (e.g. "Warn" or "Info") which are converted to the corresponding
numerical value in `to_severity`. Invalid strings were simply left
as-is, which caused confusing errors later on. Instead, report an
invalid severity string right up front to make the problem clear.
2021-10-08 12:28:02 -06:00
3f09732195 fix(lsp): expose ContentModified error code to callbacks (#15262) 2021-10-08 11:19:33 -07:00
5cbd0fba00 Merge pull request #15962 from bfredl/nosort
fix(buffer_updates): handle :sort of already sorted buffer
2021-10-08 18:19:18 +02:00
e9d6f7ca6c feat(lsp): utilize textEdit.range for startbyte in omnifunc (#15957)
Closes https://github.com/neovim/neovim/issues/15784
2021-10-08 08:47:59 -07:00
ef687d3218 fix(buffer_updates): handle :sort of already sorted buffer 2021-10-08 16:15:35 +02:00
93d33ed02e Merge pull request #15954 from virchau13/fix-table-validation
fix(api): check type in nlua_pop_keydict (fixes #15940)
2021-10-08 13:50:29 +02:00
6064376f6d fix(api): check type in nlua_pop_keydict (#15940) 2021-10-08 18:22:33 +08:00
7f93b2ab01 fix: support severity_sort option for show_diagnostic functions (#15948)
Support the severity_sort option for show_{line,position}_diagnostics.
2021-10-07 19:19:30 -06:00
e16adbf238 fix(provider): compare versions as number, not string #15937
"3.10" < "3.3" but v3.10 > v3.3
Fixes #14586
2021-10-07 14:27:40 -07:00
2d206d5ab2 Merge pull request #15946 from bfredl/issue-12861
fix(buffer_updates): make lockmarks not affect extmarks and buffer updates
2021-10-07 20:52:10 +02:00
fe608750a9 Merge pull request #15839 from bfredl/encgrugg
refactor(api): some cleanup
2021-10-07 20:29:53 +02:00
54b2c6800e fix(buffer_updates): cleanup test behavior 2021-10-07 20:22:10 +02:00
7d171b1c48 fix(buffer_updates): make lockmarks not affect extmarks and buffer updates. fixes #12861
Now mark_adjust() will trigger appropriate buf_updates_send_splice() called by extmark_adjust()
2021-10-07 20:21:23 +02:00
206f4429c6 Merge pull request #15945 from bfredl/emptydelete
fix(buffer_updates): handle :delete of the very last line in buffer
2021-10-07 20:13:15 +02:00
413bb6b7a4 refactor(api): cleanup modify_keymap and parse_keymap_opts 2021-10-07 19:45:30 +02:00
8335e26b2d fix(buffer_updates): handle :delete of the very last line in buffer 2021-10-07 19:35:49 +02:00
b9a35ec7a4 Merge pull request #15934 from kylo252/replacement-size
fix(lint): remove redundant ternary operator
2021-10-07 18:57:48 +02:00
684299ed4c Merge pull request #15941 from dundargoc/refactor/remove-redundant-casts
refactor: remove redundant casts
2021-10-07 18:39:27 +02:00
b55944e8af feat(diagnostic): update jumplist on goto_next/prev (#15942) 2021-10-07 08:46:17 -07:00
cbc60524f1 Merge pull request #15932 from erw7/fix-nvim-buf-set-extmark
fix(api): fix nvim_buf_set_extmark
2021-10-07 17:31:56 +02:00
7356d3cdbd Merge pull request #15316 from vigoux/ts-fix-captures
fix(treesitter): run predicates more often in iter_matches
2021-10-07 16:00:36 +02:00
6d9dea4201 refactor: remove redundant casts 2021-10-07 13:16:55 +02:00
23383451b0 fix(api): fix nvim_buf_set_extmark
Fix the problem of calling clear_virttext on undefined variables.
2021-10-07 19:03:54 +09:00
83778ce567 refactor(api): remove duplicated handle mpack encode/decode functions 2021-10-07 08:00:28 +02:00
c61a3865ee fix: set cursorlineopt=number in terminal mode (#15493)
When entering terminal mode, cursorlineopt is no longer entirely
disabled. Instead, it's set to `number`. Doing so ensures that users
using `set cursorline` combined with `set cursorlineopt=number` have
consistent highlighting of the line numbers, instead of this being
disabled when entering terminal mode.

Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
2021-10-06 16:31:14 -06:00
e06936125a fix(extmarks): splice extmarks on nv_Undo #15920 2021-10-06 09:35:44 -07:00
47dd6c4f47 fix(lint): remove redundant ternary operator
The value of `new_len` will never be '0' since `replacement.size`
is checked against that early on.
2021-10-06 18:21:43 +02:00
d0c0878b3e fix(PVS/V1048): "variable was assigned the same value" #15870 2021-10-06 07:47:31 -07:00
45b9815fc1 refactor: remove superfluous function-like macros #15918
Remove following macros:
CONVERTED
HMLL_ITER_BACK
PACK_STRUCT
IGNORE_BUF
find_shada_parameter
path_try_shorten_fname
2021-10-06 06:27:27 -07:00
1034f7d7b1 vim-patch:8.2.0017: OS/2 and MS-DOS are still mentioned #15928
Problem:    OS/2 and MS-DOS are still mentioned, even though support was
            removed long ago.
Solution:   Update documentation. (Yegappan Lakshmanan, closes vim/vim#5368)
6f345a1458
2021-10-06 06:14:56 -07:00
a161559a00 fix(tui): remove dead code #15929
Before #15889, we used our fork of libuv which supports Windows 7/8.
After #15889, we use upstream libuv, which does not support Windows 7 and lacks
mouse/altbuf support for Windows 8 console.
2021-10-06 05:13:34 -07:00
0c7d7fb45d vim-patch:8.1.2379: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
217e1b8359
2021-10-06 11:50:10 +02:00
3b3e2244db vim-patch:8.1.2388: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
4ba37b5833
2021-10-06 11:50:10 +02:00
86f32dfcdd vim-patch:8.1.2368: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
c667da5185
2021-10-06 11:50:10 +02:00
b4acae2c4a vim-patch:8.1.2392: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
6e0ce171e1
2021-10-06 11:50:10 +02:00
41d3b98deb vim-patch:8.1.2394: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
63d9e730f7
2021-10-06 11:50:10 +02:00
e8f87f15d7 vim-patch:8.1.2395: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
0d6f5d9740
2021-10-06 11:50:10 +02:00
d6c789a571 vim-patch:8.1.2396: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
e38eab22c1
2021-10-06 11:49:42 +02:00
acd5e831b6 fix(checkhealth): mitigate issues with duplicate healthchecks #15919
* fix(runtime/health): mitigate issues with duplicate healthchecks
  Previously if a healthcheck was found as Lua and Vim it was executed
  both times.
  This new implementations prefers Lua, therefore if two are found It only
  runs the Lua one, this way a plugin can mantain both implementations the
  Lua one with the method `check()` and the autoload function `#check()`
  (for none HEAD nvim versions).
  **Note: This will require plugins to use `check()` as the function name,
  since the autoload function that wraps the lua implementation won't be
  called**
* docs(health): use spaces and don't overuse backtics

followup to #15259
2021-10-05 15:37:39 -07:00
6a930a9dc4 vim-patch:8.2.0155: MinGW warnings; tests without +float #15908
Problem:    Warnings from MinGW compiler. (John Marriott) Json test fails when
            building without +float feature.
Solution:   Init variables. Fix Json parsing. Skip a few tests that require
            the +float feature.
a5d5953d59

Omit vim9 changes.
vim9 internal implementation is N/A,
similar to the `vimscript-*` features.

N/A patches for version.c:

vim-patch:8.1.0737: compiler warning for uninitialized variable

Problem:    Compiler warning for uninitialized variable.
Solution:   Add initialization. (John Marriott)
e519dfd713

vim-patch:8.1.1385: signed/unsigned compiler warning

Problem:    Signed/unsigned compiler warning.
Solution:   Use STRLEN() instead of strlen().
71de720c2c

vim-patch:8.2.0165: Coverity warning for using NULL pointer

Problem:    Coverity warning for using NULL pointer.
Solution:   Add missing "else".
5b18c248d3

vim-patch:8.2.0166: Coverity warning for using uninitialized variable

Problem:    Coverity warning for using uninitialized variable.
Solution:   Check for failure.
07da94b0f0

vim-patch:8.2.0167: Coverity warning for ignoring return value

Problem:    Coverity warning for ignoring return value.
Solution:   Check the return value and jump if failed.
58ceca5cae

"src/testdir/test_vim9*.vim" files are N/A
because vim9 code is currently unsupported.

vim-patch:8.2.0168: Coverity warning for assigning NULL to an option

Problem:    Coverity warning for assigning NULL to an option.
Solution:   Use empty string instead of NULL.
97a2af39cd

vim-patch:8.2.0169: Coverity warning for dead code

Problem:    Coverity warning for dead code.
Solution:   Check if inside try-finally.
8cbd6dfc0c

vim-patch:8.2.0170: Coverity warning for ignoring return value

Problem:    Coverity warning for ignoring return value.
Solution:   Check the return value and return if failed.
a6d536829a

vim-patch:8.2.0172: Coverity warning for not restoring character

Problem:    Coverity warning for not restoring character.
Solution:   Restore the character also in case of failure.
4549ece47c

vim-patch:8.2.0254: compiler warning for checking size_t to be negative

Problem:    Compiler warning for checking size_t to be negative.
Solution:   Only check for zero. (Zoltan Arpadffy)
ae8d2de3a9

vim-patch:8.2.0326: compiler warning for using uninitialized variable

Problem:    Compiler warning for using uninitialized variable. (Yegappan
            Lakshmanan)
Solution:   Do not jump to failed but return.
d5aec0ced1

vim-patch:8.2.3387: compiler warning for non-static function

Problem:    Compiler warning for non-static function.
Solution:   Make the function static. (Dominique Pellé, closes vim/vim#8816)
de05ae7158
2021-10-05 10:58:06 -07:00
59edd377d3 docs: regenerate #15545 2021-10-05 10:48:48 -07:00
dd7812ec66 fix(docs): add win_config.c 2021-10-05 09:56:22 -07:00
38ef66f4c1 fix(docs): duplicate tag, wrong formatting
Fixes build error:
    cd /usr/home/build/neovim/build/runtime && /usr/local/bin/cmake -E remove doc/* && /usr/local/bin/cmake -E copy_directory /usr/home/build/neovim/runtime/doc doc && /usr/home/build/neovim/build/bin/nvim -u NONE -i NONE -e --headless -c helptags\ ++t\ doc -c quit
    Error detected while processing command line:
    E154: Duplicate tag "vim.register_keystroke_callback()" in file doc/lua.txt
2021-10-05 09:45:25 -07:00
49fdc62114 feat(api): named marks set, get, delete #15346
Adds the following API functions.

- nvim_buf_set_mark(buf, name, line, col)
  * Set marks in a buffer.
- nvim_buf_del_mark(buf, name)
  * Delete a mark that belongs to buffer.
- nvim_del_mark(name)
  * Delete a global mark.
- nvim_get_mark(name)
  * Get a global mark.

Tests:

- Adds test to all the new api functions, and adds more for the existing
  nvim_buf_get_mark.
    * Tests include failure cases.

Documentation:

- Adds documentation for all the new functions, and improves the
  existing fucntion docs.
2021-10-05 08:49:20 -07:00
912a6e5a9c feat(lsp): improve json deserialization performance (#15854)
* Add optional second table argument to vim.json.decode which takes
  a table 'luanil' which can include the 'object' and/or 'array' keys. These
  options use luanil when converting NULL in json objects and arrays
  respectively. The default behavior matches the original lua-cjson.
* Remove recursive_convert_NIL function from rpc.lua, use
  vim.json.decode with luanil = { object = true } instead. This removes a hotpath
  in the json deserialization pipeline by dropping keys with json NULL
  values throughout the deserialized table.
2021-10-05 08:37:20 -07:00
f6c0a37b02 build(deps)!: use libuv 1.42.0 upstream for WIN32 (#15889)
Switch libuv from https://github.com/neovim/libuv fork to upstream for WIN32.
Upstream at 1.42.0 is now used for all platforms.

BREAKING CHANGE: removes Windows 7 support
BREAKING CHANGE: removes support for mouse and alternate buffers in TUI for
Windows 8 and 8.1
2021-10-05 17:23:42 +02:00
3b531d50a8 docs(contrib): recommend nvim --clean #15917 2021-10-05 08:01:09 -07:00
f6a9f0bfca fix(vim-patch): add missing nginx runtime files (#15916)
Followup to incomplete runtime update https://github.com/neovim/neovim/pull/15911
2021-10-05 15:19:16 +02:00
17f7c83f29 docs(intro.txt): change vimhelp.appspot.com to vimhelp.org (#15915)
Ref 6c1e1570b1 (diff-644ad027e3580bc940a6b7b4aaf1869bae267f7ff30e359e523d5de70e317106)
2021-10-05 06:49:15 -06:00
0c2a7aa5f7 vim-patch:6e649224926b (#15911)
Update runtime files
6e64922492
2021-10-05 14:12:16 +02:00
0a7a215aa6 fix(healthcheck): update builtins to the new convention #15914
Adjust some builtin healthchecks to use Lua, after #15259
2021-10-05 05:05:33 -07:00
6d8cafed40 ci: exclude lua-cjson from PVS report #15859 2021-10-05 05:02:49 -07:00
a2734efdc2 vim-patch:8.2.3473: some tcl files are not recognized #15912
Problem:    Some files with tcl syntax are not recognized.
Solution:   Add a few file patterns. (Doug Kearns)
78aa5ffe31
2021-10-05 04:21:52 -07:00
93a7571fab Merge pull request #15259 from muniter/muniter/checkhealth-from-lua
feat(checkhealth): support Lua healthchecks
2021-10-05 11:27:07 +02:00
655e489e90 docs(develop.txt): nvim_open_win is now in win_config.c (#15909) 2021-10-04 20:10:07 -06:00
8b43b07333 feat(ex_checkhealth): provide function for command line completion
Move away from providing completion with ExpandRTDir to ExpandGeneric
providing the function get_healthcheck_name which caches the results for
the current command line prompt.

It does the almost the same thing the Vim function 'get_healthcheck'
implemented in 'runtime/autoload/health.vim' does.
2021-10-04 16:51:54 -05:00
b60e6448eb Merge pull request #15813 from bfredl/neomouse
fix(mouse): correct dragged position in composed layout
2021-10-04 23:08:39 +02:00
8f2a8b50da docs(runtime/health): update with new lua support
- describe how the lua support works
- explain new behavior of :checkhealth *
- fixed formatting to use tab instead of spaces
2021-10-04 14:28:54 -05:00
c65f956015 test(runtime/health): cover lua healthchecks
- Add tests for lua healthchecks (failure, success and submodules).
- Reword some of the test naming for improved logs readability.
- Modify render test to accomodate the changes of the health autoload function.
- Add test for :checkhealth completion of Lua healtchecks.
2021-10-04 14:28:54 -05:00
9249dcdda1 feat(runtime/health): support lua healthchecks
- Refactor health.vim to discover lua healthcheck in the runtime
  directories lua/**/health{/init}.lua
- Support healthchecks for lua submodules e.g :checkhealth vim.lsp and
  also support wildcard "*" at the end for all submodules
  :checkhealth vim*
- Refactor health.vim to use variable scope instead of output capturing
- Create health.lua module to wrap report functions and future
  extensibility.
- Move away from searching just in the runtimepath, use
  `nvim_get_runtime_file` due to #15632

Example:
Plugin linter in rtp can declare it's checkhealts in lua module
`lua/linter/health{/init}.lua` that returns a table with a method
"check" that when executed calls the report functions provided by the
builtin lua module require("health").

The plugin also has a submodule `/lua/linter/providers` in which it
defines `/lua/linter/providers/health{/init}.lua`

This plugin healthcheck can now be run by the ex command:
  `:checkhealth linter linter.providers`

Also calling all submodules can be done by:
  `:checkhealth linter*

And "linter" and "linter.provider" would be discovered when:
  `:checkhealth`
2021-10-04 14:28:54 -05:00
83fa8956c3 docs: fix typo 2021-10-04 13:09:32 -06:00
810da1a702 fix(mouse): correct dragged position in composed layout 2021-10-04 21:00:42 +02:00
253a012469 Merge pull request #15901 from bfredl/apiorg
refactor(api): re-organanize public and private API functions
2021-10-04 20:06:41 +02:00
22e4a2a286 refactor(api): move window config related functions to own file 2021-10-04 19:23:00 +02:00
c4d581deae refactor: inline unnecessary macros #15890 2021-10-04 08:35:18 -07:00
c7a63f35db feat(startup): load builtin plugins with --clean #15893
Closes #15605
2021-10-04 07:01:49 -07:00
44f7b46199 refactor: remove redundant char casts #15888 2021-10-04 06:40:43 -07:00
b4c54ffa22 Merge pull request #15894 from gpanders/hardcode-diagnostic-highlights
refactor: define diagnostic highlights in syntax.c
2021-10-04 10:52:05 +02:00
088026205f refactor: define diagnostic highlights in syntax.c 2021-10-03 20:06:06 -06:00
8a9f292991 Merge #15218 from gpanders/split-trimempty
feat(lua): add "noempty" param to vim.split()
2021-10-03 17:33:12 -07:00
a0bf28cd54 vim-patch:8.2.3469: some files with json syntax are not recognized (#15891)
Problem:    Some files with json syntax are not recognized.
Solution:   Add a few file patterns. (Emiliano Ruiz Carletti, closes vim/vim#8947)
50c5689342
2021-10-03 16:50:51 -06:00
a8504638cd feat(eval/method): partially port v8.1.1987
Cannot be fully ported as the remote_*() functions from +clientserver
are not yet ported. Include the test changes anyway.

line()'s optional winid argument was already ported. (Wasn't added in
this patch; this just adds documentation)
2021-10-03 20:12:20 +01:00
c5583df3c0 vim-patch:8.1.1984: more functions can be used as methods
Problem:    More functions can be used as methods.
Solution:   Make various functions usable as a method.
3f4f3d8e7e

test_prompt_buffer.vim already had all the changes, except
Test_prompt_garbage_collect().
2021-10-03 20:12:20 +01:00
d23d37b212 vim-patch:8.1.1961: more functions can be used as a method
Problem:    More functions can be used as a method.
Solution:   Allow more functions to be used as a method.  Add a test for
            mapcheck().
a144983633

mzeval() (if_mzscheme) is N/A.
2021-10-03 20:12:20 +01:00
86593beaa4 feat(eval/method): partially port v8.1.1954
Does not include listener_*() functions.

js_*() functions are N/A.

json_encode() and json_decode() didn't include tests; add some anyway
(to json_functions_spec.lua).

test_lua.vim isn't included yet, so add tests to luaeval_spec.lua.
2021-10-03 20:06:33 +01:00
59c8a1fd51 feat(eval/method): partially port v8.1.1953
Adds method call support for all functions in the patch, but it cannot
be fully ported due to missing tests for:

- index(): requires Blobs from v8.1.0735.
           Note that index() was already added as a method in v8.1.1803;
           this patch only adds a test.

- iconv(): requires v8.1.1136 for test_termcodes.vim.

Nvim deprecated inputdialog(), so it no longer has an eval.txt entry.

Keep the test for hlexists() commented-out, just like previously. (Nvim
always defines the Number group, so it always returns 1 instead)

Cannot include both changes to test_syn_attr.vim as Nvim doesn't support
":hi term=..."; however, both test the same ->hlID() syntax anyway.
2021-10-03 20:06:32 +01:00
8b7615c735 vim-patch:8.1.1952: more functions can be used as a method
Problem:    More functions can be used as a method.
Solution:   Allow more functions to be used as a method.
5d69fdb7c4
2021-10-03 20:06:32 +01:00
3137c7d635 feat(eval/method): partially port v8.1.1925
Adds method call support for all functions in the patch, but it cannot
be fully ported due to missing tests for:

- getcwd(): requires chdir() and Test_chdir_func() from v8.1.1291.

Note that the method call tests for getreg() and getregtype() were
removed in v8.2.1547, which has already been ported, but doesn't seem to
have been replaced with a new test...

This patch also makes getchangelist()'s argument optional (defaults to
the current buffer).

eval.txt includes a typo for gettabwinvar(), which is fixed in
v8.1.1952.
2021-10-03 20:06:32 +01:00
6110480c29 feat(eval/method): partially port v8.1.1921
Adds method call support for all functions in the patch, but it cannot
be fully ported due to missing tests for:

- filereadable(): requires v8.1.1378 for Test_delete_rf(), but there
                  appears to have been some trouble porting it. (#12784)

- confirm(): requires v8.1.0832 for Test_confirm() and v8.1.0815 for
             feedkeys()'s "L" flag.

             (I did attempt to port the test using nvim_input() instead,
             but seems that input handling for confirm() doesn't work in
             --headless mode?)

             Note that confirm() was actually added as a method in
             v8.1.1915.

Uncomment use of method call syntax in Test_Executable() previously
included instead from v8.2.2259.
2021-10-03 20:06:31 +01:00
0193b3a391 vim-patch:8.1.1336: some eval functionality is not covered by tests
Problem:    Some eval functionality is not covered by tests.
Solution:   Add a few more test cases. (Masato Nishihata, closes vim/vim#4374)
17aca707f9

Test_expand() changes are required for v8.1.1921.
Test_call() and Test_cindent_func() are already ported.
2021-10-03 20:06:31 +01:00
7ba11e06c0 vim-patch:8.2.3466: completion submode not indicated for virtual replace (#15886)
Problem:    Completion submode not indicated for virtual replace.
Solution:   Add submode to "Rv". (closes vim/vim#8945)
cc8cd44533
2021-10-03 15:04:51 -04:00
04b59ebd85 vim-patch:8.2.3465: cannot detect insert scroll mode (#15885)
Problem:    Cannot detect insert scroll mode.
Solution:   Add "scroll" to complete_info(). (closes vim/vim#8943)
27fef59dd1
2021-10-03 14:53:58 -04:00
310d53e5d0 refactor(api): make export of functions opt-in, not opt-out 2021-10-03 16:14:47 +02:00
3beea1fe1b Merge pull request #15516 from bfredl/keyset
refactor(api): Represent option dicts as a structs in C and reduce conversion overhead from lua
2021-10-03 14:31:53 +02:00
9fe704f88e vim-patch:8.2.3464: nginx files are not recognized (#15883)
Problem:    nginx files are not recognized.
Solution:   Add several file patterns. (Chris Aumann, closes vim/vim#8922)
8b8c0ed657
2021-10-03 13:40:59 +02:00
32565922ef refactor(api): handle option dicts properly
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
2021-10-03 10:46:57 +02:00
23d13aa4cc Merge pull request #15786 from gpanders/diagnostic-signs-unique-severity 2021-10-02 21:01:40 -06:00
0f554ef6f8 refactor(diagnostics): always make 'set' go through 'show'
Always make calls to `vim.diagnostic.set` call `vim.diagnostic.show`.
This creates an easier to reason about code path and is also less
surprising when users wish to override override `vim.diagnostic.show`
with custom behavior and `vim.diagnostic.set` is called with empty
diagnostics.

Functionally, the end result is the same: when `show` is called with an
empty diagnostics list, it just calls `hide` and then returns, which is
exactly what `reset` does right now.
2021-10-02 20:37:09 -06:00
1124439954 docs(diagnostic): add blurb on how to replace builtin handlers 2021-10-02 20:37:09 -06:00
c319c800cf test(diagnostic): add test case for signs 2021-10-02 20:37:09 -06:00
0c06da1f0a fix(nvim_open_win): crash if autocmds delete buffer/window #15549
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 1def3d1542.

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
2021-10-02 19:10:59 -07:00
ad1c42a97d vim-patch:8.2.3460: some type casts are not needed #15868
Problem:    Some type casts are not needed.
Solution:   Remove unnecessary type casts. (closes vim/vim#8934)
dfa5e464d4
2021-10-02 18:04:21 -07:00
4449297d12 docs(lsp): clarify parameters of some util functions (#15851)
`pad_left` and `pad_right` are unused
List used keys of `opts` in `make_floating_popup_options`
2021-10-02 17:55:54 -07:00
b3e815094b fix(float)!: always anchor to corner of window including border #15832
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
2021-10-02 17:36:24 -07:00
c5e8c39102 Merge #15803 fix(lsp_spec): tests depend on previous session 2021-10-02 16:50:20 -07:00
8c74c895b3 refactor: format with uncrustify #15872
* refactor: format with uncrustify
* refactor: fix function parameter comments
2021-10-02 14:41:50 -07:00
09307e64df fix(docs): uncrustify.cfg location #15817 2021-10-02 14:32:18 -07:00
ac973d5532 docs: remove obsolete text on language #15875 2021-10-02 14:30:13 -07:00
c4857b695f fix(input): resolve isolated (non-ALT/META) mappings #13109
Problem:
Since 2f06413dfb #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
2021-10-02 14:27:37 -07:00
79fb9ed080 Merge pull request #15867 from bfredl/starpack
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
2021-10-02 17:47:55 +02:00
069d1de184 fix(lsp_spec): tests depended on previous session
- fix tests which accidentally depended on previous session
2021-10-02 08:26:57 -07:00
c74a706869 fix(release.sh): ignore failed "rm" 2021-10-02 08:26:57 -07:00
9c268263b1 refactor: format with uncrustify #15842
* refactor: format with uncrustify
* refactor: convert function comments to doxygen
2021-10-02 07:59:41 -07:00
9df7e022b4 fix(runtime): add packages as "/pack/*/start/*" patterns to &rtp
This makes `globpath(&rtp, ...)` work again for start packages
2021-10-02 16:45:19 +02:00
898f91f0f3 refactor: convert char_u to char #15824 2021-10-02 06:53:48 -07:00
a3b5b4a31e feat(vim-patch.sh): better detection of remote name #15846 2021-10-02 06:15:01 -07:00
724ffe7095 feat(diagnostics): add vim.diagnostic.get_namespaces (#15866)
Many vim.diagnostic functions expect the user to pass in a namespace id.

This PR allows the user to list active diagnostic namespaces:

```lua
:lua print(vim.inspect(vim.diagnostic.get_namespaces()))

{
  [7] = {
    name = "vim.lsp.client-1",
    opts = {},
    sign_group = "vim.diagnostic.vim.lsp.client-1"
  }
}
```
2021-10-01 22:50:28 -07:00
36408146ad docs(diagnostics): add "priority" option to signs table (#15860)
This feature was added in #15785, but the docs for
vim.diagnostic.config() weren't updated.
2021-10-01 19:07:55 -06:00
dc4670038e Merge pull request #15864 from jamessan/gitattributes
fix: include ci/ in exported tarball
2021-10-01 19:55:01 -04:00
d6f03aaafd fix: include ci/ in exported tarball
src/nvim/testdir/runnvim.sh re-uses the test suite code from ci/ to
cleanup the output of legacy tests.

Closes #15856

[skip ci]
2021-10-01 19:53:27 -04:00
a940952fe2 Merge pull request #15861 from dundargoc/refactor/xdiff
refactor: update path to xdiff in comments
2021-10-01 17:53:27 -04:00
1efbd4980f Merge pull request #15862 from dundargoc/refactor/xdiff-pvs
refactor: remove PVS comment on top of files
2021-10-01 17:52:50 -04:00
d9b3e41a63 Merge pull request #15863 from dundargoc/docs/contributing/commit-message
docs: update preferred commit message style for the static analyzer PRs
2021-10-01 17:52:13 -04:00
38b0306591 docs: update preferred commit message style for the static analyzer PRs 2021-10-01 21:22:32 +02:00
3134ef3d9f refactor: remove PVS comment on top of files
The xdiff directory is excluded from the PVS report so the comment isn't
required.
2021-10-01 21:08:53 +02:00
19ab0f22cc refactor: update path to xdiff in comments 2021-10-01 21:07:02 +02:00
458f2aad5c fix(treesitter): run predicates more often in iter_matches
Superseedes #15126, and fixes the issue.
2021-10-01 09:20:35 +02:00
9337fff8aa Merge pull request #15852 from bfredl/afteragain
fix(runtime): fix ordering of "after" packages
2021-09-30 22:32:02 +02:00
251ce9ddd1 fix(runtime): fix ordering of "after" packages
they must come after ordinary runtime dirs which are not "after"
2021-09-30 22:03:18 +02:00
7152353ade ci: add type and scope from PR title as labels #15850
This only works if the label exists in the first place of course.
2021-09-30 08:08:36 -07:00
270cc1d70f Merge pull request #14937 from dstein64/vim-8.1.2304
vim-patch:8.1.2304,8.1.2309,8.1.2319,8.1.2321
2021-09-29 20:59:53 -04:00
d90fb1c0bf Refactor/uncrustify (#15790)
* 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
2021-09-29 19:48:50 +02:00
88442c2fa6 docs: add 'plus one' to correct getmousepos docs
This change was applied to Vim as part of 90df4b9.
90df4b9d42
2021-09-29 11:13:49 -04:00
096309037b chore: remove empty line
This update was part of vim-patch:4c29502.
4c295027a4
The other parts of that patch were applied to Neovim in ad6bb38.
2021-09-29 11:13:49 -04:00
ae97f25e9d test: add a test for getmousepos() 2021-09-29 11:13:49 -04:00
c423ee584a vim-patch:8.1.2321: cannot select all text with the mouse
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)
0a5aa7b28a
2021-09-29 11:13:49 -04:00
037ec8f208 vim-patch:8.1.2319: compiler warning for int size
Problem: Compiler warning for int size.
Solution: Add typecast. (Mike Williams)
07a63d8633
2021-09-29 11:13:49 -04:00
95bf86c2bf vim-patch:8.1.2309: compiler warning for argument type
Problem: Compiler warning for argument type.
Solution: Use linenr_T and cast to varnumber_T. (John Marriott)
abe12a1a4f
2021-09-29 11:13:49 -04:00
3b9e75b366 vim-patch:8.1.2304: cannot get the mouse position when getting a mouse click
Problem:    Cannot get the mouse position when getting a mouse click.
Solution:   Add getmousepos().
db3a205147
2021-09-29 11:13:49 -04:00
ec4731d982 feat(lsp): add codeAction/resolve support (#15818)
Closes https://github.com/neovim/neovim/issues/15339 and https://github.com/neovim/neovim/issues/15828
2021-09-28 14:04:01 -07:00
3507d58dfb Merge pull request #15812 from bfredl/taba
fix(runtime): make a copy of runtime_search_path when iterating
2021-09-28 19:12:39 +02:00
19a77cd5a7 feat(lsp): add client command support to codelens (#15820)
Also adds a check against the server capabilities to fix
https://github.com/neovim/neovim/issues/15183
2021-09-28 09:19:19 -07:00
ff18a8bcc4 refactor(lsp): remove json encode/decode wrappers (#15826) 2021-09-28 09:13:44 -07:00
9ca7b6b71a fix(ui): s/format_entry/format_item to match docs (#15819)
Follow up to https://github.com/neovim/neovim/pull/15771
2021-09-27 16:12:03 -07:00
63fde086d9 feat(ui): add vim.ui.select and use in code actions (#15771)
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.
2021-09-27 21:57:28 +02:00
a0ec8597e3 fix(runtime): make a copy of runtime_search_path when iterating
This is to prevent concurrent modification, just like save_rtp
in the vim 8 implementation
2021-09-27 21:17:53 +02:00
6736ee8be5 chore: remove unused script finddeclarations.pl #15814 2021-09-27 09:02:42 -07:00
96614f84ab fix(lsp): avoid serializing boolean as key (#15810)
In vim.lsp.buf.references, the key vim.type_idx (which evaluates to a
boolean) was set to equal vim.types.dictionary. This resulted in a
boolean key in json which is not allowed by the json spec, and which
lua-cjson fails to serialize.
2021-09-27 00:32:30 -07:00
bec7f47cee docs: document dependencies in MAINTAIN.md #15801
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2021-09-26 17:24:20 -07:00
187e3a3b7e refactor(diagnostic): use sign priority for severity_sort #15785
Rather than relying on the order in which signs are placed to dictate
the order in which they are displayed, explicitly set the priority of
the sign according to the severity of the diagnostic and the value of
severity_sort. If severity_sort is false or unset then all signs use the
same priority.
2021-09-26 16:02:18 -07:00
cb51a1b615 docs: add lua-cjson to third-party licenses #15800 2021-09-26 14:57:57 -07:00
73280a7987 feat(lsp): allow subset of CodeActionContext as arg to code_action methods (#15793)
This makes it easier to filter the code actions. For example:

    vim.lsp.buf.code_action { only = 'refactor' }
2021-09-26 23:40:28 +02:00
c217766f7c feat(lsp): use cjson for lsp rpc (#15759) 2021-09-26 22:53:04 +02:00
68c65b7732 Merge pull request #14871 from mjlbach/feature/lua-cjson-embedded
feat(lua): expose lua-cjson as vim.json
2021-09-26 12:23:46 -07:00
3246bf5f4e ci(lintcommit.lua): replace third-party commitlint #15747 2021-09-26 12:13:59 -07:00
9c31f3b026 test: add tests for vim.json 2021-09-26 11:52:17 -07:00
9686c21237 Merge pull request #15797 from smolck/ui-stuff
fix(ui_bridge): set bridge width and height on attach
2021-09-26 20:16:39 +02:00
08ee03cb16 fix(ui_bridge): set bridge width and height on attach 2021-09-26 11:00:40 -05:00
44145847dc fix(tui): remove obsolete $NVIM detection #15791
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.
2021-09-26 08:27:18 -07:00
d4fa1649fb Merge pull request #15351 from bfredl/virt_line
feat(screen): virtual lines
2021-09-26 16:56:19 +02:00
c273eb3100 refactor: replace sprintf with snprintf #15794 2021-09-26 07:53:51 -07:00
68d6ff8802 Merge pull request #15721 from bfredl/electricboogalo
fix(runtime): some ordering issues (and start work on cache mechanism)
2021-09-26 16:20:23 +02:00
ac3288d556 fix(runtime): ordering of loading packages with user config
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.
2021-09-26 15:44:40 +02:00
392c658d4d feat(decorations): support virtual lines (for now: only one block at a time) 2021-09-26 12:19:54 +02:00
30fed27241 feat(lua): expose lua-cjson as vim.json
* 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>
2021-09-26 00:35:55 -07:00
8decc9f52d feat(lua): add lua-cjson as vendored dependency
Derived from the openresty lua-cjson fork at commit 3d93d29709
2021-09-26 00:35:47 -07:00
84f66909e4 refactor: use kwargs parameter in vim.split 2021-09-25 20:11:32 -06:00
5fa26e2c2f feat: add trimempty optional parameter to vim.split
The `split()` VimL function trims empty items from the returned list by
default, so that, e.g.

  split("\nhello\nworld\n\n", "\n")

returns

  ["hello", "world"]

The Lua implementation of vim.split does not do this. For example,

  vim.split("\nhello\nworld\n\n", "\n")

returns

  {'', 'hello', 'world', '', ''}

Add an optional parameter to the vim.split function that, when true,
trims these empty elements from the front and back of the returned
table. This is only possible for vim.split and not vim.gsplit; because
vim.gsplit is an iterator, there is no way for it to know if the current
item is the last non-empty item.

Note that in order to preserve backward compatibility, the parameter for
the Lua vim.split function is `trimempty`, while the VimL function uses
`keepempty` (i.e. they are opposites). This means there is a disconnect
between these two functions that may surprise users.
2021-09-25 20:11:30 -06:00
b3b02eb529 docs(CONTRIBUTING.md): how to use uncrustify #15780
close #15780
2021-09-25 18:38:51 -07:00
8b0e6cc05d fix(api): fix crash after set_option_value_for() #15390
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
2021-09-25 17:48:06 -07:00
2f9b9e61d7 refactor: format with uncrustify #15778
* fixup: force exactly one whitespace between type and variable
2021-09-25 17:16:04 -07:00
05d685be52 Merge pull request #15776 from jamessan/macos-11-ci
Add macos-11 CI
2021-09-25 09:43:57 -04:00
7cb34a341d test(normal): CA_COMMAND_BUSY in visual select mode #15292
Fix was already applied in 5f144efefa #15688,
but this commit adds another dimension to the test.

Test correctly fails after reverting 5f144efefa.

ref #15288
2021-09-24 09:59:36 -07:00
64a5eddc89 ci: use runner, instead of os, for job name and cache key 2021-09-24 09:01:50 -04:00
e0cf32c6de ci: add macOS 11 build 2021-09-24 09:01:30 -04:00
bc570b0064 Merge #15774 fix(pvs): fix warnings, script 2021-09-24 05:13:55 -07:00
55d1e630b4 Merge #15731 vim-patch:7.4.725,8.2.{0597,0598,0924,1035}
fixes #14581
2021-09-24 05:11:19 -07:00
7a26eb8a56 refactor: format with uncrustify #15755 2021-09-24 05:03:15 -07:00
03ed72642d fix(pvs): Exclude xdiff from analysis
ref 088161a945
ref fbe88ef8f5
2021-09-24 03:26:31 -07:00
508fcdadb7 fix(PVS): disable "typo" warnings V1051, V1074
PVS is worried about typos. Now we need it to stop worrying...
Disable these checks entirely, they are all false positives.

tui.c:1873        V1074   Boundary between escape sequence and string is unclear. The escape sequence ends with a letter and the next character is also a letter. Check for typos.
tui.c:1983        V1074   Boundary between escape sequence and string is unclear. The escape sequence ends with a letter and the next character is also a letter. Check for typos.

regexp_nfa.c:6189 V1051   Consider checking for misprints. It's possible that the 'pim->result' should be checked here.
screen.c:2928     V1051   Consider checking for misprints. It's possible that the 'vcol_sbr' should be checked here.
screen.c:3187     V1051   Consider checking for misprints. It's possible that the 'line_attr' should be checked here.
screen.c:3267     V1051   Consider checking for misprints. It's possible that the 'multi_attr' should be checked here.
screen.c:4747     V1051   Consider checking for misprints. It's possible that the 'redraw_next' should be checked here.
syntax.c:3448     V1051   Consider checking for misprints. It's possible that the 'arg_end' should be checked here.
syntax.c:3625     V1051   Consider checking for misprints. It's possible that the 'arg_end' should be checked here.
tui.c:1836        V1051   Consider checking for misprints. It's possible that the 'data->unibi_ext.set_cursor_style' should be checked here.
tui.c:1863        V1051   Consider checking for misprints. It's possible that the 'data->unibi_ext.set_cursor_style' should be checked here.
tui.c:1882        V1051   Consider checking for misprints. It's possible that the 'data->unibi_ext.set_cursor_style' should be checked here.
2021-09-24 03:22:26 -07:00
3c7cef7b08 fix(PVS V681): function call order is undefined
https://pvs-studio.com/en/docs/warnings/v681/
2021-09-24 02:49:59 -07:00
fefd1652e7 fix(PVS V576): false positive
`lower`, `upper` are `varnumber_T`, correctly matched to `PRIdVARNUMBER`
format.
2021-09-24 02:43:37 -07:00
0d59c01a64 fix(PVS V576): wrong fprintf() format
https://pvs-studio.com/en/docs/warnings/v576/

Before 1bffe66508 this was originally
"%ld" but that looks like a mistake. At least now, w_height_inner and
w_width_inner are just `int`.
2021-09-24 02:29:49 -07:00
d15defeb2f fix(PVS V507): false positive
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.
2021-09-24 02:09:52 -07:00
433bda405e fix(lsp): guard textDocument/codeAction command logic #15769
Problem:

    Error executing vim.schedule lua callback: ...ovim/HEAD-aba3979/share/nvim/runtime/lua/vim/lsp/buf.lua:502: command: expected string, got
     nil
    stack traceback:
            ...ovim/HEAD-aba3979/share/nvim/runtime/lua/vim/lsp/buf.lua:502: in function 'execute_command'
            ...HEAD-aba3979/share/nvim/runtime/lua/vim/lsp/handlers.lua:151: in function <...HEAD-aba3979/share/nvim/runtime/lua/vim/lsp/handlers.lua:113>
            ...ovim/HEAD-aba3979/share/nvim/runtime/lua/vim/lsp/buf.lua:465: in function 'callback'
            ...r/neovim/HEAD-aba3979/share/nvim/runtime/lua/vim/lsp.lua:1325: in function 'handler'
            ...r/neovim/HEAD-aba3979/share/nvim/runtime/lua/vim/lsp.lua:899: in function 'cb'
            vim.lua:281: in function <vim.lua:281>


Solution:

This is a follow-up to the work done in
6c03601e3a.
There are valid situations where a `textDocument/codeAction` is returned
without a command, since a command in optional. For example from Metals,
the Scala language server when you get a code action to add a missing
import, it looks like this:

```json
Result: [
  {
    "title": "Import \u0027Instant\u0027 from package \u0027java.time\u0027",
    "kind": "quickfix",
    "diagnostics": [
      {
        "range": {
          "start": {
            "line": 6,
            "character": 10
          },
          "end": {
            "line": 6,
            "character": 17
          }
        },
        "severity": 1,
        "source": "bloop",
        "message": "not found: value Instant"
      }
    ],
    "edit": {
      "changes": {
        "file:///Users/ckipp/Documents/scala-workspace/sanity/src/main/scala/Thing.scala": [
          {
            "range": {
              "start": {
                "line": 6,
                "character": 10
              },
              "end": {
                "line": 6,
                "character": 17
              }
            },
            "newText": "Instant"
          },
          {
            "range": {
              "start": {
                "line": 1,
                "character": 0
              },
              "end": {
                "line": 1,
                "character": 0
              }
            },
            "newText": "\nimport java.time.Instant\n"
          }
        ]
      }
    }
  }
]
```

This change just wraps the logic that grabs the command in a conditional
to skip it if there is no command.
2021-09-23 18:20:10 -07:00
be93821647 fix: move contrib/uncrustify.cfg -> src/uncrustify.cfg #15768
If uncrustify is now the (partial) authority on code style, it is no
longer "contrib".
2021-09-23 14:56:58 -07:00
9cde1e5891 fix(diagnostic): check for nil in show_diagnostics (#15772) 2021-09-23 09:52:21 -07:00
057606e845 fix(diagnostic): don't return nil when callers expect a table (#15765)
diagnostic_lines() returns a table, so make the early exit condition an
empty table rather than 'nil'. This way, functions that use the input
from diagnostic_lines don't have to do a bunch of defensive nil checking
and can always assume they're operating on a table.
2021-09-23 08:23:57 -07:00
abf13258cf Merge #14979 doc: convert Nvim style guide XML to vim :help 2021-09-23 07:02:43 -07:00
c05b10748c doc(dev_style.txt): misc updates 2021-09-23 06:59:30 -07:00
5f49d0efee doc: convert neovim style guide to vim doc. 2021-09-23 06:59:30 -07:00
f1bf70c2f9 vim-patch:8.2.1035: setreg() does not always clear the register
Problem:    setreg() does not always clear the register.
Solution:   Clear the register if the dict argument is empty. (Andy Massimino,
            closes vim/vim#3370)
7633fe595e

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).
2021-09-23 02:07:21 +01:00
f8241f825a vim-patch:7.4.725
Problem:    ":call setreg('"', [])" reports an internal error.
Solution:   Make the register empty. (Yasuhiro Matsumoto)
659c94d483

Required for v8.2.1035.

Note that setreg('"', []) didn't cause an internal error for us, but
didn't clear the register properly either...
2021-09-23 02:04:16 +01:00
f9779facca vim-patch:8.2.0924: cannot save and restore a register properly
Problem:    Cannot save and restore a register properly.
Solution:   Add getreginfo() and make setreg() accept a dictionary. (Andy
            Massimino, closes vim/vim#3370)
bb861e293e

Cherry-pick eval.txt changes for getreginfo() from:
6aa57295cf
207f009326
2021-09-23 02:04:11 +01:00
74ddd14241 vim-patch:8.2.0598: test_eval_stuff fails in normal terminal
Problem:    Test_eval_stuff fails in normal terminal.
Solution:   Close the new window.
61fbb3371e

Required for v8.2.0598 to work.
2021-09-22 23:53:13 +01:00
3b2be8f3de vim-patch:8.2.0597: test_eval is old style
Problem:    Test_eval is old style.
Solution:   Change some tests to a new style test.
90455cfa87

Cherry-pick Test_setreg_basic changes from v8.2.0610.

Note that the old-style version of the tests (and the cherry-picked
changes) exist in legacy/eval_spec.lua; keep them as they've already
been Lua'd.

Required for v8.2.0924.
2021-09-22 23:53:13 +01:00
aba397991b build(deps): bump luarocks to 3.7.0 #15740
Besides bugfixes, this brings `XDG_*` compliance and improved
robustness, especially for network errors.

See https://github.com/luarocks/luarocks/blob/master/CHANGELOG.md

- fixup: set LIBUV_LIBDIR to workaround 83126ba324
    - https://github.com/luarocks/luarocks/issues/1214
    - https://github.com/luarocks/luarocks/pull/1355
2021-09-22 12:26:01 -07:00
d999c96cf3 feat(diagnostic): allow customized diagnostic messages (#15742)
Provide a 'format' option for virtual text and floating window previews
that allows the displayed text of a diagnostic to be customized.
2021-09-22 12:20:15 -07:00
80e3f0eb34 Merge pull request #15739 from clason/luv-bump 2021-09-22 15:11:10 -04:00
248974a4c6 Merge pull request #14115 from mfussenegger/lsp-commands
lsp: Add a registry for client side code action commands
2021-09-22 11:42:56 -07:00
ec447b8798 docs: .git-blame-ignore-revs #15653 2021-09-22 06:36:53 -07:00
48e67b2294 refactor: format with uncrustify #15741 2021-09-22 06:25:38 -07:00
fb6f27e86f vim-patch:34cc7d8c034f #15753
Update runtime files
34cc7d8c03
2021-09-22 06:12:06 -07:00
e8fb0728e2 Merge pull request #15717 from gpanders/diagnostic-include-source
feat(diagnostic): add option to include diagnostic source
2021-09-21 18:32:32 -07:00
bc652f148f refactor(diagnostic): remove get_virt_text_chunks()
This function isn't compatible with including diagnostic sources when
"source" is "if_many" since it only has access to diagnostics for a
single line. Rather than having an inconsistent or incomplete interface,
make this function private. It is still exported as part of the module
for backward compatibility with vim.lsp.diagnostics, but it can
eventually be made into a local function.
2021-09-21 18:54:28 -06:00
d43151ea0b feat(diagnostic): add option to include diagnostic source
Add an option to virtual text display and floating window previews to
include diagnostic source in the diagnostic message.
2021-09-21 18:54:26 -06:00
17b7968f02 fix(diagnostic): preserve fields from LSP diagnostics via user_data (#15735)
* preserve fields from LSP diagnostics via adding a user_data table to the diagnostic, which can hold arbitrary data in addition to the lsp diagnostic information.
2021-09-21 15:27:12 -07:00
8164adc144 fix(lsp): update lsp-handler signature in call_hierarchy (#15738)
This fixes the handler signature and also prevents n+1 requests firing
if there are multiple clients.

(The first `prepareCallHierarchy` handler is called once per client,
each invocation used `buf_request` to make more requests using *all*
clients)
2021-09-21 15:05:49 -07:00
a65d8c34e6 ci(PVS): PVS/V009: add required header #15751 2021-09-21 09:02:43 -07:00
c76cddf3e0 fix(startup): init.lua: set $MYVIMRC to absolute path #15748
- main.c: remove os_setenv("MYVIMRC",…), it is already done by
  do_source().
  - This also sets $MYVIMRC to a full (absolute) path.
- code cleanup.
2021-09-21 08:47:46 -07:00
c208993026 Merge pull request #15745 from e-kwsm/Makefile
build: enhance Makefile
2021-09-21 08:22:08 -04:00
f446ab3aa3 fix(build): call find_package(Threads) before using its variables 2021-09-21 06:56:59 -04:00
9cbebcb247 chore(deps): bump libuv and luv to 1.42.0 2021-09-21 10:17:05 +02:00
7014731035 build: enhance Makefile
- fix regression where `-j` is not passed to ninja
  (39c886551b, #15708)
- enable to pass `-l` (load) to ninja as well
- s/BUILD_TYPE/CMAKE_GENERATOR/
2021-09-21 15:54:14 +09:00
21f7555277 Merge pull request #15743 from jamessan/libuv-threads
build: Add ${CMAKE_THREAD_LIBS_INIT} to LIBUV_LIBRARIES
2021-09-20 21:56:49 -04:00
2435cf77d1 build: add ${CMAKE_THREAD_LIBS_INIT} to LIBUV_LIBRARIES
This is a workaround for not yet having fully correct Find* cmake
modules for static builds.

https://github.com/Tronic/cmake-modules/issues/3#issuecomment-624469020
2021-09-20 21:19:52 -04:00
6c03601e3a feat(lsp): add a registry for client side code action commands
This builds on https://github.com/neovim/neovim/pull/14112 and closes
https://github.com/neovim/neovim/issues/12326
2021-09-20 22:26:00 +02:00
187579fe19 feat(lsp): include original request params in handler ctx
This is mostly motivated by https://github.com/neovim/neovim/issues/12326

Client side commands might need to access the original request
parameters.

Currently this is already possible by using closures with
`vim.lsp.buf_request`, but the global handlers so far couldn't access
the request parameters.
2021-09-20 22:06:54 +02:00
0216aed20c fix(diagnostic): clamp line numbers in display layer (#15729)
Some parts of LSP need to use cached diagnostics as sent from the LSP
server unmodified. Rather than fixing invalid line numbers when
diagnostics are first set, fix them when they are displayed to the user
(e.g. in show() or one of the get_next/get_prev family of functions).
2021-09-20 11:32:21 -07:00
f4ca3a29dd refactor: reformat with uncrustify #15736
* fix function parameter comments
* remove space after star in function names
2021-09-20 09:35:41 -07:00
1f8c91bf72 fix(inccommand): ignore trailing commands only for *previewed* command #15638
Since the `State` is global, other scripts are unexpectedly affected during the
'inccommand' preview. This commit introduces a new flag for `do_cmdline`, in
order to ignore trailing '|'-separated commands only for the command invoking
the preview.

fix #8796, update #7494
2021-09-20 07:33:10 -07:00
30fefee684 refactor: format with uncrustify #15726 2021-09-20 06:53:38 -07:00
12bccc7dd1 test: close timers in vim_spec.lua functional test
Close the timer started during tests before closing the session. This
fixes the uv_loop_close hangs happening in the functional tests.

Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh2702@gmail.com>
2021-09-20 18:10:40 +05:30
73d12a8b71 test: fix running functional tests under gdbserver
It was not possible to run the tests under the gdbserver because we were
not closing the old session before starting a new one. This caused the
server to not to be able to bind to the given address and crashing the
tests.

This commit closes the session before starting a new one.

Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh2702@gmail.com>
2021-09-20 18:10:40 +05:30
490e09c6d8 Merge #15727 build(lint): check scripts/*.lua 2021-09-19 16:56:57 -07:00
41da72ffb6 build(lint): commit linter 2021-09-19 16:39:34 -07:00
736299bf22 build(lint): check scripts/*.lua 2021-09-19 16:36:08 -07:00
39c886551b refactor(Makefile): use built-in make commands #15708
Changes to the main Makefile:
- add `MAKEFILE_PATH` and `MAKEFILE_DIR` that are set with native commands
- add `NVIM_PRG`
- rename `BUILD_TYPE` to `CMAKE_GENERATOR` to align with CMake naming
- remove the misleading `BUILD_CMD` and use `BUILD_TOOL` instead

Add the following phony target to quickly test the changes

```make
debug-print:
	@echo makefile path: $(MAKEFILE_PATH)
	@echo makefile dir: $(MAKEFILE_DIR)
	@echo build dir: $(BUILD_DIR)
	@echo cmake generator tool: $(CMAKE_GENERATOR)
	@echo build-tool: $(BUILD_TOOL)
	@echo nvim-prg: $(NVIM_PRG)
```
2021-09-19 15:53:48 -07:00
e61ea7772e feat(diagnostic): match(), tolist(), fromlist() #15704
* feat(diagnostic): add vim.diagnostic.match()
  Provide vim.diagnostic.match() to generate a diagnostic from a string and
  a Lua pattern.
* feat(diagnostic): add tolist() and fromlist()
2021-09-19 15:13:23 -07:00
853346a94d refactor: format with uncrustify #15722 2021-09-19 13:07:42 -07:00
6565adcbff build(lint): commit linter #15725
Example test failure:

    $ nvim -es +"lua require('scripts.lintcommit')._test()"
    [ FAIL ]: expected=true, got=false
        input: ":no type before colon 1"
    [ FAIL ]: expected=true, got=false
        input: "ci: tab after colon"

Example main({trace=true}) output:

    $ nvim -es +"lua require('scripts.lintcommit').main()"
    run: { "git", "branch", "--show-current" }
    run: { "git", "merge-base", "origin/master", "master" }
    run: { "git", "merge-base", "upstream/master", "master" }
    run: { "git", "rev-list", "89db07556dbdce97c0c150ed7e47d80e1ddacad3..master" }
    run: { "git", "show", "-s", "--format=%s", "d2e6d2f5fc93b6da3c6153229135ba2f0b24f8cc" }
    Invalid commit message: "buildlint): commit linter #15620"
        Commit: d2e6d2f5fc93b6da3c6153229135ba2f0b24f8cc
        Invalid commit type "buildlint)". Allowed types are:
        { "build", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "test", "chore", "vim-patch" }
        See also:
            https://github.com/neovim/neovim/blob/master/CONTRIBUTING.md#commit-messages
            https://www.conventionalcommits.org/en/v1.0.0/
2021-09-19 12:57:57 -07:00
89db07556d Merge pull request #15630 from zeertzjq/vim-8.2.3424
vim-patch:8.1.{1071,1078,1079,1110},8.2.{2640,3424,3425,3437}
2021-09-19 14:31:10 -04:00
2aa662568a build(lint): commit linter #15620 2021-09-19 11:06:47 -07:00
65572c719a build(lint): commit linter #15620 2021-09-19 09:27:08 -07:00
2afbce7651 refactor(tests): remove redir_exec #15718
Problem
- `redir_exec` is obsolete, but it keeps getting used in new tests
  because people copy existing tests.
- Disadvantages of `redir_exec`:
  - Captures extra junk before the actual error/message that we _want_ to test.
  - Does not fail on error, unlike e.g. `command()`.

Solution
- Use new functions like `nvim_exec` and `pcall_err`.
2021-09-19 02:29:37 -07:00
f4ce4c1677 vim-patch:8.2.3437: compiler warnings for 32/64 bit usage
Problem:    Compiler warnings for 32/64 bit usage.
Solution:   Add type casts. (Mike Williams, closes vim/vim#8870)
f5785cf059
2021-09-19 13:13:44 +08:00
a348c666a3 vim-patch:8.2.3425: warning for using uninitialized variable
Problem:    Warning for using uninitialized variable.
Solution:   Initialize it. (John Marriott)
56e14698b4
2021-09-19 13:13:44 +08:00
51567db4b6 vim-patch:8.2.3424: a sequence of spaces is hard to see in list mode
Problem:    A sequence of spaces is hard to see in list mode.
Solution:   Add the "multispace" option to 'listchars'. (closes vim/vim#8834)
f14b8ba137
2021-09-19 13:13:44 +08:00
177e87525a vim-patch:8.2.2640: screenstring() returns non-existing composing characters
Problem:    screenstring() returns non-existing composing characters.
Solution:   Only use composing characters if there is a base character.
f1387285e2
2021-09-19 13:13:44 +08:00
59e80c4dfc vim-patch:8.1.1110: composing chars on space wrong when 'listchars' is set
Problem:    Composing chars on space wrong when 'listchars' is set.
Solution:   Do not use "space" and "nbsp" entries of 'listchars' when there is
            a composing character.  (Yee Cheng Chin, closes vim/vim#4197)
e5e4e22c1c
2021-09-19 13:13:44 +08:00
c14dc616bf vim-patch:8.1.1079: no need for a separate ScreenLinesUtf8() test function
Problem:    No need for a separate ScreenLinesUtf8() test function.
Solution:   Get the composing characters with ScreenLines().
48aed0824e
2021-09-19 13:13:44 +08:00
32663b0f7e vim-patch:8.1.1078: when 'listchars' is set a composing char on a space is wrong
Problem:    When 'listchars' is set a composing char on a space is wrong.
Solution:   Separate handling a non-breaking space and a space. (Yasuhiro
            Matsumoto, closes vim/vim#4046)
5f8069bbf5
2021-09-19 13:13:44 +08:00
963474321b vim-patch:8.1.1071: cannot get composing characters from the screen
Problem:    Cannot get composing characters from the screen.
Solution:   Add screenchars() and screenstring(). (partly by Ozaki Kiichi,
            closes vim/vim#4059)
2912abb3a2
2021-09-19 13:13:44 +08:00
924e8e4f2d fix(diagnostic): only update decorations for loaded buffers (#15715)
When vim.diagnostic.config() is called, the decorations for diagnostics
are re-displayed to use the new configuration. This should only be done
for loaded buffers.
2021-09-18 14:01:03 -07:00
77399184d7 ci(labeler): diagnostic 2021-09-18 13:29:56 -07:00
41cfba63cd feat(lsp): improve vim.lsp.util.apply_text_edits (#15561)
- Fix the cursor position after applying TextEdits
- Support reversed range of TextEdit
- Invoke nvim_buf_set_text one by one
2021-09-18 13:19:21 -07:00
340f77e78e Merge pull request #15710 from gpanders/show_line_diagnostics
fix(diagnostic): resolve nil bufnr in show_line_diagnostics
2021-09-18 10:31:40 -07:00
de406f651c vim-patch:8.2.3394: filler lines are wrong when changing text in diff mode (#15547)
Problem:    Filler lines are wrong when changing text in diff mode.
Solution:   Don't change the filler lines on every change.  Check
            scrollbinding when updating the filler lines. (closes vim/vim#8809)
04626c243c
2021-09-18 12:38:58 -04:00
51a98aa0c2 refactor: format #15702 2021-09-18 09:34:23 -07:00
752d2d2081 test: add test case for show_line_diagnostics 2021-09-18 10:07:54 -06:00
ef52433847 fix(diagnostic): resolve nil bufnr in show_line_diagnostics 2021-09-18 09:44:30 -06:00
6cad86fffd Merge pull request #15632 from bfredl/rtptest
runtime: always use DIP_START and remove duplication of start packages in &rtp
2021-09-18 17:14:25 +02:00
a860f7880f refactor(runtime): handle pack/foo/start/bar/after dirs properly
The order should be:
XDG_CONFIG_HOME/nvim
XDG_DATA_HOME/nvim/site/pack/foo/start/bar/
XDG_CONFIG_HOME/nvim/after
XDG_DATA_HOME/nvim/site/pack/foo/start/bar/after
2021-09-18 13:59:19 +02:00
396280d303 refactor(runtime): always use DIP_START when searching for runtime files
Now remove the addition of "start/*" packages in 'packpath' as
explicit items in 'runtimepath'. This avoids 'runtimepath' from becoming
very long when using a lot of plugins as packages.

To get the effective search path as a list, use |nvim_list_runtime_paths()|
2021-09-18 13:53:50 +02:00
8ef2b56cac fix(diagnostic): change default severity_sort order 2021-09-18 13:21:54 +02:00
0dcf4ab27b fix(diagnostic): remove check on nil return value
vim.diagnostic._set_signs doesn't return anything, so checking the
return value will always fail.
2021-09-17 21:10:10 -06:00
445ef41314 refactor(diagnostic): combine config() and set() calls 2021-09-17 21:07:24 -06:00
15d501ff7a refactor(diagnostic): group local functions together 2021-09-17 21:07:24 -06:00
1f49268c46 refactor: convert TRUE/FALSE to true/false (#15660) 2021-09-18 00:24:39 +02:00
938ed458e2 fix(diagnostic): change default severity_sort order
When severity_sort is true, higher severities should be displayed before
lower severities (e.g. ERROR is displayed over WARN).

Also improved the test case for this.
2021-09-17 14:59:30 -06:00
ede5695eb1 Merge pull request #15696 from gpanders/diagnostic-sign-fix
Diagnostic hot fixes
2021-09-17 11:31:56 -07:00
4d7dcbe49f fix(termdebug): replace mapset with nvim_set_keymap (#15699)
Co-authored-by: ii14 <ii14@users.noreply.github.com>
2021-09-17 19:29:27 +02:00
d9f93e5642 fix(typo): overriden -> overridden (RE: PR #14159) (#15360) 2021-09-17 13:07:00 -04:00
32c0631183 fix(diagnostic): support severity_sort 2021-09-17 10:50:25 -06:00
d8de4eb685 test: reorg #15698
Problem:
Subdirectories like "visual", "insert", "normal" encourage people to
separate *related* tests for no good reason.  Typically the _mode_ is
not the relevant topic of a test (and when it is, _then_ create
an appropriate describe() or it()).

Solution:
- Delete the various `test/functional/<mode>/` subdirectories, move
  their tests to more meaningful topics.
- Rename `…/normal/` to `…/editor/`.
  - Move or merge `…/visual/*` and `…/insert/*` tests into here where
    appropriate.
- Rename `…/eval/` to `…/vimscript/`.
  - Move `…/viml/*` into here also.

* test(reorg): insert/* => editor/mode_insert_spec.lua
* test(reorg): cmdline/* => editor/mode_cmdline_spec.lua
* test(reorg): eval core tests => eval_spec.lua
2021-09-17 09:16:40 -07:00
f87779a24d fix(diagnostic): correctly handle folder level diagnostics 2021-09-17 09:28:11 -06:00
15fbc9b69e docs(diagnostics): fix typos 2021-09-17 08:57:51 -06:00
3fd145007c fix(diagnostic): fix wrong data type in setqflist() 2021-09-17 08:53:08 -06:00
d56002f7b7 Merge pull request #15364 from seandewar/vim-8.2.3337
vim-patch:8.2.{3286,3289,3293,3298,3313,3321,3328,3330,3331,3337,3354,3355,3357,3360,3369,3375}
2021-09-17 10:47:17 -04:00
71e0e6cc63 fix(diagnostic): don't overwrite existing sign definitions 2021-09-17 08:44:52 -06:00
867e888599 refactor(style): switch-case formatting, "uncrustify:indent-off" #15669
* refactor: disable formatting for attribute in macro
* fixup: disable/enable uncrustify with uncrustify:indent-off/on
* fixup: stop indenting contents inside braces in case
* fixup: remove case brace if no variable declaration
2021-09-17 07:38:16 -07:00
1ec3d37192 Merge pull request #15580 from seandewar/vim-8.2.3378
vim-patch:8.2.{3378,3379,3384,3386,3398,3400}
2021-09-17 09:39:36 -04:00
5f144efefa fix: prevent K_EVENT from stopping Select mode CTRL-O #15688
When using Goneovim, Select mode `CTRL-O` returns back to Select mode
immediately (even with `--clean`). Neovim TUI (with some plugins) also randomly
returns to Select mode even if no keys are pressed when using `CTRL-O` in Select
mode.
2021-09-17 06:17:51 -07:00
c4b7744704 Merge #15693 fix(diagnostics)
fix(diagnostics): fixup for `show_line_diagnostics` and `lsp.diagnostics.get`
2021-09-17 04:58:31 -07:00
22d146760e fix(diagnostic): don't convert diagnostic table twice
The recursive implementation of vim.lsp.diagnostic.get() applied
`diagnostic_vim_to_lsp` twice, and the second time gave wrong
results because of the unexpected format.

Fixes https://github.com/neovim/neovim/issues/15689
2021-09-17 13:35:57 +02:00
3e230da90b fix(diagnostic): show_line_diagnostic with empty lnum
The documentation claims to default to the current line number if
the argument `lnum` is nil, but that was never actually done.

Fixes https://github.com/neovim/neovim/issues/15690
2021-09-17 13:33:54 +02:00
4881456e83 fix(diagnostic): nvim_echo takes three args (#15687)
Fixup for https://github.com/neovim/neovim/pull/15585
Closes https://github.com/neovim/neovim/issues/15686
2021-09-17 09:21:17 +02:00
c13242cf47 fix(diagnostic): remove useless highlight links (#15683)
These links were actually defined backwards: the highlight groups
actually being used for display are the new "Diagnostic*" groups, so
linking the old "LspDiagnostics*" groups to these does absolutely
nothing, since there is nothing actually being highlighted with the
LspDiagnostics* groups.

These links were made in an attempt to preserve backward compatibility
with existing colorschemes. We could reverse the links to maintain this
preservation, but then that disallows us from actually defining default
values for the new highlight groups.

Instead, just remove the links and be done with the old LspDiagnostics*
highlight groups.

This is not technically a breaking change: the breaking change already
happened in #15585, but this PR just makes that explicit.
2021-09-17 08:17:54 +02:00
1e0d563967 vim-patch:8.2.3375: using uninitialized memory
Problem:    Using uninitialized memory.
Solution:   Initialize textprop_save_len.
df9070e300

textprop_save_len is N/A.
2021-09-17 02:10:45 +01:00
d78f06852e vim-patch:8.2.3369: auto formatting after "cw" leaves cursor in wrong spot
Problem:    Auto formatting after "cw" leaves cursor in wrong spot.
Solution:   Do not auto-format after the delete. (closes vim/vim#8789)
6b36d2a16d
2021-09-17 02:10:45 +01:00
ebd035f08b vim-patch:8.2.3360: user function completion fails with dict function
Problem:    User function completion fails with dict function.
Solution:   Do not stop sequencing through the list if user functions when
            encountering an empty name. (Naohiro Ono, closes vim/vim#8765,
            closes vim/vim#8774)
5aec755b67
2021-09-17 02:10:44 +01:00
26b7faf1f2 vim-patch:8.2.3357: crash when 'virtualedit' is set and window is narrow
Problem:    Crash when 'virtualedit' is set and window is narrow. ()
Solution:   Check that width is not zero. (closes vim/vim#8767)
02f8694a6b
2021-09-17 02:10:44 +01:00
2ddfd6b999 vim-patch:8.2.3337: completing "call g:" returns entries with just "g:"
Problem:    Completing "call g:" returns entries with just "g:". (Naohiro Ono)
Solution:   Skip empty strings returned by get_user_func_name(). (closes vim/vim#8753)
069f90852f
2021-09-17 02:10:44 +01:00
b24c377c8a vim-patch:8.2.3330: Coverity reports using uninitialized field
Problem:    Coverity reports using uninitialized field.
Solution:   Initialize the field early.
7deb4115ef
2021-09-17 02:10:43 +01:00
17f377b6f9 vim-patch:8.2.3328: Coverity error for not checking return value
Problem:    Coverity error for not checking return value.
Solution:   Check value is not negative.
b85d3627d9
2021-09-17 02:10:43 +01:00
2cbbab28d2 vim-patch:8.2.3321: some code is not tested
Problem:    Some code is not tested.
Solution:   Add some more tests. (Dominique Pellé, closes vim/vim#8735)
bd9e796125

Include Test_confirm_write_partial_file() anyway, even though it will
not be run.
2021-09-17 02:10:43 +01:00
e9ddff9d8a vim-patch:8.2.3313: unused code in win_exchange() and frame_remove()
Problem:    Unused code in win_exchange() and frame_remove().
Solution:   Remove the code. (closes vim/vim#8728)
9e2fa4bb9e
2021-09-17 02:10:42 +01:00
423150dfa0 vim-patch:8.2.3293: finding completions may cause an endless loop
Problem:    Finding completions may cause an endless loop.
Solution:   Use a better way to check coming back where the search started.
            (Andy Gozas, closes vim/vim#8672, closes vim/vim#8671)
6a230c6b32
2021-09-17 02:10:39 +01:00
7ff5f02821 vim-patch:8.2.3286: win_enter_ext() has too many boolean arguments
Problem:    win_enter_ext() has too many boolean arguments.
Solution:   use one flags argument with defined values.
d61f2f772a

Include some style changes to appease the linter.

N/A patches for version.c:

vim-patch:8.2.3289: compiler warning for unused variable with small features

Problem:    Compiler warning for unused variable with small features.
Solution:   Rearrange #ifdefs.
f18e8a969a

vim-patch:8.2.3298: build failure with small features

Problem:    Build failure with small features.
Solution:   Add #ifdef.
6f6d58c380

vim-patch:8.2.3331: Coverity warns for using value without boundary check

Problem:    Coverity warns for using value without boundary check.
Solution:   Add a boundary check.
ed7cb2df35

vim-patch:8.2.3354: build failure with +byte_offset but without +textprop

Problem:    Build failure with +byte_offset but without +textprop. (John
            Marriott)
Solution:   Adjust the #ifdef.
92755bba30

vim-patch:8.2.3355: MS-Windows: compiler warning for 64-32 bit conversion

Problem:    MS-Windows: compiler warning for 64-32 bit conversion.
Solution:   Add type casts.
434df7a401
2021-09-17 01:46:24 +01:00
c2a65921d7 fix(diagnostic): don't override existing highlight groups #15682
Use the 'default' keyword to prevent overriding existing highlight groups.

ref #15585
2021-09-16 14:51:29 -07:00
0c66289cba Merge pull request #15668 from bfredl/logmenu
fix(tests): don't attempt to call ui functions in free_all_mem()
2021-09-16 23:36:53 +02:00
2e8103475e Merge #15585 refactor: move vim.lsp.diagnostic to vim.diagnostic
## Overview

- Move vim.lsp.diagnostic to vim.diagnostic
- Refactor client ids to diagnostic namespaces
- Update tests
- Write/update documentation and function signatures

Currently, non-LSP diagnostics in Neovim must hook into the LSP subsystem. This
is what e.g. null-ls and nvim-lint do. This is necessary because none of the
diagnostic API is exposed separately from the LSP subsystem.

This commit addresses this by generalizing the diagnostic subsystem beyond the
scope of LSP. The `vim.lsp.diagnostic` module is now simply a specific
diagnostic producer and primarily maintains the interface between LSP clients
and the broader diagnostic API.

The current diagnostic API uses "client ids" which only makes sense in the
context of LSP. We replace "client ids" with standard API namespaces generated
from `nvim_create_namespace`.

This PR is *mostly* backward compatible (so long as plugins are only using the
publicly documented API): LSP diagnostics will continue to work as usual, as
will pseudo-LSP clients like null-ls and nvim-lint. However, the latter can now
use the new interface, which looks something like this:

```lua
-- The namespace *must* be given a name. Anonymous namespaces will not work with diagnostics
local ns = vim.api.nvim_create_namespace("foo")

-- Generate diagnostics
local diagnostics = generate_diagnostics()

-- Set diagnostics for the current buffer
vim.diagnostic.set(ns, diagnostics, bufnr)
```

Some public facing API utility methods were removed and internalized directly in `vim.diagnostic`:

* `vim.lsp.util.diagnostics_to_items`

## API Design

`vim.diagnostic` contains most of the same API as `vim.lsp.diagnostic` with
`client_id` simply replaced with `namespace`, with some differences:

* Generally speaking, functions that modify or add diagnostics require a namespace as their first argument, e.g.

  ```lua
  vim.diagnostic.set({namespace}, {bufnr}, {diagnostics}[, {opts}])
  ```

   while functions that read or query diagnostics do not (although in many cases one may be supplied optionally):

   ```lua
   vim.diagnostic.get({bufnr}[, {namespace}])
   ```

* We use our own severity levels to decouple `vim.diagnostic` from LSP. These
  are designed similarly to `vim.log.levels` and currently include:

  ```lua
  vim.diagnostic.severity.ERROR
  vim.diagnostic.severity.WARN
  vim.diagnostic.severity.INFO
  vim.diagnostic.severity.HINT
  ```

  In practice, these match the LSP diagnostic severity levels exactly, but we
  should treat this as an interface and not assume that they are the same. The
  "translation" between the two severity types is handled transparently in
  `vim.lsp.diagnostic`.

* The actual "diagnostic" data structure is: (**EDIT:** Updated 2021-09-09):

  ```lua
  {
    lnum = <number>,
    col = <number>,
    end_lnum = <number>,
    end_col = <number>,
    severity = <vim.diagnostic.severity>,
    message = <string>
  }
  ```

This differs from the LSP definition of a diagnostic, so we transform them in
the handler functions in vim.lsp.diagnostic.

## Configuration

The `vim.lsp.with` paradigm still works for configuring how LSP diagnostics are
displayed, but this is a specific use-case for the `publishDiagnostics` handler.
Configuration with `vim.diagnostic` is instead done with the
`vim.diagnostic.config` function:

```lua
vim.diagnostic.config({
    virtual_text = true,
    signs = false,
    underline = true,
    update_in_insert = true,
    severity_sort = false,
}[, namespace])
```

(or alternatively passed directly to `set()` or `show()`.)

When the `namespace` argument is `nil`, settings are set globally (i.e. for
*all* diagnostic namespaces). This is what user's will typically use for their
local configuration. Diagnostic producers can also set configuration options for
their specific namespace, although this is generally discouraged in order to
respect the user's global settings. All of the values in the table passed to
`vim.diagnostic.config()` are resolved in the same way that they are in
`on_publish_diagnostics`; that is, the value can be a boolean, a table, or
a function:

```lua
vim.diagnostic.config({
    virtual_text = function(namespace, bufnr)
        -- Only enable virtual text in buffer 3
        return bufnr == 3
    end,
})
```

## Misc Notes

* `vim.diagnostic` currently depends on `vim.lsp.util` for floating window
  previews. I think this is okay for now, although ideally we'd want to decouple
  these completely.
2021-09-16 14:23:42 -07:00
4fca63dbf7 fix(lint): remove unused parameters from deprecated functions 2021-09-16 15:01:09 -06:00
888a6ec6ce fix(lint): remove unused function from diagnostic spec 2021-09-16 14:40:13 -06:00
7d21b95869 Merge pull request #15211 from seandewar/blob-port
Port VimL's Blob type - vim-patch:8.1.{0735,0736,0738,0741,0742,0755,0756,0757,0765,0793,0797,0798,0802,1022,1023,1671},8.2.{0121,0184,0404,0521,0829,1473,1866,2712}
2021-09-16 16:31:41 -04:00
2d81f19279 Merge #15680 fix(eval): add the vimscript-1 feature to has() 2021-09-16 13:25:26 -07:00
89f7f7a991 vim-patch:8.2.1866: Vim9: appending to pushed blob gives wrong result
Problem:    Vim9: appending to pushed blob gives wrong result.
Solution:   Set ga_maxlen when copying a blob.
66fa5fd54f

Vim9script is N/A.
2021-09-16 20:20:43 +01:00
26d728fe7c test(oldtest): re-order test_eval_stuff tests to match Vim 2021-09-16 20:09:56 +01:00
18b32fca67 fix(eval): add the vimscript-1 feature to has()
Include Test_string_concat_scriptversion1 to test that
has('vimscript-1') works (excluding the :scriptversion 1 bit).
2021-09-16 19:50:13 +01:00
9d5d72c388 fix(test runner): handle nil in no-colors output handler #15679
Problem:
13748512f6 #15610 The no-colors codepath of the nvim.lua test output
handler does not handle nil, leading to weird symptoms if e.g. a test
has a syntax error:

    test/busted/outputHandlers/nvim.lua:105: attempt to concatenate a nil value

Solution:
Coerce to string in no-colors handler.
2021-09-16 11:42:00 -07:00
d140d3bd33 fix(docs): ignore _*.lua files from auto doc generation #15678 2021-09-16 10:49:11 -07:00
0c86bf563c refactor: remove UTF to byte col conversion 2021-09-16 11:26:45 -06:00
29bc648d2b fix(man.vim): ensure buftype=nofile after :tag or :stag #15675
Problem:
`buftype=help` occasionally propagates from help to man buffer. As a result the
next time you open help it opens in the man window, replacing the manpage.

Test case:
    nvim -u NORC
    :Man man
    :set bt?            " should print `buftype=nofile`
    :help
    <C-W><C-W><C-W>c    " go back to :Man window and close it
    :help               " focus help window
    :Man man            " open window with manpage again
    :set bt?            " prints `buftype=help`

Solution:
- call s:set_options()
    - man#read_page() (called by autocmd BufReadCmd man://*) should already do
      this. But BufReadCmd doesn't fire for already-existing man:// buffers.

Fix #15650
2021-09-16 06:51:26 -07:00
4fa3865588 test: add test case for severity ranges 2021-09-15 19:09:21 -06:00
10283915d6 doc(eval): include latest relevant Blob changes
Also includes some small relevant nearby non-Blob changes and typo
fixes.

Changes are included from:
- v8.1.0815
- v8.1.0846
- v8.1.1084
- v8.1.2326
- v8.2.1969
- d89682477c
- d09091d495
- 53f7fccc94
2021-09-16 00:14:48 +01:00
6eb41e5c8d test(oldtest): unskip existing tests that use Blobs 2021-09-16 00:14:48 +01:00
e53b71627f feat(f_msgpackparse): support parsing from Blob
Note that it is not possible for msgpack_unpack_next() and
msgpack_unpacker_next() to return MSGPACK_UNPACK_EXTRA_BYTES, so it
should be fine to abort() on that.

Lua 5.1 doesn't support string hex escapes (\xXX) like VimL does (though
LuaJIT does), so convert them to decimal escapes (\DDD) in tests.
2021-09-16 00:14:47 +01:00
ddaa0cc9be fix(test/dumplog): tostring(rv) before formatting as string
For example, implicitly converting a table to a string works in LuaJIT,
but needs to be done explicitly with tostring() in Lua 5.1.

This can cause issues when testing a non-JIT build if eq(), for example,
fails with a table argument. E.g: eq({}, {1}) will not print the details
of the assertion failure, but will instead print a less helpful "string
expected, got table" error.
2021-09-16 00:14:47 +01:00
5fdf741f77 feat(f_msgpackdump): support dumping to Blob 2021-09-16 00:14:47 +01:00
7e9ea08321 feat(f_chansend): support Blob data argument 2021-09-16 00:14:47 +01:00
e88961943b fix(eval): partially port v8.2.3284
These were issues that I found while porting that I fixed upstream. :^)

Very little of the patch can be exactly ported as we're a bit behind on
dependant patches (we also can't use the exact :for emsg, as we don't
support iterating over Strings yet), so just translate the fixes as best
as we can for now.

Include latest relevant doc changes from:
- v8.1.0815
- v8.2.2658
2021-09-16 00:14:46 +01:00
3d6bb8b3fb fix(f_remove): partially port v8.2.2779
Fixes remove() copying one extra byte after the end of a Blob's buffer.

Can't be fully ported as the change is from blob_remove(), which hasn't
been ported yet.
2021-09-16 00:14:46 +01:00
ecb54238e0 vim-patch:8.2.2712: memory leak when adding to a blob fails
Problem:    Memory leak when adding to a blob fails.
Solution:   Clear the second typval before returning.
f2dd9cb995
2021-09-16 00:14:46 +01:00
9e38c4a79f vim-patch:8.2.1473: items in a list given to :const can still be modified
Problem:    Items in a list given to :const can still be modified.
Solution:   Work like ":lockvar! name" but don't lock referenced items.
            Make locking a blob work.
021bda5671
2021-09-16 00:13:41 +01:00
ffaf881b42 vim-patch:8.2.0829: filter() may give misleading error message
Problem:    filter() may give misleading error message.
Solution:   Also mention Blob as an allowed argument.
fcb0b61d15

Rename Test_map_fails() to Test_map_filter_fails() from v8.2.0610 and
include the modeline.
2021-09-15 22:57:55 +01:00
19232593ba fix(f_insert): partially port v8.2.0634
Fixes a crash in f_insert() when inserting into a NULL blob.
Include blob-related test changes and some other simple changes.
2021-09-15 22:57:54 +01:00
9b5c9dbfa7 vim-patch:8.2.0521: crash when reading a blob fails
Problem:    Crash when reading a blob fails.
Solution:   Avoid keeping a pointer to a freed blob object. (Dominique Pelle,
            closes vim/vim#5890)  Adjust error messages.
15352dc6ec
2021-09-15 22:57:54 +01:00
ba34afb378 vim-patch:8.2.0404: writefile() error does not give a hint
Problem:    Writefile() error does not give a hint.
Solution:   Add remark about first argument.
18a2b87ca2
2021-09-15 22:57:54 +01:00
53f28f024c vim-patch:8.2.0184: blob test fails
Problem:    Blob test fails.
Solution:   Check for different error when float feature is missing.
92be6e3f46

Nvim always has the float feature, but include the changes to the test
anyway.
2021-09-15 22:57:53 +01:00
ef76238548 vim-patch:8.2.0121: filter() and map() on blob don't work
Problem:    filter() and map() on blob don't work.
Solution:   Correct the code. (closes vim/vim#5483)
49c57ce500
2021-09-15 22:57:53 +01:00
726b255288 vim-patch:8.1.1671: copying a blob may result in it being locked
Problem:    Copying a blob may result in it being locked.
Solution:   Reset v_lock. (Ken Takata, closes vim/vim#4648)
b7b9efbccf
2021-09-15 22:57:53 +01:00
e7772c051f vim-patch:8.1.1023: may use NULL pointer when indexing a blob
Problem:    May use NULL pointer when indexing a blob. (Coverity)
Solution:   Break out of loop after using index on blob
61be376337
2021-09-15 22:57:52 +01:00
bd9c787b4f vim-patch:8.1.0802: negative index doesn't work for Blob
Problem:    Negative index doesn't work for Blob.
Solution:   Make it work, add a test. (closes vim/vim#3856)
a5be9b6248

Leave tv_blob_get()'s return type untouched.
2021-09-15 22:57:47 +01:00
23f5999d28 vim-patch:8.1.0798: changing a blob while iterating over it works strangely
Problem:    Changing a blob while iterating over it works strangely.
Solution:   Make a copy of the Blob before iterating.
dd29ea1805
2021-09-15 22:30:31 +01:00
e140eec441 vim-patch:8.1.0797: error E898 is used twice
Problem:    Error E898 is used twice.
Solution:   Rename the Blob error to E899. (closes vim/vim#3853)
bf821bccf1
2021-09-15 22:30:31 +01:00
c57132ec2a vim-patch:8.1.0793: incorrect error messages for functions that take a Blob
Problem:    Incorrect error messages for functions that now take a Blob
            argument.
Solution:   Adjust the error messages. (Dominique Pelle, closes vim/vim#3846)
0d17f0d1c0
2021-09-15 22:30:31 +01:00
6a02ccc222 vim-patch:8.1.0765: string format of a Blob can't be parsed back
Problem:    String format of a Blob can't be parsed back.
Solution:   Use 0z format.
4131fd5509
2021-09-15 22:30:30 +01:00
0eadd7e5fd vim-patch:8.1.0757: not enough documentation for Blobs
Problem:    Not enough documentation for Blobs.
Solution:   Add a section about Blobs.
d89682477c

Include doc changes for empty() from v7.4.1274.
Include some minor typo fixes.
2021-09-15 22:30:20 +01:00
2b98bdd75b vim-patch:8.1.0756: copy() does not make a copy of a Blob
Problem:    copy() does not make a copy of a Blob.
Solution:   Make a copy.
3d28b58c51

Replace vim_memsave() with xmemdup().
2021-09-15 21:54:00 +01:00
c1b8731ece vim-patch:8.1.0755: error message for get() on a Blob with invalid index
Problem:    Error message for get() on a Blob with invalid index.
Solution:   Return an empty Blob, like get() on a List does.
2ea773b468
2021-09-15 21:54:00 +01:00
d346ac536f vim-patch:8.1.0742: not all Blob operations are tested
Problem:    Not all Blob operations are tested.
Solution:   Add more testing for Blob.
05500ece62

Test_readfile_binary is already ported.
2021-09-15 21:53:38 +01:00
7200454ee6 vim-patch:8.1.0738: using freed memory, for loop over blob leaks memory
Problem:    Using freed memory, for loop over blob leaks memory.
Solution:   Clear pointer after freeing memory.  Decrement reference count
            after for loop over blob.
ecc8bc482b
2021-09-15 21:19:31 +01:00
de9df825d5 feat(decode_string): decode binary string with NULs to Blob
Strings that previously decoded into a msgpack special for representing
BINs with NULs now convert to Blobs. It shouldn't be possible to decode
into this special anymore after this change?

Notably, Lua strings with NULs now convert to Blobs when passed to VimL.
2021-09-15 21:19:30 +01:00
ef729fb15b feat(shada): restore Blob globals properly
As Strings and Blobs are encoded as msgpack BINs, the current ShaDa
implementation will restore global Blob variables as Strings (or msgpack
special dicts if they contain NULs).

Encode an additional element with Blob globals to differentiate them
from Strings so that we can restore them with the correct type.

Adjust variables_spec.lua's autotest() to also check for proper type.
2021-09-15 21:19:30 +01:00
af6f454f5c feat(msgpack): convert Blobs to BIN strings 2021-09-15 21:19:30 +01:00
ab82369c8e feat(json): convert Blobs to array of byte values
Similiar to how Vim does it, but to be consistent with how Nvim encodes
lists, add a space after every comma.
2021-09-15 21:19:29 +01:00
312c783d81 feat(api): convert Blobs to API strings
Note that these are not NUL-terminated; the API supports this.
2021-09-15 21:19:29 +01:00
10aa60e806 feat(nlua): convert Blobs to strings 2021-09-15 21:19:29 +01:00
bfeecd0b41 vim-patch:8.1.0736: code for Blob not sufficiently tested
Problem:    Code for Blob not sufficiently tested.
Solution:   Add more tests.  Fix uncovered crash.  Add test_null_blob().
c0f5a78c15

eval0 and ex_echo's emsg-specific changes have already been ported.
These tests uncover another crash that was fixed in v8.1.0738.
2021-09-15 21:19:29 +01:00
9095101743 vim-patch:8.1.0735: cannot handle binary data
Problem:    Cannot handle binary data.
Solution:   Add the Blob type. (Yasuhiro Matsumoto, closes vim/vim#3638)
6e5ea8d2a9

Nvim-specific Blob conversions are implemented in future commits.

Refactor write_blob() to use a FileDescriptor, as f_writefile() was
refactored to use one (does not apply to read_blob()).

Use var_check_lock() in f_add() for Blobs from v8.1.0897.

Add a modeline to test_blob.vim and fix some doc typos.

Include if_perl.txt's VIM::Blob() documentation. Interestingly, this
function already worked before this port, as it just returns a Blob
string literal, not an actual Blob object.

N/A patches for version.c:

vim-patch:8.1.0741: viminfo with Blob is not tested

Problem:    Viminfo with Blob is not tested.
Solution:   Extend the viminfo test.  Fix reading a blob.  Fixed storing a
            special variable value.
8c8b8bb56c

vim-patch:8.1.1022: may use NULL pointer when out of memory

Problem:    May use NULL pointer when out of memory. (Coverity)
Solution:   Check for blob_alloc() returning NULL.
e142a9467a
2021-09-15 21:19:22 +01:00
a5bbb932f9 refactor: move vim.lsp.diagnostic to vim.diagnostic
This generalizes diagnostic handling outside of just the scope of LSP.
LSP clients are now a specific case of a diagnostic producer, but the
diagnostic subsystem is decoupled from the LSP subsystem (or will be,
eventually).

More discussion at [1].

[1]: https://github.com/neovim/neovim/pull/15585
2021-09-15 14:09:47 -06:00
685cf39813 feat(lsp): improve logging (#15636)
* Simplify rpc encode/decode messages to rpc.send/rcp.receive
* Make missing handlers message throw a warning
* Clean up formatting style in log
* Move all non-RPC loop messages to trace instead of debug
* Add format func option to log to allow newlines in per log entry
2021-09-15 11:35:04 -07:00
afdc9e6150 fix(:source): copy curbuf lines to memory before sourcing #15111
It's possible for weirdness to happen if curbuf is modified while
sourcing from it via :source (with no arguments). For example:

- Deleting lines from or wiping curbuf can cause internal error E315 to
  be thrown from ml_get.
- Changing the curbuf to another buffer while sourcing can cause lines
  from the new curbuf to then be sourced instead.
2021-09-15 05:17:07 -07:00
6188926e00 fix(:source, nvim_exec): handle Vimscript line continuations #14809
Problem:
Anonymous :source (no args) and nvim_exec() don't support Vimscript line continuations.

Solution:
Factor out the concat logic into concat_continued_line() and a
CONCAT_CONTINUED_LINES macro for simple concatenations where lines are
fetched individually.

Closes #14807
2021-09-14 16:35:33 -07:00
b86039b104 fix(ui): don't log from UI events during free_all_mem()
Example assertion failure:

   %0 in logmsg neovim/src/nvim/log.c:139:17
   %1 in ui_call_update_menu neovim/build/src/nvim/auto/ui_events_call.generated.h:8:3
   %2 in ex_menu neovim/src/nvim/menu.c:263:3
   %3 in do_one_cmd neovim/src/nvim/ex_docmd.c:1981:5
   %4 in do_cmdline neovim/src/nvim/ex_docmd.c:602:20
   %5 in do_cmdline_cmd neovim/src/nvim/ex_docmd.c:287:10
   %6 in free_all_mem neovim/src/nvim/memory.c:596:3
   %7 in os_exit neovim/src/nvim/main.c:574:3
   %8 in exit_event neovim/src/nvim/msgpack_rpc/channel.c:569:5
2021-09-14 21:01:15 +02:00
9edd17509f Merge #15657 vim-patch:8.1.1195,8.2.{3417,3419} 2021-09-14 10:27:21 -07:00
b63b4777ec docs: third-party licenses, TEST_COLORS, system() #15665 2021-09-14 10:20:33 -07:00
0a83017fe9 refactor: format files with uncrustify #15663 2021-09-14 09:13:34 -07:00
516775e9d8 fix(lsp): correctly parse LSP snippets #15579
Fixes #15522
2021-09-14 04:31:41 -07:00
b8cce77702 fix: "redundant cast to the same type" #15662
Apply "redundant cast to the same type" fix from clangd.
2021-09-14 04:07:08 -07:00
6ed43f8f1c refactor: format tui/input.c with uncrustify (#15661) 2021-09-14 12:21:24 +02:00
0771504488 refactor: format tui.c with uncrustify (#15640) 2021-09-14 10:36:08 +02:00
31ac33bf77 vim-patch:8.2.3419: a failing debug expression may make Vim unusable
Problem:    A failing debug expression may make Vim unusable.
Solution:   Suppress error messages. (closes vim/vim#8848)
0325d3967c
2021-09-13 17:24:07 +01:00
936c4ae151 vim-patch:8.2.3417: Vim9: a failing debug expression aborts script sourcing
Problem:    Vim9: a failing debug expression aborts script sourcing.
Solution:   Do not let expression failure abort script sourcing. (closes vim/vim#8848)
072f1c6888

Vim9script is N/A, exclude Test_Debugger_breakadd_expr.

Move debuggy struct to before generated header inclusion so
eval_expr_restore prototype works.

Add CheckRunVimInTerminal to Test_Debugger_breakadd.
Cherry-pick Test_Debugger_breakadd changes from v8.2.1440, v8.2.1736.
2021-09-13 17:19:24 +01:00
9f3d7dcda2 vim-patch:8.1.1195: Vim script debugger functionality needs cleanup
Problem:    Vim script debugger functionality needs cleanup.
Solution:   Move debugger code to a separate file.  Add more tests. (Yegappan
            Lakshmanan, closes vim/vim#4285)
eead75c5e8

Good to have for eval_expr_restore in v8.2.3417.

Doesn't actually add any tests.
2021-09-13 17:19:15 +01:00
5fd21b8d3e vim-patch:6c391a74fe90 (#15654)
Update runtime files
6c391a74fe

omit autoload/getscript.vim

skip doc/eval.txt (needs 8.2.2468)
skip doc/various.txt (needs 8.2.3400)

(typofixes courtesy of @dundargoc)
2021-09-13 16:33:41 +02:00
1a9d2a4040 vim-patch:89a9c159f23f #15641
Update runtime files
89a9c159f2

Omit:
nsis/lang/turkish.nsi
pixmaps/gen-inline-pixbufs.sh
doc/popup.txt
doc/terminal.txt
tutor/tutor*
src/[g]vimtutor
CONTRIBUTING.md

Skip:
doc/eval.txt (needs 8.1.2342)
doc/testing.txt (needs 8.2.0299)
2021-09-13 06:05:27 -07:00
d5b66e8860 refactor: replace TRUE/FALSE with true/false #15647 2021-09-13 04:57:36 -07:00
b9d57fa107 vim-patch:8.2.3432: octave/Matlab filetype detection does not work properly (#15652)
Problem:    Octave/Matlab filetype detection does not work properly.
Solution:   Update the patterns used for matching. (Doug Kearns)
ca0627df69
2021-09-13 10:00:09 +02:00
643cb8a6ec doc(options): remove vim9script reference (#15645)
[skip ci]
2021-09-12 13:51:00 +02:00
5615ea8b6b vim-patch:8.2.3368: not all Racket files are recognized (#15643)
Problem:    Not all Racket files are recognized.
Solution:   Also recognize .rktl and .rktd files. (Doug Kearns)
9cd91a1e88
2021-09-12 13:09:18 +02:00
ae73aa8339 vim-patch:8.2.3374: Pyret files are not recognized (#15642)
Problem:    Pyret files are not recognized.
Solution:   Recognize .arr files as Pyret. (Doug Kearns)
eb05d05f8a
2021-09-12 12:55:34 +02:00
1c5833cb00 Merge pull request #15639 from bfredl/xdata
fix(tests): use isolated XDG_DATA_HOME in startup tests
2021-09-12 11:35:31 +02:00
229effac9f vim-patch:partial 6aa57295cfbe (#15633)
* vim-patch:partial 6aa57295cfbe

Update runtime files
6aa57295cf

omit doc/popup.txt
omit plugin/manpager.vim

partial skip runtime/doc/eval.txt (needs 8.2.{0258,0924,1544,2324,2468,2606})

skip ftplugin/julia.vim, indent/julia.vim, syntax/julia.vim (already
        ported in
        65f32f0f19)
skip syntax/scala.vim (already ported in
        a92e83ac14)
2021-09-12 11:02:33 +02:00
4a7a99ff31 Merge pull request #15550 from jasonccox/vim-8.2.3385
vim-patch:8.2.3385,8.2.3393
2021-09-12 10:55:35 +02:00
8e663e28ee fix(tests): use isolated XDG_DATA_HOME in startup tests
Otherwise the users site packages will be loaded from ~/.local/share/nvim/site
which can cause unexpected error messages and other kinds of mayhem

Simpler alternative: use "--noplugin". Shouldn't be done because:
(1) these tests should test the ordinary startup code path as close as possible
(2) tests that test the loading of site packages will be added here very soon
2021-09-12 09:30:46 +02:00
cd4ec810e9 Merge pull request #14770 from andrew-pa/fix13403
Fix relative float positioning
2021-09-12 09:23:47 +02:00
e2c3bcd52c Merge pull request #15637 from bfredl/colorsss
fix(build): add an env var to re-enable the colors
2021-09-12 08:34:13 +02:00
5087347e3b fix(build): add an env var to re-enable the colors 2021-09-11 23:20:00 +02:00
413e86869e Merge #14611 from seandewar/vim-8.1.1116
vim-patch:8.1.{1116,1188,1190,1355,1722,2035,2036,2038,2043},8.2.{0886,2309}
2021-09-11 12:12:59 -07:00
e31652879e vim-patch:partial 53f7fccc9413 (#15631)
* vim-patch:partial 53f7fccc9413

Update runtime files
53f7fccc94

omit macros/hanoi/hanoi.vim
omit spell/tet/main.aap
omit tools/shtags.1
omit tools/xcmdsrv_client.c

skip doc/pattern.txt (requires 8.2.3110; 8.2.{1665,1872})
skip doc/map.txt (requires 8.2.3228)
2021-09-11 16:47:45 +02:00
7175efb518 fix(get_showbreak_value): remove FUNC_ATTR_UNUSED 2021-09-11 15:36:04 +01:00
26733dd488 vim-patch:8.2.2309: 0o777 not recognized as octal
Problem:    0o777 not recognized as octal.
Solution:   Use vim_isodigit(). (Ken Takata, closes vim/vim#7633, closes vim/vim#7631)
c37b655443

:scriptversion is N/A.
2021-09-11 15:36:04 +01:00
90a4cf92d2 vim-patch:8.2.0886: cannot use octal numbers in scriptversion 4
Problem:    Cannot use octal numbers in scriptversion 4.
Solution:   Add the "0o" notation. (Ken Takata, closes vim/vim#5304)
c17e66c5c0

:scriptversion is N/A.

Cherry-pick latest str2nr() doc changes from v8.1.2035.
Cherry-pick various mentions of the 0o prefix from:
 - v8.2.2324
 - 2346a63784
 - 11e3c5ba82
 - 82be4849ee

Patch used ascii_isbdigit() by mistake, which was fixed in v8.2.2309.

Make STR2NR_OOCT work the same as STR2NR_OCT when forcing.
In Vim, STR2NR_FORCE | STR2NR_OOCT isn't handled, and doesn't actually
force anything. Rather than abort(), make it work as STR2NR_OCT.

This means STR2NR_FORCE | STR2NR_OCT works the same as
STR2NR_FORCE | STR2NR_OOCT and STR2NR_FORCE | STR2NR_OCT | STR2NR_OOCT.
2021-09-11 15:36:03 +01:00
10018958d8 vim-patch:8.1.2043: not sufficient testing for quoted numbers
Problem:    Not sufficient testing for quoted numbers.
Solution:   Add a few more test cases.
ea8dcf8346

:scriptversion is N/A.

Already added more quote tests in the port of v8.1.2036.
2021-09-11 15:35:55 +01:00
b6d9e92805 vim-patch:8.1.2036: the str2nr() tests fail
Problem:    The str2nr() tests fail.
Solution:   Add missing part of patch.
1ac90b4fa6

Add extra tests for quoted numbers in vim_str2nr_spec.lua, as the
included ones in this patch are somewhat lacking.
2021-09-11 15:33:20 +01:00
6617629ad6 vim-patch:8.1.2035: recognizing octal numbers is confusing
Problem:    Recognizing octal numbers is confusing.
Solution:   Introduce scriptversion 4: do not use octal and allow for single
            quote inside numbers.
60a8de28d1

:scriptversion is N/A.

Cherry-pick Test_readfile_binary() from v8.1.0742.

Note that this patch was missing vim_str2nr() changes, and so fails the
tests; this was fixed in v8.1.2036.
2021-09-11 15:33:20 +01:00
dda977f5c4 vim-patch:8.1.1722: error when scriptversion is 2 a making a dictionary access
Problem:    Error when scriptversion is 2 a making a dictionary access.
Solution:   Parse the subscript even when not evaluating the sub-expression.
            (closes vim/vim#4704)
61343f0c44

:scriptversion is N/A.
2021-09-11 15:33:19 +01:00
34cb087955 vim-patch:8.1.1355: obvious mistakes are accepted as valid expressions
Problem:    Obvious mistakes are accepted as valid expressions.
Solution:   Be more strict about parsing numbers. (Yasuhiro Matsumoto,
            closes vim/vim#3981)
16e9b85113

Update vim_str2nr_spec.lua to add more tests that use strict = true.
2021-09-11 15:33:19 +01:00
cd18fe17a8 vim-patch:8.1.1116: cannot enforce a Vim script style
Problem:    Cannot enforce a Vim script style.
Solution:   Add the :scriptversion command. (closes vim/vim#3857)
558ca4ae55

:scriptversion is N/A, but ":let ..=" is relevant.

N/A patches for version.c

vim-patch:8.1.1188: not all Vim variables require the v: prefix

Problem:    Not all Vim variables require the v: prefix.
Solution:   When scriptversion is 3 all Vim variables can only be used with
            the v: prefix.  (Ken Takata, closes vim/vim#4274)
d2e716e6df

vim-patch:8.1.1190: has('vimscript-3') does not work

Problem:    has('vimscript-3') does not work.
Solution:   Add "vimscript-3" to the list of features.
93a4879c20

vim-patch:8.1.2038: has('vimscript-4') is always 0

Problem:    has('vimscript-4') is always 0.
Solution:   Add "vimscript-4" to the feature table. (Naruhiko Nishino,
            closes vim/vim#4941)
af91438338
2021-09-11 15:33:06 +01:00
e7d2102c91 docs: .git-blame-ignore-revs #15535 2021-09-11 07:12:03 -07:00
e8067d1490 refactor(syntax.c): format with uncrustify #15627 2021-09-11 07:07:15 -07:00
521817ee76 Merge pull request #15619 from clason/vim-90df4b9d4234
vim-patch:90df4b9d4234

chore(vim-patch): add doc/vim9.txt to unwanted files
2021-09-11 12:59:30 +02:00
086631cd92 feat(api): win_viewport also sends line_count #15613 2021-09-10 19:19:39 -07:00
09a477737f Merge #15311 docs(extmarks) 2021-09-10 19:13:36 -07:00
915703f2d8 docs: extmarks indexing #15311
ref #11456
2021-09-10 19:10:09 -07:00
f8e406ed30 docs: extmarks indexing #15311
fix #11456
2021-09-10 18:31:11 -07:00
9b553ad28d docs: extmark indexing #12742
Extmarks mostly use api-indexing, except for nvim_buf_get_extmarks(),
which uses api-indexing with inclusive ranges.

ref #11456
2021-09-10 17:59:28 -07:00
9697023a0b vim-patch:8.2.3389: cannot stop insert mode completion without side effects #15538
Problem:    Cannot stop insert mode completion without side effects.
Solution:   Add CTRL-X CTRL-Z. (closes vim/vim#8821)
dca29d9cf4
2021-09-10 17:14:32 -07:00
5e22fdd9cc test: avoid writing ~/.bash_history #15621
Problem:
- If I run 'make test' on Linux (Fedora), a few lines like
  /path/to/neovim/build/bin/shell-test REP 31 line
  /path/to/neovim/build/bin/shell-test REP 41 line
  are written to my ~/.bash_history.
  These comes from from test/functional/terminal/scrollback_spec.lua.
- If $HISTFILE is unset, shell will not write to history file.
  But bash sets $HISTFILE to default value (~/.bash_history) if it is unset.
- Unknown how to set an env var to empty string in CMake. These do NOT work:
  set(HISTFILE "")
  set(ENV{HISTFILE} "")
  unset(ENV{HISTFILE})

Solution:
Set HISTFILE=/dev/null
2021-09-10 11:54:36 -07:00
7525052270 Merge #15626 vim-patch:8.1.{2281,2283},8.2.{2903,3391,3397} 2021-09-10 08:43:45 -07:00
36aff87ab6 vim-patch:8.2.3397: no test for what 8.2.3391 fixes
Problem:    No test for what 8.2.3391 fixes.
Solution:   Add a test. (Yegappan Lakshmanan, closes vim/vim#8828)
03d257998b
2021-09-10 15:52:07 +01:00
6e1c03bd2d vim-patch:8.2.3391: crash with combination of 'linebreak' and other options
Problem:    Crash with combination of 'linebreak' and other options.
Solution:   Avoid n_extra to become negative. (Christian Brabandt,
            closes vim/vim#8817)
20e0c3d27b
2021-09-10 15:52:07 +01:00
b91609a70d vim-patch:8.2.2903: cursor position wrong on wrapped line with 'signcolumn'
Problem:    Cursor position wrong on wrapped line with 'signcolumn'.
Solution:   Don't add space for showbreak twice. (Christian Brabandt,
            closes vim/vim#8262)
a06e345af5

Add a modeline to test_display.vim.

This introduced a regression fixed by v8.2.3391.
2021-09-10 15:52:07 +01:00
fd1dbb103b vim-patch:8.1.2281: 'showbreak' cannot be set for one window
Problem:    'showbreak' cannot be set for one window.
Solution:   Make 'showbreak' global-local.
ee85702c10

Change in oneleft() is N/A as the relevant condition was removed
(has_mbyte is always true for Nvim, so the condition was always false;
see commit 73dc9e9).

Use wp over curwin for curs_columns().

Required for v8.2.2903 (otherwise test fails as it'll leave the global
option set).

N/A patches for version.c:

vim-patch:8.1.2283: missed on use of p_sbr

Problem:    Missed on use of p_sbr.
Solution:   Add missing p_sbr change.
91e22eb6e0

Already ported in commit 43a874a.
2021-09-10 15:50:43 +01:00
f46341fa43 vim-patch:8.2.3400: ":z!" is not supported
Problem:    ":z!" is not supported.
Solution:   Make ":z!" work and add tests. (Dominique Pellé, closes vim/vim#8836)
            Use display height instead of current window height.
7f2dd1e90c
2021-09-10 15:35:19 +01:00
a73b7c2b16 vim-patch:8.2.3398: html text objects are not fully tested
Problem:    Html text objects are not fully tested.
Solution:   Add tests for dbcs encoding and different number of backslashes.
            (Dominique Pellé, closes vim/vim#8831)
af631f61bc

Cherry-pick Test_textobj_quote() and modeline from v8.2.0655.
2021-09-10 15:35:18 +01:00
c23e87d9d1 vim-patch:8.2.3386: using uninitialized memory
Problem:    Using uninitialized memory.
Solution:   Initialize the rm_ic field. (Dominique Pellé, closes vim/vim#8800)
a918712626
2021-09-10 15:35:18 +01:00
b3a97c56b6 vim-patch:8.2.3384: cannot disable modeline for an individual file
Problem:    Cannot disable modeline for an individual file.
Solution:   Recognize "nomodeline" in a modeline. (Hu Jialun, closes vim/vim#8798)
9dcd349ca8

Cherry-pick missing modeline for test_modeline.vim (heh) from v8.2.1432.
2021-09-10 15:35:18 +01:00
e8e2f73c3a vim-patch:8.2.3378: MS-Windows: completing environment variables with % is wrong
Problem:    MS-Windows: completing environment variables with % is wrong.
Solution:   Only complete environment variables with $. (Albert Liu,
            closes vim/vim#8791)
6024c0427c

The change itself in set_one_cmd_context() is N/A (it was never included
in Neovim to begin with).

N/A patches for version.c:

vim-patch:8.2.3379: crash when using NULL job

Problem:    Crash when using NULL job.
Solution:   Copy static string into buffer. (issue vim/vim#8260)
271906bc06
2021-09-10 15:35:15 +01:00
0dcfd0e8d1 fix(mouse.c): fix mouse drag positions on multigrid #12667
Currently, multigrid mouse drag positions are handled incorrectly if the
drag event is not in the top left grid. Fix this by not adjusting the
position of the event in jump_to_mouse.

related: #15091
2021-09-10 07:24:41 -07:00
c58ee4ef7f docs: clarify :runtime START, OPT behavior #15342
By default, the :runtime command searches "pack/*/start" in 'packpath'
along with 'runtimepath'. Update the documentation to reflect this
behavior.
2021-09-10 07:11:50 -07:00
7b822d4b4b Merge branch 'master' into histfile 2021-09-10 07:05:11 -07:00
329047b3db docs #15625
fix #12261
fix #15536
fix #15623
fix #15572
ref #14244
ref #15034

close #15555
close #14957
2021-09-10 06:59:17 -07:00
af6948d271 docs(terminal): clarify CTRL-\ behavior #15171 2021-09-10 06:24:08 -07:00
4b452d4efb perf(lua): optimize vim.deep_equal #15236
By remembering the keys already compared in repeating a comparison is
avoided. Thanks: https://stackoverflow.com/a/32660766
2021-09-10 06:22:40 -07:00
3b3dbcf7b7 refactor: format files with uncrustify #15607 2021-09-10 06:14:15 -07:00
aab3583e74 vim-patch:8.2.3399: Octave files are not recognized (#15622)
Problem:    Octave files are not recognized.
Solution:   Detect Octave files. (Doug Kearns)
deba5eb195
2021-09-10 14:01:13 +02:00
c58a667e57 chore(vim-patch): add doc/vim9.txt to unwanted files 2021-09-10 13:20:11 +02:00
185ed18e6c Merge pull request #15618 from jamessan/test-timeout-config
test: use $TEST_TIMEOUT to specify timeout
2021-09-10 06:27:20 -04:00
c7ccb26260 do not write into user's ~/.bash_history 2021-09-10 18:21:29 +09:00
be557dddf4 vim-patch:90df4b9d4234
Update runtime files
90df4b9d42

omit .github/CODEOWNERS
omit doc/vim9.txt
omit po/it.po

skip ftplugin/jsonc.vim
skip indent/jsonc.vim
skip syntax/jsonc.vim
(already ported in dce50312e1)

partial skip doc/eval.txt (needs 8.1.{2304,2321})
2021-09-10 09:14:56 +02:00
8f0c843c13 vim-patch:4d8f476176ea (#15612)
* vim-patch:4d8f476176ea

Update runtime files
4d8f476176

skip nsis/README.txt
skip doc/vim9.txt
skip src/nvim/po/it.po
2021-09-10 08:48:27 +02:00
a422f2136a docs(gen_vimdoc.py): ignore health.lua files #15614 2021-09-09 18:28:12 -07:00
8d93223f83 test: use $TEST_TIMEOUT to specify timeout 2021-09-09 20:49:26 -04:00
2fe95cb1ad vim-patch:partial 2346a6378483 (#15599)
Update runtime files
2346a63784

omit doc/vim.man
omit doc/vim9.txt
omit doc/vimdiff.txt
omit doc/vimdiff.man

skip doc/eval.txt (missing patch 8.2.2324)
skip doc/help.txt (missing patch 8.2.2344)
2021-09-09 18:59:11 +02:00
d80aac3b2a Merge pull request #15566 from bfredl/mpack
libs: vendor libmpack and libmpack-lua
2021-09-09 18:47:03 +02:00
13748512f6 test(busted): disable colors in test-runner output #15610
Problem
-------

Because test/busted/outputHandlers/nvim.lua doesn't know if it's running
in a terminal (no "isatty" equivalent), it outputs color codes in CI
logs and local tooling that runs the tests in a pipe:

    [1m[ SKIPPED ] 

This is just noise, hard for humans to read.

Solution
--------

Disable the color codes. If we later find a clever way to detect
a terminal in nvim.lua, we might consider re-enabling colors, but that
would still affect the CI build logs...
2021-09-09 09:18:43 -07:00
422198cde6 Merge pull request #15091 from yatli/mouse_drag_fix
fix #15075 (mouse crash in multigrid)
2021-09-09 17:37:59 +02:00
ad8eda3f5b fix(ci): don't enrage the CI Gods by calling a file 'core.*' 2021-09-09 16:06:43 +02:00
0f596665cc feat(lua): make vim.mpack support vim.NIL and vim.empty_dict() 2021-09-09 16:06:43 +02:00
eaf661dacd feat(lua): add vim.mpack for msgpack support in lua 2021-09-09 16:06:43 +02:00
2a08aeff1a fix(build): make vendored libmpack and libmpack-lua build properly 2021-09-09 16:06:43 +02:00
4ef3c2c2c1 build: vendor libmpack/libmpack-lua sources from b593809d93b5299bbee4e1d18e2e2d55f9fa53a6 2021-09-09 16:06:43 +02:00
c8f46480bc build: vendor libmpack source from libmpack/libmpack 22b1fd90285117c995728511f9525d29520a8c82 2021-09-09 16:06:43 +02:00
d8339be691 Merge #15460 feat(lua)!: register_keystroke_callback => on_key 2021-09-09 06:55:35 -07:00
9f3679cbfd docs: naming conventions 2021-09-09 06:28:11 -07:00
69fe427df4 feat(lua)!: register_keystroke_callback => on_key
Analogous to nodejs's `on('data', …)` interface, here on_key is the "add
listener" interface.

ref 3ccdbc570d #12536

BREAKING_CHANGE: vim.register_keystroke_callback() is now an error.
2021-09-09 06:09:33 -07:00
4eb1ebbcf7 fix(doc): various fixes #15604
In particular:
- jobwait: omitting {timeout} arg is the same as -1.
- sockconnect: omitting {opts} arg is the same as {}.
- jobsend: obsoleted by chansend; don't mention it in job_control.txt.
- menu_get: add to |functions| table.

[skip ci]
2021-09-09 00:37:59 -07:00
ed0c747788 Merge pull request #15602 from clason/vim-8.2.3390
vim-patch:8.2.3390: included xdiff code is outdated

build: move src/nvim/xdiff to src/xdiff
2021-09-09 08:43:20 +02:00
fbe88ef8f5 build: move src/nvim/xdiff to src/xdiff
Closes #11239
2021-09-08 22:34:54 +02:00
69f4438d35 vim-patch:8.2.3390: included xdiff code is outdated
Problem:    Included xdiff code is outdated.
Solution:   Sync with xdiff in git 2.33. (Christian Brabandt, closes vim/vim#8431)
ba02e4720f
2021-09-08 22:33:20 +02:00
9065730680 fix(windowing): positioning of relative floats
Fix relative floating windows so that they open in the correct position
relative to each other. Also make sure that their positions are correct
immediately after creation without a redraw.
2021-09-08 10:31:47 -06:00
c1f573fbc9 feat(lsp): support textDocument/prepareRename (#15514) 2021-09-08 17:00:15 +02:00
11289ad733 fix(termdebug): replace term_getline with getbufline #15598
Correct incomplete runtime file port in
79cbbd5179
2021-09-08 07:35:40 -07:00
79cbbd5179 vim-patch:d2ea7cf10a4d #15571
Update runtime files
d2ea7cf10a

omit `runtime/doc/if_tcl.txt`
omit `runtime/doc/textprop.txt`
omit `runtime/tutor/*`
omit `runtime/syntax/vim.vim` (cherry-picked in 2dd7828511)

manual merge of `runtime/pack/dist/opt/termdebug/plugin/termdebug.vim`
2021-09-08 07:24:12 -07:00
5e5a329ea2 test: timeout at 20 minutes #15597
Set a maximum test run-time of 20 minutes to:
- fail faster
- avoid wasting CI resources
- set a bound on the test time (if tests take longer than 20 minutes we
  need to invest in parallelizing them...)

Timeout looks like:

    -- Tests exited non-zero: Process terminated due to timeout
    -- No output to stderr.
    CMake Error at /…/neovim/cmake/RunTests.cmake:86
    (message):
      functional tests failed with error: Process terminated due to timeout
2021-09-08 07:21:28 -07:00
384a43fe71 chore(lsp): fix formatting in vim.lsp.log (#15596) 2021-09-07 21:48:19 -07:00
257e8a7431 Merge pull request #15595 from mjlbach/feat/add-healthcheck-lsp
* feat(lsp): add lsp healthcheck

* feat(lsp): add warning message for large log size
2021-09-07 21:16:19 -07:00
e6777a7a04 feat(lsp): add warning message for large log size 2021-09-07 20:52:08 -07:00
e26802650d feat(lsp): add lsp healthcheck
Add healthcheck for language server client, currently only checks
logging status.
2021-09-07 20:51:40 -07:00
47f99d6644 Merge pull request #15575 from dundargoc/refactor/uncrustify
refactor: format files with uncrustify
2021-09-07 22:18:46 +02:00
28ac6c00e6 fix(multigrid): #15075 mouse events crash neovim 2021-09-08 01:57:40 +08:00
1e49a1c888 refactor: format files with uncrustify 2021-09-07 19:07:51 +02:00
Jit
db695cc4ca fix(screen): missing search highlights when redrawing from timer #15380
* Revert "vim-patch:8.1.2294: cursor pos wrong with concealing and search causes a scroll"
* Add a test which covers #13074 910bbc3cca
  while reverting the screen.c code changes from there.

Fixes #14064
2021-09-06 15:18:33 -07:00
687a0b3d3e fix(lsp): adapt codelens resolve to handler signature change (#15578)
Follow up to https://github.com/neovim/neovim/pull/15504
2021-09-06 17:30:53 +02:00
3f526feebf fix(lsp): update workspace/applyEdit handler signature (#15573) 2021-09-05 12:48:54 -07:00
23fe6dba13 Merge pull request #15504 from mjlbach/feat/change-handler-signature
feat(lsp)!: change handler signature
2021-09-05 10:27:52 -07:00
f7dabbc115 docs: regenerate 2021-09-05 10:05:38 -07:00
df17d7844e feat(lsp)!: change handler signature
Previously, the handler signature was:

  function(err, method, params, client_id, bufnr, config)

In order to better support external plugins that wish to extend the
protocol, there is other information which would be advantageous to
forward to the client, such as the original params of the request that
generated the callback.

In order to do this, we would need to break symmetry of the handlers, to
add an additional "params" as the 7th argument.

Instead, this PR changes the signature of the handlers to:

  function(err, result, ctx, config)

where ctx (the context) includes params, client_id, and bufnr. This also leaves
flexibility for future use-cases.

BREAKING_CHANGE: changes the signature of the built-in client handlers, requiring
updating handler calls
2021-09-05 10:04:30 -07:00
7a0468e7ad Merge pull request #15569 from bfredl/end_fill
refactor(screen): let win_line() always handle fillers after last line
2021-09-05 17:45:46 +02:00
c9c9422af0 build: fix fpclassify -Wfloat-conversion warning #15570
Work around a glibc bug where it truncates the argument to fpclassify()
from double to float by implementing fpclassify() ourselves.

Correctness test (Note that the FP_SUBNORMAL test depends on an atof() that
knows how to parse subnormals. Glibc does, not sure about other libcs.):

    #include <math.h>
    #include <stdint.h>
    #include <string.h>

    int xfpclassify(double d)
    {
      uint64_t m;
      int e;

      memcpy(&m, &d, sizeof(m));
      e = 0x7ff & (m >> 52);
      m = 0xfffffffffffffULL & m;

      switch (e) {
        default: return FP_NORMAL;
        case 0x000: return m ? FP_SUBNORMAL : FP_ZERO;
        case 0x7ff: return m ? FP_NAN : FP_INFINITE;
      }
    }

    #include <assert.h>
    #include <stdlib.h>

    int main(void)
    {
      assert(FP_ZERO == xfpclassify(atof("0.0")));
      assert(FP_ZERO == xfpclassify(atof("-0.0")));
      assert(FP_NORMAL == xfpclassify(atof("1.0")));
      assert(FP_NORMAL == xfpclassify(atof("-1.0")));
      assert(FP_INFINITE == xfpclassify(atof("inf")));
      assert(FP_INFINITE == xfpclassify(atof("-inf")));
      assert(FP_NAN == xfpclassify(atof("nan")));
      assert(FP_NAN == xfpclassify(atof("-nan")));
      assert(FP_SUBNORMAL == xfpclassify(atof("1.8011670033376514e-308")));
      return 0;
    }
2021-09-05 07:37:25 -07:00
274248c354 refactor(screen): let win_line() always handle fillers after last line 2021-09-05 11:22:45 +02:00
dce50312e1 vim-patch:90df4b9 (#15494)
Add JSONC runtime files

Co-authored-by: Izhak Jakov <izhakjakov>
2021-09-04 19:49:17 +02:00
6117877823 Merge pull request #15563 from dundargoc/refactor/uncrustify
refactor: update uncrustify config and format screen.c
2021-09-04 09:39:30 +02:00
15af08ad17 refactor: update uncrustify config and format screen.c
Also set new option cmt_trailing_single_line_c_to_cpp to true. It
converts trailing, single-line c-comments (/**/) into cpp-comments (//).
2021-09-03 21:23:23 +02:00
d3c6f1ebbb vim-patch:8.2.3393: escaping for fish shell is skipping some characters
Problem:    Escaping for fish shell is skipping some characters.
Solution:   Escape character after backslash if needed. (Jason Cox,
            closes vim/vim#8827)
6631597452
2021-09-02 13:07:29 -06:00
85ba41a4b3 vim-patch:8.2.3385: escaping for fish shell does not work properly
Problem:    Escaping for fish shell does not work properly.
Solution:   Insert a backslash before a backslash. (Jason Cox, closes vim/vim#8810)
6e82351130
2021-09-02 13:07:29 -06:00
5f8518b3f0 fix(defaults): "syntax sync maxlines=1" on CmdwinEnter #15552
I mistakenly suggested maxlines=&cmdwinheight, forgetting that it is
calculated from topline, not cursor. maxlines=1 makes the most sense in
cmdwin.

ref #15401 622a36b1f1
2021-09-02 10:29:59 -07:00
622a36b1f1 feat(defaults): limit syntax cost on CmdwinEnter #15401
Add a new default autocommand to limit syntax highlighting
synchronization in the command window. This refactors the nvim_terminal
autocommand out of main() and into a new init_default_autocmds()
function, which is now part of the startup process and can be further
extended with more default autocommands down the road.

ref #6289 #6399
2021-09-02 04:17:04 -07:00
6751d6254b refactor(tests): use assert_alive() #15546 2021-09-01 09:42:53 -07:00
0603eba6e7 feat(api): nvim_get_chan_info: include "argv" for jobs #15537
ref #15440
2021-09-01 07:29:38 -07:00
5c643dee7b docs(lsp): remove private lsp.diagnostic functions from docs (#15541)
Both `apply_to_diagnostic_items` and `show_diagnostics` are local
functions and cannot be called by users.
2021-09-01 14:28:15 +02:00
684550ff38 docs(lsp): document codelens.get bufnr parameter (#15540)
Alternative to https://github.com/neovim/neovim/pull/15224
2021-09-01 13:29:11 +02:00
284199bc4b Merge #15402 fix(terminal): close without ! if the job is stopped 2021-08-31 07:24:25 -07:00
3c081d0280 fix(jobwait): always drain process event queues #15402
Problem:
jobwait() returns early if the job was stopped, but the job might have
pending callbacks on its event queue which are required to complete its
teardown. State such as term->closed might not be updated yet (by the
pending callbacks), so codepaths such as :bdelete think the job is still
running.

Solution:
Always flush the job's event queue before returning from jobwait().

ref #15349
2021-08-31 06:53:06 -07:00
55defa1a41 fix(terminal): close without ! if the job is stopped
- If the terminal job is still running then ! is still required.

Closes #4683
2021-08-31 06:46:56 -07:00
9695691ee4 Merge pull request #15526 from bfredl/f_meta
fix(lua): make core vim module not dependent on $VIMRUNTIME modules
2021-08-30 18:09:53 +02:00
6f2d0ea311 fix(lua): make core vim module not dependent on $VIMRUNTIME functions
fixes #15524

Note: this is obviously a quickfix. A scalabe solution will
involve being able to specify a _list_ of modules to be
put into packages.preload, without needing to manually copypasta
a blurb of C code. Perhaps even involving bytecode for
static builds (to speedup initialization)
2021-08-30 17:31:44 +02:00
c52ec8f9eb fix(tutor): formatting, layout #15098
* fix(tutor): adjust over-80ch lines and corresponding expect file
* fix(tutor): standardise indentation and formatting, add nowrap modeline

- unifies the formatting/layout, which was a bit inconsistent,
- adds a nowrap modeline

Since the tutor uses a lot of conceals, which are included in the character
count when calculating line wrapping, lines were breaking at what looked like
odd spots, which gives a poor first impression and lowered readability.

I have adjusted some lines to be over 80ch in the source, but once they're
rendered out with conceals, they're actually under 80, so even with nowrap we
don't visually extend past 80.

fix #15088
2021-08-30 05:27:35 -07:00
325fad8983 fix(lsp): resolve bufnr in buf_is_attached (#15523) 2021-08-30 07:46:00 -04:00
3ab73ff81f chore(flake): fix for recent nixpkgs (#15520)
https://github.com/NixOS/nixpkgs/pull/134463 made keepDebugInfo obsolete
for generic packages.
This copies what keepDebugInfo used to do.
2021-08-30 11:55:02 +02:00
215c9b5792 Merge pull request #15498 from neovim/marvim/api-doc-update/master
docs: regenerate
2021-08-30 09:47:39 +02:00
b35de6c525 vim-patch:8.2.2938: after using motion force from feedkeys() it sticks (#15240)
Problem:    After using motion force from feedkeys() it may not be reset.
Solution:   Clear motion_force in clearop(). (closes vim/vim#8323)
21492743e8
2021-08-29 17:08:39 -04:00
119b4daced docs: regenerate 2021-08-29 15:34:51 +00:00
4e66e74fd7 Merge pull request #15304 from bfredl/quantumtheory
fix(lua): preserve argument list ... which has not the same length as #{...}
2021-08-29 17:34:00 +02:00
6896d22b63 fix(lua): preserve argument lists which are not lists 2021-08-29 16:04:50 +02:00
81f4de08bd docs: .git-blame-ignore-revs #15510 2021-08-28 14:00:54 -07:00
636ecd0c3b Merge pull request #15509 from bfredl/miniperf
perf(api): avoid spurious allocations when converting small objects
2021-08-28 18:38:31 +02:00
6fe670878b Merge pull request #15465 from dundargoc/refactor/uncrustify
refactor(codebase): Update uncrustify config and apply it on one file screen.c

The plan is to go through the codebase in batches, and remove the most egregious "make lint"
backlog failures, by applying this config.
2021-08-28 16:59:08 +02:00
705e8f10ac perf(api): avoid spurious allocations when converting small objects
Converter functions use a heap-allocated stack to handle complex
nested objects. However, these are often called with simple,
primitive values like integers or bools wrapped in an Object.
Avoid the memory allocation in this case using kvec_withinit_t
2021-08-28 16:52:01 +02:00
469652d0d5 refactor(lua): rename nlua_msgpack_ => nlua_api_
These functions do not involve msgpack. Initially the nvim api was
sometimes called the "msgpack API", but entry points from vim script
and lua are equally valid (and don't need to reference "msgpack")
2021-08-28 16:50:59 +02:00
2d240024ac refactor: format screen.c with uncrustify 2021-08-28 16:18:36 +02:00
5a66205944 refactor: update uncrustify config file to better fit neovim style guide 2021-08-28 16:17:53 +02:00
04938eed3e fix(lsp): check if buffer is valid in changetracking (#15505) 2021-08-28 11:57:06 +02:00
8af13ed946 fix(process_wait): drain proc.events directly #15501
After a process's refcnt is decremented to zero, it enqueues a
`process_close_event` on its own event queue. In `process_wait`, this
event should be processed immediately so that any process close
callbacks are executed before `process_wait` returns.

Update `process_wait` to always process the process's event queue after
the process is freed, rather than the event queue passed in as an
argument.
2021-08-27 19:17:11 -07:00
ff7f7dd26b Merge #15433 defaults: auto-create backup dir 2021-08-27 18:08:20 -07:00
e5d464d8e0 docs: update 'backupdir' and 'undodir' descriptions 2021-08-27 10:45:25 -06:00
4e516e53bf fix: remove trailing slashes before making directory
Remove the trailing slashes from 'undofile' and 'backupdir' before
creating directories. They cause problems on Windows which doesn't
recognize these slashes as proper path separators.
2021-08-27 10:45:25 -06:00
460019366e feat: defaults: auto-create backup dir
Copy the behavior of 'undodir' and create the last specified directory
in the 'backupdir' option if it doesn't exist.

Use trailing slashes for 'backupdir' as well as 'viewdir' and 'undodir'
by default. Note that 'undodir' always behaves as though it has the
trailing slashes, regardless of whether or not they are present. They
are added to the default option value to minimize surprise.

The '.' value in 'backupdir' is kept because the default behavior for
backups is solely to have a backup if the save of the main file to disk
fails. As soon as that save is completed the backup file is removed, so
generally there is no need to put them in a central location.

Co-authored by: murphy66 <murphy66@gmail.com>
2021-08-27 10:34:44 -06:00
32024787b6 vim-patch:8.1.2229: color number column above/below cursor #15409
Problem:    Cannot color number column above/below cursor differently.
Solution:   Add LineNrAbove and LineNrBelow. (Shaun Brady, closes vim/vim#624)
efae76ab1a
2021-08-27 05:50:37 -07:00
08e223cebb tests(lua/on_yank): assert conditions that fail correctly #15495
The test added in 274a3504a7
does not fail if the code changes are reverted.
2021-08-27 04:54:01 -07:00
f6e662bbe9 feat(lsp): get_border_size(): support repeating border char list #15474 2021-08-27 04:19:17 -07:00
274a3504a7 fix(lua): verify buffer in highlight.on_yank (#15482)
Resolve an issue with deferred clearing of highlight failing if the 
buffer is deleted before the timeout by checking whether the
buffer is valid first.
2021-08-26 16:37:36 +02:00
6ff1e3fa1f fix(man.vim): use -addr=other instead of -range=-1 #15172
-range=-1 requires the current file to have at least <count> lines, whereas -addr=other doesn't.

-addr=other also sets <count> to -1 by default when it is not specified, though this feature seems undocumented.
2021-08-26 04:36:31 -07:00
d8ddd1e425 fix(man.vim): reduce false positives for manReference #14242
Co-authored-by: Anmol Sethi <hi@nhooyr.io>
2021-08-26 04:31:37 -07:00
4c499899b2 Merge #15293 Vimscript "method" syntax
Port VimL's method call syntax - vim-patch:8.1.{1638,1800,1803,1807,1809,1816,1820,1821,1828,1834,1835,1861,1863,1878,1879,1888,1909,1911,1912}
2021-08-26 04:26:32 -07:00
2548a9e180 fix(man.vim): filetype=man is too eager #15488
Problem:
"set filetype=man" assumes the user wants :Man features, this does extra
stuff like renaming the buffer as "man://".

Solution:
- old entrypoint was ":set filetype=man", but this is too presumptuous #15487
- make the entrypoints more explicit:
  1. when the ":Man" command is run
  2. when a "man://" buffer is opened
- remove the tricky b:man_sect checks in ftplugin/man.vim and syntax/man.vim
- MANPAGER is supported via ":Man!", as documented.

fixes #15487
2021-08-26 02:19:52 -07:00
8d62f5fd58 vim-patch:8.2.3362: buffer overflow when completing long tag name (#15449)
Problem:    Buffer overflow when completing long tag name.
Solution:   Allocate the buffer dynamically. (Gregory Anders, closes vim/vim#8769)
489d60996d
2021-08-25 21:57:18 -04:00
10d7d73b2d Merge pull request #15475 from vigoux/bufupdates-paste
Send correct byte updates on visual paste
2021-08-25 20:56:15 +02:00
14231463a4 fix(bufupdates): send correct updates for visual paste
One step further towards stable tree-sitter.

Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
2021-08-25 15:11:39 +02:00
a373ca1d82 Merge pull request #15466 from vigoux/ts-query-auto
feat(ts): add query module in treesitter keys
2021-08-24 17:45:54 +02:00
5d633546bf fix(lsp): enable additional capabilities (#15470)
Declaration, type-definition, and implementation capabilities were
previously disabled if the client received table output from the server
capabilities. The workDoneProgress capability is sent for many servers
for all supported capabilities as part of this table. Default to setting 
capability to table instead of false.
2021-08-23 16:25:15 -04:00
a92e83ac14 vim-patch:6aa5729 (#15463)
Update Scala syntax file
6aa57295cf
2021-08-23 17:58:45 +02:00
5756470a2b build: remove CFLAGS from :version in non-debug builds #15424
A step towards reproducible builds.
2021-08-23 07:57:17 -07:00
8e0963d307 feat(ts): add query module in treesitter keys 2021-08-23 15:34:08 +02:00
c5d76c5b9b fix(doc): example for vim.diff() (#15464) 2021-08-23 13:47:54 +02:00
34b60ec894 Merge pull request #15434 from Dkendal/feature-lua-treesitter-sibling
feat(treesitter): add next, prev sibling method
2021-08-23 09:14:40 +02:00
4b3ffde208 docs: issue templates 2021-08-22 17:37:08 -07:00
fb5db6c7cf docs: issue templates 2021-08-22 16:56:41 -07:00
90b2da16ae fix(window.c): win_close from other tabpage #15454
Fix #15313
2021-08-22 15:27:20 -07:00
da5d023c97 vim-patch:8.2.3358: structurizr files are not recognized (#15417)
Problem:    Structurizr files are not recognized.
Solution:   Recognize the file by contents. (Bastian Venthur, closes vim/vim#8764)
dea561111a
2021-08-22 14:40:59 -07:00
c2a211b8e3 docs: make Lua docstrings consistent #15255
The official developer documentation in in :h dev-lua-doc specifies to
use "--@" for special/magic tokens. However, this format is not
consistent with EmmyLua notation (used by some Lua language servers) nor
with the C version of the magic docstring tokens which use three comment
characters.

Further, the code base is currently split between usage of "--@",
"---@", and "--- @". In an effort to remain consistent, change all Lua
magic tokens to use "---@" and update the developer documentation
accordingly.
2021-08-22 13:55:28 -07:00
649dbb3b15 Merge pull request #15457 from bfredl/oldmap
refactor(map): remove extra-allocating map_new/map_free functions
2021-08-22 17:29:17 +02:00
de21e6ef3d refactor(map): remove extra-allocating map_new/map_free functions
Note: the reason for removing them is not that there after this refactor
is no use of them, but rather that having them available is an
anti-pattern: they manange an _extra_ heap allocation which has
nothing to do with the functionality of the map itself (khash
manages the real buffers internally). In case there happens to
be a reason to allocate the map structure itself later, this
should be made explicit using xcalloc/xfree calls.
2021-08-22 16:15:38 +02:00
db1b0ee3b3 refactor: replace TRUE/FALSE with true/false #15425 2021-08-22 07:10:57 -07:00
783140c670 fix(doc): move vim.diff doc (#15456)
... to prevent bots from overwriting it
2021-08-22 13:52:56 +02:00
7ebb25cca1 Merge pull request #15451 from bfredl/metamap
perf(map): get rid of unnecessary pointer indirections for maps.
2021-08-22 13:12:58 +02:00
3d3c0c669d feat(api): add lua C bindings for xdiff (#14536)
* feat(api): add lua C bindings for xdiff

* chore: opt.hunk_lines -> opt.result_type

opt.on_hunk now takes precedence over opt.result_type

* chore: fix indents

Fix indents

* chore: change how priv is managed

Assign priv NULL and unconditionally apply XFREE_CLEAR to it when
finished.
2021-08-22 12:22:04 +02:00
c265fd31ab refactor(api): remove unneccesary indirection around handles
These things are just maps to pointers, no need to perform
a huge song and dance around it.
2021-08-22 11:28:47 +02:00
b888018aed refactor(marktree): embed the keymap in the MarkTree struct 2021-08-22 10:46:04 +02:00
b2277a4279 refactor(map): get rid of spurious subsystem_init() functions due to maps 2021-08-22 10:46:04 +02:00
6d23a58b7d refactor(extmark): remove pointer indirection for extmark use of maps 2021-08-22 10:46:01 +02:00
4500253f60 refactor(syntax): don't use pointer indirected maps for no reason 2021-08-22 10:10:15 +02:00
9e651a9d09 perf(map): reduce double pointer indirection to single pointer indirection
the only field of Map(...) was a pointer to a khash_t. make it contain
the struct by value instead.
2021-08-22 09:54:21 +02:00
8331cd13c4 docs #15447
- update ":help 'hidden'" #15410
- update ":help K" #15398
- try to capture some of the debug steps from #12036 (bpftrace, USDT probes)
2021-08-21 18:26:33 -07:00
a90513c24b feat(keywordprg): use :terminal for external commands #15398
Open external 'keywordprg' commands in a :terminal in a new tab. <Esc> is
mapped to stop the job and close the buffer.

Closes #2995
Closes #2761
2021-08-21 17:23:10 -07:00
50b30de200 feat(terminal): TermClose: set exit code in v:event.status #15406
Closes #4713
2021-08-20 10:45:28 -07:00
140084180e feat(treesitter): add next, prev sibling method
Add tsnode methods to change to the next, previous, named or unnamed
nodes.
2021-08-20 11:58:15 -04:00
599af74514 Merge pull request #15295 from gpanders/ftdetect
fix: only source package ftdetect files once
2021-08-20 11:30:43 +02:00
2ae9ff1285 docs: regenerate (#15431)
Co-authored-by: marvim <marvim@users.noreply.github.com>
2021-08-19 20:28:18 +02:00
69741107e6 Merge pull request #15429 from bfredl/hl_2
perf(treesitter): avoid string lookup of highlight name in hot loop
2021-08-19 19:15:16 +02:00
ff0833cb4e feat(lsp): allow root_dir to be nil (#15430)
According to the protocol definition `rootPath`, `rootUri` and
`workspaceFolders` are allowed to be null.

Some language servers utilize this to provide "single file" support.
If all three are null, they don't attempt to index a directory but
instead only provide capabilities for a single file.
2021-08-19 18:15:18 +02:00
ea39ff5732 feat(lsp): jump to diagnostics by position (#14795) 2021-08-19 11:36:01 -04:00
2460f0a702 perf(treesitter): avoid string lookup of highlight name in hot loop
These numbers are guaranteed to be stable even if you do "highlight
clear" (all attributes disappear, but not the id to name mapping itself)
2021-08-19 16:45:04 +02:00
d088066fa1 Merge pull request #15422 from bfredl/syn_name2id_go_brr
feat(highlights): some improvements and perf fixes
2021-08-19 15:48:22 +02:00
19a0d90bb3 Merge #15410 defaults: 'hidden', 'nojoinspaces'
ref #6289
2021-08-19 06:13:08 -07:00
bb4b4d79a8 perf(highlight): use a hashtable for highlight group names
syn_name2id and syn_check_group go brr.

Note: this has impact mostly when using multiple filetypes,
as the old syn_name2id was optimized to return latest
added groups quickly (which will be the latest filetype)
2021-08-19 15:08:50 +02:00
fca52f5f32 feat(match): allow hl group to be defined after :match command 2021-08-19 15:08:50 +02:00
d8ab8cccd0 test: update tests to work with 'hidden' 2021-08-18 12:17:12 -06:00
a9f563ab62 refactor(highlight): make syn_check_group alloc free for existing group 2021-08-18 14:19:01 +02:00
7bff642169 Merge pull request #15249 from dundargoc/refactor/a-song-of-true-and-false
refactor: replace TRUE/FALSE with true/false
2021-08-18 10:10:42 +02:00
d417e67e59 feat(defaults): set nojoinspaces 2021-08-17 16:39:04 -06:00
f6c72b745c feat(defaults): set hidden 2021-08-17 16:38:39 -06:00
15b736d6e8 Merge pull request #15396 from gpanders/options-no-vi-vim
refactor(options): remove vi/vim default value distinction
2021-08-17 16:46:36 +02:00
8e926a0984 refactor(options): remove vi/vim default value distinction 2021-08-17 08:07:41 -06:00
35c6aef1c9 docs: update pull request workflow #15243
The WIP, RFC and RDY stage workflow is outdated and unnecessary. The new
workflow utilize the draft pull request on GitHub.
2021-08-17 05:58:49 -07:00
2cb8db34e3 feat: defaults: set undo points in <C-U> and <C-W> (#15400) 2021-08-16 18:28:52 -07:00
3954537b9e feat(defaults): remove 'options' from viewoptions #15397
ref #6289
2021-08-16 13:05:24 -07:00
e01b88c799 Merge pull request #15399 from mfussenegger/private-lsp-comments
docs(lsp): Prevent internal comments from showing as vim.lsp.init docs
2021-08-16 21:32:18 +02:00
c1e17866c8 docs(lsp): prevent internal comments from showing as vim.lsp.init docs 2021-08-16 20:27:51 +02:00
4ba74953b5 feat(defaults): switchbuf=uselast #15394 2021-08-16 11:20:46 -07:00
7215d35694 feat: defaults: inccommand=nosplit #15395 2021-08-16 10:39:17 -07:00
0aa8128aaa feat(defaults): map CTRL-L to search highlights, update diffs #15385 2021-08-16 08:31:14 -07:00
7146103be2 ci: increase clint line length limit to 100 characters (#15252) 2021-08-16 15:32:36 +02:00
57fc3d3ed7 Merge pull request #15386 from jamessan/32-bit-revert
Revert "tests: unit: fix preprocess: pass -m32 for 32bit ABI (#11073)"
2021-08-16 07:29:17 -04:00
29712aef60 fix(autocmd.c): fix conditions in block_autocmds, unblock_autocmds #15372
Logic got swapped in 7574918dc7.
We didn't notice it since v:termresponse isn't really used yet. #6279
2021-08-16 00:43:21 -07:00
e9dd640897 vim-patch:8.2.3295: 'cursorline' should not apply to 'breakindent' #15281
Problem:    'cursorline' should not apply to 'breakindent'.
Solution:   Make 'cursorline' apply to 'breakindent' and 'showbreak'
            consistently. (closes vim/vim#8684)
4f33bc20d7
2021-08-16 00:27:04 -07:00
54726e8bb9 fix(defaults): do not map Y in visual-mode #15387
Y in visual-mode is unrelated to the normal-mode behavior.

reverts part of #13268
2021-08-16 00:13:25 -07:00
5a111c1b02 feat(defaults): map Y to y$ #13268
rationale:
- consistent with D and Y
- long recommended by Vim's own ":help Y"

close #13268
close #416
ref #6289
2021-08-15 21:24:59 -07:00
c417d573a3 Revert "tests: unit: fix preprocess: pass -m32 for 32bit ABI (#11073)"
This reverts commit ed11721b6b.

It broke multiple 32-bit builds and isn't actually required for building
in a true x86 32-bit environment.
2021-08-16 00:02:22 -04:00
aa07d06bf4 Merge pull request #15363 from dundargoc/ci/squash
ci: ensure all PRs are up to date with master before attempting squash
2021-08-15 11:39:08 -04:00
c6ef95606f fix(ci): re-run GHA for ready_for_review events (#15377)
By default, the pull_request target only runs for the "opened",
"synchronize", and "reopened" events.

Since we've disabled GHA CI for "draft" PRs, the "ready_for_review"
event also needs to be included so CI is automatically run when leaving
draft status.
2021-08-15 15:27:50 +02:00
9367aee62d ci: ensure all PRs are up to date with master before attempting squash
This is to ensure unrelated authors don't get credited.
2021-08-15 12:38:05 +02:00
0f2af87a38 Merge pull request #15320 from neovim/julia
vim-patch:8.2.3283: Julia filetype is not recognized
vim-patch:6aa5729: Add Julia runtime files
2021-08-15 11:22:30 +02:00
65f32f0f19 vim-patch:6aa5729
Add Julia runtime files.
6aa57295cf
2021-08-15 11:02:19 +02:00
0dc4bec69e vim-patch:8.2.3283: Julia filetype is not recognized
Problem: Julia filetype is not recognized
Solution: Add filetype detection. (Christian Clason, closes #8700)

issue: vim/vim#7498
vim-patch: vim/vim@0eec851
2021-08-15 11:02:12 +02:00
d805eb3e05 Merge pull request #15370 from gpanders/cmake-libluv
build: prioritize statically built libluv in search
2021-08-14 21:23:58 -04:00
084b28bec8 Merge pull request #15367 from jamessan/release-fixes
Clean up release handling
2021-08-14 21:22:13 -04:00
bcca62a760 Merge pull request #15368 from jamessan/fragility
test(lsp): disable finicky test when TEST_SKIP_FRAGILE is set
2021-08-14 21:21:50 -04:00
f8eae29d39 build: prioritize statically built libluv in search
When libluv is built statically it appends an '_a' suffix to the library
name. This affects CMake's ability to find the bundled version of libluv
(which is built statically) when there is a dynamic version of the
library also built on the system, which does not have the '_a' suffix.

Prioritize searching for 'libluv_a' first before falling back to
'libluv'. This will ensure the bundled version of libluv is always found
first before any system versions of libluv. In cases where we are not
using bundled libraries, CMake will still safely fall through to finding
'libluv' since package managers do not typically provide static system
libraries.
2021-08-14 06:53:52 -06:00
8491077314 test(lsp): disable finicky test when TEST_SKIP_FRAGILE is set 2021-08-13 23:53:55 -04:00
6f965f41df build: use RelWithDebInfo build for nightlies, Release for releases
Unlike Release build type, RelWithDebInfo does not disable asserts.
This helps get better debug info from people brave enough to use the
nightly builds, but shouldn't be used for official releases.

[skip ci]
2021-08-13 23:32:15 -04:00
f027c5e1e4 build: update appdata.xml version in release commit
Adding the version we just released in the "version bump" commit is
useless, since that means the actual release only reports the old
version.

Closes #15362

[skip ci]
2021-08-13 23:32:10 -04:00
222cd43222 ci: comment from bot is more helpful in case of conflict (#15359)
Also change PR title to follow conventional commits convention.
2021-08-13 15:58:31 +02:00
ce172d8d4a ci: fix typo squasher by changing trigger to "pull_request_target" (#15357)
The "pull_request" trigger only enables read-access for forks,
"pull_request_target" is required if a fork is to be a trigger. Also
changed the python script to reflect this change.
2021-08-13 15:18:15 +02:00
6f0d4ccc43 Merge pull request #15341 from dundargoc/ci/link-to-discourse
chore: link to discourse when choosing issue template
2021-08-13 10:47:44 +02:00
20c1e5757d chore: link to Discourse when choosing issue template for user questions 2021-08-13 10:34:20 +02:00
b2994e35c9 feat(v:lua): support calling v:lua as a method 2021-08-13 01:11:36 +01:00
da9005af79 fix(v:lua): fix emsg when calling v:lua directly
v:lua expressions are represented using vvlua_partial. As v:lua isn't
intended to be called directly, it's given an empty pt_name.

Because of this, calling v:lua directly like "v:lua()" will cause "E117:
Unknown function: ", with an empty name.

Instead, have call_func() show the name "v:lua" in the emsg.
2021-08-12 22:35:25 +01:00
5503d8e28b fix(eval_lambda): cherry-pick leak fix from v8.1.2107
That patch also includes a test using test_refcount() for lambdas, but
such test functions are N/A for Nvim.
2021-08-12 22:35:25 +01:00
5d88349817 feat(eval): partially port v8.1.1915
Cannot be fully ported as chdir() hasn't been ported yet.
2021-08-12 22:35:25 +01:00
56b56a76e8 vim-patch:8.1.1911: more functions can be used as methods
Problem:    More functions can be used as methods.
Solution:   Make a few more functions usable as a method.
64b4d73524

Note that the old-style version of Test_byteidx() was already translated
to a Lua test in 069_multibyte_formatting_spec.lua. Keep both versions,
using Test_byteidx() to mainly test the method call syntax for byteidx()
and byteidxcomp().
2021-08-12 22:35:24 +01:00
7925f0b633 vim-patch:8.1.1909: more functions can be used as methods
Problem:    More functions can be used as methods.
Solution:   Make a few more functions usable as a method.
e49fbff384
2021-08-12 22:35:24 +01:00
5fbc1a49c7 vim-patch:8.1.1888: more functions can be used as methods
Problem:    More functions can be used as methods.
Solution:   Make various functions usable as a method.
073e4b92e6

test_popup.vim already has the changes from this patch (they're N/A
anyway).
2021-08-12 22:35:24 +01:00
41dbd3a2e0 vim-patch:8.1.1879: more functions can be used as methods
Problem:    More functions can be used as methods.
Solution:   Make float functions usable as a method.
93cf85f9ef

Fix atan2() doc typo (patch referred to it as atan()).
Adjust Test_fmod() method test to expect "str2float('nan')".
2021-08-12 22:35:23 +01:00
7474db98af vim-patch:8.1.1878: negative float before method not parsed correctly
Problem:    Negative float before method not parsed correctly.
Solution:   Apply "!" and "-" in front of expression before using ->.
9cfe8f6e68
2021-08-12 22:35:23 +01:00
98dfe4adc4 vim-patch:8.1.1863: confusing error when using a builtin function as method
Problem:    Confusing error when using a builtin function as method while it
            does not support that.
Solution:   Add a specific error message.
9174639a82
2021-08-12 22:35:23 +01:00
287a77ef51 vim-patch:8.1.1861: only some assert functions can be used as a method
Problem:    Only some assert functions can be used as a method.
Solution:   Allow using most assert functions as a method.
24278d2407

Port tests to assert_spec.lua.
2021-08-12 22:35:22 +01:00
f03dd22f0d vim-patch:8.1.1835: cannot use printf() as a method
Problem:    Cannot use printf() as a method.
Solution:   Pass the base as the second argument to printf().
fd8ca21b3f
2021-08-12 22:35:22 +01:00
5811390f82 vim-patch:8.1.1834: cannot use a lambda as a method
Problem:    Cannot use a lambda as a method.
Solution:   Implement ->{lambda}(). (closes vim/vim#4768)
22a0c0c4ec

Add an additional lua_funcname argument to call_func_rettv() to maintain
support for v:lua.

A memory leak was introduced with this patch that was fixed in
v8.1.2107.
2021-08-12 22:35:22 +01:00
32589341a4 vim-patch:8.1.1828: not strict enough checking syntax of method invocation
Problem:    Not strict enough checking syntax of method invocation.
Solution:   Check there is no white space inside ->method(.
5184132ec0
2021-08-12 22:35:21 +01:00
daedbd9312 vim-patch:8.1.1821: no test for wrong number of method arguments
Problem:    No test for wrong number of method arguments.
Solution:   Add a test.
f97d46f816
2021-08-12 22:35:21 +01:00
d41b87e070 vim-patch:8.1.1820: using expr->FuncRef() does not work
Problem:    Using expr->FuncRef() does not work.
Solution:   Make FuncRef work as a method.
761fdf01c6
2021-08-12 22:35:21 +01:00
8d1ca37d1f vim-patch:8.1.1816: cannot use a user defined function as a method
Problem:    Cannot use a user defined function as a method.
Solution:   Pass the base as the first argument to the user defined function
            after "->". (partly by FUJIWARA Takuya)
fcfe1a9b89
2021-08-12 22:35:20 +01:00
aa2dc8b7b4 vim-patch:8.1.1809: more functions can be used as a method
Problem:    More functions can be used as a method.
Solution:   Add has_key(), split(), str2list(), etc.
a74e4946de
2021-08-12 22:35:20 +01:00
003c8acc8a vim-patch:8.1.1807: more functions can be used as a method
Problem:    More functions can be used as a method.
Solution:   Add append(), appendbufline(), assert_equal(), etc.
            Also add the :eval command.
25e42231d3

:eval is already ported.
2021-08-12 22:35:20 +01:00
e6be6c307a vim-patch:8.1.1803: all builtin functions are global
Problem:    All builtin functions are global.
Solution:   Add the method call operator ->.  Implemented for a limited number
            of functions.
ac92e25a33

- Note that to *exactly* port hunk @@ -7376,18 +7444,19 from
  handle_subscript(), we need the :scriptversion patches (I have an open
  PR for those, but this patch works fine without them anyway).
- Port call_internal_func() from v7.4.2058.
- Adjust some error messages in tests, as they rely on the Blob patches.
- Add a modeline to test_method.vim.

Ignore the global_functions and base_method tables and prefer the
current GPerf implementation. Instead, add an extra base_arg field to
VimLFuncDef that holds the number of the argument to use as the base
(1-indexed, so that 0 may be used to refer to functions that cannot be
used as methods).

This also means we support using any argument as a base from the get-go,
rather than just the first (Vim includes this ability in future patches,
however).

To mark a function as usable as a method, use the "base" key as
described in eval.lua.
2021-08-12 22:35:19 +01:00
4042ae5a2b vim-patch:8.1.1800: function call functions have too many arguments
Problem:    Function call functions have too many arguments.
Solution:   Pass values in a funcexe_T struct.
c6538bcc1c

Use FUNCEXE_INIT to initialize funcexe_T instances.

call_callback() and other Vim listener related stuff is N/A.
2021-08-12 22:31:18 +01:00
60dd76c7e2 vim-patch:8.1.1638: running tests leaves some files behind
Problem:    Running tests leaves some files behind.
Solution:   Delete the files. (Ozaki Kiichi, closes vim/vim#4617)
3940ec6d41

Required for v8.1.1888.

N/A patches for version.c:

vim-patch:8.1.1912: more functions can be used as methods

Problem:    More functions can be used as methods.
Solution:   Make channel and job functions usable as a method.
vim/vim@570497a
2021-08-12 17:16:34 +01:00
1918638c67 test(oldtest): cherry-pick needed test functions from v8.1.1336
Cherry-pick Test_call() and Test_cindent_func().

Required for v8.1.1911 and v8.1.1915.
2021-08-12 17:16:34 +01:00
e0bdc9b89c fix(eval): cherry-pick emsg changes from v8.1.0736
v8.1.0736 made some changes for making some emsgs more specific.
Includes the change for Test_lambda_fails() in test_lambda.vim.
Adjust relevant functionaltests to expect the new emsgs.

This patch has been fully ported in my Blob port PR, but it hasn't been
merged yet, so just use what we need from it for now.

Required for v8.1.1821.
2021-08-12 17:16:33 +01:00
c0767bd4f3 refactor: replace TRUE/FALSE with true/false 2021-08-12 10:37:40 +02:00
7d2233fad0 Merge pull request #15336 from bfredl/plines
refactor(plines): move "plines" (size of printed lines) family of function to own file
2021-08-11 17:38:36 +02:00
167514fe83 fix: only source package ftdetect files once
ftdetect files in start packages are sourced once from the :runtime
command in filetype.vim and once when packages are loaded. Change the
package loading logic to only source ftdetect files for opt packages to
avoid this duplication.
2021-08-11 09:35:21 -06:00
28b5c73bf8 refactor(plines): move horizontal size functions to plines.c
fix style.
2021-08-11 17:10:52 +02:00
2c60f7c991 Merge pull request #15335 from muniter/set_extmark_error_cleanup
refactor(api): remove redundant api_set_error
2021-08-11 10:38:21 +02:00
8bf318dcde refactor(plines): what is basic compiler optimizations? 2021-08-10 23:22:25 +02:00
ac56a27a10 refactor(plines): remove implicit curwin chartabsize() function 2021-08-10 23:18:12 +02:00
b506643dfc refactor(plines): style of new plines.c file 2021-08-10 23:06:48 +02:00
7f71e8a6b3 refactor(plines): move out plines related code from misc1.c 2021-08-10 22:59:29 +02:00
d475955ed3 refactor(api): remove redundant api_set_error
This error is already handled by 'find_buffer_by_handle'
2021-08-10 15:55:03 -05:00
0465341e16 refactor(plines): remove implicit curwin plines_nofill() function 2021-08-10 22:39:04 +02:00
a177c7df09 refactor(plines): remove implicit curwin plines() function 2021-08-10 22:32:08 +02:00
c479b90359 Merge pull request #15253 from spywhere/float-win-scl-fix
Fix sign column auto with minimum break floating window minimal style
2021-08-10 22:14:52 +02:00
adebbebdd7 fix(lsp): properly handle nil lines when trimming empty lines (#15325) 2021-08-10 20:52:30 +02:00
c5baba065c Merge pull request #15329 from dundargoc/github/bug-template/make-behavior-mandatory
ci: make all questions mandatory in bug template
2021-08-10 14:35:36 +02:00
f43a8f0eda ci: make all questions mandatory in bug template 2021-08-10 12:18:55 +02:00
1a10acb997 fix(lsp): floating popup should take offset_x into account when positioning (#15297) 2021-08-09 23:56:58 +02:00
33b4513b89 doc: Document -complete=lua option (#15102) 2021-08-09 21:21:14 +02:00
3cacd108d0 docs: regenerate (#15324)
Co-authored-by: marvim <marvim@users.noreply.github.com>
2021-08-09 20:54:28 +02:00
0e9d97896a Merge pull request #15307 from muniter/update-help.txt
docs(help.txt): Add a tag to the neovim api.
2021-08-09 19:51:47 +02:00
a3d5f391cf docs: Add some references to LSP specification (#15321) 2021-08-09 19:45:00 +02:00
cad5f01cf3 docs: elaborate on commitlint rules (#15322)
linter requires lowercase at start and no period at end of description
2021-08-09 18:46:33 +02:00
109a417e21 docs(help.txt): add treesitter to the main help file 2021-08-09 09:17:02 -05:00
4667bfb732 docs(help.txt): add a tag to the neovim api 2021-08-09 09:16:56 -05:00
7dbbd5d8b1 ci: create GitHub Action that squashes all typo PRs into a single PR (#15041)
The action adds all pull-request authors (and Marvim) as a co-author to the
newly created PR and also links to the closed PRs.
2021-08-09 15:21:50 +02:00
9ef7003c38 Merge pull request #15312 from janlazo/vim-8.2.2639
vim-patch:8.1.{1818},8.2.{1464,2639,2814,2947,2976,2986,3114,3141,3160,3198}
2021-08-09 08:28:36 -04:00
0a43b4d51e refactor(sign): include longer sign column option 2021-08-09 11:09:22 +07:00
c8f57f6ded fix(sign): reset auto sign column with minimum in float win minimal style 2021-08-09 11:09:22 +07:00
292148b08b vim-patch:8.2.3141: no error when using :complete for :command without -nargs
Problem:    No error when using :complete for :command without -nargs.
Solution:   Give an error. (Martin Tournoij, closes vim/vim#8544, closes vim/vim#8541)
de69a7353e

N/A patches for version.c:

vim-patch:8.1.1801: cannot build without the +eval feature

Problem:    Cannot build without the +eval feature.
Solution:   Always define funcexe_T.
505e43a20e

vim-patch:8.1.1818: unused variable

Problem:    Unused variable.
Solution:   Remove the variable. (Mike Williams)
b4a88a0441

vim-patch:8.2.1464: Vim9: build warning for unused variable

Problem:    Vim9: build warning for unused variable.
Solution:   Delete the variable declaration.
829ac868b7

vim-patch:8.2.2639: build failure when fsync() is not available

Problem:    Build failure when fsync() is not available.
Solution:   Add #ifdef.
5ea79a2599

vim-patch:8.2.2814: Vim9: unused variable

Problem:    Vim9: unused variable. (John Marriott)
Solution:   Adjust #ifdef.
b06b50dfa0

vim-patch:8.2.2947: build failure without the channel feature

Problem:    Build failure without the channel feature.
Solution:   Add back #ifdef. (John Marriott)
f5bfa8faa7

vim-patch:8.2.2976: build failure without the +eval feature

Problem:    Build failure without the +eval feature.
Solution:   Add #ifdefs.
8de901e1f1

vim-patch:8.2.2986: build failure without the profile feature

Problem:    Build failure without the profile feature.
Solution:   Add #ifdef.
d9f31c13d2

vim-patch:8.2.3114: Amiga-like systems: build error using stat()

Problem:    Amiga-like systems: build error using stat().
Solution:   Only build swapfile_process_running() on systems where it is
            actually used. (Ola Söder, closes vim/vim#8519)
599a6e5b36
2021-08-08 22:29:55 -04:00
43a874ab74 vim-patch:8.2.3198: cannot use 'formatlistpat' for breakindent
Problem:    Cannot use 'formatlistpat' for breakindent.
Solution:   Use a negative list indent. (Maxim Kim, closes vim/vim#8594)
f674b358fc

Port get_showbreak_value() from patch v8.1.2281
to avoid breaking changes when porting older patches.
2021-08-08 22:22:34 -04:00
f89a275e32 vim-patch:8.2.3160: 'breakindent' does not work well for bulleted lists
Problem:    'breakindent' does not work well for bulleted and numbered lists.
Solution:   Add the "list" entry to 'breakindentopt'. (Christian Brabandt,
            closes vim/vim#8564, closes vim/vim#1661)
4a0b85ad01
2021-08-08 22:22:34 -04:00
68f61b167e vim-patch:8.2.3285: scdoc filetype is not recognized (#15294)
Problem:    Scdoc filetype is not recognized.
Solution:   Add filetype detection. (Gregory Anders, closes vim/vim#8701)
dd097bdc13
2021-08-08 18:27:34 -04:00
cdbd54972b option: pvs/v557 (#14740)
Replace STRCAT with STRLCAT() to always NUL-terminate "errbuf" array.
2021-08-08 17:27:50 -04:00
a2909aa35f ci(labeler): apply label tests if only files under test have changed (#15305) 2021-08-08 11:03:55 +02:00
35041432bf ci(forms): fix "vim" description in bug template
Make clear that the version should be specified in any case, including patch level
2021-08-07 18:14:03 +02:00
c9131ef9b5 docs: fix paragraph for BufEnter in the documentation (#15301) 2021-08-07 12:18:40 +02:00
faa3007927 Merge pull request #14767 from theHamsta/no-treesitter-mapping-to-non-existent
fix(treesitter): do not map hl_group when no mapping is set
2021-08-07 11:44:41 +02:00
a1cc146405 ci(labeler): apply documentation label only for changes exclusively in runtime/doc/* (#15298) 2021-08-07 10:36:15 +02:00
e7bde44d6d fix(lsp): prevent duplicate lines seperated by newlines (#15284) 2021-08-06 17:15:49 -04:00
912152d635 chore: remove reference to nvim-treesitter in comment 2021-08-06 22:08:45 +02:00
f489d98653 fix(treesitter): do not map hl_group when no mapping is set
This changes the behavior of the hl_cache to the old one.

- when the capture exists as a hlgroup -> use it
- when hl_map contains a mapping -> use it
- else do nothing (before: map capture to non-existing capture)

Before also captures `@foo.bar` would intend to use the hlgroup `foo.bar`
which results in a confusing error since hlgroups can't contain dots.
2021-08-06 22:04:28 +02:00
f22326ef09 ci(labeler): add "tests" and "ci" labels to the labeler action (#15287)
Also added "CONTRIBUTING.md" file under the "documentation" label since
it gets changed fairly often.
2021-08-06 13:15:29 +02:00
22072b11e8 ci(labeler): fix syntax so changes under src/nvim/lua are registered (#15285)
The labeler action requires a glob (*) to denote files under a
directory.
2021-08-06 12:16:24 +02:00
41912bf777 Merge pull request #15283 from jamessan/pending-c-parsers
test(treesitter): skip all parsers tests if parsers aren't installed
2021-08-06 10:53:18 +02:00
8336488ce1 test(treesitter): skip all parsers tests if parsers aren't installed 2021-08-05 21:41:55 -04:00
5130bc071e ci(tests): skip "stale events on channel close" (#15278)
This test sporadically hangs CI (cf. #14083); skip until the actual code is fixed.
2021-08-05 15:07:26 +02:00
3d18359672 Merge pull request #15257 from gpanders/remove-set_virtual_text
refactor: remove remaining references to nvim_buf_set_virtual_text
2021-08-04 09:28:38 +02:00
545e05d2fe chore(vim-patch.sh): replace hub with gh (#15162) 2021-08-03 19:52:48 +02:00
2093b12b82 refactor: remove remaining references to nvim_buf_set_virtual_text 2021-08-03 11:39:46 -06:00
8baf7bce2b Merge pull request #15226 from zeertzjq/vim-8.1.2029
vim-patch:8.1.2029,8.1.2117,8.1.2214,8.2.3204
2021-08-02 19:23:57 -04:00
93443d59a9 Merge pull request #15233 from baahrens/doc-treesitter-fix-typos
doc(treesitter): Fix typos
2021-08-02 15:18:37 +02:00
3f9a838454 ci: disable false "footer-leading-blank" warning from commitlint (#15238) 2021-08-02 11:22:43 +02:00
141f0038db docs: fixed link to label "good-first-issue" (#15239) 2021-08-02 11:01:28 +02:00
535c762ff7 Merge pull request #15129 from dundargoc/action/commitlint
ci: add commit linter to GitHub Actions.
2021-08-02 00:08:31 +02:00
c24daf5a10 vim-patch:8.2.3204: display garbled when 'cursorline' is set and lines wrap
Problem:    Display garbled when 'cursorline' is set and lines wrap. (Gabriel
            Dupras)
Solution:   Avoid inserting lines twice.
c9e7e344ed
2021-08-02 05:41:17 +08:00
68f0670dfc vim-patch:8.1.2214: too much is redrawn when 'cursorline' is set
Problem:    Too much is redrawn when 'cursorline' is set.
Solution:   Don't do a complete redraw. (closes vim/vim#5079)
11a58af66f
2021-08-02 05:41:17 +08:00
56b437a6c7 vim-patch:8.1.2117: CursorLine highlight used while 'cursorline' is off
Problem:    CursorLine highlight used while 'cursorline' is off.
Solution:   Check 'cursorline' is set. (cloes vim/vim#5017)
49474ca122
2021-08-02 05:41:17 +08:00
1666fe9dfe vim-patch:8.1.2029: cannot control 'cursorline' highlighting well
Problem:    Cannot control 'cursorline' highlighting well.
Solution:   Add "screenline". (Christian Brabandt, closes vim/vim#4933)
017ba07fa2
2021-08-02 05:41:17 +08:00
337b1b31ac Merge pull request #15234 from janlazo/vim-8.2.3164
vim-patch:8.2.{3164,3167,3192,3208,3213,3214,3225,3231,3243,3246,3247,3250,3253,3256,3260}
2021-08-01 12:17:39 -04:00
de74fcc74c fixup! remove DYNAMIC_ICONV
Code for "DYNAMIC_ICONV" macro was dead since v0.3.0.
d87e5d7016
2021-08-01 11:27:11 -04:00
e98eba9086 vim-patch:8.2.3256: executable test may fail on new Ubuntu system
Problem:    Executable test may fail on new Ubuntu system.
Solution:   Consider /usr/bin/cat and /bin/cat the same.
bf634a0a8b
2021-08-01 11:27:11 -04:00
20fc0519af vim-patch:8.2.3246: memory use after free
Problem:    Memory use after free.
Solution:   When clearing a string option set the pointer to "empty_option".
77111e2bfc
2021-08-01 11:27:11 -04:00
5e4fcc8b36 vim-patch:8.2.3225: incsearch highlighting is attempted halfway a mapping
Problem:    Incsearch highlighting is attempted halfway a mapping.
Solution:   Only do incsearch highlighting if keys were typed or there is no
            more typeahead.
ccb148ac63
2021-08-01 11:26:54 -04:00
d95e28f5ce vim-patch:8.2.3213: NOCOMPOUNDSUGS entry in spell file not tested
Problem:    NOCOMPOUNDSUGS entry in spell file not tested.
Solution:   Add a test. (Dominique Pellé, closes vim/vim#8624)
9c9472ff49
2021-08-01 11:26:54 -04:00
34f3c5cc96 vim-patch:8.2.3167: get E12 in a job callback when searching for tags
Problem:    Get E12 in a job callback when searching for tags. (Andy Stewart)
Solution:   Use the sandbox only for executing a command, not for searching.
            (closes vim/vim#8511)
547f94f330

N/A patches for version.c:

vim-patch:8.2.3164: MS-Windows: reported version lacks patchlevel

Problem:    MS-Windows: reported version lacks patchlevel, causing some update
            tools to update too often. (Klaus Frank)
Solution:   Add the patchlevel to the version. (Christian Brabandt)
0894e0d808

vim-patch:8.2.3192: build failure with small version

Problem:    Build failure with small version (Tony Mechelynck).
Solution:   Remove stray #ifdef.
11d7e62f1d

vim-patch:8.2.3208: dynamic library load error does not mention why it failed

Problem:    Dynamic library load error does not mention why it failed.
Solution:   Add the error message. (Martin Tournoij, closes vim/vim#8621)
1a3e5747b7

vim-patch:8.2.3214: MS-Windows: passing /D does not set the install location

Problem:    MS-Windows: passing /D does not set the install location.
Solution:   Adjust how the installer uses $VIM. Update the documentation.
            (Christian Brabandt, closes vim/vim#8605)
7d60384a00

vim-patch:8.2.3231: build failure with small features

Problem:    Build failure with small features.
Solution:   Adjust #ifdef.
9088784972

vim-patch:8.2.3243: MS-Windows: "edit with multiple Vim" choice is less useful

Problem:    MS-Windows: the "edit with multiple Vim" choice is not that
            useful.
Solution:   Change it to "Edit with multiple tabs". (Michael Soyka,
            closes vim/vim#8645)
83cd0156e0

vim-patch:8.2.3247: using uninitialized memory when checking for crypt method

Problem:    Using uninitialized memory when checking for crypt method.
Solution:   Check the header length before using the salt and seed.
77ab4e28a2

vim-patch:8.2.3250: MS-Windows: cannot build with libsodium

Problem:    MS-Windows: cannot build with libsodium.
Solution:   Change FEAT_SODIUM into HAVE_SODIUM. (Christian Brabandt,
            closes vim/vim#8668, closes vim/vim#8663)
1790be6cb6

vim-patch:8.2.3253: channel test fails randomly

Problem:    Channel test fails randomly.
Solution:   Add a sleep after sending the "echoerr" command. (Michael Soyka)
890ee4e2be

vim-patch:8.2.3260: build failure with small features

Problem:    Build failure with small features.
Solution:   Add #ifdef.
335c8c7b20
2021-08-01 11:26:53 -04:00
4c605ec78a doc(treesitter): Fix typos 2021-08-01 17:09:19 +02:00
f54340d488 docs: add description of each type 2021-08-01 14:29:29 +02:00
5f3f4263b4 ci: add commit linter to GitHub Actions 2021-08-01 12:45:17 +02:00
51251e1dc7 Merge pull request #15217 from neovim/marvim/api-doc-update/master
docs: regenerate
2021-08-01 11:26:00 +02:00
a5c25e4f3e Merge pull request #15228 from janlazo/vim-8.2.3002
vim-patch:8.2.{3002,3019,3025,3030,3032,3044,3046,3063,3101,3115,3119,3120,3131,3136,3140,3157,3163,3218,3245,3254}
2021-07-31 19:15:36 -04:00
927383f212 vim-patch:8.2.3136: no test for E187 and "No swap file"
Problem:    No test for E187 and "No swap file".
Solution:   Add a test. (Dominique Pellé, closes vim/vim#8540)
fe3418abe0
2021-07-31 18:32:01 -04:00
18b12bcee1 vim-patch:8.2.3115: Coverity complains about free_wininfo() use
Problem:    Coverity complains about free_wininfo() use.
Solution:   Add a condition that "wip2" is not equal to "wip". (Neovim vim/vim#14996)
b5098060f4

This fix came from https://github.com/neovim/neovim/pull/14996.
This commit adds only a comment to be in sync with Vim.

N/A patches for version.c:

vim-patch:8.2.3063: crash when switching 'cryptmethod' to xchaha20 with undo file

Problem:    Crash when switching 'cryptmethod' to xchaha20 with an existing
            undo file. (Martin Tournoij)
Solution:   Disable reading undo file when decoding can't be done inplace.
            (issue vim/vim#8467)
65aee0b714

vim-patch:8.2.3101: missing function prototype for vim_round()

Problem:    Missing function prototype for vim_round().
Solution:   Add the prototype.
67b17a6fc6

vim-patch:8.2.3119: compiler warning for unused argument

Problem:    Compiler warning for unused argument.
Solution:   Add UNUSED.
6a9e5c69cf

vim-patch:8.2.3120: crypt with sodium test fails on MS-Windows

Problem:    Crypt with sodium test fails on MS-Windows.
Solution:   Make the tests pass. (closes vim/vim#8428)
db86472770

vim-patch:8.2.3131: MS-Windows: ipv6 channel test is very flaky in the GUI

Problem:    MS-Windows: ipv6 channel test is very flaky in the GUI.
Solution:   Skip the test.
981217c11f

vim-patch:8.2.3140: MS-Windows: ipv6 channel test is very flaky also without GUI

Problem:    MS-Windows: ipv6 channel test is very flaky also without the GUI.
Solution:   Skip the test also without the GUI.
482d2f37a5

vim-patch:8.2.3157: crypt test may fail on MS-Windows

Problem:    Crypt test may fail on MS-Windows.
Solution:   Ignore "[unix]" in the file message. (Christian Brabandt,
            closes vim/vim#8561)
16e26a3116

vim-patch:8.2.3218: when using xchaha20 crypt undo file is not removed

Problem:    When using xchaha20 crypt undo file is not removed.
Solution:   Reset 'undofile' and delete the file. (Christian Brabandt,
            closes vim/vim#8630, closes vim/vim#8467)
8a4c812ede

vim-patch:8.2.3245: the crypt key may appear in a swap partition

Problem:    The crypt key may appear in a swap partition.
Solution:   When using xchaha20 use sodium_mlock(). (Christian Brabandt,
            closes vim/vim#8657)
131530a54d
2021-07-31 18:31:41 -04:00
5cead86975 fixup! vim-patch:8.2.3019: location list only has the start position. 2021-07-31 16:58:10 -04:00
0c93525340 docs: regenerate 2021-07-31 20:26:57 +00:00
24f2b9ef1c fix(lsp): Include client name in handler error messages (#15227)
Makes it easier to tell with language server caused an error.
2021-07-31 22:26:02 +02:00
e4fedf5156 vim-patch:8.2.3254: win_gettype() does not recognize a quickfix window
Problem:    win_gettype() does not recognize a quickfix window.
Solution:   Add "quickfix" and "loclist". (Yegappan Lakshmanan, closes vim/vim#8676)
28d8421bfb
2021-07-31 15:10:51 -04:00
8738ce8c41 vim-patch:8.2.3163: location list window may open a wrong file
Problem:    Location list window may open a wrong file.
Solution:   Also update the qf_ptr field. (Wei-Chung Wen, closes vim/vim#8565,
            closes vim/vim#8566)
1557b16dad
2021-07-31 15:10:50 -04:00
64ad770fbe vim-patch:8.2.3025: not enough tests for quickfix end_col and end_lnum
Problem:    Not enough tests for quickfix end_col and end_lnum.
Solution:   Add a few more test cases. (Shane-XB-Qian, closes vim/vim#8409)
0d5e1ec37f
2021-07-31 15:10:50 -04:00
59e96717d2 vim-patch:8.2.3019: location list only has the start position.
Problem:    Location list only has the start position.
Solution:   Make it possible to add an end position. (Shane-XB-Qian,
            closes vim/vim#8393)
6864efa596

N/A patches for version.c:

vim-patch:8.2.3002: Vim doesn't abort on a fatal Tcl error

Problem:    Vim doesn't abort on a fatal Tcl error.
Solution:   Change emsg() to iemsg(). (Dominique Pellé, closes vim/vim#8383)
affd0bc626

vim-patch:8.2.3030: Coverity reports a memory leak

Problem:    Coverity reports a memory leak.
Solution:   Fix the leak and a few typos. (Dominique Pellé, closes vim/vim#8418)
cb54bc6562

Patch v8.2.3022 is mostly N/A but cannot be included here
because of new feature check for "has()".

vim-patch:8.2.3032: build problems with MSVC, other crypt issues with libsodium

Problem:    Build problems with MSVC, other crypt issues with libsodium.
Solution:   Adjust MSVC makefile. Disable swap file only when 'key' is set.
            Adjust error message used when key is wrong.  Fix Coverity issues.
            (Christian Brabandt, closes vim/vim#8420, closes vim/vim#8411)
226b28b961

vim-patch:8.2.3044: Amiga MorphOS and AROS: process ID is not valid

Problem:    Amiga MorphOS and AROS: process ID is not valid.
Solution:   Use FindTask to return something which is unique to all processes.
            (Ola Söder, closes vim/vim#8444)
3a62b14077

vim-patch:8.2.3046: Amiga MorphOS: Term mode is set using DOS packets

Problem:    Amiga MorphOS: Term mode is set using DOS packets.
Solution:   Use the same way of setting term mdoe on all next gen Amiga-like
            systems.  (Ola Söder, closes vim/vim#8445)
b420ac9d20
2021-07-31 15:10:23 -04:00
5f01714b25 vim-patch:8.1.2019: 'cursorline' always highlights the whole line (#15161)
Problem:    'cursorline' always highlights the whole line.
Solution:   Add 'cursorlineopt' to specify what is highlighted.
            (closes vim/vim#4693)
410e98a70b
2021-07-30 21:51:26 -04:00
15698eb5a1 Merge pull request #15206 from dundargoc/refactor/a-song-of-true-and-false/global-variables-2
refactor: replace TRUE/FALSE with true/false
2021-07-30 17:53:07 +02:00
7b627ece8d Merge pull request #15222 from dundargoc/PVS/V501
refactor: PVS/V501: removed duplicate sub-expression 'chunk.size > 2'
2021-07-30 15:41:27 +02:00
ca3071ea93 Merge pull request #15062 from seandewar/vim-8.1.0829
vim-patch:8.1.0829: when 'hidden' is set session creates extra buffers
2021-07-30 09:19:44 -04:00
74a38c03c0 Merge pull request #14744 from janlazo/vim-8.2.2957
vim-patch:8.2.2957: using getchar() in Vim9 script is problematic
2021-07-30 09:01:35 -04:00
518f0d3d47 refactor: PVS/V501: removed duplicate sub-expression 'chunk.size > 2' 2021-07-30 14:29:54 +02:00
94120d2fd5 refactor: replace TRUE/FALSE with true/false 2021-07-30 12:29:32 +02:00
870c43c023 fixup! fix(highlight): remove syncolor.vim
Fix lint errors from lines with 80+ characters.
2021-07-29 23:01:24 -04:00
3865b43205 vim-patch:8.2.2957: using getchar() in Vim9 script is problematic
Problem:    Using getchar() in Vim9 script is problematic.
Solution:   Add getcharstr(). (closes vim/vim#8343)
3a7503c34c

Cherry-pick Test_getchar() changes from patch v8.1.2304
to sync with upstream.

Port f_getcharstr() to src/nvim/eval/funcs.c, not src/nvim/getchar.c.
Patch v8.1.2042 is not ported yet.
2021-07-29 21:51:39 -04:00
d628e4250f Merge pull request #15207 from gpanders/bye-syncolor
fix(highlight): remove syncolor.vim
2021-07-29 23:31:57 +02:00
b73e733d52 Merge pull request #15184 from bfredl/sunjonhl
feat(decorations): allow more than one stacked highlight in a virt_text
2021-07-29 22:25:43 +02:00
25a879dfa2 feat(decorations): deprecate nvim_buf_set_virtual_text
Full virt_text functionality is provided by nvim_buf_set_extmark
2021-07-29 20:36:12 +02:00
a4d81a8002 refactor(decorations): merge the two different code paths for virt_text
test(bufhl): CHANGE of tested behaviour (inb4 a proper priority mechanism)
test(decoration): change of test; previous behavior was buggy (ghost
buffer text)
2021-07-29 20:34:42 +02:00
1495d36d63 feat(decorations): allow more than one stacked highlight in a virt_text 2021-07-29 20:34:20 +02:00
3521bf7672 feat(lsp): implement vim.lsp.diagnostic.redraw() (#15203)
Add a new function to redraw diagnostics from the current diagnostic
cache, without receiving a "publishDiagnostics" message from the server.
This is already being done in two places in the Lua stdlib, so this
function unifies that functionality in addition to providing it to third
party plugins.

An example use case for this could be a command or key-binding for
toggling diagnostics virtual text. The virtual text configuration option
can be toggled using `vim.lsp.with` followed by
`vim.lsp.diagnostic.redraw()` to immediately redraw the diagnostics
with the updated setting.
2021-07-29 09:02:17 -07:00
3b6d95b5f6 Merge pull request #15213 from zeertzjq/vim-8.2.3236
vim-patch:8.2.3236: mode() does not indicate using CTRL-O in Select mode
2021-07-29 17:03:12 +02:00
143a920de9 chore: fix lsp bug issue template
correct description for expected behavior
2021-07-29 16:35:02 +02:00
1d3aaae15c chore: fix bug issue template form
description for "expected behavior" was wrongly attached to "actual behavior"
2021-07-29 16:17:58 +02:00
98c4b2cf62 Merge pull request #15215 from bfredl/fix_15212
fix(decorations): crash when :bdelete (extmark_free_all) after clear_namespace
2021-07-29 14:25:02 +02:00
cd353aa824 fix(decorations): crash when :bdelete (extmark_free_all) after clear_namespace
fixes #15212
2021-07-29 12:59:56 +02:00
04ba81ddba vim-patch:8.2.3236: mode() does not indicate using CTRL-O in Select mode
Problem:    mode() does not indicate using CTRL-O in Select mode.
Solution:   Use "vs" and similar. (closes vim/vim#8640)
eaf3f36168
2021-07-29 07:47:17 +08:00
ac5139eae4 ci(labeler): adapt to new label names 2021-07-28 17:29:27 +02:00
cab90f2ef1 fixup! fix(highlight): remove syncolor.vim 2021-07-28 09:11:07 -06:00
6c08af083d ci: label PRs only the first time they're opened (#15209)
instead of on every change -- including removing erroneous labels
2021-07-28 11:30:08 +02:00
701c21480e ci(labeler): update label format 2021-07-28 10:10:45 +02:00
9190addf1f fixup! fix(highlight): remove syncolor.vim 2021-07-27 16:00:53 -06:00
d3bc61b31d fixup! fix(highlight): remove syncolor.vim 2021-07-27 14:14:42 -06:00
9afa0d25a6 fix(highlight): remove syncolor.vim
Remove syncolor.vim in favor of defining the default highlight groups
directly in `init_highlight`. This approach provides a number of
advantages:

1. The highlights are always defined, regardless of whether or not the
   syntax regex engine is enabled.
2. Redundant sourcing of syntax files is eliminated (syncolor.vim was
   often sourced multiple times based on how the user's colorscheme file
   was written).
3. The syntax highlighting regex engine and the highlight groups
   themselves are more fully decoupled.
4. Removal of the confusing `:syntax on` / `:syntax enable` dichotomy
   (they now both do the same thing).

This approach also correctly solves a number of bugs related to
highlighting (#15176, #12573, #15205).
2021-07-27 14:14:30 -06:00
c642f3ac27 Merge pull request #15142 from neovim/marvim/api-doc-update/master
docs: regenerate
2021-07-27 11:28:04 +02:00
86baf582b8 docs: regenerate 2021-07-26 18:48:46 +00:00
c818d8df34 Merge pull request #15197 from dundargoc/refactor/a-song-of-true-and-false/global-variables
refactor: replace TRUE/FALSE with true/false
2021-07-26 20:41:54 +02:00
3e00d4f01c feat(lsp): make list handlers configurable (#15199)
The handlers for textDocument/references, textDocument/documentSymbol,
and workspace/symbol open their results in the quickfix list by default
and are not configurable. They are also incompatible with `vim.lsp.with`
as they do not accept a configuration parameter.

Add a `config` parameter to the handler for these three messages which
allows them to be configured with `vim.lsp.with`. Additionally, add a
new configuration option 'loclist' that, when true, causes these
handlers to open their results in the location list rather than the
quickfix list.
2021-07-26 11:39:50 -07:00
b8813bacfe Merge pull request #15090 from kraftwerk28/master
docs: fix typo in treesitter.txt
2021-07-26 20:38:11 +02:00
ec7881bbfd Merge pull request #15180 from gpanders/xcalloc
fix: fix incorrect call sites of xcalloc
2021-07-26 20:30:10 +02:00
0e22a40b6d Merge pull request #15191 from vigoux/ts-docs
docs(ts): add documentation for listing fns
2021-07-26 18:48:15 +02:00
1637622db9 chore: remove checkbox from issue template
Checkboxes trigger "task lists", which add noise.
2021-07-26 17:31:27 +02:00
dfd9d861dc refactor: replace TRUE/FALSE with true/false
Focus is on global variables.
2021-07-26 17:12:35 +02:00
7b520cca3a Merge pull request #15151 from dundargoc/refactor/true-and-false-macro
refactor: replace TRUE/FALSE macros with C99 true/false
2021-07-26 10:25:08 +02:00
11dcf15682 refactor: replace TRUE/FALSE macros with C99 true/false 2021-07-25 21:51:50 +02:00
5c42e2a87f docs(ts): add documentation for listing fns 2021-07-25 20:52:05 +02:00
192adfe99f Merge pull request #14311 from matveyt/nomode_ce
refactor(state): Remove EXMODE_NORMAL
2021-07-25 19:35:23 +02:00
f15c745502 chore: PVS/V751: ignore warning #15153
There's already an ignore directive but it's placed on the wrong line.
This commit should correct it.
2021-07-25 10:19:56 -07:00
53f70bb183 chore: added ccls-cache in .gitignore (#15175) 2021-07-25 19:12:07 +02:00
3a34f59ae8 Merge pull request #14347 from theHamsta/list_directives
treesitter: add query.list_directives
2021-07-25 16:49:22 +02:00
bebca7bbeb chore: update LSP bug report with Github issue forms (#15159) 2021-07-25 16:07:20 +02:00
1aef6297b3 chore: update feature request template by using Github issue forms. (#15158) 2021-07-25 16:06:19 +02:00
e5f3abfd17 chore: update bug report template by using Github's new issue forms (#15152) 2021-07-25 16:05:11 +02:00
a8f00e39ba Merge pull request #15178 from gpanders/master
fix: source syncolors.vim after startup scripts
2021-07-25 15:36:04 +02:00
3fd4f2f611 fix: fix incorrect call sites of xcalloc
The number of elements comes first and the size of each element second.
2021-07-24 15:52:14 -06:00
289c153d1f doc: group documentation of predicates and directives 2021-07-24 20:57:45 +02:00
b2a9afef6d treesitter: add query.list_directives 2021-07-24 20:57:45 +02:00
860aedd06b fix: source syncolors.vim after startup scripts
This fixes an issue introduced in #14771 (fix: source syncolors.vim
before startup scripts) that affected highlights for users who set
'background' to light in their startup script. Because syncolor.vim
checks for the value of &background, it was always setting up the 'dark'
background colors, which looked wrong for users using light backgrounds.

The primary benefit of #14771 is that it decoupled highlighting from the
syntax engine. This is useful for e.g. treesitter, which still makes use
of highlights even if the syntax engine is disabled. For this reason, it
is still worthwhile to source syncolor.vim separately from synload.vim,
which #14771 accomplishes. However, we should still source syncolor.vim
after the user startup scripts, to ensure that we are respecting the
options the user sets.

Another corollary benefit is that this reduces some redundancy in
highlight definitions, since we now only source syncolors.vim if the
user did not already enable a colorscheme.
2021-07-24 10:28:16 -06:00
46009499af Merge pull request #15169 from bfredl/freebsdfail
fix(ci): disable broken test on openbsd also on freebsd
2021-07-24 13:18:38 +02:00
13db912e51 fix(ci): lower timeout to 45 minutes (from default 360 mins) 2021-07-24 10:23:15 +02:00
a3e2636afd fix(ci): disable broken test on openbsd on all CI due to resource constraints 2021-07-23 19:35:32 +02:00
8ce0929418 Remove EXMODE_NORMAL 2021-07-23 18:08:40 +02:00
754ac5a834 Merge pull request #15114 from theHamsta/treesitter-hl-priority
feat(treesitter): allow to set highlight priority for queries
2021-07-23 17:56:16 +02:00
5ea6cc1d75 docs(tree-sitter): document highlight priority 2021-07-22 21:38:57 +02:00
242608e669 feat(treesitter): allow to set highlight priority for queries 2021-07-22 21:38:57 +02:00
a8c3d50fad lsp: add vim.lsp.diagnostic.set_qflist() function (#14831)
* Add vim.lsp.diagnostic.set_qflist() function
* replaces opts.open_loclist with unified opts.open
2021-07-22 08:48:28 -07:00
ea35584bac Merge pull request #14771 from gpanders/colorscheme
fix: source syncolors.vim before startup scripts
2021-07-22 14:10:56 +02:00
6f48c018b5 Revert "fix(ci): remove mongodb from brew to avoid brew upgrade error (#15115)" (#15141)
This reverts commit 5377b2b00a.

(Fix no longer needed.)
2021-07-20 23:30:32 +02:00
sim
710b9ed1c7 lsp(start_client): Allow passing custom workspaceFolders to the LSP (#15132)
Some language servers *cough*rust-analyzer*cough* need an empty/custom
workspaceFolders for certain usecases. For example, rust-analyzer
needs an empty workspaceFolders table for standalone file support
(See https://github.com/rust-analyzer/rust-analyzer/pull/8955).

This can also be useful for other languages that need to commonly
open a certain directory (like flutter or lua), which would help
prevent spinning up a new language server altogether.

In case no workspaceFolders are passed, we fallback to what we had
before.
2021-07-20 22:00:38 +02:00
2475161def Merge pull request #15135 from neovim/marvim/api-doc-update/master
docs: regenerate
2021-07-19 23:35:35 +02:00
823412eda9 docs: regenerate 2021-07-19 21:24:46 +00:00
9358aa04c4 docs: made can_merge private (#15138) 2021-07-19 14:23:28 -07:00
4ed2d4fd66 fix(lsp): allow diagnostic.clear to accept nil bufnr (#15137)
Passing `nil` is equivalent to passing 0, i.e. it simply uses the
current buffer number.

This fixes a bug when vim.lsp.diagnostic.disable() is called without
arguments.
2021-07-19 14:23:12 -07:00
223c355040 Merge pull request #15127 from bfredl/nlua_init
refactor(lua): initialize lua state at startup instead of dynamically
2021-07-19 22:27:55 +02:00
1aeb945553 feat(lsp): allow diagnostics to be disabled for a buffer (#15134)
Add two new methods to allow diagnostics to be disabled (and re-enabled)
in the current buffer. When diagnostics are disabled they are simply not
displayed to the user, but they are still sent by the server and
processed by the client.

Disabling diagnostics can be helpful in a number of scenarios. For
example, if one is working on a buffer with an overwhelming amount of
diagnostic warnings it can be helpful to simply disable diagnostics
without disabling the LSP client entirely. This also allows users more
flexibility on when and how they may want diagnostic information to be
displayed. For example, some users may not want to display diagnostic
information until after the buffer is first written.
2021-07-19 11:49:55 -07:00
c487a73fa2 feat(lsp): allow configuring zindex for floating windows (#15086) 2021-07-19 09:03:59 -07:00
526fc609b8 fix(shared): do not treat empty tables as list in deep extend (#15094)
An empty table was previously always treated as a list, which means that
while merging tables, whenever an empty table was encountered it would
  always truncate any table on the left.

`vim.tbl_deep_extend("force", { b = { a = 1 } }, { b = {} })`

Before: `{ b = {} }`
After: `{ b = { a = 1 } }`
2021-07-19 08:52:44 -07:00
3b2a85ff76 Merge pull request #15070 from dundargoc/PVS/V768
[RDY] chore(PVS/V768): don't use enum as bool.
2021-07-19 11:29:09 -04:00
e877eccafd refactor(lua): initialize lua state at startup instead of dynamically
lua is used as part of implementation for more core features. As an
example, every user keypress will invoke a lua function to check for
keypress handlers (regardless if they are registered or not). Thus not
starting lua until it is first used doesn't make much sense anymore.

nlua_enter was also needed due to the earlier stateful &rtp
translation, which by now have been made stateless.
2021-07-19 16:12:39 +02:00
192c21ccde chore(PVS/V768): don't use enum as bool. 2021-07-19 14:42:39 +02:00
bfb04812d5 Merge pull request #15073 from dundargoc/PVS/V751
[RDY] chore(PVS/V751): tui.c, Parameter is not used
2021-07-18 13:39:20 -04:00
d9be6ba796 Merge pull request #15110 from dundargoc/PVS/V1042
[RDY] chore: PVS/V1042 - ignore warning globally.
2021-07-18 13:36:23 -04:00
6f9e219f60 chore(PVS/V751): tui.c, Parameter is not used
False positive. Documentation for grid_scroll says "`cols` is always
zero, reserved for future use".
2021-07-18 11:47:09 +02:00
c36df20aef feat: aggregate code actions from all clients (#15121) 2021-07-18 01:58:35 -07:00
9f6989d551 chore: PVS/V1042 - ignore warning globally.
V1042 is a warning that a file has a copyleft license, which is an
irrelevant warning to open-source projects.
2021-07-17 17:27:17 +02:00
96a6b9b52d vim-patch:8.1.0829: when 'hidden' is set session creates extra buffers
Problem:    When 'hidden' is set session creates extra buffers.
Solution:   Move :badd commands to the end. (Jason Franklin)
d39e275b57

Adjust some tests in ex_cmds/mksession_spec.lua:

- 'restores same :terminal buf in splits': Buffers aren't always :badded
  in the same order as they're :edited, :balted, etc, so the order of
  buffers in the buffer list may change slightly now that :badd happens
  afterwards.
- 'restores buffers with tab-local CWD': This is explained in a comment.
2021-07-17 16:12:49 +01:00
5377b2b00a fix(ci): remove mongodb from brew to avoid brew upgrade error (#15115)
macOS CI was failing because:

- brew upgrade fails because,
- mongodb-community cant upgrade because,
- some symlinks are owned by ...  mongodb-community...

We don't use mogodb, so we can just remove it wholesale.
2021-07-17 16:59:39 +02:00
d8f5f4d090 doc(lsp): various small fixes (#15113)
- remove incorrect usage of docstrings
- fix make_formatting_params return type documentation to 'DocumentFormattingParams'
- make progress_handler private
- fix links
2021-07-17 11:15:57 +02:00
0bcf96bf0b fix: source syncolors.vim before startup scripts
This fixes an issue (#12573) where colorscheme files are sourced twice
upon startup. This occurs when the startup script calls `:colorscheme`,
which sets the `g:colors_name` global variable. When syntax highlighting
is enabled in `syn_maybe_enable()` the `syntax.vim` script is sourced
which in turn sources `synload.vim`. This script checks to see if
`g:colors_name` is set and, if so, runs

    exe "colors " . colors_name

This is done to ensure that highlight groups are defined before enabling
the syntax highlighting engine.

Instead, source syncolors.vim before the startup scripts which sets up
default highlights and only load the full syntax engine after
the startup scripts or when the user runs `:syntax on`. Add a guard
variable `did_syncolor` to prevent syncolor.vim from being sourced
twice and remove the line mentioned above from synload.vim so that
the colorscheme file is not re-sourced when the syntax engine is loaded.
2021-07-14 20:51:36 -06:00
682247b52e Merge pull request #15078 from bfredl/p_vim_vi
refactor(options): remove obsolete distinction of "vi" vs "vim" defaults
2021-07-14 22:21:57 +02:00
f0cc3a9480 refactor(options): remove obsolete distinction of "vi" vs "vim" defaults
It might come as a schocking surprise, but the defaults we support
are the NEOVIM defaults.
2021-07-14 21:54:19 +02:00
19a2e59f7e Merge pull request #15017 from donbex/local-file-uri
fix(lsp): accept file URIs without a hostname
2021-07-14 12:20:13 -07:00
fc869da6dc refactor(options): delet unused P_VIM flag 2021-07-14 21:06:07 +02:00
ceaef6bf3f docs: fix typo in treesitter.txt 2021-07-14 21:41:53 +03:00
c31bc6ea73 fix(lsp): pass bufnr for async formatting (#15084)
the `textDocument/rangeFormatting` nad `textDocument/formatting` did not
pass bufnr to apply_text_edits, meaning edits were applied to
the user's currently active buffer. This could result in text being
applied to the wrong buffer.
2021-07-14 09:15:43 -07:00
02bf251bb3 Merge pull request #14812 from gpanders/stdin_closed
feat(job): add parameter to close stdin
2021-07-13 20:51:46 +02:00
f83763b261 Add test case for 'null' stdin mode 2021-07-12 13:22:56 -06:00
d7382475b3 Fix line length clint error 2021-07-12 12:17:44 -06:00
35e13df3c8 Rename stdin to stdin_mode
stdin is a macro in Windows builds.
2021-07-12 12:17:44 -06:00
eb7f24b4ae feat(job): add parameter to close stdin
Some programs behave differently when they detect that stdin is being
piped. This can be problematic when these programs are used with the job
control API where stdin is attached, but not typically used. It is
possible to run the job using a PTY which circumvents this problem, but
that includes a lot of overhead when simply closing the stdin pipe would
suffice.

To enable this behavior, add a new parameter to the jobstart options
dict called "stdin" with two valid values: "pipe" (the default)
implements the existing behavior of opening a channel for stdin and
"null" which disconnects stdin (or, if you prefer, connects it to
/dev/null). This is extensible so that other modes can be added in the
future.
2021-07-12 15:17:10 +02:00
eece0735fe fix(lsp): avoid ipairs on non-sequential tables (#15059)
ipairs terminates on the first nil index when iterating over table keys:

for i,k in ipairs( {[1] = 'test', [3] = 'test'} ) do
  print(i, k)
end

prints:
1 test

Instead, use pairs which continues iterating over the entire table:

for i,k in pairs( {[1] = 'test', [3] = 'test'} ) do
  print(i, k)
end

prints:
1 test
3 test
2021-07-11 11:34:26 -07:00
e5b75d41db chore(clang): Fix 'Array subscript is undefined' #15057 2021-07-11 07:59:23 -07:00
22b5381396 fixup(clipboard): Fix error not properly handled #14984
fixes #14967
2021-07-11 06:19:54 -07:00
c21a6972a0 fix(lsp): Ensure human readable errors are printed
`return err_message(tostring(err))` caused errors to be printed as
`table: 0x123456789` instead of showing the error code and error
message.

This also removes some `if err` blocks that never got called because at
the end of `handlers.lua` all the handlers are wrapped with logic that
adds generic error handling.
2021-07-11 11:22:35 +02:00
256570a7a6 fix(lsp): Ensure users get feedback on references/symbols errors or empty results
Relates to https://github.com/neovim/neovim/issues/15050

Users should get some indication if there was an error or an empty
result.
2021-07-11 10:57:00 +02:00
79fe9dedcf window.c: address Coverity failure #14996
Check that `wip2` does not point to the same address as `wip`, to address the
Coverity test failure from PR #14884.

Based on the `if` clauses, `free_wininfo(wip2, ...)` is only called when
`wip2->wi_win == NULL` and `wip->wi_win == wp`. I think `wip2` would only point
to the same address as `wip` in scenarios where `wp` were `NULL`, which can be
assumed otherwise based on the earlier code.
2021-07-10 21:32:37 -07:00
936f3a4ddc test/memory_usage_spec: skip on MacOS #15043
Memory compression could complicate the measurements.
2021-07-10 20:15:38 -07:00
7c61d9c3bf fix(lsp): Add separator between codelens in virttext (#15049)
Before:

  Lens1Lens2

After:

  Lens1 | Lens2

Fixes https://github.com/neovim/neovim/issues/15048
2021-07-10 21:35:38 +02:00
0b64d5ecd1 fix(lsp): correctly check for windows in lsp logger (#14954) 2021-07-10 11:11:33 -07:00
1dab9357de feat(vim.uri): Allow URI schemes other than file: without authority 2021-07-10 18:27:37 +01:00
82a443e1f3 test(lsp): file URIs do not allow relative paths 2021-07-10 18:27:37 +01:00
ce5f4228aa test(lsp): file URIs without a hostname 2021-07-10 18:27:37 +01:00
a2c2a08652 fix(lsp): accept file URIs without a hostname
RFC 8089, which defines the file URI scheme, also allows URIs without a
hostname, i.e. of the form file:/path/to/file. These are returned by
some language servers and accepted by other LSP implementations, such as
VSCode's, so it is reasonable for us to accept them as well.
2021-07-10 18:27:37 +01:00
3de7017d9d Merge pull request #15047 from teto/flake-tests
flake update
2021-07-10 18:37:07 +02:00
389cbe63bf chore: add log hander to gen_vimdoc
so it actually dumps output.
Plus a description of what it does in the argparser.
2021-07-10 17:55:45 +02:00
de909bf48b chore(flake): update inputs
Updated inputs so no need to add tree-sitter ourselves anymore.

Added checks:
- for pylint/shlint
- distinguish the devolpment shell from the ASAN build (closure for ASAN
  version is smaller). While in the devShell, functionaltests would fail
because bin/nvim could not load
outputs/out/share/nvim/syntax/syntax.vim
So we touch the file.
2021-07-10 17:52:15 +02:00
e43dbfdd05 feat(lsp): Make line diagnostics display prettier
Adds indentation that matches the number prefix to ensure diagnostic
messages spawning multiple lines align.

Before:

    Diagnostics:
    1. • Variable not in scope: red :: t0 -> t
    • Perhaps you meant one of these:
        ‘rem’ (imported from Prelude), ‘read’ (imported from Prelude),
        ‘pred’ (imported from Prelude)
    2. • Variable not in scope: repeDoubleColon :: [Char] -> t0
    • Perhaps you meant ‘replaceDoubleColon’ (line 32)

After:

    Diagnostics:
    1. • Variable not in scope: red :: t0 -> t
       • Perhaps you meant one of these:
           ‘rem’ (imported from Prelude), ‘read’ (imported from Prelude),
           ‘pred’ (imported from Prelude)
    2. • Variable not in scope: repeDoubleColon :: [Char] -> t0
       • Perhaps you meant ‘replaceDoubleColon’ (line 32)
2021-07-09 20:36:08 +02:00
37af69285a Merge pull request #15036 from vigoux/decurbuf-2
refactor(undo): don't assume curbuf in u_compute_hash
2021-07-09 18:52:26 +02:00
ff53c5585f refactor(undo): don't assume curbuf in u_compute_hash 2021-07-09 15:36:07 +02:00
191d3e6af7 Merge pull request #15035 from neovim/marvim/api-doc-update/master
docs: regenerate
2021-07-09 14:40:19 +02:00
832e1708c2 docs: regenerate 2021-07-09 10:39:24 +00:00
9132b76da6 fix(lsp): support duplicate params in signature help (#15032) 2021-07-09 03:38:29 -07:00
1c41689287 Merge pull request #12971 from vigoux/decurbuf
Decrease reliance on curbuf in BUFEMPTY and `undo.c`
2021-07-09 10:15:18 +02:00
27118c6eb3 Merge pull request #14908 from neovim/marvim/api-doc-update/master
docs: regenerate
2021-07-08 22:50:18 -04:00
9c93e6461c refactor(undo): remove last occurence of save_curbuf 2021-07-08 23:08:42 +02:00
b35fefc57f refactor: remove all mentions to curbuf_lock 2021-07-08 23:08:27 +02:00
9c7e04eb3b build(cmake): skip download if target file exists #14844) 2021-07-08 11:16:13 -07:00
980d50d90e vim-patch:8.2.3125: variables are set but not used #15028
Problem:    Variables are set but not used.
Solution:   Move the declarations to the block where they are used.
            (closes vim/vim#8527)
09f688c33a
2021-07-08 11:04:46 -07:00
4339f528db vim-patch:8.2.3089: garbage collection has useless code #15027
Problem:    Garbage collection has useless code.
Solution:   Bail out when aborting. (closes vim/vim#8504)
20cc528320
2021-07-08 11:03:33 -07:00
6b313d68d0 docs: regenerate 2021-07-08 15:42:31 +00:00
03d15d9e09 fix(lsp): restore diagnostics extmarks that were moved to the last edit line (#15023) 2021-07-08 08:40:41 -07:00
af263711a3 feat(lsp): highlight active parameter in signature help (#15018) 2021-07-07 23:04:35 -07:00
f2205b83c5 doc: "--remote" is not supported #14936
There are plans to support the --remote-xx stuff (or something like it): #1750 #8326
But we don't need this doc meanwhile.
2021-07-07 19:04:49 -07:00
bd7a0b46a9 doc: remove mentions of compile-time flags #14935
Nvim always compiles everything in so those are useless at best and
confusing at worst.
2021-07-07 18:51:40 -07:00
4547137aaf chore: use codespell to spell check #15016 2021-07-07 15:28:44 -07:00
e2bc7e321b clang/'Dead initialization': don't assign unused value to variable "string" #15015 2021-07-07 14:25:27 -07:00
77b33e4b9f fix(lsp): restore diagnostics extmarks on buffer changes (#15011) 2021-07-07 22:31:39 +02:00
0fd3f9130d clang/'Dead nested assignment': don't assign unused value to precision #15012 2021-07-07 13:17:03 -07:00
3de777d259 chore(deps): bump LibLUV to 1.40.0-0 (#14997)
Adds several threading, async, and gc fixes and allows building with older gcc (4.x). Minimum required version remains 1.30.1.
2021-07-07 08:24:08 +02:00
f8ed13c0dc style(undo): remove unnecessary comment 2021-07-06 19:52:26 +02:00
e5804d46fd fix(qf): use correct buffer field 2021-07-06 19:51:59 +02:00
7970631fa0 buffer: move BUFEMPTY to a function 2021-07-06 19:12:15 +02:00
763c852812 undo: reduce reliance on curbuf 2021-07-06 19:08:32 +02:00
55a2c513aa buffer: don't rely on curbuf in BUFEMPTY 2021-07-06 19:07:11 +02:00
df33f30e88 clang/'Dead assignment': ignore warning #15000
This assignment is informative/documenting though technically unnecessary.
https://github.com/neovim/neovim/pull/11900#discussion_r381860165 .
2021-07-05 18:59:27 -07:00
a6cdfa27d5 chore(deps): bump LibLUV to 1.34.1 and lua-compat-53 to 0.9 (#14985)
This bumps the bundled LibLUV to 1.34.1 in order to make the newly introduced `uv.fs_mkstemp` available in the official builds. (The minimum required version remains at 1.30.1.)

The bump of lua-compat-53 to 0.9 is needed to build with the updated LibLUV.
2021-07-05 14:30:50 +02:00
f515baedc1 Merge pull request #14989 from folke/lsp_convert_input_markdown
fix(lsp): prevent double <text> for cached plaintext markup
2021-07-04 20:06:37 -07:00
910967e5af fix(lsp): prevent double <text> for cached plaintext markup 2021-07-05 00:39:46 +02:00
c6226bd6c9 Merge pull request #14391 from lewis6991/signs
signs: Change b_signcols_max -> b_signcols_valid
2021-07-04 23:16:49 +02:00
65b0918c24 signs: Change b_signcols_max -> b_signcols_valid
b_signcols_max isn't used to store the max value, it is use to
invalidate b_signcols.
2021-07-04 21:50:27 +01:00
18bfcfe77f Merge pull request #14981 from janlazo/vim-8.2.3081
vim-patch:8.2.{3081,3082,3085,3087,3088,3093,3094,3097,3098}
2021-07-04 11:00:48 -04:00
0d75b0d8d4 vim-patch:8.2.3097: crash when using "quit" at recovery prompt
Problem:    Crash when using "quit" at recovery prompt and autocommands are
            triggered.
Solution:   Block autocommands when creating an empty buffer to use as the
            current buffer. (closes vim/vim#8506)
1d97efce0c
2021-07-04 09:22:50 -04:00
ce4d424bfc vim-patch:8.2.3093: tablabel_tooltip test fails with Athena
Problem:    tablabel_tooltip test fails with Athena. (Dominique Pellé)
Solution:   Skip the test when using Athena. (closes vim/vim#8508)
fb773a3e0a
2021-07-04 09:22:50 -04:00
37959e8865 vim-patch:8.2.3088: with 'virtualedit' set to "block" Visual highlight is wrong
Problem:    With 'virtualedit' set to "block" Visual highlight is wrong after
            using "$".  (Marco Trosi)
Solution:   Do not set w_old_cursor_lcol to MAXCOL. (closes vim/vim#8495)
9cee4a1c9c
2021-07-04 09:22:50 -04:00
c2a7e445ce vim-patch:8.2.3087: Gemtext files are not recognized
Problem:    Gemtext files are not recognized.
Solution:   Recognize .gmi and .gemini files. (closes vim/vim#8427)
fcde67c99f
2021-07-04 09:22:49 -04:00
d7060183b8 vim-patch:8.2.3085: JSONC files are not recognized
Problem:    JSONC files are not recognized.
Solution:   Recognize .jsonc files. (Izhak Jakov, closes vim/vim#8500)
acbb4b5720

N/A patches for version.c:

vim-patch:8.2.3081: cannot catch errors in a channel command

Problem:    Cannot catch errors in a channel command.
Solution:   Instead of skipping the error make it silent. (closes vim/vim#8477)
11a632d60b

vim-patch:8.2.3082: a channel command "echoerr" does not show anything

Problem:    A channel command "echoerr" does not show anything.
Solution:   Do not use silent errors when using an "echoerr" command.
            (closes vim/vim#8494)
b836f631db

vim-patch:8.2.3094: Test_popup_atcursor_pos() fails without the conceal feature

Problem:    Test_popup_atcursor_pos() fails without the conceal feature.
Solution:   Add a check for the conceal feature. (Dominique Pellé,
            closes vim/vim#8505)
c60e959cba

vim-patch:8.2.3098: popup window test is flaky on MS-Windows with GUI

Problem:    Popup window test is flaky on MS-Windows with GUI.
Solution:   Skip the check in this situation.
999db2346b
2021-07-04 09:22:45 -04:00
490615612e fix(vim.opt): vimL map string values not trimmed (#14982)
Options formatted as a list of comma-separated key-value pairs may have
values that contain leading and trailing whitespace characters. For
example, the `listchars` option has a default value of
`"tab:> ,trail:-,nbsp:+"`. When converting this value to a lua table,
leading and trailing whitespace should not be trimmed.

Co-authored-by: Robert Hrusecky <robert.hrusecky@utexas.edu>
2021-07-04 00:14:39 -07:00
75f758b993 fix(clint): fix link to style guide. (#14975) 2021-07-03 09:09:02 -07:00
ee2c7095c4 refactor(memfile_test): replace long_u type with size_t. #14974
long_u was a custom integer type that is no longer used.
More information can be found in https://github.com/neovim/neovim/issues/459.
2021-07-03 08:23:15 -07:00
70223babb0 PVS/V1051: Ignore "modulo by 1" warning for ARRAY_SIZE. (#14943)
The warning is triggered by the second division when arr is a char array
since sizeof(char) is 1. A modulo by 1 may normally indicate a logic
error, but in this case it's intended.
2021-07-03 07:50:05 -07:00
05330ba508 doc/startup: cleanup; assign ENN to "conflicing configs" msg (#14971) 2021-07-03 06:31:00 -07:00
7918072f99 doc/readme: mention void linux (#14969) 2021-07-03 05:52:33 -07:00
d791274a9d fixup(clipboard): Use case matching #14962
Context: https://github.com/neovim/neovim/pull/14848#discussion_r663203173
2021-07-02 17:47:18 -07:00
94583483f9 deps(curl): v7.77.0 (#14961)
https://github.com/neovim/neovim/issues/14078#issuecomment-870882357
d66e306abf
2021-07-02 17:44:05 -07:00
62d67de598 version bump 2021-07-02 18:12:11 +02:00
a5ac2f45ff NVIM v0.5.0
This release represents ~4000 commits since v0.4.4, the previous
non-maintenance release. Highlights include builtin support for LSP, new APIs
for extended marks (with byte resolution tracking of changes) and buffer
decorations, as well as vast improvements to lua as a plugin and configuration
language. Experimental support for tree-sitter as a syntax engine is also
included, building on the new core APIs for byte tracking and decorations.

FEATURES:

New API functions:
  nvim_exec: execute multiline vim script blocks
  nvim_get_hl_id_by_name: Gets a highight definition by name
  nvim_exec_lua: new name for nvim_execute_lua
  nvim_notify: Notify the user with a message
  nvim_get_runtime_file: Find files in runtime directories
  nvim_get_all_options_info: Get option information for all options
  nvim_get_option_info: Get option information for one option
  nvim_echo: Echo a message with highlights
  nvim_open_term: Open a virtual terminal in a buffer
  nvim_chan_send: send data to a channel. (like chansend() but supports lua strings)
  nvim_set_decoration_provider: callback driven decoration API for a namespace

  nvim_buf_set_text: Set/replace a character range in a buffer
  nvim_buf_delete: Delete the buffer. |:bwipeout|
  nvim_buf_get_extmark_by_id: Returns position for a given extmark id.
  nvim_buf_get_extmarks: get extmarks in traversal order.
  nvim_buf_set_extmark: Creates or updates an extmark.

  nvim_buf_del_extmark: Removes an extmark.
  nvim_buf_call: call a function with buffer as temporary current buffer

  nvim_win_hide: Closes the window and hide the buffer it contains |:hide|
  nvim_win_call: Calls a function with window as temporary current window.

New UI events:
  redraw.screenshot
  redraw.win_viewport

Lua:
  767cd8b17 #12235 startup: add init.lua as an alternative user config
  687eb0b39 #14686 feat(startup): Source runtime/plugin/**/*.lua at startup
  #14686 runtime: allow lua in various runtime search paths such as
         syntax/ ftdetect/ indent/ ftplugin/ compiler/ colors/
  43956dea5 #13479 lua: Add vim.opt and fix scopes of vim.o
  1407899c3 #12268 lua: Add buffer, window and tab accessors
  be662fe5c lua: vim.wait implementation
  2b663c061 #14213 viml: embed Lua syntax highlighting
  901dd79f6 feat: add completion to ':lua'
  82688973 lua: complete methods in metatables
  342148525 runtime: propagate lua parsing errors while using "require"
  aaca2c1c4 #13276 feat(lua): improve error message to make it actionable
  c60c7375f startup: handle autoload and lua packages during startup
  3ccdbc570 #12536 lua: add vim.register_keystroke_callback
  971a191c4 lua: Add ability to pass lua functions directly to vimL
  91e41c857 #12401 lua: add vim.highlight.range
  f2894bffb #12279 lua: Add highlight.on_yank
  ae5bd0454 #11969 lua: add tbl_deep_extend
  ea4127e9a lua: metatable for empty dict value
  dab40f43b Add v:lua.func() vimL syntax for calling lua
  678a51b1d Lua: vim.validate()
  474d0bcbf lua: vim.rpcrequest, vim.rpcnotify, vim.NIL
  8ee7c94a9 lua: add vim.fn.{func} for direct access to vimL function
  d0d38fc36 #11442 Lua: vim.env, vim.{g,v,w,bo,wo}

Tree-sitter:
  Note: tree-sitter is considered experimental for 0.5. There's remaining
  bugs for buffer parsing, as well as known performance issues for
  large files and injected (nested) languages.

  e93342629 #10124 Tree-sitter API for lua
  440695c29 tree-sitter: implement query functionality and highlighting prototype
  8bea39f37 feat(treesitter): allow injections to be configured through directives
  929f19414 feat(treesitter): add offset predicate for language injection
  cd75d3289 #14200 feat: treesitter checkhealth
  1a631026a feat(treesitter): add language tree
  d3f544002 treesitter: runtime queries
  3c5141d2c #13008 treesitter: add string parser
  9437327d5 treesitter: use new on_bytes interface
  e4b5efa51 treesitter: use decoration provider API
  d6209a7b8 fix: Add a test and it is so pretty
  836c31032 feat(ts): bump tree-sitter to v0.20.0

LSP client:
  00dc12c5d #11336 lua LSP client: initial implementation
  d5aaad14e #11430 Followup improvements to LSP
  ee7ac469c #11578 LSP: Use async completion for omnifunc.
  070bd3ea2 #11604 LSP: shrink API, improve docs
  25afa10f9 #11669 Merge 'LSP: differentiate diagnostic underline by severity'
  e956ea767 #11777 LSP: show diagnostic in qf/loclist
  dd8b29cfe #11838 LSP: set InitializeParams.rootPath value
  0c5d2ffeb #11837 Merge 'LSP: fixes, improve test visibility'
  ca8699378 #11638 LSP: implement documentHighlight
  220a2b05c LSP/references: Add context to locations returned by server
  ccb038dc6 LSP/completion: add textEdit support
  da6f38ab3 #12313 LSP: Add workspace.applyEdit client capabilities
  f559e5249 #11607 LSP: Add textDocument/codeAction support
  0d83a1c43 #12638 LSP: Feature/add workspace folders
  fd507e278 #13641 LSP: window/showMessageRequest
  e467d2939 LSP: Move workspace/configuration handler from nvim-lspconfig to core
  2bdd553c9 feat(lsp): Add codelens support

UI:
  f8134f2fd screen.c: remove fold_line special case
  c146eddc8 experimental support for per-window color schemes
  a1508c9f6 nvim__screenshot (dump TUI state to file)
  08fe10010 terminal: enable pass through indexed colors to TUI in rgb mode
  5a8569942 tests/ui: make screen.lua use "linegrid" representation internally
  8fe19d9d8 screen: make ui_compositor aware of the intended size of a float
  54ce1010e extmark: add new flexible "decorations" abstraction
  4781333a7 decorations: allow virt_text overlay at any column
  bdebe8516 decorations: use extmark column adjustments for buffer highlights
  7b488314d decorations: Allow highlights beyond end of line hl_eol
  425bc438a decorations: add additional styling of virt_text overlays
  edb5864a2 floats: z-index
  243820ebd floats: add borders (MS-DOS MODE)
  5b6edc852 feat(float): add rounded borders preset
  4a36ec6da #14310 float: add "solid" border style

vim patches:
  around ~1000 vim patches and runtime updates got merged. Hooray!
  Changes include improvements to quickfix, prompt buffers, incsearch,
  display of search counts, and much much more.

various features and changes:
  858c05613 #12809 Support for :perl, :perlfile, :perldo and perleval()
  bc86f76c0 api/buffer: add "on_bytes" callback to nvim_buf_attach
  19b623708 jobstart now supports env/clear_env
  ef7c6b972 Support specifying "env" option for termopen()
  7c4f34966 #13287 switch from travis to github actions
  24db59ca8 feat: implement BufModified autocmd
  b83d8223f implement Scroll autocommand
  8caf84130 Lower "closed by the client" message level to INFO
  7de276b87 bump libvterm to 0.1.4
  097ec71bd #14096 aarch64/linux: fix build by updating LuaJIT
  bd5f0e969 #12531 support autoread using tui focus tracking
  8a1276005 #12382 Add v:event.visual during `TextYankPost`
  802f8429d api(nvim_open_win): add "noautocmd" option

FIXES:
  21444552c BugFix(clipboard): Fix block paste not working properly
  01493e799 #14413 api: fix nvim_exec() silencing behaviour
  9699f3be1 fix(doc): Add '/site' to stdpath('data') example in `:help 'rtp'`
  581b2bcde screen: fix problem with p_ch
  eae4b1e5c luaref: fix leaks for global luarefs
  409b2711f fix: segfault when pasting in term with empty buffer
  cf6c23fb0 #14273 fix plenty of errors discovered by clang
  21035cff9 #14500 fix plenty of errors discovered by coverity
  bca19138b #13987 tui: fix possibility of evaluating uninitialized variables
  9f2335937 fix_cursor: do not change line number when edit will not impact cursor row
  33f92fe02 fix(pty): Always use $TERM from the job's env dict
  6249059d4 checkhealth: fix terminfo problems on Windows
  397be5d38 #12811 UI: fix cursor not displayed after hiding and un-hiding
  87afc9031 screen.c: fix an issue with wrap and folds
  b419e39a2 screen.c: fix last character on foldtext
  2ea312769 #13688 screen.c: fix display of signcolumn=auto in diffs
  c2d288e29 Fix screen terminal family issues
  314b222c2 #14127 Fix click on foldcolumn with vsplit
  e65d0e53b vim.fn: throw error when trying to use API function
2021-07-02 17:54:29 +02:00
b6ff02e27b ex_cmds: verify invalid command name 2021-07-02 17:44:44 +02:00
7685fc9ecd Merge pull request #14864 from seandewar/get-config-zindex
fix(api/win_get_config): include z-index
2021-07-02 14:52:08 +02:00
8b07653902 doc(options): Fix recommended PowerShell config (#14349)
Ensure that
  * Shell uses UTF8 input/output mode
  * Stderr output is captured, in UTF8
  * Program exit codes are correctly captured

Update functional test harness and add tests
for :make command.

Closes #13713
2021-07-02 08:15:40 -04:00
7d8202087b Merge pull request #14951 from rktjmp/14924-checksums
feat(ci): Add sha256 checksums to release notes
2021-07-01 22:32:05 -04:00
2dd7828511 runtime/vim: d2ea7cf10a4d026ebd402594d656af7d5c811c24 (#14950)
Port vim syntax file only.
2021-07-01 17:31:30 -04:00
d1c906a7c6 feat(ci): Add sha256 checksums to release notes 2021-07-02 05:06:21 +10:00
e8247bc739 lint (#14941)
Fix SC2155 error, found by shellcheck v0.7.2.

https://github.com/koalaman/shellcheck/wiki/SC2155
2021-07-01 12:37:03 -04:00
f133ab598f Merge pull request #14792 from shadmansaleh/refactor/mkdir_p
Refactor(tests): Use os commands in mkdir_p helper
2021-07-01 16:20:34 +02:00
a50a3a12d6 Merge pull request #14848 from shadmansaleh/fixup/block_paste_clipboard
fix(clipboard): Fix block paste from system clipboard not working properly
2021-07-01 15:47:21 +02:00
47a08ec72e Tests(clipboard): Add test for block paste 2021-07-01 15:01:01 +06:00
21444552c0 BugFix(clipboard): Fix block paste not working properly
Block copy and paste from system-clipboard currently breaks formatting.
This fixes it.

The bug occurs because system-clipboard doesn't contain information
about what mode the copy was made.
Simple solution to this is we keep a cache of copy we last made along
with mode information. If system-clipboard returns the cache we apply
the mode information that we know about that cache.
2021-07-01 15:01:01 +06:00
27ea0d37e1 Refactor(tests): mkdir_p in startup/init.lua test 2021-07-01 08:25:55 +06:00
f35a5f2efc Revert "tui: improve support for tmux, GNU Screen" (#14786)
* Revert "tui: improve support for tmux, GNU Screen"

This reverts commit c266c2f36e.

This commit broke neovim under tmux, where it "types" the background
string as input to the terminal. Fixing this with neovim as-is requires
changing tmux keybindings or TERM settings, which has to be done by
every single user, therefore a fix should happen on neovim's side.

Fixes #14298

* tui: fix code lints.
2021-06-30 21:29:51 -04:00
8bd6990084 vim-patch:8.2.1905: the wininfo list may contain stale entries (#14884)
Problem:    The wininfo list may contain stale entries.
Solution:   When closing a window remove any other entry where the window
            pointer is NULL.
4882d98339
2021-06-30 21:24:50 -04:00
d83bc835b6 Merge pull request #14938 from janlazo/vim-8.2.3072
vim-patch:8.2.{3072,3075}
2021-06-30 18:46:22 -04:00
fe10a4e555 Open funcs_data.mpack in binary mode. (#14944)
"b" flag is required to read binary files on Windows. 
https://www.lua.org/pil/21.2.2.html
2021-06-30 18:17:48 -04:00
b82d8faf53 Refactor(tests): Use os commands in mkdir_p helper 2021-06-30 23:27:36 +06:00
390fed3248 Merge pull request #14939 from clason/bump-ts-0.20
[RDY] feat(ts): bump tree-sitter to v0.20.0
2021-06-30 18:18:35 +02:00
48b2092d01 Merge pull request #14942 from jamessan/functionaltest-lua
ci(gha): Add functionaltest-lua checker
2021-06-30 09:58:02 -04:00
3438959da9 Update CONTRIBUTING.md: mention ASAN/UBSAN for runtime errors 2021-06-30 14:57:52 +02:00
836c310321 feat(ts): bump tree-sitter to v0.20.0 2021-06-30 12:11:35 +02:00
2fc9e9effa ci(gha): Add functionaltest-lua checker 2021-06-29 21:46:46 -04:00
b2cc43b454 vim-patch:8.2.3072: "zy" does not work well when "virtualedit' is "block"
Problem:    The "zy" command does not work well when 'virtualedit' is set to
            "block". (Johann Höchtl)
Solution:   Make endspaces zero. (Christian Brabandt, closes vim/vim#8468,
            closes vim/vim#8448)
7d7bcc6ba0

N/A patches for version.c:

vim-patch:8.2.3075: xxd always reports an old version string

Problem:    Xxd always reports an old version string. (Åsmund Ervik)
Solution:   Update the version string with the last known change date.
            (Jürgen Weigert, closes vim/vim#8475)
80b2ba3e96
2021-06-29 21:40:48 -04:00
384f9870f6 Merge pull request #14930 from clason/ts-ifdef-fixup
fixup(ts): put ts_query_cursor_set_match_limit behind feature guard
2021-06-29 20:23:02 +02:00
845d5ab305 Merge pull request #14931 from clason/patch-1
fix(ci): change autolabel to "treesitter"
2021-06-29 20:03:15 +02:00
f969b4bfb1 fix(ci): change autolabel to "treesitter"
Open issues and PRs are almost all labeled `treesitter` instead of `tree-sitter`; this change improves consistency.
2021-06-29 18:54:27 +02:00
7e8a8482e8 fixup(ts): put ts_query_cursor_set_match_limit behind feature guard
This is a fixup for #14915, which used the above-mentioned call to
restore the behavior of the pre-release version of tree-sitter to
that of 0.19.5. However, this function was introduced after 0.19.5,
breaking distro builds that link against 0.19.5 instead of the tag
specified in neovim's build script.

Now the function should only be called when it is available _and_
needed. Once tree-sitter is bumped to 0.19.6 (when this is released),
this guard can be removed again.

Fixes #14923 (among others)
2021-06-29 17:15:12 +02:00
2bcf18deaa Merge pull request #14779 from tjdevries/tjdevries/vim_opt_fixes
An assortment of various vim.opt fixups.
2021-06-29 10:24:41 -04:00
f8990870ff Merge pull request #14335 from chentau/extmark_delbytes
Extmarks: manually zero out `curbuf->deleted_bytes2` on substitute and join
2021-06-29 15:31:23 +02:00
19b7cef0a7 fix(vim.opt): Fix #14828 with empty values being incorrectly inserted 2021-06-29 09:18:59 -04:00
6ecec87c09 fix(vim.opt): Fix #14668 Now correctly handles unescaped commas in isfname style 2021-06-29 08:42:07 -04:00
9119ea1bec fix(vim.opt): Fix #14669 whichwrap now acts as expected 2021-06-29 08:42:07 -04:00
b02e64c4df fix(vim.opt): Add basic error handling 2021-06-29 08:42:07 -04:00
e6175f6389 fix(vim.opt): Get window options before setting.
This closes #14677, but I also am a little unsure if there are times
where this may not be correct. However, this just changes the behavior
that even if `was_set` was false, we still get for
`nvim_win_get_option`.
2021-06-29 08:42:07 -04:00
1d3ee1c441 fix(vim.opt): #14708 Now lets you put duplicate values in wildmode 2021-06-29 08:42:07 -04:00
1c962401a1 Manually zero out deleted_bytes2 when substituting and joining lines 2021-06-29 00:48:24 -07:00
f83c25942d fix(doc/api): Remove 'border' as unsupported (#14916)
PR #13998 added support for floating window borders.
2021-06-28 20:40:56 -04:00
99a4152a4b fix: Remove [RFC] from PR subject in vim-patch.sh (#14917)
As of PR #10383, CONTRIBUTING.md says '[RFC] is assumed by default'. As
of PR #11656, CONTRIBUTING.md says '**do not** put "RFC" in the PR
title'.
2021-06-28 20:40:00 -04:00
3552916cb9 fix(doc): remove reference to vim.lsp.callbacks (#14576)
too old now, can be confusing
2021-06-28 23:02:17 +02:00
c81cbad444 Merge pull request #14920 from otherJL0/master
Adding clangd language server config file
2021-06-28 18:20:33 +02:00
5777fc1b8e Adding clangd language serever config file to point to build/ directory for compile_commands.json 2021-06-28 11:03:09 -04:00
785dcff909 Merge pull request #14915 from clason/ts-match-limit
fix(treesitter): set match limit for query cursors
2021-06-28 16:28:52 +02:00
5aaa1a1c04 [RDY] Add buffer information to tabline_update (#12481)
* Add buffer information to tabline_update

Most terminal implementations of the tabline display buffer and tab
information. Many neovim-qt users disable GuiTabline because it lacks
functionality provided in the terminal implementation.

The tabline_update event should include buffer information too, so client GUIs
can display rich useful tabs.
2021-06-27 15:30:09 -04:00
bdf3df4027 Fixed +1 -1 in util.lua (#14913)
No point in adding and then subtracting I believe ;)
2021-06-26 13:43:18 -04:00
bb4fc69e93 Merge pull request #14914 from janlazo/vim-8.2.3050
vim-patch:8.2.{2954,3049,3050}
2021-06-26 13:42:38 -04:00
18354ca4a7 fix(treesitter): set match limit for query cursors
Upstream tree-sitter raised the number of pending matches for a query cursor
from 32 to 64k in <https://github.com/tree-sitter/tree-sitter/commit/
78010722a49ed6224c773c22b0d25a8c9fbde584>, which severely impacted performance
for some highlighting queries. This uses the `ts_query_cursor_set_match_limit`
function introduced in <https://github.com/tree-sitter/tree-sitter/commit/
cd96552448a6e0d4eb27fc54b27cb5130c4b6f76> to manually set this back to the old
default of 32.

Fixes #14897
2021-06-26 18:11:38 +02:00
7a239a8a9a vim-patch:8.2.2954: short file name extension for Scala not recognized
Problem:    Short file name extension for Scala not recognized.
Solution:   Recognize *.sc. (closes vim/vim#8337)
6db7b6375a
2021-06-26 11:43:35 -04:00
eb7e7ad882 vim-patch:8.2.3049: JSON patch file not recognized
Problem:    JSON patch file not recognized.
Solution:   Recognize json-patch as json. (Kevin Locke, closes vim/vim#8450)
6582e230a0
2021-06-26 11:37:57 -04:00
750ad18845 vim-patch:8.2.3050: cannot recognize elixir files
Problem:    Cannot recognize elixir files.
Solution:   Recognize Elixir-specific files.  Check if an .ex file is Euphoria
            or Elixir. (Austin Gatlin, closes vim/vim#8401, closes vim/vim#8446)
f3caeb63d6
2021-06-26 10:51:29 -04:00
5c0b01fd88 vim-patch:8.2.3018: 'quickfixtextfunc' formatting is lost when switching buffers (#14865)
Problem:    Formatting using quickfixtextfunc is lost when updating location
            lists for different buffers.  (Yorick Peterse)
Solution:   Use the right window for the locaiton list. (Yegappan Lakshmanan,
            closes vim/vim#8400, closes vim/vim#8403)
ad52f96a2d
2021-06-26 10:44:05 -04:00
20dc3f1989 vim-patch:8.1.0897: can modify a:000 when using a reference (#14902)
Problem:    Can modify a:000 when using a reference.
Solution:   Make check for locked variable stricter. (Ozaki Kiichi,
            closes vim/vim#3930)
05c00c038b
2021-06-26 10:19:09 -04:00
ad9c2c069a Fix <afile> getting prepended with a slash on WinClosed (#14515)
It is wrong to assume that you can't shorten a path if it's in `/`: you
can always shorten it by removing the forward slash.

Closes #14512
2021-06-26 10:18:36 -04:00
c1120ad0e1 fix(doc/usr_41): don't mention 0o prefix for octs (#14906)
v8.2.0886 isn't ported yet.
Also remove mentions of Vim9 and legacy script for now.

[skip ci]
2021-06-25 20:10:58 -04:00
e680d7d6af fix(lsp): render the last line in stylize_markdown 2021-06-25 11:45:42 -07:00
3b44b21894 Merge pull request #14910 from folke/lsp_fences_docs
style(lsp): make get_markdown_fences private
2021-06-25 11:04:44 -07:00
b86b410a92 Update busy_start/busy_stop ui events documentation (#14415)
Closes #14386
2021-06-25 13:01:57 -04:00
28dde1038f style(lsp): make get_markdown_fences private 2021-06-25 18:32:00 +02:00
5d792701cf Merge pull request #14904 from mfussenegger/nil-message-callbacks
fix(lsp): Handle nil message_callbacks
2021-06-25 09:13:01 -07:00
7b5a233d64 Merge pull request #14617 from folke/fancy_markdown_fences_support
feat(lsp): use `g:markdown_fenced_languages` in `vim.lsp.util.stylized_markdown`
2021-06-25 09:02:28 -07:00
22c27c0fb4 Merge pull request #14903 from mfussenegger/add-workspace-folder
fix(lsp): Set `dir` completion option for add_workspace_folder
2021-06-25 08:29:57 -07:00
aa1e20497a feat(lsp): use markdown_fenced_languages in stylized_markdown 2021-06-25 17:27:38 +02:00
bbd13aadd7 Merge pull request #14907 from folke/lsp_markdown
fix(lsp): syntax improvements for lsp_markdown
2021-06-25 08:22:54 -07:00
08f81f0f29 fix(lsp): syntax improvements for lsp_markdown 2021-06-25 17:01:06 +02:00
58473178ff fix(lsp): Handle nil message_callbacks
The `onexit` handler could set `message_callbacks` to `nil` within the
luv event loop while the mainloop runs a function that tries to access
`message_callbacks`.

This adds some checks to prevent errors in that case.

Fixes https://github.com/neovim/neovim/issues/14863
2021-06-25 14:45:17 +02:00
7ea652e4bf fix(lsp): Set dir completion option for add_workspace_folder
Given that the input is pre-filled with a path, it should be possible to
use dir completion.
2021-06-25 14:28:17 +02:00
510ed996d2 Merge pull request #14886 from janlazo/vim-8.1.1437
vim-patch:8.1.{1437,2391},8.2.{1255,2185,2294,3033,3034,3037,3038,3043}
2021-06-24 19:36:21 -04:00
1e2fc1f9cd Merge pull request #14584 from akinsho/bugfix/vim-nil-conversion-logic
[RDY] fix(lsp): do not convert vim.NIL to nil in lists
2021-06-24 13:23:28 -07:00
444f175335 fix(lsp): do not convert vim.NIL to nil in lists 2021-06-24 11:23:19 +01:00
9081cd30a5 vim-patch:8.2.3033: no error when using alpha delimiter with :global
Problem:    No error when using alpha delimiter with :global.
Solution:   Check the delimiter like with :substitute. (closes vim/vim#8415)
419a40ac96

N/A patches for version.c:

vim-patch:8.1.2391: cannot build when __QNXNTO__ is defined

Problem:    Cannot build when __QNXNTO__ is defined. (Ian Wayne Larson)
Solution:   Move the check for "qansi". (Ken Takata, closes vim/vim#5317)
c95e8d6490

vim-patch:8.2.2294: VMS: a few remaining problems

Problem:    VMS: a few remaining problems.
Solution:   Add VMS specific changes. Add Lua support. (Zoltan Arpadffy)
82c38fe508

vim-patch:8.2.3034: installing packages on github CI sometimes fails

Problem:    Installing packages on github CI sometimes fails.
Solution:   Update package information first. (Christian Brabandt,
            closes vim/vim#8432)
ef7be8348f

vim-patch:8.2.3037: configure reports libcanberra when checking for libsodium

Problem:    Configure reports libcanberra when checking for libsodium.
Solution:   Adjust the message. (Ozaki Kiichi, closes vim/vim#8435)
8ce3ca8961

vim-patch:8.2.3038: Amiga built-in version string doesn't include build date

Problem:    Amiga built-in version string doesn't include build date.
Solution:   Add the build date if available. (Ola Söder, closes vim/vim#8437)
cc65040986

vim-patch:8.2.3043: Amiga: cannot get the shell size on MorphOS and AROS

Problem:    Amiga: cannot get the shell size on MorphOS and AROS.
Solution:   Use control sequences. (Ola Söder, closes vim/vim#8438)
d415d26913
2021-06-23 23:27:01 -04:00
cd4b649136 vim-patch:8.2.2185: BufUnload is not triggered for the quickfix dummy buffer
Problem:    BufUnload is not triggered for the quickfix dummy buffer.
Solution:   Do trigger BufUnload. (Pontus Leitzler,closes vim/vim#7518, closes vim/vim#7517)
            Fix white space around "=".
1cfb9bb5c0
2021-06-23 23:16:20 -04:00
4cb0bf0942 vim-patch:8.2.1255: cannot use a lambda with quickfix functions
Problem:    Cannot use a lambda with quickfix functions.
Solution:   Add support for lambda. (Yegappan Lakshmanan, closes vim/vim#6499)
d43906d2e5
2021-06-23 23:16:20 -04:00
d5329c0331 vim-patch:8.1.1437: code to handle callbacks is duplicated
Problem:    Code to handle callbacks is duplicated.
Solution:   Add callback_T and functions to deal with it.
3a97bb3f0f

Port Vim's put_callback() as callback_put()
because Neovim's naming convention is {type}_{action},
not {action}_{type}.

Renaming put_callback type as PutCallback.
https://neovim.io/develop/style-guide.xml#Type_Names
2021-06-23 23:16:20 -04:00
24e0c16fd6 Merge pull request #14868 from shadmansaleh/patch_verbose_for_lua
fix(runtime): Fix bugs regarding lua runtime files
2021-06-23 20:34:57 +02:00
0d7e33bc13 docs(starting): mention init.lua in paths and remove repetition (#14883) 2021-06-23 09:36:03 +02:00
5a24284b8d Merge pull request #14878 from mjlbach/fix/lsp-quickfix-focus 2021-06-22 11:45:04 -07:00
b601f2548c Merge pull request #14719 from snezhniylis/marktree_delete_node_iter_fix
Fix deletable nodes in MarkTree sometimes getting skipped
2021-06-22 13:48:22 +02:00
9a39a11807 fixup! vim-patch:8.2.3020: unreachable code (#14866) 2021-06-22 10:35:36 +02:00
43479f0ad6 extmark: fix deletable nodes in MarkTree sometimes getting skipped
As per #14236, performing extmark cleanup in a certain namespace does
not guarantee removing all the extmarks inside given namespace.
The issue resides within the tree node removal method and results in
a couple of rare edge cases.

To demonstrate what causes this bug, I'll give an example covering one
of the edge cases.

=== AN EXAMPLE ===

   (A)         (B)         (C)         (D)         (E)
---------   ---------   ---------   ---------   ---------
  <0, 1>      <0, 1>      <0, 1>      <0, 1>      <0, 1>
  <0, 2>      <0, 2>      <0, 2>      <0, 2>      <0, 2>
  <0, 3>      <0, 3>      <0, 3>      <0, 3>      <0, 3>
  <0, 4>      <0, 4>      <0, 4>      <0, 4>      <0, 4>
  <0, 5>      <0, 5>      <0, 5>      <0, 5>      <0, 5>
  <0, 6>      <0, 6>      <0, 6>      <0, 6>      <0, 6>
  <0, 7>      <0, 7>      <0, 7>      <0, 7>      <0, 7>
  <0, 8>      <0, 8>      <0, 8>      <0, 8>      <0, 8>
  <0, 9>      <0, 9> *           *    <0, 9>  *   <0, 9>
[0, 10] *   [0, 10]     <0, 9>        [0, 11]     [0, 11]
  [0, 11]     [0, 11]     [0, 11]     [0, 12]     [0, 12]  *
  [0, 12]     [0, 12]     [0, 12]     [0, 13]     [0, 13]
  [0, 13]     [0, 13]     [0, 13]     [0, 14]     [0, 14]
  [0, 14]     [0, 14]     [0, 14]     [0, 15]     [0, 15]
  [0, 15]     [0, 15]     [0, 15]     [0, 16]     [0, 16]
  [0, 16]     [0, 16]     [0, 16]     [0, 17]     [0, 17]
  [0, 17]     [0, 17]     [0, 17]     [0, 18]     [0, 18]
  [0, 18]     [0, 18]     [0, 18]     [0, 19]     [0, 19]
  [0, 19]     [0, 19]     [0, 19]   [0, 20]     [0, 20]
[0, 20]     [0, 20]     [0, 20]

DIAGRAM EXPLANATION

* Every column is a state of the marktree at a certain stage.

* To make it simple, I don't draw the whole tree. What you see are
   2 leftmost parent nodes ([0, 10], [0, 20]) and their children placed
   in order `MarkTreeIter` would iterate through. From top to bottom.

* Numbers on this diagram represent extmark coordinates. Relative
   positioning and actual mark IDs used by the marktree are avoided
   for simplicity.

* 2 types of brackets around coordinates represent 2 different
   extmark namespaces (`ns_id`s).

* '*' shows iterator position.

ACTUAL EXPLANATION

Let's assume, we have two sets of extmarks from 2 different plugins:
  * Plugin1: <0, 1-9>
  * Plugin2: [0, 10-20]

1. Plugin2 calls
    `vim.api.nvim_buf_clear_namespace(buf_handle, ns_id, 0, -1)`
    to clear all its extmarks which results in `extmark_clear` call.

2. The iteration process goes on ignoring extmarks with irrelevant
    `ns_id` from Plugin1, until it reaches [0, 10], entering state (A).

3. At the end of cleaning up process, `marktree_del_itr` gets called.
    This function is supposed to remove given node and, if necessary,
    restructure the tree. Also, move the iterator to the next node.
    The bug occurs in this function.

4. The iterator goes backwards to the node's last child, to put it
    in the place of its deleted parent later. (B)

5. The parent node is deleted and replaced with its child node. (C)

6. Since now this node has 8 children, which is less than
    `MT_BRANCH_FACTOR - 1`, it get's merged with the next node. (D)

7. Finally, since at (B) the iterator went backward, it goes forward
    twice, skipping [0, 11] node, causing this extmark to persist,
    causing the bug. (E)

ANALYSIS AND SOLUTION

The algorithm works perfectly when the parent node gets replaced by
its child, but no merging occurs. I.e. the exact same diagram,
but without the (D) stage. If not for (D), it would iterate to <0, 9>
and then to [0, 11]. So, iterating twice makes sense. The actual problem
is in (C) stage, because the iterator index isn't adjusted and still
pointing to no longer existent node. So my solution is to adjust
iterator index after removing the child node.

More info: https://github.com/neovim/neovim/pull/14719
2021-06-22 10:32:46 +02:00
060255253f fix(lsp): handlers should focus quickfix list 2021-06-21 20:44:37 -07:00
b4ac878026 fix(source): Source giving E484 & parsing error at line 1 for lua files
It's happening because do_source is only expected to return FAIL when it
was unable to open file . But `nlua_exec_file` returns fail for parsing
and execution error too . Those errors are emitted through `nlua_error`.

So now return value of nlua_exec_file is ignored like do_cmdline. It now
only returns fail when it was unable to open file that check is done
before calling nlua_exec_file or do_cmdline. Errors in nlua_exec_file
are still directly emitted through nlua_error like before.
2021-06-21 13:07:05 +06:00
b4a216f7ed BugFix: Fix inconsistent verbose message
When a keymap is set from lua currently verbose message says
it's set from line 1. That's incorrect because we don't really know when
it was set. So until proper :verbose support isn't added for sourceing
lua it shouldn't say where it was set at.
2021-06-21 07:14:37 +06:00
b585f723bc vim-patch:8.2.3020: unreachable code (#14866)
Problem:    Unreachable code.
Solution:   Remove the code. (closes vim/vim#8406)
2fb7495686
2021-06-20 14:20:43 -04:00
997a9c8792 Merge pull request #14849 from seandewar/demethod-curwin
fix(doc): various fixes
2021-06-19 20:18:30 -04:00
c16afaa1f8 Merge pull request #14851 from ckipp01/hlCodeLens 2021-06-19 15:44:48 -07:00
90bdb6e74d Add hl group docs for codelenses 2021-06-20 00:16:37 +02:00
db06fe11fa Merge pull request #14861 from stevearc/diagnostic-loclist
fix(lsp): fix severity_limit logic in set_loclist
2021-06-19 11:08:34 -07:00
5f1b728621 fix(api/win_get_config): include z-index 2021-06-19 17:17:17 +01:00
41332f6187 fix(doc/index.txt): various ex command fixes
Add :eval and :checkhealth (:eval was also missing upstream).
Fix :perlfile typo, add abbreviations for :perl, :perlfile and :perldo.
Remove :scriptversion; it hasn't been ported yet (#14611).

[skip ci]
2021-06-19 16:58:50 +01:00
b5c0ade437 fix(doc): :sleep! does not hide cursor
:sleep is the same as :sleep! in the port of v8.2.2366
2021-06-19 16:58:50 +01:00
7d025f2e8e fix(doc): remove :promptfind and :promptrepl
:promptfind and :promptrepl are N/A for Nvim.
2021-06-19 16:58:39 +01:00
bb35ed6aaa fix(doc): don't use method call syntax in examples
The method call syntax patches aren't ported yet.
2021-06-19 16:37:04 +01:00
43835ab0da fix(lsp): fix severity_limit logic in set_loclist 2021-06-19 07:35:17 -07:00
7da86f55a7 Merge pull request #14833 from vigoux/tree-sitter-docs-tidy
docs(treesitter): tidy docs and remove legacy information
2021-06-19 08:48:35 +02:00
96d83e2a66 Merge pull request #14824 from vigoux/extmarks-ts-perf
perf(extmarks): allow ephemeral extmarks past EOF to remove O(strlen^2) cost of tree-sitter
2021-06-18 12:37:27 +02:00
e2d3ad7bc4 vim-patch:8.2.3012: when 'rightleft' is set the line number is drawn reversed (#14839)
Problem:    When 'rightleft' is set the line number is sometimes drawn
            reversed.
Solution:   Adjust how space is handled. (Christian Brabandt, closes vim/vim#8389,
            closes vim/vim#8391)
29f0dc3689
2021-06-17 22:00:26 -04:00
a03ffe1602 Merge pull request #14840 from folke/lsp_float_cleanup
chore(lsp): removed deprecated floating preview methods
2021-06-16 23:39:10 -07:00
39d9713c5b chore(lsp): removed deprecated floating preview methods 2021-06-17 07:48:40 +02:00
a72dfec855 release.sh: use stdin for release commit message (#14832)
v0.5.0 has too many commits since v0.4.0.
"git commit -m" triggers "Argument list too long" error.
2021-06-16 22:58:54 -04:00
a85e8a186b perf(extmarks): allow ephemeral extmarks past EOF 2021-06-16 20:15:47 +02:00
3a438bbb44 docs(treesitter): mention query help page 2021-06-16 19:10:15 +02:00
1b6b32c544 docs(treesitter): tidy docs and remove legacy information 2021-06-16 19:06:29 +02:00
c78816eb66 Merge pull request #14796 from glacambre/upgrade_to_gcc11
[RDY] ci: upgrade to gcc-11 on ubuntu-18.04
2021-06-16 12:13:07 -04:00
04ad196b4e ci: upgrade to gcc-11 on ubuntu-18.04
In https://github.com/neovim/neovim/issues/14150 , investigations showed
that using an older gcc to build the appimage could result in severe
perf issues. This is because older gcc versions happily replace calls to
libc functions with their own, which happen to be less optimized than
their libc counterparts.

We fix this problem by upgrading to gcc-11 on ubuntu-18.04.
2021-06-16 17:54:14 +02:00
f76f72a27b fix(lsp): add bufnr to formatting requests
Add the buffer number to the `textDocument/formatting` request, so
that it is passed to the handler.
The built-in formatting handlers do not use the buffer number, but user
overrides should have access to it.
2021-06-15 23:53:43 -07:00
3df0e475e8 docs(lsp): Clarify opts for show_line_diagnostics() 2021-06-15 23:21:04 -07:00
6a77def1ee Merge pull request #14454 from eltociear/patch-1
screen: fix typo in screen.c
2021-06-15 20:06:41 +02:00
ec7b21918d Merge pull request #14822 from eltociear/patch-2
option: fix typo in option.c
2021-06-15 20:02:18 +02:00
dbf8236764 option: fix typo in option.c
seperated -> separated
2021-06-16 01:08:23 +09:00
19ccda230e Merge pull request #14817 from neovim/marvim/api-doc-update/master 2021-06-15 07:37:54 -07:00
45a7cd2c19 docs: regenerate 2021-06-15 06:20:14 +00:00
8cdffd42dd docs(lsp): annotate call_hierarchy function as private 2021-06-14 23:19:23 -07:00
b8dfa2f112 fix(lsp): fix on_detach in lsp.diagnostic
`lsp.diagnostic.get_all()` was returning diagnotics for `:bwipeout`-ed
buffers because the diagnostic cache is not cleared. The first argument
of on_detach callback is the string "detach", not the bufnr.
2021-06-14 23:07:52 -07:00
44fad0a7a3 Merge pull request #14815 from folke/lsp_triples
fix(lsp): replace --- by a line in stylize_markdown
2021-06-14 23:04:34 -07:00
d7d1f40d2c fix(lsp): replace --- by a line in stylize_markdown 2021-06-15 07:35:58 +02:00
b28d458f87 Merge pull request #14482 from elianiva/lsp/remove_hover_line
feat(lsp): hide triple - in hover window
2021-06-14 15:03:25 -07:00
98b597bf03 Merge pull request #14737 from rktjmp/lsp-guard-against-negative-lines
[RDY] fix(lsp): guard against negative diagnostic line numbers
2021-06-14 15:01:58 -07:00
6488fca06b feat(lsp): hide triple - in hover window. 2021-06-15 05:01:45 +07:00
ed61b7f053 Merge pull request #14814 from nanotee/fix_lsp_floats_presets
fix(lsp): allow 'rounded' and 'solid' in floats
2021-06-14 15:00:11 -07:00
15039d7597 fix(lsp): allow 'rounded' and 'solid' in floats 2021-06-14 23:19:45 +02:00
8162792283 Merge pull request #13165 from mfussenegger/codelens
feat(lsp): Add codelens support
2021-06-14 14:15:57 -07:00
32c6ad02b7 Merge pull request #14813 from neovim/marvim/api-doc-update/master
docs: regenerate
2021-06-14 22:56:23 +02:00
67c4ae1322 docs: regenerate 2021-06-14 20:39:02 +00:00
4284abd89a Merge pull request #14804 from clason/rounded-borders
[RDY] feat(float): add rounded borders preset
2021-06-14 13:36:47 -07:00
2bdd553c9e feat(lsp): Add codelens support 2021-06-14 21:45:14 +02:00
5b6edc852f feat(float): add rounded borders preset
Add `borders = "rounded"` preset for `nvim_open_win`, equivalent to

  border = {"╭", "─", "╮", "│", "╯", "─", "╰", "│"}

Also add undocumented "solid" preset to docs.
2021-06-14 11:10:57 +02:00
2f0e5e7e67 Merge pull request #14802 from janlazo/vim-8.2.1354
vim-patch:8.2.{936,1354,2990}
2021-06-13 18:09:11 -04:00
8f4ba0a46b vim-patch:8.2.2990: Jupyter Notebook files are not recognized
Problem:    Jupyter Notebook files are not recognized.
Solution:   Recognize *.ipynb. (closes vim/vim#8375)
2e66b0d137
2021-06-13 15:27:24 -04:00
e2bc0bf665 fix(ci): adjust DEPS_INSTALL_DIR on OpenBSD to avoid pkg-config bug (#14803)
Also bumps to OpenBSD 6.9 and updates packages.

Co-authored-by: glacambre <code@lacamb.re>
2021-06-13 14:03:47 -04:00
ac18e26f57 vim-patch:8.2.0936: some terminals misinterpret the code for getting cursor style
Problem:    Some terminals misinterpret the code for getting cursor style.
Solution:   Send a sequence to the terminal and check the result. (IWAMOTO
            Kouichi, closes vim/vim#2126)  Merged with current code.
a45551a535

Cherry-pick Test_cwindow_highlight() from patch v8.1.2040
because it is skipped.
2021-06-13 12:34:23 -04:00
8b81218300 vim-patch:8.2.1354: test 59 is old style
Problem:    Test 59 is old style.
Solution:   Convert into a new style test. (Yegappan Lakshmanan, closes vim/vim#6604)
aa970abd0a
2021-06-13 10:19:48 -04:00
141647cfbb Merge pull request #14765 from folke/lsp_plaintext
fix(lsp): convert_input_to_markdown_lines: preserve plaintext
2021-06-12 17:48:04 -07:00
9c7132cda4 Merge pull request #14788 from shadmansaleh/fix/lua_runtime1
fixup(runtime): Fix lua runtime files not listed in :scriptnames
2021-06-13 00:52:30 +02:00
afb0274c28 fix(lsp): convert_input_to_markdown_lines: preserve plaintext 2021-06-12 21:47:17 +02:00
12d8ff7ccd Merge pull request #14785 from janlazo/vim-8.1.1838
vim-patch:8.1.{1838,1865},8.2.{38,39,46,945,948,2896}
2021-06-12 15:07:11 -04:00
cdbc733ec4 refactor(startup): Load init.lua with do_sorce
This was init.lua will be logged in startuptime
2021-06-13 00:27:52 +06:00
1f280b582f fixup(runtime): Fix lua runtime files not listed
lua runtime files weren't listed in :scriptname & profiler.
This fixes that.

* Add tests

* Small doc tweeks
2021-06-13 00:27:52 +06:00
ee4735881d fix(lsp): guard against negative diagnostic line numbers 2021-06-13 03:38:59 +10:00
6a4685fb0e vim-patch:8.2.2896: spellfile functionality not fully tested
Problem:    Spellfile functionality not fully tested.
Solution:   Add tests for CHECKCOMPOUNDPATTERN and COMMON. (Dominique Pellé,
            closes vim/vim#8270)
dc3275a1ac
2021-06-12 13:06:50 -04:00
72b512bd53 vim-patch:8.2.0945: cannot use "z=" when 'spell' is off
Problem:    Cannot use "z=" when 'spell' is off.
Solution:   Make "z=" work even when 'spell' is off. (Christian Brabandt,
            Gary Johnson, closes vim/vim#6227)
152e79e94b
2021-06-12 13:06:50 -04:00
82d1c29bfd vim-patch:8.2.0046: tests for spell suggestions are slow
Problem:    Tests for spell suggestions are slow.
Solution:   Use shorter words. Test with latin1 and utf-8 to cover more code.
            (Dominique Pelle, closes vim/vim#5399)
767340574b
2021-06-12 13:06:49 -04:00
e78656875d vim-patch:8.2.0039: memory access error when "z=" has no suggestions
Problem:    Memory access error when "z=" has no suggestions.
Solution:   Check for negative index.
569fea2c31
2021-06-12 13:06:49 -04:00
f376e67a53 vim-patch:8.2.0038: spell suggestions insufficiently tested
Problem:    Spell suggestions insufficiently tested.
Solution:   Add spell suggestion tests. (Dominique Pelle, closes vim/vim#5398)
e9a8d1f9ad

Requires latest en.utf-8.spl from
https://ftp.nluug.nl/pub/vim/runtime/spell/.

Include the following patch because patch v8.2.0946 was merged:

vim-patch:8.2.0948: spell test fails

Problem:    Spell test fails.
Solution:   Adjust expected text of the prompt.
d281b7c227
2021-06-12 13:06:49 -04:00
e75244af63 vim-patch:8.1.1865: spellrare and spellrepall in the wrong order
Problem:    Spellrare and spellrepall in the wrong order.
Solution:   Put spellrare below spellrepall. (closes vim/vim#4820)
a3891681f7
2021-06-12 13:06:49 -04:00
61117d89a3 vim-patch:8.1.1838: there is :spellwrong and :spellgood but not :spellrare
Problem:    There is :spellwrong and :spellgood but not :spellrare.
Solution:   Add :spellrare. (Martin Tournoij, closes vim/vim#4291)
08cc374dab
2021-06-12 13:06:48 -04:00
d3bdde0bad test: clear $GZIP, use nvim's system() (#14791) 2021-06-12 13:05:43 -04:00
db83be2dab Merge pull request #14137 from last-partizan/patch-1-test
Fix popupmenu position in multigrid mode (pum_above)
2021-06-12 14:59:47 +02:00
8d23941af8 fix(ui): Fix pum incorrect position in multigrid mode
Refs #12985
2021-06-12 14:34:02 +02:00
d09b8ad715 Merge pull request #14761 from janlazo/vim-8.2.2966
vim-patch:8.2.{1702,2422,2966,2971,2974}
2021-06-11 21:07:47 -04:00
2644fe5b7c vim-patch:8.2.2974: Greek spell checking uses wrong case folding
Problem:    Greek spell checking uses wrong case folding.
Solution:   Fold capital sigma depending on whether it is at the end of a
            word or not. (closes vim/vim#299)
4f13527598
2021-06-11 17:00:14 -04:00
a9b8c780fe Merge pull request #14773 from mjlbach/fix/vim-region-bounds
fix(lua): ensure vim.region truncates to buf range
2021-06-11 10:24:30 -07:00
81a6b70880 Merge pull request #14686 from shadmansaleh/feat/evaluate_plugin/lua
runtime: allow to use .lua files for most features defined as &rtp/{feature}/*.vim
2021-06-11 17:42:21 +02:00
fa768152dc Merge pull request #14776 from vigoux/ts-0.19.5plus
deps(treesitter): bump to 0.19.5+
2021-06-11 16:34:16 +02:00
69255fc7e4 Merge pull request #14777 from vigoux/label-dependencies
ci: correctly label dependencies PRs
2021-06-11 16:33:57 +02:00
7b0836ed01 ci: correctly label dependencies PRs
Configures the labeler to handle PRs related to third-party.
2021-06-11 16:17:41 +02:00
74140e7642 Merge pull request #14775 from bfredl/gcc11
macros: add a dummy statement to allow FALLTHROUGH in an empty case.
2021-06-11 15:19:58 +02:00
3085788a3e deps(treesitter): bump to 0.19.5+
This fixes a bunch of issues with queries.
2021-06-11 14:15:27 +02:00
4eeefb8d45 macros: add a dummy statement to allow FALLTHROUGH in an empty case. 2021-06-11 12:07:07 +02:00
67eb63df50 Merge pull request #14769 from mjlbach/feature/fix_diagnostic_end_range
fix(lsp): cap diagnostic end range to buf length
2021-06-11 01:13:03 -07:00
cd3233c289 fix(lua): ensure vim.region truncates to buf range
If vim.region receives a large range outside of the current buffer
bounds, it will not check the range ahead of time and loop until neovim
exhausts the system memory.

Fixes #14743
2021-06-11 04:10:01 -04:00
8ebbeee1d0 vim-patch:8.2.2971: cannot yank a block without trailing spaces
Problem:    Cannot yank a block without trailing spaces.
Solution:   Add the "zy" command. (Christian Brabandt, closes vim/vim#8292)
544a38e44d
2021-06-10 22:58:15 -04:00
f9b9b82047 fix(lsp): cap diagnostic end range to buf length
Closes #14743
2021-06-10 22:16:34 -04:00
d662dfde36 vim-patch:8.2.2422: crash when deleting with line number out of range
Problem:    Crash when deleting with line number out of range. (Houyunsong)
Solution:   Avoid using a negative line number.
1d859e2421
2021-06-10 21:28:30 -04:00
cb368e1bff vim-patch:8.2.1702: crash when using undo after deleting folded lines
Problem:    Crash when using undo after deleting folded lines.
Solution:   Check for NULL pointer. (closes vim/vim#6968)
da697645d5
2021-06-10 19:20:33 -04:00
292037ef9b vim-patch:8.2.2966: ml_get errors after recovering a file
Problem:    ml_get errors after recovering a file. (Yegappan Lakshmanan)
Solution:   Fix the cursor position after deleting lines.
e3f50ad640
2021-06-10 19:20:32 -04:00
e1edc079dd refactor(source): Move lua file detection to do_source
So now :source can run lua files too :)

* feat: Add support for :[ranged]source for lua files
2021-06-11 01:01:03 +06:00
92b6b3764c refactor(tests): Simplify tests at functional/lua/runtime_spec 2021-06-11 01:01:03 +06:00
07c9b20c75 enhance(runtime): Enable completion for lua files
Enabled for `:colorscheme` `:compiler` filetype
2021-06-11 01:01:03 +06:00
f000251e08 feat(runtime): Allow lua to be used in syntax 2021-06-11 01:01:03 +06:00
f256a18fef feat(runtime): Allow lua to be used in ftdetect 2021-06-11 01:01:02 +06:00
4dffe1ff2f feat(runtime): Allow lua to be used in indent 2021-06-11 01:01:02 +06:00
fd5e5d2715 feat(runtime): Allow lua to be used in ftplugin 2021-06-11 01:01:02 +06:00
68be8b99cf feat(runtime): Allow lua to be used in compiler 2021-06-11 01:01:02 +06:00
1e6c02510a feat(runtime): Allow lua to be used in colorschemes
* tests(runtime): move runtime/plugin tests to functional/lua/runtime_spec
2021-06-11 01:01:02 +06:00
687eb0b39f feat(startup): Source runtime/plugin/**/*.lua at startup
For opt plugins these files are sourced on `:packadd`

* `:runtime` Now can exexute lua files
2021-06-11 00:58:38 +06:00
1df8a34a7b docs(contributing): update commit message instructions (#14758)
we are changing the way we write commits to increase automation. This commit explains how to write commit messages.
2021-06-10 19:08:58 +02:00
988f88c24e Merge pull request #14249 from euclidianAce/euclidianAce/win-config-include-border
include 'border' in nvim_win_get_config
2021-06-10 12:01:12 +02:00
7b519cd11c api:get_config: don't add border="none" (inactive default) 2021-06-10 10:41:50 +02:00
38d6452899 fix linter errors 2021-06-10 10:41:50 +02:00
8021c5a531 api: include border in nvim_win_get_config 2021-06-10 10:41:49 +02:00
21645e603c Merge pull request #14763 from neovim/marvim/api-doc-update/master
docs: regenerate
2021-06-10 10:05:55 +02:00
04f9511715 docs: regenerate 2021-06-10 08:03:28 +00:00
70a1331dab Merge pull request #14717 from notomo/add-win-call-api
api: add nvim_win_call
2021-06-10 10:02:31 +02:00
53791c0546 Merge pull request #14510 from urandom/doc_nvim_buf_set_extmark
Minor observational corrections to the nvim_buf_set_extmark documentation
2021-06-10 09:39:35 +02:00
1a9eb7a987 api: add nvim_win_call 2021-06-10 09:34:29 +02:00
fd7e77b227 Merge pull request #14757 from jbyuki/open_line_changed_bytes
fix: changed byte ranges for indented lines
2021-06-09 23:49:02 +02:00
a15c2cbab6 add tests in buffer_updates 2021-06-09 12:20:13 -07:00
7ff7ca56dd minor fix 2021-06-09 11:58:25 +02:00
a1db340cea minor fixes 2021-06-09 11:57:37 +02:00
d9e11f4f78 fix changed byte ranges for indented lines 2021-06-09 11:35:15 +02:00
93f15db5d6 Merge pull request #14736 from mfussenegger/lsp-diagnostic-get-qfitems
feat(lsp): Split out a "get qf items" func from set_loclist
2021-06-07 09:43:43 -07:00
f03a4d616b feat(lsp): Split out a diagnostics_to_items function from set_loclist
Makes it easier to re-use the logic to populate the quickfix list
instead of the location list.
2021-06-07 18:24:32 +02:00
f2906a4669 Merge pull request #14731 from neovim/marvim/api-doc-update/master
docs: regenerate
2021-06-06 20:10:07 +02:00
0819e1acf9 docs: regenerate 2021-06-06 10:23:07 +00:00
4ce61742cf Merge pull request #14726 from folke/lsp_single_popup_per_buffer
fix(lsp): max 1 floating preview per buffer. Fixes #11508
2021-06-06 03:22:10 -07:00
37d5236f88 Merge pull request #14511 from urandom/lsp_diagnostics_workspace_loclist
feat(lsp): add an option to lsp.diagnostic.set_loclist to the workspace
2021-06-06 03:16:43 -07:00
36d05845f7 feat(lsp): extend diagnostic.set_loclist
add option to show workspace diagnostic instead of the current buffer's
2021-06-06 09:59:46 +02:00
b3e3ab0567 Merge pull request #14733 from mjlbach/fix_docs_2
docs(lsp): fix locations_to_items docstring
2021-06-05 20:45:24 -07:00
5902bed406 docs(lsp): fix locations_to_items docstring 2021-06-05 17:22:47 -07:00
36802b895f Merge pull request #14730 from mjlbach/feature/open_loclist_on_win
fix(lsp): set_loclist should target current win
2021-06-05 17:12:55 -07:00
f214c19e2b Merge pull request #14707 from ray-x/master
fix(lsp): floating window border size for string type
2021-06-05 15:00:07 -07:00
15abde1676 fix(lsp): set_loclist should target current win
Currently, for large number of diagnostics, the delay in populating
loclist may be sufficient for a user to switch to another window,
resulting in the loclist being populated on the wrong window.
2021-06-05 14:46:10 -07:00
21ecde1728 Merge pull request #14729 from mjlbach/feat/diagnostic_quickfix_cleanup
feat(lsp): remove line from diagnostic quickfix
2021-06-05 13:57:16 -07:00
d846bd7e06 feat(lsp): remove line from diagnostic quickfix
Adding the line takes up valuable horizontal screen space, and also
precludes using the quickfixtextfunc built into neovim due to the
harcoded `|`.
2021-06-05 13:39:30 -07:00
becbb7436f Merge pull request #14724 from janlazo/vim-8.2.2877
vim-patch:8.0.1578,8.2.{2877,2937}
2021-06-05 13:18:05 -04:00
bfcec8d2f0 version.c: update [skip ci] (#14328)
Co-authored-by: marvim <marvim@users.noreply.github.com>

vim-patch:8.1.1433: win_execute() may leave popup window focused
vim-patch:8.1.2257: MS-Windows GUI: scroll wheel always uses current window

vim-patch:8.2.0520: tests are not listed in sorted order
vim-patch:8.2.2794: Linux users don't know how to get ncurses
vim-patch:8.2.2807: build fails with tiny features
vim-patch:8.2.2818: no jump added when opening terminal in current window
vim-patch:8.2.2823: MS-Windows: launching Vim from installer doesn't open README
vim-patch:8.2.2830: terminal colors are not updated when 'background' is set
vim-patch:8.2.2836: build failure without the +quickfix feature
vim-patch:8.2.2841: MS-Windows: cursor wrong when 'lz' and 'stl' are set
vim-patch:8.2.2845: MS-Windows: warning for signed/unsigned comparison
vim-patch:8.2.2852: configure can add --as-needed a second time
vim-patch:8.2.2859: Tcl test fails because of changed error message
vim-patch:8.2.2876: configure cannot detect Python 3.10
vim-patch:8.2.2883: MS-Windows manifest file name is misleading
vim-patch:8.2.2889: typo and verbose comment in Makefiles
vim-patch:8.2.2891: cannot build with Perl 5.34
vim-patch:8.2.2899: Appveyor script does not detect nmake failure
vim-patch:8.2.2907: memory leak when running out of memory
vim-patch:8.2.2909: build error with non-Unix system
vim-patch:8.2.2913: MS-Windows conpty supports using mouse events
vim-patch:8.2.2919: using ":!command" does not work if it uses posix_spawn()
vim-patch:8.2.2923: EBCDIC build is broken
vim-patch:8.2.2924: superfluous extern declaration
vim-patch:8.2.2929: accidentally enable tcl by default
vim-patch:8.2.2939: GTK: righthand scrollbar does not show with split window
vim-patch:8.2.2940: MS-Windows: cannot see the size when resizing

vim-patch:e307073680d498b113c7df8250abd5676de1ed13
vim-patch:8fbd6723af3248a1fa46fa1e610804841603abe5
vim-patch:d52986e7be366b6f8c9e18078648f1c5219c4335
vim-patch:7a212c625362d86327878d57269d63f6a2ca5d2b
vim-patch:424e98baab3bf05d7946f99ddfa180ae71570650
vim-patch:2b72821924ff514727b60fb0b647d5caae8336f7
vim-patch:c882e4d169fd5e0364bc91642040337efe7327a6
2021-06-05 13:16:27 -04:00
77b24c867b window: pvs/v1071
"void" cast unused return value of win_comp_pos().
2021-06-05 12:49:28 -04:00
0aa16dbd18 regexp: pvs/v1071
"void" cast unused return values of getchr(), peekchr().
2021-06-05 12:49:28 -04:00
61e07d98dd fold: pvs/v1071
"void" cast unused return value of hasFolding().
2021-06-05 12:49:28 -04:00
c6b8598616 memline: pvs/v1071
"void" cast unused return value of ml_find_line().
2021-06-05 12:49:28 -04:00
ac64055826 indent_c: pvs/v1071
"void" cast unused return value of find_last_paren().
2021-06-05 12:49:27 -04:00
3d120b1c18 screen: pvs/v614
win_col_offset must be 0 to be no-opt
when passed to col_off param of draw_virt_text().
2021-06-05 12:49:27 -04:00
607d1cc80d fixup! vim-patch:8.2.2136: Vim9: Using uninitialized variable
Resolve pvs/v560 error.
mods is nonnull in the modified inner if-condition.
because it is checked for NULL in the outer if-condition.
2021-06-05 12:49:27 -04:00
44b6a7b5bf undo: pvs/v547
buf is nonnull when xfree(buf) is executed.

free(NULL) is safe (for target compilers) so xfree(NULL) is also safe.
2021-06-05 12:49:27 -04:00
5115bc3f4f sign: pvs/v547
vim_strsave() returns nonnull.
2021-06-05 12:49:27 -04:00
729f270266 userfunc: pvs/v547
vim_strsave() returns nonnull.
2021-06-05 12:49:26 -04:00
5571004b69 fixup! tests: fix system_spec when run with clipboard manager (#10956)
uv_process_options_t "args" member was set to a local array from stack.
when uv_process_options_t variable is outside the function.
https://pvs-studio.com/en/docs/warnings/v507/
2021-06-05 12:49:26 -04:00
304c6ce934 fixup! fixup! vim-patch:8.2.2776: :mksession uses current value of 'splitbelow' and 'splitright' (#14398) 2021-06-05 12:49:26 -04:00
b959de3a5f vim-patch:8.0.1578: no test for :popup in terminal
Problem:    No test for :popup in terminal.
Solution:   Add a screen dump test.
69f5a3011d
2021-06-05 12:49:26 -04:00
60bf49ab1c vim-patch:8.2.2937: popup test fails if rightleft feature not enabled
Problem:    Popup test fails if rightleft feature not enabled.
Solution:   Check that the rightleft feature is available. (Dominique Pellé,
            closes vim/vim#8321)
56cddb3879
2021-06-05 12:49:26 -04:00
1b13c744ea vim-patch:8.2.2877: insufficient tests for popup menu rightleft
Problem:    Insufficient tests for popup menu rightleft.
Solution:   Add tests. (Yegappan Lakshmanan, closes vim/vim#8235)
1e615669c0
2021-06-05 12:49:26 -04:00
149efa9b2b fix(lsp): max 1 floating preview per buffer. Fixes #11508 2021-06-05 10:13:01 +02:00
ca802046bf Merge pull request #14721 from jamessan/mac-ci
fix(ci): Remove gcc@8/gcc@9 homebrew workaround
2021-06-04 12:28:37 -04:00
04985f69eb fix(ci): Remove gcc@8/gcc@9 homebrew workaround 2021-06-04 11:21:45 -04:00
7d4f890aa9 Merge pull request #14710 from janlazo/clang-warnings
Reduce clang warnings
2021-06-02 22:40:09 -04:00
6a2f1b1740 clang/'Logic error': assert get_decor_provider(id, true) returns nonnull
nvim_set_decoration_provider() has undefined behavior (if not crash)
if get_decor_provider() returns NULL.
2021-06-02 21:49:38 -04:00
68cb51ab0a fixup! vim-patch:8.2.2776: :mksession uses current value of 'splitbelow' and 'splitright' (#14398)
tab_firstwin can be NULL.
2021-06-02 21:45:44 -04:00
d1238856a8 clang/'Logic error': has_profiling() may not set forceit 2021-06-02 21:24:01 -04:00
626c631e89 clang/'Logic error': zero-init oldbase array
unrelative() must not have garbage structs.
2021-06-02 21:19:19 -04:00
59db83bc59 clang/API: reject null string in timer_start() 2021-06-02 21:05:13 -04:00
351050a10f fix(lsp): floating window border size for string type 'none' and 'shadow' 2021-06-02 20:44:13 +10:00
68d40388f3 Merge pull request #14701 from neovim/marvim/api-doc-update/master
docs: regenerate
2021-06-02 08:16:39 +02:00
2ebc28018e docs: regenerate 2021-06-02 00:43:13 +00:00
056c464e8a Merge pull request #14692 from jamessan/api-doc-workflow
ci(gha): New workflow to regen API docs on pushes to release branches
2021-06-01 20:40:16 -04:00
3fe7a04704 Merge pull request #14698 from jose-elias-alvarez/omnifunc-insert-check
fix(lsp): check mode in omnifunc callback
2021-06-01 10:13:17 -07:00
d4caafacc1 fix(lsp): check mode in omnifunc callback 2021-06-01 22:13:21 +09:00
b10cda83fa Merge pull request #14693 from shadmansaleh/enhance/lsp/make_focusable_parameter_configurable
feat(lsp): Make focusability of lsp float configurable
2021-06-01 04:32:59 -07:00
68d48e25b6 docs(lsp): Fix opts param not captured by docgen
In the documentation for `vim.lsp.util.open_floating_preview`
the opts table keys were prefixed with `--` instead of `---`,
preventing capture by docgen.
2021-06-01 17:29:06 +06:00
0bd34cb4ec feat(lsp): Make focusability of lsp float configurable
This pr allows the user to specify whether `lsp.utils.open_floating_preview`
is focusable via the `opts` parameter. Defaults to true.

It can be configured by setting the focusable key inside opts parameter:

```lua
vim.lsp.util.open_floating_preview(contents, syntax, {focusable = false})
```
2021-06-01 17:23:35 +06:00
64bdaef327 Merge pull request #14694 from folke/lsp_popup_border 2021-06-01 01:52:38 -07:00
2faa1c361b Merge pull request #14659 from seandewar/api-win-buf-noautocmd
api(nvim_open_win): Enable BufEnter autocmds by default like ordinary window; add "noautocmd" option to block BufEnter.
2021-06-01 10:05:58 +02:00
0ece34cbb8 fix(lsp): properly handle border character list without highlight groups. Fixes #14691 2021-06-01 09:36:29 +02:00
efef508ec6 ci(gha): New workflow to regen API docs on pushes to release branches
Upon pushing updates to files which may contain API documentation, the
workflow will regenerate the docs and, if there are relevant changes,
create a PR targeting the source branch.

[skip ci]
2021-05-31 22:52:44 -04:00
db6523cd13 api(parse_float_config): use api_object_to_bool() 2021-06-01 03:05:04 +01:00
802f8429d5 api(nvim_open_win): add "noautocmd" option
This option, when set, stops nvim_open_win() from potentially firing
buffer-related autocmd events
(BufEnter, BufLeave and BufWinEnter in the case of nvim_open_win()).
2021-06-01 03:05:04 +01:00
27c616d688 Merge pull request #14685 from janlazo/vim-8.2.2911
vim-patch:8.1.2400,8.2.{2911,2914.2916}
2021-05-31 22:01:09 -04:00
e8f0ff1d48 Merge pull request #14531 from janlazo/revert-noblock
Revert "api/window: use the "noblock" variants in nvim_win_set_buf"
2021-05-31 21:57:44 -04:00
c3ac9c13df vim-patch:8.2.2916: operators are not fully tested
Problem:    Operators are not fully tested.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#8290)
2ac7184d34
2021-05-31 21:37:46 -04:00
2f79caa02d vim-patch:8.1.2400: test39 is old style
Problem:    Test39 is old style.
Solution:   Convert the test cases into new style. (Yegappan Lakshmanan,
            closes vim/vim#5324)
1f3e7d3bf0
2021-05-31 21:24:31 -04:00
e399731561 vim-patch:8.2.2914: cannot paste a block without adding padding
Problem:    Cannot paste a block without adding padding.
Solution:   Add "zp" and "zP" which paste without adding padding. (Christian
            Brabandt, closes vim/vim#8289)
2fa9384ca1

Cherry-pick Test_normal_z_error() from patch v8.2.0369.
2021-05-31 21:06:11 -04:00
73e3669c7a vim-patch:8.2.2911: pattern "\%V" does not match all of block selection
Problem:    Pattern "\%V" does not match all of block selection. (Rick Howe)
Solution:   Use the value of vi_curswant. (closes vim/vim#8285)
e71c0ebe2c
2021-05-31 21:06:10 -04:00
2a1bc8657a Merge pull request #14690 from mjlbach/fix_docs
fix(docs): delete duplicate tags
2021-05-31 12:01:22 -07:00
638c29b7c9 fix(docs): delete duplicate tags 2021-05-31 11:51:02 -07:00
0866df4d6a Merge pull request #14687 from kabouzeid/vim-docs
Updated vim docs
2021-05-31 11:27:58 -07:00
96dfa07642 Merge pull request #14635 from folke/lsp_get_lines
perf(lsp): get all lines from a file in one go (`locations_to_items`)
2021-05-31 11:12:23 -07:00
07f81b3b05 docs: regenerate 2021-05-31 19:47:51 +02:00
3cd688ff77 fix vim.opt:remove doc (#14664) 2021-05-30 00:09:30 -04:00
cabf8ab26b Merge pull request #14649 from folke/lsp_float_refactor
refactor(lsp): consolidate the different floating window methods into `open_floating_preview`
2021-05-29 12:06:58 -07:00
a7205e2b70 Merge pull request #14673 from janlazo/vim-8.2.2898
vim-patch:8.2.{2898,2900}
2021-05-29 14:08:27 -04:00
ca6a8ac93c vim-patch:8.2.2900: QuitPre is triggered before :wq writes the file
Problem:    QuitPre is triggered before :wq writes the file, which is
            different from other commands.
Solution:   Trigger QuitPre after writing the file. (closes vim/vim#8279)
1174b018a6
2021-05-29 13:19:22 -04:00
30a34136b6 vim-patch:8.2.2898: QuitPre and ExitPre not triggered when GUI window is closed
Problem:    QuitPre and ExitPre not triggered when GUI window is closed.
Solution:   Call before_quit_autocmds(). (closes vim/vim#8242)
3552e74289
2021-05-29 09:59:20 -04:00
64da499ac2 refactor(lsp): consolidate the different floating window methods into open_floating_preview 2021-05-29 13:42:15 +02:00
43956dea55 lua: Add vim.opt and fix scopes of vim.o (#13479)
* lua: Add vim.opt

* fixup: cleaning

* fixup: comments

* ty clason

* fixup: comments

* this is the last commit. period.
2021-05-28 17:24:48 +02:00
192ea01edd cmake: install app icon in XDG hicolor icon theme (#14656)
Install the icon of the application in the hicolor XDG icon theme;
this way it can be properly loaded by XDG menus in the currently set
XDG icon theme, without looking in the legacy pixmaps location.
2021-05-27 22:37:24 +02:00
192f89ea1b Merge pull request #14646 from mfussenegger/wipe-floating-markdown-bufs
lsp: Ensure floating markdown buffers are deleted on hide
2021-05-26 12:13:58 -07:00
e06a73900f lsp: Ensure floating markdown buffers are deleted on hide
After the change to use fancy_floating_markdown for the signature help I
noticed that scratch buffers start to accumulate.
2021-05-26 19:27:04 +02:00
0b905be47b Merge pull request #14607 from glacambre/fix_get_all_options_info_crash
[RDY] Generate PARAM_COUNT macro
2021-05-26 10:30:20 -04:00
fd91e73c57 Merge pull request #14640 from janlazo/vim-3ec3217f0491
vim-patch:3ec3217f0491,8.2.{2278,2885}
2021-05-26 09:13:30 -04:00
0c8454f5bc Fix crash on :echo get_all_options_info()
Iterating over PARAM_COUNT is wrong as PARAM_COUNT also counts the last
element of the options array, which has a NULL fullname in order to
signal the end of the array.
2021-05-26 07:07:11 +02:00
a7061359b7 vim-patch:8.2.2278: falling back to old regexp engine can some patterns
Problem:    Falling back to old regexp engine can some patterns.
Solution:   Do not fall back once [[:lower:]] or [[:upper:]] is used.
            (Christian Brabandt, closes vim/vim#7572)
66c50c5653
2021-05-26 00:39:55 -04:00
7e0d50b16e vim-patch:8.2.2885: searching for \%'> does not match linewise end of line
Problem:    searching for \%'> does not match linewise end of line. (Tim Chase)
Solution:   Match end of line if column is MAXCOL. (closes vim/vim#8238)
872bee557e
2021-05-26 00:16:32 -04:00
31ea80649d vim-patch:3ec3217f0491
Update runtime files
3ec3217f04

Omit fuzzy-match in pattern.txt.
2021-05-25 22:11:04 -04:00
54c441c80b perf(lsp): get all lines from a file in one go 2021-05-25 12:23:39 +02:00
a282a177d3 Merge pull request #14634 from janlazo/vim-8.2.2880
vim-patch:8.2.{511,1689,1957,2880,2884}
2021-05-24 16:59:14 -04:00
370e65ed7c vim-patch:8.2.2884: not enough cscope code is covered by tests
Problem:    Not enough cscope code is covered by tests.
Solution:   Add a few test cases. (Dominique Pellé, closes vim/vim#8246)
1e469c72ee
2021-05-24 15:36:30 -04:00
25a088b0ad vim-patch:8.2.0511: Cscope code not fully tested
Problem:    Cscope code not fully tested.
Solution:   Add more test cases. (Dominique Pelle, closes vim/vim#5886)
d7ffc0ba8c
2021-05-24 15:25:32 -04:00
1b0937dd89 test/old: partial port of patch v8.2.1.0183
Prep for patch v8.2.0511.
2021-05-24 15:25:32 -04:00
529d88c641 vim-patch:8.2.1689: 'colorcolumn' doesn't show in indent
Problem:    'colorcolumn' doesn't show in indent.
Solution:   Also draw the column when draw_state is WL_BRI or WL_SBR.
            (Alexey Demin, closes vim/vim#6948, closes vim/vim#6619)
ad5e5631c5
2021-05-24 13:13:00 -04:00
db3136d2ea vim-patch:8.2.1957: diff and cursorcolumn highlighting don't mix
Problem:    Diff and cursorcolumn highlighting don't mix.
Solution:   Fix condition for what attribute to use. (Christian Brabandt,
            closes vim/vim#7258, closes vim/vim#7260)
fabc3ca896
2021-05-24 12:53:27 -04:00
6d932ccb1c vim-patch:8.2.2880: unified diff fails if actually used
Problem:    Unified diff fails if actually used.
Solution:   Invoke :diffupdate in the test.  Fix the check for working external
            diff. (Ghjuvan Lacambre, Christian Brabandt, closes vim/vim#8197)
ad5c178a19
2021-05-24 12:38:02 -04:00
0a653f7ab9 vim-patch:8.2.2879: file extension .hsig not recognized (#14628)
Problem:    File extension .hsig not recognized.
Solution:   Use Haskell filetype for .hsig files. (Marcin Szamotulski,
            closes vim/vim#8236)
f5409dbf66
2021-05-23 17:15:38 -04:00
9d8a18aa56 vim-patch:8.2.2879: file extension .hsig not recognized (#14623)
Problem:    File extension .hsig not recognized.
Solution:   Use Haskell filetype for .hsig files. (Marcin Szamotulski,
            closes vim/vim#8236)
f5409dbf66
2021-05-23 16:28:10 -04:00
109fb51589 Merge pull request #14622 from mfussenegger/unmute-error-responses
lsp: Only mute RequestCancelled or ContentModified, but not other errors
2021-05-23 08:58:19 -07:00
5d4717010c lsp: Only mute RequestCancelled or ContentModified, but not other errors
handlers passed to `lsp_buf_request` weren't called if the server
responded with an error that looks like this:

     "decoded", {
      error = {
        code = -32601,
        message = "No delegateCommandHandler for foo"
      },
      id = 5,
      jsonrpc = "2.0"
    }

An example where that happens is both eclipse.jdt.ls and the
haskell-language-server when invoking a command that doesn't exist:

    :lua vim.lsp.buf_request(
      0,
      'workspace/executeCommand',
      { command = 'foo' },
      function(err, _, res)
        print(vim.inspect(err), vim.inspect(res))
      end
    )
2021-05-23 17:04:19 +02:00
3fb3b548a6 Merge pull request #14619 from janlazo/vim-8.2.2772
vim-patch:8.2.{2772,2778}
2021-05-22 22:32:43 -04:00
59d550345d vim-patch:8.2.2778: problem restoring 'packpath' in session
Problem:    Problem restoring 'packpath' in session.
Solution:   Let "skiprtp" also apply to 'packpath'.
d23b714d8b

Port Test_mksession_skiprtp() to lua functional test.
2021-05-22 17:32:24 -04:00
8415615b59 vim-patch:8.2.2772: problems when restoring 'runtimepath' from a session file
Problem:    Problems when restoring 'runtimepath' from a session file.
Solution:   Add the "skiprtp" item in 'sessionoptions'.
635bd60804

Allow "terminal" value for sessionoptions even if it's no-opt
because patch v8.0.1592 is not ported yet.

Omit vim9 test, Test_mksession_skiprtp().
2021-05-22 15:40:06 -04:00
8e5439182b fixup! vim-patch:8.1.0734: the hlsearch state is not stored in a session file (#13547) 2021-05-22 15:36:48 -04:00
0cbe748da3 Merge pull request #14615 from folke/faster_locations_to_items
perf(lsp): `locations_to_items`: use libuv for unloaded buffers to get line
2021-05-22 10:58:45 -07:00
c98e4d1a2a perf(lsp): locations_to_items use libuv for unloaded buffers to get line 2021-05-22 18:56:48 +02:00
5b2be75256 Merge pull request #14269 from fdschmidt93/fix/document_symbol_range
fix(lsp): prefer selectionRange over range for document symbols in vim.lsp.util.symbols_to_items
2021-05-22 09:18:03 -07:00
9c7ad33006 Merge pull request #14603 from folke/format_on_save
fix(lsp): allow apply_text_edits to append text (insert at last line)
2021-05-22 09:13:06 -07:00
449bbf5540 Merge pull request #14601 from janlazo/vim-8.1.2320
vim-patch:8.1.{2320,2339},8.2.{946,1591,2875}
2021-05-22 10:12:42 -04:00
486050ebc9 vim-patch:8.2.2875: cancelling inputlist() after a digit does not return zero
Problem:    Cancelling inputlist() after a digit does not return zero.
Solution:   Always return zero when cancelling. (closes vim/vim#8231)
5cf94577cf
2021-05-21 23:01:11 -04:00
39fdb86832 vim-patch:8.2.0946: cannot use "q" to cancel a number prompt
Problem:    Cannot use "q" to cancel a number prompt.
Solution:   Recognize "q" instead of ignoring it.
eebd555733
2021-05-21 23:01:11 -04:00
4dadbe64a0 vim-patch:8.2.1591: using winheight('.') in tests works but is wrong
Problem:    Using winheight('.') in tests works but is wrong.
Solution:   Use winheight(0). (issue vim/vim#6863)
c05d1c043a
2021-05-21 20:04:39 -04:00
994cc931d1 vim-patch:8.1.2339: insufficient testing for quickfix
Problem:    Insufficient testing for quickfix.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#5261)
70077dd1ca

TODO:
Debug the following off-by-one error:
call assert_equal(repeat('m', 1024), l[0].module)
2021-05-21 20:04:38 -04:00
83e48174e6 vim-patch:8.1.2320: insufficient test coverage for quickfix
Problem:    Insufficient test coverage for quickfix.
Solution:   Add more tests.  Fix uncovered problem. (Yegappan Lakshmanan,
            closes vim/vim#5238)
f9ae154c51
2021-05-21 20:04:38 -04:00
6dd04ed5f6 doc/options: Removed vim-only text from ambiwidth. (#14602)
NeoVim always includes all features and doesn´t have termcap-options (t_u7).
2021-05-21 19:59:48 -04:00
efe33fc799 Merge pull request #14604 from folke/master
feat(lsp): use same formatting for `signature_help` as `hover`
2021-05-21 11:17:17 -07:00
bfdd750fce feat(lsp): use fancy_floating_markdown for signature_help 2021-05-21 19:55:30 +02:00
02390af5a6 fix(lsp): clear current_syntax before formatting fancy markdown region 2021-05-21 19:18:22 +02:00
262645b325 fix(lsp): preview_location options and syntax fallback 2021-05-21 19:16:50 +02:00
d09f53d8ec fix(lsp): allow apply_text_edits and set_lines to insert text after the last line. Fixes #14017 2021-05-21 09:06:00 +02:00
75992f2ad9 Merge pull request #14596 from folke/master
lsp: `lsp.util.fancy_floating_markdown` improvements
2021-05-20 23:41:34 -07:00
de96626ad4 Fixed ttimeout documentation. (#14600)
ttimeout is a boolean. The correct command for this line is ":set ttimeoutlen=9999"
2021-05-20 18:39:41 -04:00
07f54201c7 feat(lsp): lsp.util.fancy_floating_markdown improvements
fix: fancy_floating_markdown: syn region must include keepend to make sure syntax regions are applied correctly. Fixes #14594

feat: fancy_floating_markdown: handle <pre></pre> code blocks as a markdown code block with plaintext

fix: possible nil check for markdown code blocks till end of buffer

refactor: only one check is needed to see if stripped[h.finish +1] is valid

fix(lsp): dont't set doc ownsyntax, since it breaks contained syntaxes. Set regions for the markdown blocks intsead

fix: apply markdown formatting for code blocks without a language

fix: use markdownCodeBlock when no language was set in a code block
2021-05-21 00:34:30 +02:00
713eaaed06 Merge pull request #14490 from kevinhwang91/qftf
vim-patch: 8.2.{0869,0933,0959} - port quickfixtextfunc
2021-05-20 17:54:52 -04:00
3bd9cce368 Merge pull request #14575 from vigoux/virtualedit-bytes
fix(bufupdate): send events when inserting with virtualedit
2021-05-20 20:05:25 +02:00
d29148ffd8 Merge remote-tracking branch 'origin/master' into qftf 2021-05-20 21:15:31 +08:00
2dc0f81271 fixup! vim-patch:8.2.0959: using 'quickfixtextfunc' is a bit slow 2021-05-20 11:34:10 +08:00
5d9c560127 Merge pull request #14538 from jamessan/vim-patch.sh-fixup
fix(vim-patch.sh -m): Show all commits touching a file, not just the first
2021-05-19 22:51:00 -04:00
cf714bf418 vim-patch.sh -m: Ignore changes to version.c
[skip ci]
2021-05-19 22:50:05 -04:00
86d35bef13 fix(vim-patch.sh -m): Show all commits touching a file, not just the first
[skip ci]
2021-05-19 22:50:05 -04:00
216bfa1d6b Merge pull request #14579 from jamessan/windows-env-vars
Deduplicate env var names on Windows
2021-05-19 22:46:42 -04:00
30befcdce4 Merge pull request #14592 from janlazo/vim-8.2.2869
vim-patch:8.2.{2869,2871}
2021-05-19 21:36:31 -04:00
49ab1b91e7 Remove '- 1' for sizes passed to xstrlcpy
xstrlcpy() NUL-terminates the destination string
such that reducing the destination string length by 1
to reserve the last byte for NUL is pointless.

https://github.com/neovim/neovim/pull/14490#discussion_r635661185
2021-05-19 21:09:53 -04:00
003cda2312 vim-patch:8.2.2871: unnessary VIM_ISDIGIT() calls, badly indented code
Problem:    Unnessary VIM_ISDIGIT() calls, badly indented code.
Solution:   Call skipdigits() on the next character.  Improve indenting.
            (Dominique Pellé, closes vim/vim#8227)
4781d6fd86
2021-05-19 20:58:09 -04:00
5fd605e1d1 vim-patch:8.2.2869: using unified diff is not tested
Problem:    Using unified diff is not tested.
Solution:   Test all cases also with unified diff. (issue vim/vim#8197)
485b627100
2021-05-19 20:44:06 -04:00
045e47ec55 Merge pull request #14563 from mjlbach/fix_intelephense_langserver
lsp: handle case where CompletionItem.insertTextFormat is nil
2021-05-19 12:39:44 -07:00
abf2ffd1e1 Merge pull request #12076 from bfredl/luavar
use new conversion rules for vim.g, vim.v
2021-05-19 19:54:09 +02:00
7fbf3bf18b lua: use proper conversion of vim.g values 2021-05-19 19:29:19 +02:00
6deae3d14b fix(health/python3): remove obsolete check (#14590)
Python 3.3 reached its end-of-life 2017-09-29:

  https://www.python.org/dev/peps/pep-0398

Closes https://github.com/neovim/neovim/issues/14586
2021-05-19 19:26:15 +02:00
f6a86a3d7d Merge pull request #14589 from mhinz/revert-smarter-tagstack
Unfortunately, there are some subtle bugs in the smarter tagstack changes,
so we'll revert them for now and try to come up with a better approach.

One of the added tests, adds current position to jumplist before jumping,
is valuable though and changed to still work after reverting the other two
commits.

Closes #14571
2021-05-19 18:58:21 +02:00
edd48f57aa Merge pull request #14583 from cbarrete/unsupported-call-hierarchies
lsp: handle unsupported call hierarchy call
2021-05-19 09:39:44 -07:00
19d4926f5a vim-patch:8.2.0959: using 'quickfixtextfunc' is a bit slow
Problem:    Using 'quickfixtextfunc' is a bit slow.
Solution:   Process a list of entries. (Yegappan Lakshmanan, closes vim/vim#6234)
00e260bb6c
2021-05-20 00:24:22 +08:00
00246d7be5 vim-patch:8.2.0933: 'quickfixtextfunc' does not get window ID of location list
Problem:    'quickfixtextfunc' does not get window ID of location list.
Solution:   Add "winid" to the dict argument. (Yegappan Lakshmanan,
            closes vim/vim#6222)
7ba5a7eff3
2021-05-20 00:19:25 +08:00
ebe1a08366 vim-patch:8.2.0869: it is not possible to customize the quickfix window contents
Problem:    It is not possible to customize the quickfix window contents.
Solution:   Add 'quickfixtextfunc'. (Yegappan Lakshmanan, closes vim/vim#5465)
858ba06d5f
2021-05-20 00:16:07 +08:00
ca336c681d lsp: handle unsupported call hierarchy call 2021-05-19 11:55:03 -04:00
9051064672 test(lsp_spec): improve correctness
References https://github.com/neovim/neovim/issues/14571
2021-05-19 16:35:02 +02:00
34922fba6b Revert "lsp: make tagstack smarter motion-wise (#12262)"
This reverts commit 8885ea7f24.
2021-05-19 15:33:32 +02:00
3e5c484ec5 Revert "lsp: fix regression in jump_to_location() (#14446)"
This reverts commit 993ca90c9b.
2021-05-19 15:31:41 +02:00
52ca7f1a26 Merge pull request #14585 from littlepoco/master
Update README.md
2021-05-19 07:34:49 +02:00
e2af1a7da3 Update README.md 2021-05-19 11:46:37 +08:00
d16e9d8ed4 Merge pull request #14582 from bfredl/gender
docs: fix some remanining cases of gender pronoun for "the user"
2021-05-18 23:45:46 +02:00
ef9d3e6791 docs: fix some remanining cases of gender pronoun for "the user"
Adapted from original PR by:
Co-Author: Mathias Jean Johansen <mathias@mjj.io>
2021-05-18 22:47:17 +02:00
237175cf20 fix(bufupdate): send events when inserting with virtualedit
Problem first raised
https://github.com/nvim-treesitter/nvim-treesitter/issues/1304
2021-05-18 19:31:56 +02:00
c46d981461 Merge pull request #14580 from jamessan/title-stack
fix(tui): Stop sending extra parameter for save/restore title
2021-05-18 11:57:12 -04:00
88ee095d42 fix(job): Deduplicate env var names on Windows
Windows handles environment variable names case-insensitively (i.e.,
%Path% can be accessed via %PATH%).  Since nvim explicitly creates the
environment block for jobs, we need to ensure it doesn't contain
duplicate names with different cases (e.g., both %Path% and %PATH%) as
that can confuse processes using the environment.

`f_environ()` now converts all env var names to upper-case on Windows,
since it does duplicate detection and also provides the base environment
for jobs.  Similarly, `create_environment()` converts any env var names
supplied in the job opts to upper-case so they can be compared against
what we get from `f_environ()`.

Closes #14541
2021-05-18 08:53:08 -04:00
0368591bb4 fix(tui): Stop sending extra parameter for save/restore title
Closes #14573
2021-05-18 07:18:50 -04:00
d250905c69 test(job_spec): Test handling of case-insensitively matching env vars
Since Windows is case-insensitive, there should only be a single env var
in visible in the resulting job.  However, non-Windows should see both.
2021-05-18 06:53:03 -04:00
c40de6e5f5 feat(ci): autolabel pull requests (#14574)
autolabel pull requests depending on which files are modified
2021-05-18 09:37:18 +02:00
dc18c1e3ee win/package: update wintools.zip for curl v7.76.1 (#14570)
https://github.com/neovim/neovim/issues/14078
2021-05-17 14:57:46 +02:00
63df353545 lsp: handle case where CompletionItem.insertTextFormat is nil
* Update tests to use explicit insertTextFormat for snippets
2021-05-16 15:25:34 -07:00
e0a01bdf7f Update vim diff and credits (#14566)
Patch 8.2.2524 added the support for the fields 'foldopen', 'foldclose'
and 'foldsep' to the 'fillchars' option in Vim:

http://ftp.vim.org/pub/vim/patches/8.2/8.2.2524

Update the credits in intro.txt based on Vim credits.
2021-05-16 13:55:53 -04:00
dab6b08a1e Merge pull request #14406 from shadmansaleh/vim-8.2.0877
vim-patch:8.2.{0877, 0880, 0884, 0887, 0896} - port searchcount()
2021-05-15 20:57:50 -04:00
6ab83f3572 Add 'FUNC_ATTR_NONNULL_RET' to nonnull alloc funcs (#14559) 2021-05-15 20:36:13 -04:00
d67dcaba02 vim-patch:8.2.2854: custom statusline cannot contain % items (#14558)
Problem:    Custom statusline cannot contain % items.
Solution:   Add "%{% expr %}". (closes vim/vim#8190)
30e3de21fc
2021-05-15 13:10:41 -04:00
0cd1430316 Merge pull request #14468 from bfredl/zindex
[WIP] z-index!
2021-05-15 14:44:22 +02:00
edb5864a29 floats: z-index 2021-05-15 13:56:27 +02:00
c57a85d534 Merge pull request #14532 from janlazo/vim-8.1.1433
vim-patch:8.0.1394,8.1.1967,8.2.{23,1000,1059,2354,2419,2433,2473,2850}
2021-05-14 18:50:44 -04:00
ba04b3d838 Merge pull request #14555 from mickael-menu/fix/range-code-action
lsp: Fix range end offset off by one character
2021-05-14 12:30:47 -07:00
c23640140d lsp: Fix range end offset off by one character 2021-05-14 18:33:23 +02:00
7c95697026 treesitter: add predicate "any-of?" (#14344)
For the case of Clojure and other Lisp syntax highlighting, it is
necessary to create huge regexps consisting of hundreds of symbols with
the pipe (|) character. To make things more difficult, these Lisp
symbols sometimes consists of special characters that are themselves
part of special regexp characters like '*'. In addition to being
difficult to maintain, it's performance is suboptimal.

This patch introduces a new predicate to perform 'source' matching in
amortized constant time. This is accomplished by compiling a hash table
on the first use.
2021-05-14 17:41:20 +02:00
520b925627 vim-patch:8.2.2850: recalling commands from history is not tested
Problem:    Recalling commands from history is not tested.
Solution:   Add tests. (closes vim/vim#8194)
71c6f7a665
2021-05-13 23:57:24 -04:00
5110ef9171 fixup! vim-patch:8.1.1228: not possible to process tags with a function 2021-05-13 21:00:28 -04:00
30987b9190 fixup! vim-patch:8.0.1449: slow redrawing with DirectX 2021-05-13 21:00:28 -04:00
cc798c626a vim-patch:8.0.1394: cannot intercept a yank command
Problem:    Cannot intercept a yank command.
Solution:   Add the TextYankPost autocommand event. (Philippe Vaucher et al.,
            closes vim/vim#2333)
7e1652c63c
2021-05-13 20:47:27 -04:00
c9195a1273 vim-patch:8.2.2473: crash when leaving command line window triggers autocommand
Problem:    Crash when leaving command line window triggers autocommand.
            (houyunsong)
Solution:   Make sure not to close the current window or buffer.
8c6951fa28

N/A patches for version.c:

vim-patch:8.2.2414: using freed memory when closing the cmdline window

Problem:    Using freed memory when closing the cmdline window.
Solution:   Check the window is still valid.
b7e2670b6a
2021-05-13 20:47:26 -04:00
e9804aead6 lint 2021-05-13 20:47:26 -04:00
07f6f12cf5 vim-patch:8.2.2433: opening cmdline window gives error in BufLeave autocommand
Problem:    Opening cmdline window gives error in BufLeave autocommand.
Solution:   Reset cmdwin_type when triggering the autocommand.
b63f3ca66d
2021-05-13 20:47:26 -04:00
3f9fa730ce vim-patch:8.2.2419: autocmd test was failing on MS-Windows with GUI
Problem:    Autocmd test was failing on MS-Windows with GUI.
Solution:   Remove stray feedkeys().
d697ddea14
2021-05-13 20:47:26 -04:00
1ca89a60d8 vim-patch:8.2.2359: strange test failure with MS-Windows
Problem:    Strange test failure with MS-Windows.
Solution:   Skip the system() call for now.
e2924328c1
2021-05-13 20:47:26 -04:00
f98433d82a vim-patch:8.2.2354: crash with a weird combination of autocommands
Problem:    Crash with a weird combination of autocommands.
Solution:   Increment b_nwindows when needed. (closes vim/vim#7674)
797e63b9f2
2021-05-13 20:47:26 -04:00
4338077632 Revert "XXX: ex_tabonly(): aucmd_win is not part of the window list."
This reverts commit 7214d0bc84.

Cannot test patch v8.2.1059 without reverting this commit.
2021-05-13 20:47:25 -04:00
f54a938271 vim-patch:8.2.1059: crash when using :tabonly in an autocommand
Problem:    Crash when using :tabonly in an autocommand. (Yegappan Lakshmanan)
Solution:   Do not allow the autocommand window to be closed.
cf8441704d

E813 error message does not mention 'popup' window
because Neovim floating window are regular windows, unlike Vim popups.

https://github.com/neovim/neovim/pull/14532#discussion_r631731829
2021-05-13 20:46:00 -04:00
7339290900 vim-patch:8.2.1000: get error when leaving Ex mode with :visual
Problem:    Get error when leaving Ex mode with :visual and a CmdLineEnter
            autocommand was used.
Solution:   Reset ex_pressedreturn. (closes vim/vim#6293)
158ea175a9
2021-05-12 19:13:28 -04:00
d5b9a7d6e8 vim-patch:8.2.0023: command line editing not sufficiently tested
Problem:    Command line editing not sufficiently tested.
Solution:   Add more tests. (Dominique Pelle, closes vim/vim#5374)
59cb041d0a

Ported to commit test_ex_mode.vim for later patches.
Test fails because feedkeys() filters out modifier keys on output.
2021-05-12 19:13:28 -04:00
dad725d5e5 vim-patch:8.1.1967: line() only works for the current window
Problem:    Line() only works for the current window.
Solution:   Add an optional argument for the window to use.
8e0a8e7eb7
2021-05-12 19:13:28 -04:00
89e29e8774 fixup! refactor nvim_buf_set_lines to use extmark_splice 2021-05-12 19:13:28 -04:00
61aefaf299 Merge pull request #14534 from mhinz/fix-win-ci
ci: fix stalling Windows builds
2021-05-11 20:32:05 -04:00
4ba3d059bf Revert "vim-patch:8.1.1378: delete() can not handle a file name that looks like a pattern (#12784)"
This reverts commit 4be0e92db0.

Unfortunately, that commit stalled the Windows builds on GHA and likely requires
other patches to work properly.
2021-05-12 00:47:21 +02:00
7d82ea0102 Merge pull request #14243 from shadmansaleh/Allow_cterm_colors_nvim_set_hl
API: Adding cterm support to nvim_set_hl
2021-05-11 15:07:00 +02:00
5c9b4948d4 treesitter: do not escape in match? (#14382) 2021-05-11 11:52:47 +02:00
7af26e5116 Revert "api/window: use the "noblock" variants in nvim_win_set_buf"
This reverts commit 1def3d1542.

Plugins may depend on catching the following events
when creating windows:
- BufWinEnter
- BufEnter
- BufLeave

Risky to introduce this breaking change on 0.5 release
when 0.5 release should be out by now.

https://github.com/asvetliakov/vscode-neovim/issues/632#issuecomment-837201224
2021-05-10 18:32:26 -04:00
133351cbf8 Merge pull request #14528 from disrupted/fix/nvim_buf_set_lines
Fix nvim_buf_set_lines
2021-05-10 23:18:14 +02:00
7b0edaac56 lua: use WarningMsg for vim.notify() warnings (#14508) 2021-05-10 14:26:39 +02:00
81dc647961 Apply patch from clason 2021-05-10 13:47:22 +02:00
e5c22f6347 Fix nvim_buf_set_lines 2021-05-10 13:31:06 +02:00
5ea9cbc280 Update the functio documentation in C 2021-05-10 11:27:48 +02:00
26139d3085 Merge pull request #14501 from chentau/extmark_setlines
Refactor nvim_buf_set_lines to use `extmark_splice` instead of `extmark_adjust`
2021-05-10 09:37:47 +02:00
13a9bd006f make get_region_bytecount end-exclusive 2021-05-09 16:23:01 -07:00
a847abc21b refactor nvim_buf_set_lines to use extmark_splice 2021-05-09 16:22:20 -07:00
d2be261e8d Merge pull request #14403 from seandewar/vim-8.2.1933
vim-patch:8.2.{0174,1933,1935,1946,2286,2287}
2021-05-09 17:08:21 -04:00
2bb22ce567 STRLEN -> strlen 2021-05-09 07:18:54 +06:00
1f952e34f2 Use bool for boolean values 2021-05-09 06:51:59 +06:00
da22be9f33 vim-patch:8.2.0896: crash when calling searchcount() with a string
Problem:    Crash when calling searchcount() with a string.
Solution:   Check the argument is a dict. (closes vim/vim#6192)
14681627f3
2021-05-09 06:37:02 +06:00
973ecd8e90 vim-patch:8.2.0887: searchcount().exact_match is 1 right after a match
Problem:    Searchcount().exact_match is 1 right after a match.
Solution:   Use LT_POS() instead of LTOREQ_POS(). (closes vim/vim#6189)
57f75a5a36
2021-05-09 06:37:02 +06:00
5c404ad0fa vim-patch:8.2.0884: searchcount() test fails on slower systems
Problem:    Searchcount() test fails on slower systems.
Solution:   Set a longer timeout.
ea6561af92
2021-05-09 06:37:01 +06:00
420344324e vim-patch:8.2.0880: leaking memory when using searchcount()
Problem:    Leaking memory when using searchcount().
Solution:   Free the last used search pattern.
109aece79d
2021-05-09 06:37:01 +06:00
e498f265f4 vim-patch:8.2.0877: cannot get the search statistics
Problem:    Cannot get the search statistics.
Solution:   Add the searchcount() function. (Fujiwara Takuya, closes vim/vim#4446)
e8f5ec0d30

Additional changes:
- Tests weren't passing because the test ran assuming the cursor was at
  start of buffer but append() left the cursor at end of buffer .
  So cursor is moved to start of buffer after append.
- searchcount() added to list of builtin functions.
2021-05-09 06:37:01 +06:00
f8173df4d7 Merge pull request #14517 from janlazo/vim-8.2.2838
vim-patch:8.2.{2838,2839}
2021-05-08 12:54:31 -04:00
cd5fde6e6c neovim-qt: v0.2.16.1 (#14514)
nvim-qt --help/version should work without $DISPLAY

https://github.com/equalsraf/neovim-qt/compare/v0.2.16...v0.2.16.1
2021-05-08 12:17:25 -04:00
ec04d37188 vim-patch:8.2.2839: default redirection missing "ash" and "dash"
Problem:    Default redirection missing "ash" and "dash".
Solution:   Recognize "ash" and "dash". (Natanael Copa, closes vim/vim#8180)
5631836975
2021-05-08 08:23:44 -04:00
6fcd96250b vim-patch:8.2.2838: file extension .wrap not recognized
Problem:    File extension .wrap not recognized.
Solution:   Use dosini filetype for .wrap files. (Liam Beguin, closes vim/vim#8177)
e3e598e82b
2021-05-08 08:17:49 -04:00
a257f00f75 Minor observational corrections to the set_extmark documentation
Add a note for the line and col, saying they are 0-based.
The end_col appears to be exclusive, unline the end_line.
2021-05-07 15:27:38 +02:00
5165513198 Merge pull request #13664 from ivechan/win_exectute
vim-patch:8.1.{1418,1425,1832,2124},8.2.{0137, 2340}
2021-05-07 08:34:28 -04:00
4be0e92db0 vim-patch:8.1.1378: delete() can not handle a file name that looks like a pattern (#12784)
Problem:    Delete() can not handle a file name that looks like a pattern.
Solution:   Use readdir() instead of appending "/*" and expanding wildcards.
            (Ken Takata, closes vim/vim#4424, closes vim/vim#696)
701ff0a3e5
2021-05-07 08:07:13 -04:00
17434b88b4 checkhealth: ignore 'wildignore' when seeking executables (#14495)
Certain values of 'wildignore', .e.g `*/node_modules/**`, would make the
provider checks not find the right executables.

Fixes https://github.com/neovim/neovim/issues/14388
2021-05-07 11:07:07 +02:00
8c9f0f1da1 Merge pull request #14502 from chentau/extmark_paste
Splice extmarks on every line for block visual paste
2021-05-07 10:52:36 +02:00
37c8067226 splice extmarks on every line for block visual paste 2021-05-06 20:40:26 -07:00
21035cff9f Merge pull request #14500 from jamessan/coverity-fixes
Various Coverity fixes
2021-05-06 19:28:36 -04:00
efed75f916 coverity/331377: os_fopen: Remove invalid iflags assert
If the O_* flags were non-zero, then ORing the flags would always be
true.  However, the O_* flags aren't guaranteed to be non-zero, so the
assert is invalid in the first place.
2021-05-06 18:57:22 -04:00
d9eaca99be coverity/331399: Remove unused "term_name" member from PtyProcess 2021-05-06 18:57:22 -04:00
d4fd139c2a coverity/331366: fname_trans_sid: Avoid buffer overrun
Since we're printf()ing into an offset of fname_buf, we need to reduce
the max length by the same amount.
2021-05-06 18:57:21 -04:00
a3e914b64c Merge pull request #14507 from fsouza/add-test-for-jumplist-fix
lsp: add a test for the jump_to_location + jump list fix
2021-05-06 15:57:10 -07:00
9bdbac6712 coverity/331382: Allocate enough space for trailing NUL 2021-05-06 18:56:57 -04:00
f6d4226f4d coverity/188735: last_nonfloat: Ensure wp is non-NULL before dereferencing 2021-05-06 18:56:56 -04:00
833a6fcb60 coverity/331378: Fix inserting new decor provider
Since the providers are ordered by ns_id, inserting a new provider may
require shifting existing providers around to maintain this ordering.

When this happens, we need to allocate a new element at the end of the
vector and then shift the larger elements to the right.  Rather than
iterating (incorrectly) with a loop and copying each item, use memmove
to copy the entire block.
2021-05-06 18:56:56 -04:00
9149fe48a9 lsp: add a test for the jump_to_location + jump list fix 2021-05-06 17:56:24 -04:00
1def3d1542 api/window: use the "noblock" variants in nvim_win_set_buf
after commit 92c6383cdca977("vim-patch:8.1.1425: win_execute() does not set window pointers properly"),
nvim_win_set_buf can use switch_win_noblock and restore_win_noblock.
It makes nvim_win_set_buf don't block autocmds so that it will be more
"without side-effects" as said in help text.

Signed-off-by: jing <lhchenjw@gmail.com>
2021-05-06 23:45:16 +08:00
03b3ff8610 vim-patch:8.2.2340: win_execute() unexpectedly returns number zero when failing
Problem:    win_execute() unexpectedly returns number zero when failing.
Solution:   Return an empty string. (closes vim/vim#7665)
37487e16da
2021-05-06 23:45:16 +08:00
8fecc5fab8 vim-patch:8.2.0137: crash when using win_execute() from a new tab
Problem:    Crash when using win_execute() from a new tab.
Solution:   Set the tp_*win pointers. (Ozaki Kiichi, closes vim/vim#5512)
a44b3eeafa
2021-05-06 23:45:16 +08:00
ec3524da29 vim-patch:8.1.2124: ruler is not updated if win_execute() moves cursor
Problem:    Ruler is not updated if win_execute() moves cursor.
Solution:   Update the status line. (closes vim/vim#5022)
345f28df54
2021-05-06 23:45:16 +08:00
73154bbae0 vim-patch:8.1.1832: win_execute() does not work in other tab
Problem:    Win_execute() does not work in other tab. (Rick Howe)
Solution:   Take care of the tab. (closes vim/vim#4792)
820680b9ff
2021-05-06 23:45:16 +08:00
3c00252248 vim-patch:8.1.1440: win_execute() test fails
Problem:    Win_execute() test fails.
Solution:   Adjust the expected error number.  Move to popup test.
2d247849ce
2021-05-06 23:45:16 +08:00
97abf8ee63 vim-patch:8.1.1425: win_execute() does not set window pointers properly
Problem:    Win_execute() does not set window pointers properly.
Solution:   Use switch_win_noblock().  Also execute autocommands in a popup
            window.
89adc3a137
2021-05-06 23:45:16 +08:00
f6518e5516 vim-patch:8.1.1418: win_execute() is not implemented yet
Problem:    Win_execute() is not implemented yet.
Solution:   Implement it.
868b7b6712
2021-05-06 23:44:47 +08:00
71107e12c7 Merge pull request #14499 from janlazo/vim-8.2.2819
vim-patch:8.0.1309,8.2.{1166,2819,2820,2825,2827,2828,2829,2832,2833}
2021-05-06 09:00:24 -04:00
296711cfad vim-patch:8.2.2829: some comments are not correct or clear
Problem:    Some comments are not correct or clear.
Solution:   Adjust the comments.  Add test for cursor position.
df36514a64
2021-05-06 00:55:30 -04:00
dad17caa87 lint 2021-05-06 00:42:20 -04:00
de299724cd vim-patch:8.2.2833: two key command cancelled by moving mouse when using popup
Problem:    Two key command cancelled by moving mouse when using popup.
            (Sergey Vlasov)
Solution:   Ignore K_MOUSEMOVE in plain_vgetc().
3a00659db7
2021-05-06 00:32:35 -04:00
0be0f9895d vim-patch:8.2.2832: operator cancelled by moving mouse when using popup
Problem:    Operator cancelled by moving mouse when using popup. (Sergey
            Vlasov)
Solution:   Do not trigger an operator for a mouse move events. (closes vim/vim#8176)
1ad72c8eb6
2021-05-06 00:31:18 -04:00
f70ecbd4dc vim-patch:8.2.1166: once mouse move events are enabled getchar() returns them
Problem:    Once mouse move events are enabled getchar() returns them.
Solution:   Ignore K_MOUSEMOVE in getchar(). (closes vim/vim#6424)
ae97b94176
2021-05-06 00:26:37 -04:00
51403d6d41 vim-patch:8.0.1309: cannot use 'balloonexpr' in a terminal
Problem:    Cannot use 'balloonexpr' in a terminal.
Solution:   Add 'balloonevalterm' and add code to handle mouse movements in a
            terminal. Initial implementation for Unix with GUI.
51b0f3701e
2021-05-06 00:19:10 -04:00
4910ac9ab8 vim-patch:8.2.2828: Coverity complains about not checking rename() return value
Problem:    Coverity complains about not checking the rename() return value.
Solution:   Add "(void)", can't do anything in case of a failure.
97a6c6a1fb
2021-05-05 22:59:40 -04:00
5c6018ba2f vim-patch:8.2.2827: test file was not deleted
Problem:    Test file was not deleted.
Solution:   Uncomment the delete() call. (Dominique Pellé, closes vim/vim#8172)
5f8ed7408a
2021-05-05 22:57:47 -04:00
7d2e76e333 vim-patch:8.2.2825: code in checkreadonly() not fully tested
Problem:    Code in checkreadonly() not fully tested.
Solution:   Add more tests. (Dominique Pellé, closes vim/vim#8169)
2bf6034e5c
2021-05-05 22:54:17 -04:00
44a331c36b vim-patch:8.2.2820: session file may divide by zero
Problem:    Session file may divide by zero.
Solution:   Avoid writing difide by zero. (closes vim/vim#8162)
b6c2e9a010

Avoid typecasts if possible.
Use PRIdLINENR, PRId64, to format line numbers.
2021-05-05 22:50:57 -04:00
dd935e1473 vim-patch:8.2.2819: finishing an abbreviation with multi-byte char may not work
Problem:    Finishing an abbreviation with a multi-byte char may not work.
Solution:   Escape K_SPECIAL in the typed character. (closes vim/vim#8160)
4934ed34c3
2021-05-05 22:06:10 -04:00
8a93d1028f Merge pull request #14497 from jamessan/ci-updates
ci(coverity): Fix typo in tar command
2021-05-05 12:55:17 -04:00
7ae1417ad5 ci(coverity): Fix typo in tar command
[skip ci]
2021-05-05 12:54:47 -04:00
554468cc03 Merge pull request #14493 from jamessan/ci-updates 2021-05-05 11:48:08 -04:00
3bebe60121 ci(gha): Run ci workflow for PRs into release branches 2021-05-05 09:21:12 -04:00
d399a853a3 Exclude .github/ and CI files from exported archives
These are only relevant for GitHub, not published tarballs.
2021-05-05 08:59:12 -04:00
26f5b979ec ci(gha): Add weekly Coverity scans
[skip ci]
2021-05-05 08:54:03 -04:00
7fcc596557 Merge pull request #14483 from mjlbach/floating_window_border_fix
window.c: fix floating window border width calculation
2021-05-05 07:09:04 +02:00
1c2e504d5c Merge pull request #14492 from seandewar/gcc-conv-warn
fix(gcc): compile warning in nvim_buf_set_extmark
2021-05-05 07:04:43 +02:00
b274b9887a fix(gcc): compile warning in nvim_buf_set_extmark 2021-05-05 02:15:51 +01:00
4ad30f775e Merge pull request #14424 from janlazo/vim-8.1.1726
vim-patch:8.1.1726,8.2.{296,860,1827,2388,2788,2790,2801}
2021-05-04 19:18:16 -04:00
ca058082ae tests: floating windows terminate border on edge of viewport when window extends past viewport 2021-05-04 15:43:53 -07:00
63d8a8f4e8 Merge pull request #14480 from mhinz/issue-template
template: make sure people read `:h vim-differences`
2021-05-04 09:38:08 -04:00
c2624b87cb Merge pull request #14486 from Sh3Rm4n/fix_get_str_line
get_str_line: Replace grow_array usage
2021-05-04 09:37:25 -04:00
d5b063aec1 Revert vim-patch:942db23c9cb7 for phpcomplete.vim
It targets Vim 8.2 without feature and version checks.
2021-05-04 07:28:24 -04:00
c9567704b7 get_str_line: Replace grow_array usage
A single xmemdupz is sufficient, as it is already
zero-terminating the string
2021-05-03 22:53:13 +02:00
3fc71ea228 Merge pull request #14418 from DerekStride/treesitter-set-directive
[RDY] tree-sitter ensure there is a nested table allocated for `#set!`
2021-05-03 21:41:39 +02:00
d45e168a1d window.c: fix floating window border width calculation
* lift calculation of w_border_adj into win_config_float
* Check max floating window height and width against
  w_{height,width}_outer when positioning window
2021-05-03 00:29:49 -07:00
ad81144442 Merge pull request #14334 from DarwinSenior/vim.log
lsp: deep copy vim.lsp.log when reloading
2021-05-02 23:40:34 -07:00
0ee52fba31 ci(gha/ci): Use clang-12 for TSAN 2021-05-02 22:24:28 -04:00
a0da4c3a49 Merge pull request #14455 from Sh3Rm4n/fix_get_str_line
[RDY] Fix get str line
2021-05-02 16:47:36 -04:00
14c692bc82 ci(gha/release): Bump to ubuntu-18.04
Per https://wiki.ubuntu.com/Releases, 16.04 is no longer under standard
support.  Switch to the next LTS, 18.04, for the next couple years.
2021-05-02 16:27:37 -04:00
cfaf666ac9 Merge pull request #14462 from kabouzeid/feature/formatting_seq_sync
[LSP] Support for sequential formatting with multiple clients
2021-05-02 12:52:27 -07:00
ad6bb386be vim-patch:4c295027a426
Update runtime files
4c295027a4
2021-05-02 13:00:38 -04:00
d19ede86ea vim-patch:8.2.2790: filetype test fails
Problem:    filetype test fails
Solution:   Also update the scripts detection
63276685f9
2021-05-02 12:54:06 -04:00
0020858e1c vim-patch:8.2.2788: Raku is now the only name what once was called perl6
Problem:    Raku is now the only name what once was called perl6.
Solution:   Adjust the filetype detection. (closes vim/vim#8120)
3f88e71fa2
2021-05-02 12:54:02 -04:00
3bc852cabf vim-patch:11e3c5ba8203
Update runtime files
11e3c5ba82
2021-05-02 12:53:49 -04:00
7e36c9a2d3 vim-patch:56994d215815
Update runtime files.
56994d2158
2021-05-02 12:44:04 -04:00
abb13dde98 vim-patch:130cbfc31235
Update runtime files
130cbfc312
2021-05-02 12:03:34 -04:00
b8f3ef10c9 vim-patch:dad4473f02e1
Update runtime files.
dad4473f02

Omit :echoconsole. Patch v8.2.2638 is not ported.
2021-05-02 11:51:38 -04:00
bcf03affbd Increase default LSP sync timeout to 1000ms 2021-05-02 17:08:57 +02:00
eea3a692c6 vim-patch:c8cdf0f80b3c
Update runtime files.
c8cdf0f80b
2021-05-02 10:33:32 -04:00
d923f38882 Add client.request_sync doc 2021-05-02 16:24:58 +02:00
6a8436065c vim-patch:9faec4e3d439
Update runtime files.
9faec4e3d4

Omit vim9.
2021-05-02 10:23:35 -04:00
f0f3fddcdd Synchronous formatting methods notify the user on timeout and interrupted 2021-05-02 16:16:49 +02:00
dc9c6ea219 Support multiple range formatting clients 2021-05-02 15:37:31 +02:00
54368736d0 doc clarification 2021-05-02 15:23:13 +02:00
04a33c1d9a template: make sure people read :h vim-differences 2021-05-02 13:52:01 +02:00
2081504a33 vim-patch:942db23c9cb7
Update runtime files
942db23c9c

Omit po files.
2021-05-01 23:47:11 -04:00
ac83c6eba6 vim-patch:e0e391755432
Update runtime files.
e0e3917554
2021-05-01 23:19:58 -04:00
8f8602d2df vim-patch:98a29d00a48e
Update runtime files.
98a29d00a4
2021-05-01 23:19:57 -04:00
dd2bc06411 vim-patch:82be4849eed0
Update runtime files.
82be4849ee
2021-05-01 23:19:57 -04:00
c1dd4e83b4 vim-patch:7e6a515ed14e
Update runtime files.
7e6a515ed1

Omit vim9.
2021-05-01 22:29:03 -04:00
b1cd67b62e vim-patch:4072ba571bab
Update runtime files.
4072ba571b

Omit vim9 references.
Omit assert_fails(). Patch v8.2.1183 is not ported yet.
2021-05-01 22:29:03 -04:00
710f0eae2f vim-patch:1b884a005398
Update runtime files.
1b884a0053

Omit doc/autocmd.txt.
Omit tools/emoji_list.vim. Patch v8.2.1540 is not ported.
2021-05-01 22:29:03 -04:00
83b6a18598 vim-patch:23515b4ef758
Update runtime files
23515b4ef7

Omit filetype.txt changes for :Man.
2021-05-01 22:29:03 -04:00
0c93005383 vim-patch:4466ad6baa22
Update runtime files
4466ad6baa

Omit vim9 references in autocmd.txt.
Omit matchfuzzypos().
2021-05-01 22:29:02 -04:00
2ebd1f6286 vim-patch:3132cddd209e
Update runtime files
3132cddd20

Omit :sort,sort() changes.
2021-05-01 22:29:02 -04:00
330500a5bf vim-patch:cb80aa2d53e5
Update runtime files.
cb80aa2d53

Omit runtime/doc/tabpage.txt.
Patch v8.2.1401 is not ported yet.

Port optwin.vim changes without gettext().
Patch v8.2.1544 is not ported yet.
2021-05-01 22:29:02 -04:00
b227cedf82 signs: fix overflow during adjustment on Windows (#14472)
On Windows, `new_lnum + MAXLNUM` causes overflow and as a result the
line number of that sign becomes invalid negative number. This occurs
when the `set signcolumn=yes`, in other words `signcolumn` is not `auto`
and the sign column is less than 2 columns.

The related change was made in the commit
f2ed7605da. Originally the above addition
is only executed if `amount != MAXLNUM`, so reintroducing this check
fixes the bug and will hardly produces a new bug.

Fixes https://github.com/neovim/neovim/issues/14460
2021-05-02 00:35:52 +02:00
48a59f8f4f Add formatting_seq_sync, change formatting and formatting_sync 2021-05-01 21:12:40 +02:00
b16c7c515c vim-patch:4f4d51a942cc
Update runtime files.
4f4d51a942

Omit "??" operator.
Patches v8.2.1794,v8.2.1798 are not ported yet.
2021-05-01 14:22:52 -04:00
993ca90c9b lsp: fix regression in jump_to_location() (#14446)
This fixes a regression that was introduced in [1] by accidentally leaving out a line.

1: https://github.com/neovim/neovim/pull/12262
2021-05-01 19:28:21 +02:00
ef81999f4e fix: make nvim_win_get_number() return win number (#14470)
Closes https://github.com/neovim/neovim/issues/14467
2021-05-01 16:57:05 +02:00
27da5511a0 docs: Treesitter (#13260)
* doc & fixes: Generate treesitter docs

* fixup to treesitter-core

* docs(treesitter): fix docs for most functions

Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
2021-05-01 08:19:48 -04:00
ca6107cfbc doc: update vim.cmd() (#14450) 2021-05-01 13:09:05 +02:00
9d4250d43d Merge pull request #14380 from bfredl/virtcol
decorations: right_align and win_col
2021-05-01 12:39:15 +02:00
0865f1238f decorations: right_align and win_col 2021-05-01 11:48:04 +02:00
b084f49496 vim-patch:8.2.1827: filetype detection does not test enough file names
Problem:    Filetype detection does not test enough file names.
Solution:   Test more file names. (Adam Stankiewicz, closes vim/vim#7099)
10a1a534d1
2021-05-01 02:27:32 -04:00
e1171cf1d2 vim-patch:d58a3bf7dac8
Update runtime files.
d58a3bf7da

Omit syntax/man.vim.
2021-05-01 02:01:25 -04:00
d1a2523f6c vim-patch:1d59aa1fdfb1
Update runtime files.
1d59aa1fdf
2021-05-01 01:37:13 -04:00
0150cc4160 Merge pull request #14463 from mfussenegger/decoded-result-false
lsp: Allow decoded.result to be `false`
2021-04-30 11:37:47 -07:00
69d4143e7b lsp: Allow decoded.result to be false
Some servers might respond to `workspace/executeCommand` requests with a
boolean result and that could be `false`.

A `false` result should be allowed and not trigger the `on_error`
handler:

    -- Invalid server message
    on_error(client_errors.INVALID_SERVER_MESSAGE, decoded)

Concrete example where this occurred is with eclipse.jdt.ls:

    vim.lsp.buf_request(
      0,
      'workspace/executeCommand',
      {
        command = 'java.project.isTestFile',
        arguments = { vim.uri_from_bufnr(0), },
      },
      function(err, _, resp)
        print(vim.inspect(err), vim.inspect(resp))
      end
    )
2021-04-30 20:17:56 +02:00
388a834a07 Merge pull request #14361 from bfredl/synenable
[WIP] startup: do "syntax enable" instead of "syntax on" after init.vim
2021-04-30 18:07:32 +02:00
b0a1d1eb64 startup: do "syntax enable" instead of "syntax on"
"syntax on" overwrites existing highlight groups, while "syntax enable"
just sets missing groups. This change prevents user defined highlights in
init.vim/lua to get overwritten. The manual recommends "syntax enable" for
new configurations anyway, "on" command was probably used as it is the
implicit default.
2021-04-30 16:48:12 +02:00
4d5516dc05 get_str_line: Simplify growarray usage 2021-04-30 14:42:02 +02:00
f5d1f0bf03 vim-patch:1c6737b20a5c
Update runtime files.
1c6737b20a
2021-04-29 23:35:37 -04:00
1e03e76daf vim-patch:207f009326c8
Update runtime files.
207f009326

Omit nl.po.
2021-04-29 21:56:34 -04:00
9f54d125d2 vim-patch:3d1cde8a2f28
Update runtime files.
3d1cde8a2f
2021-04-29 21:08:09 -04:00
09f3e62bc6 vim-patch:e7b1ea0276cc
Update runtime files.
e7b1ea0276
2021-04-29 20:42:16 -04:00
59eae3b38f Merge pull request #14459 from jamessan/pvs-script
fix(pvscheck): Switch URL to pvs-studio.com
2021-04-29 20:05:39 -04:00
794a287846 fix(pvscheck): Switch URL to pvs-studio.com
[skip ci]
2021-04-29 20:04:29 -04:00
0a0034718c vim-patch:2547aa930b59
Update runtime files.
2547aa930b

Omit modifyOtherKeys, vim9, vim.man.
2021-04-29 09:27:19 -04:00
ef8afa0eb7 Fix documentation typos for msg_scroll_flush 2021-04-29 12:48:56 +02:00
766f4c3f62 get_str_line: Use heap instead of stack
The stack allocated buffer does introduce an arbitrary limit,
to the length of the line.

Previously, if the line was too long, it might be catched by a
stack smash canary or resulted into a crash.

This is not guaranteed though, and thus could result into undefined
behavior.

To mitigate this, an dynamic allocated buffer is replacing the stack
allocated buffer, with the initial capacity of the copied line.
2021-04-29 11:48:51 +02:00
27fb03f5a0 vim-patch:7ff78465f705
Update runtime files
7ff78465f7
2021-04-28 23:04:14 -04:00
bb172c5104 vim-patch:e46a44050562
Runtime file updates
e46a440505

Omit vim9.
2021-04-28 22:42:43 -04:00
7c6ca6fed8 vim-patch:73fef33014db
Update runtime files
73fef33014

Omit usr_46.txt.
2021-04-28 22:14:37 -04:00
df2acdc3be vim-patch:65e0d77a66b7
Update runtime files
65e0d77a66

Omit usr_46.txt because of vim9.
2021-04-28 21:57:50 -04:00
565783be4b vim-patch:acc224064033
Update runtime files
acc2240640

Omit 'quickfixtextfunc'.
Omit ftplugin/man.vim.
2021-04-28 21:29:57 -04:00
04a4bbbe56 vim-patch:8.2.0860: cannot use CTRL-A and CTRL-X on unsigned numbers
Problem:    Cannot use CTRL-A and CTRL-X on unsigned numbers.
Solution:   Add "unsigned" to 'nrformats'. (Naruhiko Nishino, closes vim/vim#6144)
aaad995f83
2021-04-28 21:29:57 -04:00
65821cc1b9 vim-patch:388a5d4f20b4
Update runtime files
388a5d4f20

Omit vim9.
2021-04-28 21:29:57 -04:00
0185625c04 vim-patch:47e13953ffdb
Update runtime files
47e13953ff

Ignore *.rej files, generated by vim-patch.sh.
Source of mistakes for 1st-time contributors.
2021-04-28 21:29:57 -04:00
3d86857f28 vim-patch:2cfb4a2a7248
Update runtime files
2cfb4a2a72
2021-04-28 21:29:56 -04:00
038ce7a5af vim-patch:7ceefb35c811
Update runtime files
7ceefb35c8

Omit {ftplugin,syntax}/man.vim changes.
Omit E565,E578. They depend on patches v8.2.0614, v2.2.0670.
2021-04-28 21:29:56 -04:00
c2635665c5 vim-patch:2c7f8c574f1f
Update runtime files
2c7f8c574f

Omit the following line for man.vim:
hi def link manFooter PreProc
2021-04-28 21:29:56 -04:00
136edab705 screen: fix typo in screen.c
accomodate -> accommodate
2021-04-29 01:45:19 +09:00
9d3576246b vim-patch:8.2.2801: free Pascal makefile not recognized
Problem:    Free Pascal makefile not recognized.
Solution:   Add the fpcmake filetype. (Doug Kearns)
f6d9935a13
2021-04-27 22:54:38 -04:00
e612a0a76a vim-patch:d1caa941d876
Update runtime files
d1caa941d8

Cherry-pick error E452 from patch v8.2.0486.
2021-04-27 22:40:39 -04:00
d894b3da1e vim-patch:191acfdecabf
Update runtime files
191acfdeca

Skip has() changes for the "check" optional argument.
Patch v8.2.0427 is not ported yet.

Skip Vim9 (ex. :def).
2021-04-27 21:47:42 -04:00
c287e734f1 vim-patch:ff78155aa175
Update runtime files
ff78155aa1

Omit menu_info().
2021-04-27 21:31:28 -04:00
e7f6c52014 vim-patch:b17893aa940d
Update runtime files
b17893aa94

Omit feedkeys() changes.
2021-04-27 21:25:35 -04:00
a299f54cd7 vim-patch:eab6dff19f38
Update runtime files
eab6dff19f

Omit de.po translations.
2021-04-27 20:25:21 -04:00
44d4526e18 Ensure there is a nested table allocated for #set!
Fixes the following bug:
```
test/functional/helpers.lua:107: Error executing lua:
vim/treesitter/query.lua:256: attempt to index a nil value
```
2021-04-27 12:29:37 -02:30
95f02cb587 vim-patch:8.2.2388: no easy way to get the maximum or mininum number value
Problem:    No easy way to get the maximum or mininum number value.
Solution:   Add v:numbermax and v:numbermin.
57d5a01cb4
2021-04-27 09:21:36 -04:00
25c0675fe3 vim-patch:8.2.0296: mixing up "long long" and __int64 may cause problems
Problem:    Mixing up "long long" and __int64 may cause problems. (John
            Marriott)
Solution:   Pass varnumber_T to vim_snprintf().  Add v:numbersize.
f9706e9df0
2021-04-27 09:21:35 -04:00
e257aff016 vim-patch:bc93cebb692f
Update runtime files.
bc93cebb69
2021-04-27 09:21:35 -04:00
278ca5f456 vim-patch:ebdf3c964a90
Update runtime files.
ebdf3c964a

Omit vim9.
2021-04-27 09:21:35 -04:00
4819737853 vim-patch:560979ed4f02
Update runtime files.
560979ed4f

Omit vim9.
2021-04-27 09:21:34 -04:00
e8178093dc vim-patch:1d9215b9aaa1
Update runtime files.
1d9215b9aa
2021-04-27 09:21:34 -04:00
d112db157c vim-patch:ade0d3946801
Update runtime files.
ade0d39468
2021-04-27 09:21:34 -04:00
f406e4631d vim-patch:8024f9363683
Update runtime files.
8024f93636

Omit "modifyOtherKeys" changes.
2021-04-27 09:21:34 -04:00
5e1f434764 vim-patch:2963456ff2b7
Update runtime files.
2963456ff2
2021-04-27 09:21:33 -04:00
c8f07e5e1f vim-patch:d7df279808f7
Update a few runtime files.
d7df279808
2021-04-27 09:21:33 -04:00
ae362c2120 vim-patch:5666fcd0bd79
Update runtime files.
5666fcd0bd

Do not manually port E290 error message.
Neovim has E5030,E5031 error messages to replace E290.
2021-04-27 09:21:33 -04:00
841bc219d2 vim-patch:95a9dd1efc5a
Update runtime files.
95a9dd1efc
2021-04-27 09:21:32 -04:00
8aa817bbb3 po: remove duplicate translations
Neovim runs "src/nvim/po/check.vim" to validate all translations.
Build fails if any translation file has a duplicate.
Remove these duplicates via "msguniq --unique".

https://manpage.me/?q=msguniq
2021-04-27 09:21:32 -04:00
62adc04f08 vim-patch:469bdbde1e8e
Minor runtime file updates.
469bdbde1e
2021-04-27 09:21:32 -04:00
f19c896e9d vim-patch:2ed639abdc40
Update a few runtime files.
2ed639abdc
2021-04-27 09:21:32 -04:00
d227c22f00 vim-patch:32b364fcc097
Runtime file updates.
32b364fcc0
2021-04-27 09:21:31 -04:00
527d108223 vim-patch:664f3cf3f21d
Runtime file updates.
664f3cf3f2
2021-04-27 09:21:31 -04:00
3e47e529b0 vim-patch:c08ee7476b19
Update runtime files.
c08ee7476b
2021-04-27 09:21:31 -04:00
5426785541 vim-patch:9834b96820be
Update version 8.2 notes and make syntax.
9834b96820
2021-04-27 09:21:31 -04:00
8e782f6124 vim-patch:4ceaa3a6e0b8
Update a few runtime files
4ceaa3a6e0

Omit de.po.
2021-04-27 09:21:31 -04:00
b918d99a61 vim-patch:91359014b359
Update runtime files.
91359014b3
2021-04-27 09:21:30 -04:00
348f72524d vim-patch:0c0734d527a1
Update runtime files
0c0734d527

Omit rand(), srand() documentation.
Patch v8.1.2342 is not ported yet.
2021-04-27 09:21:30 -04:00
d1231d4f8e vim-patch:403f3eb4c189
Update runtime files.
403f3eb4c1

Port sr.po changes, done by vim-patch.sh.
No way I'm manually porting the rest.
2021-04-27 09:21:30 -04:00
52564c9aa2 vim-patch:09c6f265b210
Update runtime files.
09c6f265b2

Omit getmousepos().
Patch v8.1.2304 is not ported yet.
2021-04-27 09:21:30 -04:00
d270313c79 vim-patch:1ebbb6ee452d
Fix vim.desktop generation.
1ebbb6ee45
2021-04-27 09:21:29 -04:00
cf0fb01ea5 vim-patch:574ee7bc1246
Update runtime files
574ee7bc12

Omit ru.po because I don't know the language and there's too much to port.
2021-04-27 09:21:29 -04:00
6cdb755507 vim-patch:5ef1c6a4838a
Update runtime files
5ef1c6a483

"scrollfocus" is for Windows GUI only so it is N/A.
2021-04-27 09:21:29 -04:00
d4b65fa6fb vim-patch:1ff14ba24c4d
Update runtime files.
1ff14ba24c
2021-04-27 09:21:28 -04:00
233292b0ba vim-patch:96f45c0b6fc9
Update runtime files
96f45c0b6f

Omit de.po changes.
Same reason as before: too much and I don't understand the language.
2021-04-27 09:21:28 -04:00
f0bf853f41 vim-patch:2e693a88b24d
Update runtime files.
2e693a88b2
2021-04-27 09:21:28 -04:00
ecb48e7f8a fixup! man.vim: Refactor verify_exists to unset $MANSECT as needed
":unset" is not a valid Ex command.
Use setenv() to set/unset environment variables.
2021-04-27 09:21:28 -04:00
b1fed1ada9 vim-patch:5be4ceecea55
Update runtime files.
5be4ceecea
2021-04-27 09:21:27 -04:00
766a107839 vim-patch:589edb340454
Updte runtime files
589edb3404

Omit state() changes in eval.txt because patch v8.1.2047 is not merged.
2021-04-27 09:21:27 -04:00
d6cef4ef9d vim-patch:8fe1000e9c34
Update runtime files
8fe1000e9c

Omit de.po changes.
There's too many lines to port and I don't understand the language.
2021-04-27 09:21:27 -04:00
01a629ca03 vim-patch:8.1.1726: the eval.txt help file is too big
Problem:    The eval.txt help file is too big.
Solution:   Split off testing support to testing.txt.  Move function details
            to where the functionality is explained.
ed997adaa1

Vim commit 5477506a9f01d40fad2e8f0555bc37adee30478f
contains the duplicate tag fix in runtime/doc/testing.txt.
2021-04-27 09:21:26 -04:00
fbe18d9ca4 Merge pull request #14448 from jamessan/nightly-ci-permissions
Update permissions for vim-patches workflow
2021-04-27 07:22:28 -04:00
0ab1f9ff3f ci(gha/vim-patches): Create PR against branch running the workflow
Avoids hard-coding branch names.

[skip ci]
2021-04-26 23:45:40 -04:00
2601296c3f ci(gha): Rename nightly workflow to vim-patches
[skip ci]
2021-04-26 23:45:40 -04:00
3047a909a2 ci(gha/nightly): Enable "contents: write" permissions to setup PR
[skip ci]
2021-04-26 23:45:36 -04:00
ecf075eb29 Merge pull request #14416 from bfredl/floatorder
ui_compositior: handle overlapping displayed floats in the same tick
2021-04-26 22:11:35 +02:00
eeb1099bc4 ui_compositior: handle multiple displayed floats in the same tick
problem: the order of non-focuesed float opened before focused float is wrong (sunjon)
solution: check curwin and correct the order (bfredl)
2021-04-26 12:59:51 +02:00
bb7d3790bf Merge pull request #14435 from michaelb/doc_missing_nvim_open_term
doc : fixing missing @return in nvim_open_term doc
2021-04-24 14:03:35 +02:00
684b4ae736 doc : fixing missing @return in nvim_open_term doc 2021-04-24 12:47:52 +02:00
11728988dc Merge pull request #14429 from ckipp01/force
[LSP] - Don't automatically force shutdown on second restart.
2021-04-23 14:52:13 -07:00
8885ea7f24 lsp: make tagstack smarter motion-wise (#12262)
This commit prevents two things regarding the tagstack and jumping to
locations:

  - Pushing the same item twice in a row

  - Pushing an item where the destination is the same as the source

Both prevent having to press CTRL-T additional times just to pop items
that don't make the cursor move.
2021-04-23 14:50:35 -07:00
d650c654a8 Merge pull request #14432 from mjlbach/revert_14428
Revert "lsp: fix blocking in closing of clients"
2021-04-23 12:49:40 -07:00
4eb29e079a Revert "lsp: fix blocking in closing of clients"
This reverts commit 2e6c09838f.

* Fixes #14428
* This commit caused neovim to close while open handles to the uv timer
  to kill active language servers were still open
2021-04-23 12:17:00 -07:00
be494023d8 lsp: check if config is nil 2021-04-23 20:56:44 +02:00
4de404a681 lsp: sort diagnostics by severity (#14372)
Allow to sort diagnostics (and thus signs and virtual text) by severity, so that
the most important message is shown first.

    vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(
      vim.lsp.diagnostic.on_publish_diagnostics, {
        severity_sort = true,
      }
    )

Fixes https://github.com/neovim/neovim/issues/13929
2021-04-23 20:09:56 +02:00
2a77d9d8a4 Don't automatically force shutdown on second restart.
This is maybe a bit of a niche case, but I hit on this often as I'm
developing a server, and therefore continually restarting it to get the
latest changes of the server. Previously, I could only do this once
since if you send in a request to restart/shut down the server, it will
register it as a `tried_graceful_shutdown = true` meaning that the next
restart would force it to be killed instead of another graceful exit.

Instead, this changes the name a bit and now it will only mark
`graceful_shutdown_failed = true` _if_ it actually fails to gracefully
shutdown. This change allows for a user to restart multiple times in a
situation like mine where nothing is going wrong, but I just want to
restart continually as I'm developing without having to close and
reopen.
2021-04-23 14:26:33 +02:00
bb33727922 vim-patch:8.2.2776: :mksession uses current value of 'splitbelow' and 'splitright' (#14398)
Problem:    :mksession uses current value of 'splitbelow' and 'splitright'
            even though "options" is not in 'sessionoptions'. (Maxim Kim)
Solution:   Save and restore the values, instead of setting to the current
            value. (closes vim/vim#8119)
0995c81f2f

Patch v8.2.1682 is not ported.
Replace "goto fail;" with "return FAIL;".
2021-04-22 08:14:42 -04:00
0559d3f9c6 Improvements to tests 2021-04-22 17:09:18 +06:00
8402865cba lua: make vim.cmd an alias of vim.api.nvim_exec() (#14401)
Previously vim.cmd was an alias of nvim_command().

From now on it is an alias of nvim_exec().
2021-04-22 13:02:02 +02:00
4570d04b16 Merge pull request #14411 from seandewar/vim-8.2.1588
vim-patch:8.2.1588 - port `prompt_getprompt()`
2021-04-21 21:23:04 -04:00
c37eaf5746 Merge pull request #14417 from jamessan/ci-update
GHA updates
2021-04-21 23:49:54 +02:00
ff198bb78a fix(oldtest): fix assert_match() for :buffers t
Previous pattern could cause test to fail if ":buffers t" reported
"1 second ago".
2021-04-21 14:55:04 +01:00
65f35e0c7d vim-patch:8.2.1588: cannot read back the prompt of a prompt buffer
Problem:    Cannot read back the prompt of a prompt buffer.
Solution:   Add prompt_getprompt(). (Ben Jackson, closes vim/vim#6851)
077cc7aa0e

Updated prompt_getprompt() doc to cb80aa2d53
and removed mention of method syntax usage (not supported by Nvim).
2021-04-21 14:55:04 +01:00
805eb81ccd oldtest: port test_prompt_buffer.vim
Included from before v8.2.1588. Required for v8.2.1588.
Many tests use stuff like term_sendkeys() which is N/A, so are skipped.
2021-04-21 14:54:51 +01:00
60870d1531 eval: port tv_get_buf_from_arg()
Cherry-picked from v8.2.1562, but uses Nvim's tv_check_str_or_nr().
Required for v8.2.1588.

It isn't used for f_bufnr() to avoid a double error message if the first
argument isn't a number or string similiar to what's seen in Vim.
2021-04-21 11:29:47 +01:00
01493e7990 api: fix nvim_exec() silencing behaviour (#14413)
Previously nvim_exec would silent output no matter whether output
is true or false.
Now output is only silent and captured when output is true.
2021-04-21 10:41:37 +02:00
d7f9e58e40 gitignore: add vim patches (#14412) 2021-04-21 09:29:16 +02:00
62df537543 ci(gha/release): Enable "contents: write" permission to publish release 2021-04-21 00:32:38 -04:00
491708c989 ci(gha/win): Specify valid directory for DEPS_BUILD_DIR 2021-04-21 00:14:51 -04:00
9a01833d90 ci(gha): Simplify clang installation 2021-04-21 00:14:51 -04:00
74f8196935 ci(gha): Update to clang-12 2021-04-21 00:14:43 -04:00
02909d150e win/package: update wintools.zip (#14408)
This does not have 7za.exe and tidy.exe.

Ref: https://github.com/neovim/neovim/issues/14078
2021-04-20 15:54:22 +02:00
eef5a627bf doc: port changes for locale-based :sort
Cherry-picked from 3132cddd20.
2021-04-20 10:12:10 +01:00
b530221126 vim-patch:8.2.2287: sort test fails when locale is French Canadian
Problem:    Sort test fails when locale is French Canadian.
Solution:   Expect a different sort order. (Dominique Pellé, closes vim/vim#7609)
cec77d4530
2021-04-20 10:12:09 +01:00
b5dbd156f9 vim-patch:8.2.2286: sort test fails when locale is Canadian English
Problem:    Sort test fails when locale is Canadian English. (Neil H Watson)
Solution:   Expect a different sort order. (closes vim/vim#7609)
fefa6c347e
2021-04-20 10:12:09 +01:00
8c55a16e7d vim-patch:8.2.1946: sort() with NULL string not tested
Problem:    sort() with NULL string not tested.
Solution:   Add a test.  use v:collate. (Dominique Pellé, closes vim/vim#7247)
35efa22ff2
2021-04-20 10:12:09 +01:00
a83292685b vim-patch:8.2.1935: sort test fails on Mac
Problem:    Sort test fails on Mac.
Solution:   Disable the sort test with locale on Mac.
578f4cc7d0
2021-04-20 10:12:09 +01:00
6a0b8cbd81 vim-patch:8.2.1933: cannot sort using locale ordering
Problem:    Cannot sort using locale ordering.
Solution:   Add a flag for :sort and sort() to use the locale. (Dominique
            Pellé, closes vim/vim#7237)
55e29611d2
2021-04-20 10:12:02 +01:00
7bf62ab022 win/package: remove cat,tidy (#14402)
Neovim should not bundle external tools
that are not needed in the runtime environment.

cat.exe is meant for tests only.
Install a mingw/msys2/busybox environment which bundle cat.exe.
tidy.exe was never used in tests and is not required in Neovim runtime.
busybox and tidy.exe can be installed via scoop.

Ref: https://github.com/neovim/neovim/issues/14078
2021-04-20 01:02:42 -04:00
1d72b6e4cd eval: port v:collate
Cherry-picked from patch v8.2.0988. Required for patch v8.2.1933.
2021-04-20 02:03:46 +01:00
96f62394cf vim-patch:8.2.0174: various commands not completely tested
Problem:    Various commands not completely tested.
Solution:   Add more test cases. (Yegappan Lakshmanan, closes vim/vim#5551)
5d98dc2a48
2021-04-20 01:50:56 +01:00
26bd5a58df Merge pull request #14180 from oberblastmeister/lsp_exit_perf
fix slow closing of lsp clients when exiting vim
2021-04-19 17:35:58 -07:00
2e6c09838f lsp: fix blocking in closing of clients 2021-04-19 20:04:08 -04:00
66f9dd3c6e README.md: remove part of Install from source (#14368)
The entry "To skip bundled (third-parth/*) dependencies:" contains
inappropriate content.

- Lack of description of lua-luv-dev.
- Lack of description of libtree-sitter-dev.
- Contains libutf8proc-dev, which is no longer needed.
- The package libvterm-dev is out of date and probably unusable.

Therefore, it is not possible to build according to this description.
Also, there are only descriptions for Debian and Ubuntu. For these reasons,
this item will be deleted.
2021-04-18 17:31:43 +02:00
e343437bb6 Merge pull request #12323 from da-x/orphaned-signs
Handle 'orphaned signs' on line deletion for signcolumn >= 2
2021-04-18 17:12:41 +02:00
a129887c00 vim-patch:8.2.2773: PSL filetype not recognized (#14389)
Problem:    PSL filetype not recognized.
Solution:   Add a filetype pattern. (Daniel Kho, closes vim/vim#8117)
112a006417
2021-04-17 22:41:51 -04:00
63b64ebab0 Merge pull request #14385 from chentau/extmark_delete
Extmarks: remove `curbuf->deleted_bytes2` from `op_delete`
2021-04-17 09:25:44 +02:00
5b8575fa0d test_signs.vim: adjust for sign removal on line deletion 2021-04-17 10:11:17 +03:00
f2ed7605da Handle 'orphaned signs' on line deletion for signcolumn >= 2 2021-04-17 10:11:17 +03:00
7de75f0993 Merge pull request #14365 from chentau/extmark_delbytes_move
Extmarks: flush curbuf->deleted_bytes2 after calling do_move
2021-04-17 08:58:00 +02:00
e32eaf6538 extmarks: remove curbuf->deleted_bytes2 from op_delete 2021-04-16 23:42:53 -07:00
6974d0c6c1 lsp: deep copy vim.lsp.log when reloading
If vim.lsp.log is loaded the second time,
the vim.log.levels will be modified with additional
entries from 0-5.
This will cause the require to fail as level:lower does
not exists on numbered value.
2021-04-16 11:43:20 +01:00
a6504ec339 Merge pull request #13684 from pohzipohzi/input
doc: add description for cancelreturn option in input()
2021-04-16 09:47:45 +02:00
fe808f02f6 Merge pull request #14355 from janlazo/vim-8.1.2313
vim-patch:8.1.2313,8.2.{2046,2769}
2021-04-15 21:55:56 -04:00
d8e7fbe193 Merge pull request #14367 from janlazo/vim-8.2.2046
vim-patch:8.2.{265,2761,2764}
2021-04-15 21:54:04 -04:00
97288e73c2 vim-patch:8.2.2764: memory leak when default function argument is allocated
Problem:    Memory leak when default function argument is allocated.
Solution:   Free the expression result.
b47bed2f7a
2021-04-15 18:30:04 -04:00
7d3f31c064 vim-patch:8.2.2761: using "syn include" does not work properly
Problem:    Using "syn include" does not work properly.
Solution:   Don't add current_syn_inc_tag to topgrp. (Jaehwang Jerry Jung,
            closes vim/vim#8104)
2e240bd428

Cherry-pick AssertHighlightGroups from patch v8.2.2068.
2021-04-15 18:30:04 -04:00
eb93399d70 vim-patch:8.2.0265: "eval" after "if 0" doesn't check for following command
Problem:    "eval" after "if 0" doesn't check for following command.
Solution:   Add "eval" to list of commands that check for a following command.
            (closes vim/vim#5640)
a76b31542e
2021-04-15 18:30:03 -04:00
b34dc4c458 ex_cmds: port :eval
Cherry-picked from patch v8.1.1807.
Required for patch v8.2.2761.
2021-04-15 18:30:03 -04:00
011cfc538c vim-patch:8.2.2769: Modula-3 config files are not recognized
Problem:    Modula-3 config files are not recognized.
Solution:   Add filetype patterns. (Doug Kearns)
6bc00699c5
2021-04-15 18:08:55 -04:00
b8c3bb6790 vim-patch:8.1.2313: debugging where a delay comes from is not easy
Problem:    Debugging where a delay comes from is not easy.
Solution:   Use different values when calling ui_delay().
eda1da0c9a
2021-04-15 18:06:51 -04:00
94b10d25da vim-patch:8.2.2046: some test failures don't give a clear error
Problem:    Some test failures don't give a clear error.
Solution:   Use assert_match() and assert_fails() instead of assert_true().
            (Ken Takata, closes vim/vim#7368)
5dc4e2f883
2021-04-15 18:06:35 -04:00
b8c0fac762 Merge pull request #14370 from oberblastmeister/lsp_buf_request_sync
refactor lsp_buf_request_sync to also have an async method
2021-04-15 13:32:07 -07:00
ef5314ce59 lsp: add lsp.buf_request_all for invoking asynchronous callbacks
fixed nil issue

changed poll to 10

changed wording

added docs to once

comma

english
2021-04-15 12:54:59 -04:00
5a36d413fb flush curbuf->deleted_bytes2 after calling do_move 2021-04-14 21:47:21 -07:00
d19348923e Merge pull request #14364 from mhinz/gitignore-vim-src
gitignore: handle case where .vim-src is a symlink
2021-04-15 05:22:21 +02:00
e915ec47f3 tests/functional: delete temp file created during test run (#14363) 2021-04-14 20:42:34 -04:00
3b01e37d09 Merge pull request #14358 from bfredl/decodeco
decoration: Clean up duplicate Decoration attributes + bonus hl_eol flag
2021-04-15 01:12:36 +02:00
9471b15936 Merge pull request #14366 from mfussenegger/text-document-version-zero
lsp: Accept text document edits with version zero
2021-04-14 13:01:08 -07:00
046991e4d5 lsp: Remove vim.NIL handling from apply_text_document_edit
The rpc layer normalizes `vim.NIL` to `nil`, so the scenario tested
should never happen.
2021-04-14 21:42:03 +02:00
b67f689e4c lsp: Accept text document edits with version zero
There were a couple of reports of "Buffer X newer than edits" problems.
We first assumed that it is incorrect for a server to send 0 as a
version - and stated that they should send a `null` instead, given that
in the specification the `textDocument` of a `TextDocumentEdit` is a
`OptionalVersionedTextDocumentIdentifier`.

But it turns out that this was a change in 3.16, and in 3.15 and earlier
versions of the specification it was a `VersionedTextDocumentIdentifier`
and language servers didn't have a better option than sending `0` if
they don't keep track of the version numbers.

So this changes the version check to always accept `0` values.

See

- https://github.com/neovim/neovim/issues/12970
- https://github.com/neovim/neovim/issues/14256
- https://github.com/haskell/haskell-language-server/pull/1727
2021-04-14 21:29:32 +02:00
d9c7adc64c doc: prefer "python -m pip" (#14353)
The current guidance for install Python packages is to use

    python -m pip install <package_name>

Instead of

    pip install <package_name>

This ensures that one is using the version of pip that is tied to the
environment's interpreter (and, thusly, its packages).  This has [been
endorsed by a core
maintainer](https://snarky.ca/why-you-should-use-python-m-pip/) as
being the recommended way to invoke pip.

As there currently are a few places where the old invocation was used,
attempt to bring them in line.

Fixes #14234
2021-04-14 20:48:13 +02:00
6ab4c8f955 doc: port prompt-buffer section (#14342)
[skip ci]

Changes from original include:
- "See |terminal-window|" -> "See |terminal|".
- Remove mention of using CTRL-W window commands in insert mode.
- Converted usage example to use the Nvim job and channel API.
- Removed logging from usage example, as ch_logfile() has no direct Nvim
  counterpart.
- Fixed some small grammar/spelling mistakes.
2021-04-14 20:39:37 +02:00
57220e7cc3 gitignore: handle case where .vim-src is a symlink
I build Vim and Nvim from source and have both repos cloned locally. To prevent
vim-patch.sh from downloading the Vim source once again to /.vim-src/, I usually
use a symlink pointing to the already existing Vim repo.

The pattern "/.vim-src" works for both, a directory or a symlink.
2021-04-14 20:14:54 +02:00
7b488314d0 decoration: Clean up duplicate Decoration attributes + bonus hl_eol flag 2021-04-14 13:04:33 +02:00
cd3e74201a lsp: fix _make_floating_popup_size when wrap_at is nil (#14359) 2021-04-14 13:01:14 +02:00
e652b2987a Merge pull request #14046 from nvim-treesitter/feature/language-tree-directive-config
feat(treesitter): allow injections to be configured through directives
2021-04-14 05:36:05 +02:00
6b16ec701e lsp: fix off-by-one in line diagnostic highlighting 2021-04-14 02:11:47 +02:00
391fe1064e Merge pull request #14119 from mfussenegger/lsp-debounce
lsp: Add a flag to debounce didChange notifications
2021-04-13 15:03:13 -07:00
2001ba2c6a Merge pull request #14324 from mhinz/lsp-border-float-placement 2021-04-13 23:43:50 +02:00
720c6353b5 lsp: Add a flag to debounce didChange notifications
Would help with cases as reported in https://github.com/neovim/neovim/issues/14087
2021-04-13 21:02:30 +02:00
c9817603cf Merge pull request #14318 from chentau/extmark_luado
extmark: splice extmarks on :luado
2021-04-13 15:00:42 +02:00
ef3f05c432 tutor: force one sign per line (#14352)
The only thing setting signs in the tutor buffer (buftype=nofile), should be
tutor.vim itself.

Instead of endlessly piling up new signs per line, just unplace any sign on the
line before placing a new one.

Closes https://github.com/neovim/neovim/issues/13808
Closes https://github.com/neovim/neovim/pull/13809
2021-04-13 12:13:44 +02:00
4a36ec6da0 float: add "solid" border style (#14310)
It looks solid with the default `FloatBorder` group.

If you set the bgcolor of FloatBorder to the same color as for FloatNormal, you
effectively get an "1-cell padding".
2021-04-12 20:51:05 +02:00
ff43d9597e extmark: splice extmarks on :luado 2021-04-12 11:33:50 -07:00
3831825167 lsp: correct float placement when using borders
Because borders add up to 2 to the height of a float, we need to subtract that
from the anchor position, when opening a float in the lower half of the window.
2021-04-12 19:54:54 +02:00
a215adabc1 lsp: make sure borders are always inside of the screen
Add a helper function to get the additional width a border adds to a float to
make sure that the border is always inside the visible screen.
2021-04-12 19:51:18 +02:00
3893027200 Merge pull request #14337 from janlazo/vim-8.2.0409
vim-patch:8.1.{1841,2416},8.2.{409,1920,2050}
2021-04-11 21:43:45 -04:00
9b77a2bf60 Merge pull request #14343 from jamessan/doc-fix
fix(doc): Add '/site' to stdpath('data') example in `:help 'rtp'`
2021-04-11 20:07:11 -04:00
fa9e5ab0ea test/old: ':execute' does not suppress range error
:2,1>
should trigger backwards range error
but it is suppressed for inccomand.

:execute "2,1>"
does not suppress the error.
2021-04-11 19:14:48 -04:00
4ff70cc58b vim-patch:8.1.2416: loading menus sets v:errmsg
Problem:    Loading menus sets v:errmsg.
Solution:   Avoid setting v:errmsg and add a test for that. (Jason Franklin)
e24c5b3332
2021-04-11 17:05:42 -04:00
750f2b686b vim-patch:8.1.1841: no test for Ex shift commands
Problem:    No test for Ex shift commands.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#4801)
d5e3cc11d3

Comment out some tests because of Neovim inccomand.
2021-04-11 17:05:42 -04:00
d2a9b29e1b vim-patch:8.2.1920: listlbr test fails when run after another test
Problem:    Listlbr test fails when run after another test.
Solution:   Add test separately to list of test targets.
cf4d454df0
2021-04-11 17:05:42 -04:00
a0d3461bf8 vim-patch:8.2.2050: search test contains unneeded sleeps
Problem:    Search test contains unneeded sleeps.
Solution:   Rename the function, remove sleeps. (Christian Brabandt,
            closes vim/vim#7369)
6bed0dbc85
2021-04-11 17:05:41 -04:00
20e5cb151b vim-patch:8.2.0409: search test leaves file behind
Problem:    Search test leaves file behind.
Solution:   Delete the file.  Also use Check commands.
b68df220c5

Reorder tests based on test_search.vim in patch v8.2.0409.
2021-04-11 17:05:41 -04:00
fd908ded50 Merge pull request #14339 from janlazo/vim-8.2.0044
vim-patch:8.2.{44,45,69,2319}
2021-04-11 17:04:37 -04:00
b2971ebeed vim-patch:8.2.2319: "exptype_T" can be read as "expected type"
Problem:    "exptype_T" can be read as "expected type".
Solution:   Rename to "exprtype_T", expression type.
657137ca48

Vim9 changes omitted.
2021-04-11 16:35:55 -04:00
ca214311d2 vim-patch:8.2.0069: ETYPE_ is used for two different enums
Problem:    ETYPE_ is used for two different enums.
Solution:   Rename one to use EXPR_.
87396072c5
2021-04-11 16:35:47 -04:00
de16fbcc57 vim-patch:8.2.0045: script test fails
Problem:    Script test fails.
Solution:   For numbers "is" and "isnot" work like "==" and "!=".
ec57ec692e
2021-04-11 16:35:14 -04:00
53cbfd0220 vim-patch:8.2.0044: expression type is used inconsistently
Problem:    Expression type is used inconsistently.
Solution:   Add "ETYPE_IS" and "ETYPE_ISNOT" as separate enum values.  Rename
            "TYPE_" to "ETYPE_" to avoid confusion.
07a3db89b8
2021-04-11 16:34:53 -04:00
2e156a3b7d Merge pull request #14340 from mjlbach/fix_clangd_nix
contrib: add clang-tools to nix flake
2021-04-10 16:54:56 -07:00
9699f3be10 fix(doc): Add '/site' to stdpath('data') example in :help 'rtp'
[skip ci]
2021-04-10 13:45:48 -04:00
062c64e24c test/ui/cmdline: set notimeout to remove indeterminism (#14338) 2021-04-10 12:36:54 -04:00
6435b46b48 Merge pull request #14317 from chentau/extmark_sub
extmark: correct extmark_splice call with substitute and inccommand when replacing with escaped backslashes
2021-04-10 18:14:42 +02:00
f695457f81 contrib: add clang-tools to nix flake 2021-04-10 08:28:16 -07:00
1b030f889c doc: advertise nanotee/nvim-lua-guide (#14332) [skip ci]
Mention https://github.com/nanotee/nvim-lua-guide at the beginning of ":h lua" as well as ":h lua-vimscript".

Closes #12369 .
2021-04-09 19:36:23 +02:00
e3d0fb0d3c Merge pull request #14321 from jamessan/ci-fixes
Some small cleanups/diagnostic improvements
2021-04-09 09:48:35 -04:00
8a1a256b44 Merge pull request #14326 from janlazo/vim-8.2.0623
vim-patch:8.2.{623,1822,2738}
2021-04-09 08:25:08 -04:00
343ee2d254 extmark: correct extmark_splice call with inccommand 2021-04-09 00:34:02 -07:00
82ac44d01f vim-patch:8.2.2737: status line not updated when local 'statusline' option set (#14325)
Problem:    Status line not updated when local 'statusline' option set.
Solution:   Check the 'statusline' option of each window.
d8db838392
2021-04-08 23:14:08 -04:00
b35daa986f vim-patch:8.2.2738: extending a list with itself can give wrong result
Problem:    Extending a list with itself can give wrong result.
Solution:   Remember the item before where the insertion happens and skip to
            after the already inserted items. (closes vim/vim#1112)
dcae51facc

Originated from Neovim commit 7ceebacb3f.
2021-04-08 22:58:13 -04:00
cfeaea0d3e vim-patch:8.2.1822: list test doesn't fail
Problem:    List test doesn't fail.
Solution:   Adjust the test for NULL list handling.
f57497276b

Comment out test cases that modify null lists
because Neovim throws error messages instead of silently failing.
Null lists should be read-only and constant.
https://github.com/neovim/neovim/issues/4615
2021-04-08 22:39:28 -04:00
0d0eeff8a3 eval: add v:_null_string
Replacement for Vim's test_null_string().
Vim uses it to verify that its codebase handles null strings.
Preparation for the Test_null_list() in patch v8.2.1822.

Use v:_null_string, not non-existent env var, for null string tests.

Mention v:_null_string in id() because id(v:_null_string) returns (nil).
2021-04-08 22:36:20 -04:00
ec273a2c6b vim-patch:8.2.0623: typo in test comment
Problem:    Typo in test comment. (Christ van Willegen)
Solution:   Avoid mixing up a data structure with a body part.
f7b398c6a9

Cherry-pick Test_dict_lock_operator() from patch v8.2.0619.
2021-04-08 18:53:36 -04:00
ed3c0a27c7 Merge pull request #14314 from janlazo/vim-8.2.2720
vim-patch:8.0.{1505,1511},8.2.{1304,1305,1393,1508,1791,2720}
2021-04-08 09:32:37 -04:00
6a03bcc3c2 fix(test): Detect more core filenames 2021-04-08 08:13:39 -04:00
ce9b5848f9 Add more info to debug messages
[skip ci]
2021-04-08 08:13:39 -04:00
8caf841308 Lower "closed by the client" message level to INFO
[skip ci]
2021-04-08 07:44:51 -04:00
d99ce54252 vim-patch:8.2.1305: some tests are still old style
Problem:    Some tests are still old style.
Solution:   Convert tests 52 and 70 to new style. (Yegappan Lakshmanan,
            closes vim/vim#6544)  Fix error in FinishTesting().
622b3568fa

Omit test_mzscheme.vim.
Neovim does not support "mzscheme" feature.
2021-04-08 07:28:58 -04:00
c3c3425b76 vim-patch:8.2.1791: Vim9: debugger test fails
Problem:    Vim9: debugger test fails.
Solution:   Use "var" instead of "let".
1bdae40323
2021-04-08 07:28:58 -04:00
c0f20333c8 vim-patch:8.2.1508: not all debugger commands covered by tests
Problem:    Not all debugger commands covered by tests.
Solution:   Add tests for going up/down in the stack. (Ben Jackson,
            closes vim/vim#6765)
c63b72b6dc
2021-04-08 07:28:57 -04:00
bf6afcce20 vim-patch:8.2.1393: insufficient testing for script debugging
Problem:    Insufficient testing for script debugging.
Solution:   Add more tests. (Ben Jackson)
b7f4fa5177

Check terminal feature in individual tests, not the test suite.
Avoid code coverage loss in test_debugger.vim.
2021-04-08 07:28:57 -04:00
1b40447df3 vim-patch:8.2.1304: debug backtrace isn't tested much
Problem:    Debug backtrace isn't tested much.
Solution:   Add more specific tests. (Ben Jackson, closes vim/vim#6540)
6ca6ca4889

Port runtest.vim fix from patch v8.2.1305.
2021-04-08 07:28:57 -04:00
69bab7e35d vim-patch:8.0.1511: some code for the debugger watch expression is clumsy
Problem:    Some code for the debugger watch expression is clumsy.
Solution:   Clean up the code.
3198870137
2021-04-08 07:28:46 -04:00
1a1fe58f7e vim-patch:8.0.1505: debugger can't break on a condition
Problem:    Debugger can't break on a condition. (Charles Campbell)
Solution:   Add ":breakadd expr". (Christian Brabandt, closes vim/vim#859)
c6f9f739d3

Do not port "has_watchexpr()" to avoid dead code.
"has_watchexpr()" always returns 0 because "debug_expr" is always 0.

Restore "eval_expr()" as a wrapper to allocate "typval_T" for "eval0()".
Remove it in later patches.

Include "typval_compare()" changes from patch v8.1.0958,
partially ported in 8b60368c1b.

Close https://github.com/neovim/neovim/pull/12373

N/A patches for version.c:

vim-patch:8.2.2720: GTK menu tooltip moves the cursor

Problem:    GTK menu tooltip moves the cursor.
Solution:   Position the cursor after displaying the tooltip.  Do not show the
            tooltip when editing the command line.
01ac0a1f66
2021-04-08 07:28:46 -04:00
afae96e69a doc: add description for cancelreturn option in input() 2021-04-08 17:56:31 +08:00
48e8057285 Merge pull request #14302 from vigoux/fix-8449
Update docs
2021-04-07 09:14:49 -07:00
cd75d3289a Merge pull request #14200 from teto/treesitter-checkhealth
feat: treesitter checkhealth
2021-04-07 16:40:56 +02:00
d7a1bbd81a docs: add priority option in buf_set_extmark 2021-04-07 15:36:46 +02:00
91cdc11984 Merge pull request #14309 from mjlbach/feature/hover_return_win_buf
lsp: hover window should return buf/winnr from focusable float
2021-04-07 00:58:32 -07:00
c2298503ce Merge pull request #14308 from mjlbach/lsp_update_docs
lsp: update documentation on window borders
2021-04-07 00:29:39 -07:00
5610e8a4ac lsp: hover window should return buf/winnr from focusable float 2021-04-07 00:21:56 -07:00
2c0bcc539a lsp: update documentation on window borders 2021-04-06 23:51:15 -07:00
b518b9076f Merge pull request #14299 from mjlbach/issue_template_improvements
issue template: add reference to discourse and minimal config in lsp issue template
2021-04-06 11:22:04 -07:00
952508d405 fix(ts): move checkhealth in runtime/vim 2021-04-06 19:03:04 +02:00
e8bc3d717e feat(ts): include parser ABI version in checkhealth 2021-04-06 19:02:58 +02:00
86ced59a6a feat: treesitter checkhealth 2021-04-06 18:54:22 +02:00
370469be25 Merge pull request #14300 from elianiva/feat/lsp_border_config
feat(lsp): make hover/signature_help borders configurable
2021-04-05 22:44:28 -07:00
c84b1b1ad0 feat(lsp): make hover/signature_help borders configurable
change hl groups for the example

rename borders -> border
2021-04-06 12:13:31 +07:00
bbdd002033 Merge pull request #14290 from Shougo/vim-8.2.2704
[RFC] vim-patch:8.2.2704, 8.2.2707
2021-04-05 20:08:57 -04:00
cc9f7e717b Merge pull request #14291 from janlazo/vim-8.2.2709
vim-patch:8.2.{2709,2711,2714,2717}
2021-04-05 20:01:07 -04:00
dcb447dafd issue template: add reference to discourse and minimal config in lsp issue template 2021-04-05 14:47:59 -07:00
ce0153e4f7 vim-patch:8.2.2714: filetype pattern ending in star is too far up
Problem:    Filetype pattern ending in star is too far up.
Solution:   Move down to where patterns ending in star belong. (closes vim/vim#8065)
409da842db
2021-04-05 11:29:35 -04:00
62a3312b88 vim-patch:8.2.2711: "gj" in a closed fold does not move out of the fold
Problem:    "gj" in a closed fold does not move out of the fold. (Marco Hinz)
Solution:   Add a check for being in a closed fold. (closes vim/vim#8062)
3c49e74e18

N/A patches for version.c:

vim-patch:8.2.2709: the GTK GUI has a gap next to the scrollbar

Problem:    The GTK GUI has a gap next to the scrollbar.
Solution:   Calculate the scrollbar padding for GTK. (closes vim/vim#8027)
26af8e54ff

vim-patch:8.2.2717: GTK menu items don't show a tooltip

Problem:    GTK menu items don't show a tooltip.
Solution:   Add a callback to show the tooltip. (Leonid V. Fedorenchik,
            closes vim/vim#8067, closes vim/vim#7810)
ce5b06a6a9
2021-04-05 11:29:35 -04:00
2c4e9c5245 lsp: floating window improvements (#14207)
* remove left/right padding feature from trim_and_pad
* use invisible borders by default on floating windows
2021-04-05 15:43:08 +02:00
9fbeaf7771 vim-patch:8.1.2205: sign entry structure has confusing name (#14289)
Problem:    Sign entry structure has confusing name.
Solution:   Rename signlist_T to sign_entry_T and prefix se_ to the fields.
2021-04-05 06:16:44 -04:00
21a3d1a511 Fix the comments 2021-04-05 13:41:39 +09:00
1996028c5c vim-patch:8.2.2707: adding a lot of completions can still be a bit slow
Problem:    Adding a lot of completions can still be a bit slow.
Solution:   Add the check for CP_FAST. (Ben Jackson)
ceb0619433
2021-04-05 09:24:11 +09:00
356a35a848 vim-patch:8.2.2704: adding a lot of completions can be a bit slow
Problem:    Adding a lot of completions can be a bit slow.
Solution:   Use fast_breakcheck() instead of ui_breakcheck() when adding a
            list of completions. (Ben Jackson, closes vim/vim#8061)
440cf096fa
2021-04-05 09:22:26 +09:00
9b2d4ff625 Merge pull request #14227 from bfredl/bordaa3
Border: allow to enable/disable specific border edges
2021-04-05 00:21:51 +02:00
160c9fd126 Merge pull request #14199 from bfredl/chansend2
api: fix use-after-free in nvim_chan_send
2021-04-04 22:41:01 +02:00
0f187700ab vim-patch:8.2.0295: highlighting for :s wrong when using different separator (#14286)
Problem:    Highlighting for :s wrong when using different separator.
Solution:   Use separat argument for search direction and separator. (Rob
            Pilling, closes vim/vim#5665)
c036e87bd7
2021-04-04 14:43:22 -04:00
a4d3804837 Border: allow to enable/disable specific border edges 2021-04-04 18:32:31 +02:00
3d6831a30a api: fix use-after-free in nvim_chan_send 2021-04-04 18:11:48 +02:00
76f5c72860 Merge pull request #14063 from lewis6991/master
vim-patch:8.1.{1631,1682,1899}: sign improvements
2021-04-04 10:28:16 -04:00
ce976bf355 Merge pull request #14278 from chentau/extmark_retab
extmark: buffer update fixes for `noexpandtab` and `:retab`
2021-04-04 09:42:34 +02:00
8e496b9dfd Merge pull request #14268 from erw7/fix-p_ch-problem
screen: fix problem with p_ch
2021-04-04 12:04:36 +09:00
8ed0a0d4db Merge pull request #14094 from erw7/improve-get-bg
tui: improve support for tmux, GNU Screen
2021-04-04 12:03:33 +09:00
0dfb4e2765 Merge pull request #14282 from janlazo/vim-8.2.2695
vim-patch:8.2.{2695,2697,2700,2701,2702}
2021-04-03 21:09:26 -04:00
53cceda52d vim-patch:8.2.2702: compiler completion test fails when more scripts are added
Problem:    Compiler completion test fails when more scripts are added.
Solution:   Add a more generic pattern.
c17ba791a9
2021-04-03 20:31:17 -04:00
ffef1519ca vim-patch:8.2.2697: function list test fails
Problem:    Function list test fails.
Solution:   Add missing function. (Yegappan Lakshmanan)
0df6030145
2021-04-03 20:26:05 -04:00
3a623fd5cf vim-patch:8.2.2695: cursor position reset with nested autocommands
Problem:    Cursor position reset with nested autocommands.
Solution:   Only check and reset line numbers for not nested autocommands.
            (closes vim/vim#5820)
1e6bbfb560

N/A patches for version.c:

vim-patch:8.2.2700: nested autocmd test fails sometimes

Problem:    Nested autocmd test fails sometimes.
Solution:   Wait for the job to finish.
6437475ffb

vim-patch:8.2.2701: order of removing FORTIFY_SOURCE is wrong

Problem:    Order of removing FORTIFY_SOURCE is wrong.
Solution:   Use the more specific pattern first.
26f201345d
2021-04-03 20:25:59 -04:00
d82b599ea5 vim-patch:8.1.1899: sign_place() does not work as documented
Problem:    sign_place() does not work as documented.
Solution:   Make accept line numbers like line(). (Yegappan Lakshmanan,
            closes #4848)
2021-04-03 23:56:55 +01:00
5257bce979 vim-patch:8.1.1682: placing a larger number of ...
...signs is slow

Problem:    Placing a larger number of signs is slow.
Solution:   Add functions for dealing with a list of signs. (Yegappan
            Lakshmanan, closes #4636)
2021-04-03 23:56:54 +01:00
0b7e5eeb62 vim-patch:8.1.1631: displaying signs is inefficient
+ support for neovim's dynamic width signcolumn

Problem:    Displaying signs is inefficient.
Solution:   Avoid making multiple calls to get information about a placed
            sign. (Yegappan Lakshmanan, closes #4586)
2021-04-03 23:39:56 +01:00
804ea22944 Merge pull request #14226 from bfredl/luarefcount
lua: track reference ownership with ASAN when present
2021-04-03 17:48:39 +02:00
2df527e1ff test/lsp: disable tracking in LSP tests (here be dragons) 2021-04-03 16:27:58 +02:00
7e799502e5 luaref: simplify handling of table callables and fix leak in vim.fn.call(table)
I AM THE TABLE
2021-04-03 16:27:58 +02:00
623fe4dc7e luaref: free decoration providers 2021-04-03 16:27:58 +02:00
a0b7bb4153 luaref: free all references in buffer_updates 2021-04-03 16:27:58 +02:00
eae4b1e5c2 luaref: fix leaks for global luarefs 2021-04-03 16:27:58 +02:00
5ed383057b lua: track reference ownership with ASAN when present 2021-04-03 16:27:58 +02:00
abdda66410 vim-patch:8.2.2694: when 'matchpairs' is empty every character beeps (#14279)
Problem:    When 'matchpairs' is empty every character beeps. (Marco Hinz)
Solution:   Bail out when no character in 'matchpairs' was found.
            (closes vim/vim#8053)  Add assert_nobeep().
5b8cabfef7
2021-04-03 08:49:39 -04:00
581b2bcde0 screen: fix problem with p_ch
When the screen is resized, p_ch is not re-set to the appropriate value.
As a result, access to invalid addresses was occurring.
2021-04-03 15:27:46 +09:00
f4224a12c0 Fix lualint warnings 2021-04-03 10:18:40 +06:00
7a6228d581 Add tests for nvim_set_hl() 2021-04-03 09:18:53 +06:00
7602c56050 extmark: fixes for noexpandtab and retab 2021-04-02 16:21:46 -07:00
6db3ba9df2 Merge pull request #14027 from dylanarmstrong/fix/13955-empty-paste-in-term-segfault
fix: segfault when pasting in term with empty buffer
2021-04-02 23:15:43 +02:00
42d2bbe7d0 chore: move check for paste size 2021-04-02 12:49:36 -05:00
8bea39f372 feat(treesitter): allow injections to be configured through directives 2021-04-02 12:48:16 -05:00
dde89730b4 vim-patch:8.2.2690: PowerShell files are not recognized (#14276)
Problem:    PowerShell files are not recognized.
Solution:   Recognize several PowerShell extension. (Heath Stewart,
            closes vim/vim#8051)
ef38bcf051

N/A patches for version.c:

vim-patch:8.2.2689: tiny build fails

Problem:    Tiny build fails.
Solution:   Add #ifdef around use of p_stl.
160a2b4dac

vim-patch:8.2.2691: autoconf may mess up compiler flags

Problem:    Autoconf may mess up compiler flags.
Solution:   Handle removing FORTIFY_SOURCE a bit better. (Vladimir Lomov,
            closes vim/vim#8049)
3fa5e64e0e
2021-04-02 13:44:25 -04:00
22ef4071f0 Merge pull request #14197 from theHamsta/file-handles-modeline
Fix #14192: Handle IO errors and close files in query.lua
2021-04-02 16:50:28 +02:00
43eb22d4c9 Fix #14192: Handle IO errors and close files in query.lua 2021-04-02 16:21:49 +02:00
f2df01900e Merge pull request #14188 from mfussenegger/treesitter-0194
treesitter: Update to 0.19.4+2
2021-04-02 15:50:46 +02:00
bfaf42a621 Merge pull request #14039 from theHamsta/fix-field-introspection
Fix(treesitter): Make treesitter.inspect_lang include last field name
2021-04-02 15:46:01 +02:00
cf6c23fb0f Merge pull request #14273 from janlazo/clang-warnings
clang: resolve logic error and dead store warnings
2021-04-02 09:21:25 -04:00
4f3396e128 clang/'Logic error': assert nonnull p_extra 2021-04-02 08:43:51 -04:00
49706a1842 clang/'Logic error': fix loop cond to avoid nullptr deref
nvim_set_decoration_provider() has insufficient null checks.
2021-04-02 08:38:37 -04:00
4d396271e1 clang/API: copy "" if orig_save is NULL
orig_save can be NULL if ExpandOne() is misused
if ExpandOne() is first called with mode "WILD_CANCEL" or "WILD_APPLY"
before other modes.
2021-04-02 08:30:16 -04:00
5bfad093b2 clang/'Dead store': remove dead assign in msg_may_trunc
Evaluating the expression without assignment is enough.
2021-04-02 08:23:41 -04:00
6d34b0b702 clang/'Dead store': do not assign fnamelen
Vim hasn't changed this line in buf_modname().
Assigning a value to fnamelen is useless
when evaluating strlen() is sufficient for the condition check.
2021-04-02 08:23:41 -04:00
484370f206 clang/'Logic error': cmd_source_buffer() requires nonnull param 2021-04-02 08:23:40 -04:00
ba3d626efb clang/'Logic error': avoid nullptr deref
mouse_find_win() can return NULL.
2021-04-02 08:23:40 -04:00
5bf94259c1 clang/'Logic error': set vcol in do_put() 2021-04-02 08:23:40 -04:00
3f7cd18c4a Merge pull request #14218 from steelsojka/bugfix/check-queries-exist
fix(treesitter): check highlight queries exist
2021-04-02 05:24:49 +02:00
da31f1c7dd doc: Fix typo in the help for <Cmd> where lhs was used instead of rhs (#14272) 2021-04-01 21:50:02 -04:00
a03be1e44f Merge pull request #14271 from mjlbach/feature/lsp_cwd
lsp: allow launching language servers with uv_spawn using cwd arg
2021-04-01 17:01:51 -07:00
3b01dd4183 lsp: allow launching language servers with uv_spawn using cwd arg 2021-04-01 14:24:37 -07:00
0bf24d3eb1 Merge pull request #14270 from janlazo/vim-8.2.2678
vim-patch:8.1.0986,8.2.{2678,2683,2686}
2021-04-01 16:55:50 -04:00
7959aaf781 vim-patch:8.2.2686: status line is not updated when going to cmdline mode
Problem:    Status line is not updated when going to cmdline mode.
Solution:   Redraw status lines if 'statusline' is set and going to status
            line mode. (based on patch from Justin M. Keyes et al.,
            closes vim/vim#8044)
ce0b75711a
2021-04-01 15:05:10 -04:00
b120bb8ea9 vim-patch:8.1.0986: rename() is not propertly tested
Problem:    rename() is not propertly tested.
Solution:   Add tests. (Dominique Pelle, closes vim/vim#4061)
ef8c956172

Skip Test_rename_fails() because 'blob' feature is not ported yet.

N/A patches for version.c:

vim-patch:8.2.2678: test for 'autoshelldir' does not reset the option

Problem:    Test for 'autoshelldir' does not reset the option.
Solution:   Reset the option after testing.
82820d9bf1

vim-patch:8.2.2683: build failure without the +eval feature

Problem:    Build failure without the +eval feature.
Solution:   Add #ifdef.
b91d3f857f
2021-04-01 11:58:02 -04:00
cee19696b6 Merge pull request #14222 from janlazo/v8.2.2655
vim-patch:8.2.{2655,2656}
2021-04-01 11:38:07 -04:00
11bea67a55 fix: allow accessing vim.treesitter.language without require 2021-04-01 16:51:36 +02:00
6e9e8eb382 test/old/win: debug Test_w_arg 2021-04-01 10:45:56 -04:00
a2bd2f220c fix: selectionrange over range for document symbols 2021-04-01 14:16:01 +02:00
3784827f8d vim-patch:8.2.2656: some command line arguments and regexp errors not tested
Problem:    Some command line arguments and regexp errors not tested.
Solution:   Add a few test cases. (Dominique Pellé, closes vim/vim#8013)
a2b3e7dc92

Cherry-pick Test_t_arg() from patch v8.2.0509.
2021-04-01 07:23:04 -04:00
3b04ba7544 vim-patch:8.2.2655: The -w command line argument doesn't work
Problem:    The -w command line argument doesn't work.
Solution:   Don't set 'window' when set with the -w argument. (closes vim/vim#8011)
0a1a6a1aa4

Cherry-pick Test_w_arg() from patch v8.2.0509.
2021-04-01 07:23:04 -04:00
3d25a72a60 Merge pull request #14264 from mjlbach/feature/handle_reloading_buffer
lsp: add on_reload callback for buffer edits outside of neovim
2021-04-01 01:08:39 -07:00
f738f089da Merge pull request #14262 from mjlbach/feature/lsp_did_save_autocommand
lsp: clear did_save handler autocommand on each attach
2021-04-01 00:53:47 -07:00
5dfa937e4a Merge pull request #14266 from mjlbach/fix/rename_workspace_symbol_request
lsp: fix textDocument/workspaceSymbol -> workspace/symbol
2021-04-01 00:37:28 -07:00
f87ae324bb lsp: fix textDocument/workspaceSymbol -> workspace/symbol 2021-03-31 23:53:07 -07:00
92e106ba23 lsp: add on_reload callback for buffer edits outside of neovim 2021-03-31 22:41:00 -07:00
08941e163e lsp: clear did_save handler autocommand on each attach 2021-03-31 20:23:17 -07:00
a177820420 Merge pull request #14259 from janlazo/fix-dictwatcherdel-crash
Fix dictwatcherdel crash
2021-03-31 19:22:11 -04:00
5e4fb9a7dd os/win: fix build failure 2021-03-31 17:46:43 -04:00
d55a69168f Merge pull request #14245 from tjdevries/tjdevries/ts_override_hl
ts: Add per-language highlight links
2021-03-31 19:57:50 +02:00
d50f99f08b fixup: remove unused test function 2021-03-31 18:09:03 +02:00
06c065469b ts: Add per-language highlight links 2021-03-31 18:09:00 +02:00
94c2ce2ce4 Merge pull request #14252 from tjdevries/tjdevries/ts_query_overrides
ts: Add per-language query overriding
2021-03-31 17:59:42 +02:00
1c5e347b8c more tests 2021-03-30 21:55:51 -04:00
d6cac809b0 tv_dict_watcher_notify: any_needs_free 2021-03-30 21:55:51 -04:00
aca002e7d5 test 2021-03-30 21:55:51 -04:00
7268d49c50 tv_dict_watcher_remove: delay freeing with busy queue 2021-03-30 21:55:50 -04:00
36caafeb28 Change QUEUE_FOREACH macro to use while instead of for 2021-03-30 21:55:50 -04:00
4c76b1e981 Test and initial fix for crash with dictwatcherdel
Fixes https://github.com/neovim/neovim/issues/11188.
2021-03-30 21:55:50 -04:00
c20ae3aadb Merge pull request #14251 from janlazo/vim-8.1.1193
vim-patch:8.1.{936,1193}
2021-03-30 21:51:51 -04:00
608c03298a vim-patch:8.1.0936: may leak memory when using 'vartabstop'
Problem:    May leak memory when using 'vartabstop'. (Kuang-che Wu)
Solution:   Fix handling allocated memory for 'vartabstop'. (closes vim/vim#3976)
55c77cf2ea
2021-03-30 19:56:13 -04:00
db47cf8153 Merge pull request #14233 from mjlbach/disable_utf16_conversion
lsp: use utf-8 when utf-16 not requested
2021-03-30 14:37:55 -07:00
0cadab1412 lsp: use utf-8 when utf-16 not requested 2021-03-30 14:14:09 -07:00
240cec9192 ts: Add language version to vim.treesitter (#14255) 2021-03-30 16:40:29 -04:00
d6209a7b84 fixup: Add a test and it is so pretty 2021-03-30 10:57:38 -04:00
04fb94cd80 ts: Add per-language query overriding 2021-03-30 08:25:11 -04:00
e491e77498 vim-patch:8.1.1193: typos and small problems in test files
Problem:    Typos and small problems in test files.
Solution:   Small improvements.
037c54f261

Include unmerged patch v8.0.1200 changes
because this patch depends on `set beloff=all` removed in 1 test.
2021-03-30 06:49:37 -04:00
f89bfa6869 vim-patch:8.2.2454: leading space can not be made visible (#14138)
Problem:    Leading space can not be made visible.
Solution:   Add "lead:" to 'listchars'. (closes vim/vim#7772)
91478ae49a
2021-03-29 21:26:11 -04:00
291f1ece7f added support for termux-clipboard : clipboard.vim (#14244)
Termux - Android terminal emulator
Link - https://termux.com/
2021-03-29 20:52:35 -04:00
3f447d928d Merge pull request #14248 from andymass/vim-8.2.2612
[RFC] vim-patch 8.2.{2612,2613}
2021-03-29 20:46:44 -04:00
3c497e214f Merge pull request #14238 from janlazo/vim-8.1.0958
vim-patch:8.1.{874,958,989,2380},8.2.{1621,2674}
2021-03-29 20:25:09 -04:00
756f559599 vim-patch:8.2.2613: new test throws exception
Problem:    New test throws exception.
Solution:   Adjust the function cleanup.
6ccfd99b92
2021-03-29 19:46:33 -04:00
b4aea3d1c8 vim-patch:8.2.2612: col('.') may get outdated column value
Problem:    col('.') may get outdated column value.
Solution:   Add a note to the help how to make this work and add a test for
            it. (closes vim/vim#7971)
18b7d86d7f
2021-03-29 19:46:00 -04:00
af2f0ffdf4 vim-patch:8.1.2380: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
306139005c
2021-03-29 19:34:45 -04:00
9d28875d50 vim-patch:8.1.0874: using old style comments in new file
Problem:    Using old style comments in new file.
Solution:   Convert to // comments in new file. (Yegappan Lakshmanan)
9c46efd7dc
2021-03-29 18:40:48 -04:00
4564f2c54f vim-patch:8.2.1621: crash when using submatch(0, 1) in substitute()
Problem:    Crash when using submatch(0, 1) in substitute().
Solution:   Increment reference count. (closes vim/vim#6887)
8a0dcf4330

N/A patches for version.c:

vim-patch:8.2.2674: Motif: cancelling the font dialog resets the font

Problem:    Motif: cancelling the font dialog resets the font.
Solution:   When no font is selected to not change the font. (closes vim/vim#7825,
            closes vim/vim#8035)  Fix compiler warnings.
9dbe701fe1
2021-03-29 18:29:25 -04:00
375f957af6 vim-patch:8.1.0989: various small code ugliness
Problem:    Various small code ugliness.
Solution:   Remove pointless NULL checks. Fix function calls. Fix typos.
            (Dominique Pelle, closes vim/vim#4060)
bdace838c6
2021-03-29 18:29:25 -04:00
3dbcf69888 test/old: run most tests in test_regexp_latin.vim
Most tests here don't depend on 'set encoding=latin1'.

Skip Test_recursive_addstate() because of ASAN build.
2021-03-29 08:23:03 -04:00
8b60368c1b vim-patch:8.1.0958: compiling weird regexp pattern is very slow
Problem:    Compiling weird regexp pattern is very slow.
Solution:   When reallocating post list increase size by 50%. (Kuang-che Wu,
            closes vim/vim#4012)  Make assert_inrange() accept float values.
38f08e76ac

Omit changes to typval_compare()
because patch v8.0.1505 was not ported.
2021-03-29 08:23:02 -04:00
aa6adacd77 Make sure window is still valid in the middle of calling :lopen (#14240)
Make sure that oldwin is not invalid after splitting

Revisit this when porting vim patch v8.1.0892 and related quickfix patches.
2021-03-29 08:19:59 -04:00
fd62d39835 Make clint happy about spaces. 2021-03-29 13:52:28 +06:00
fdbba2ccf7 Api: Adding cterm color support to nvim_set_hl 2021-03-29 09:48:07 +06:00
8665a96b92 clang: fix compile warnings in tab code (#14239)
https://github.com/neovim/neovim/pull/13851
2021-03-28 18:42:22 -04:00
63c2a7af2d Merge pull request #13851 from VVKot/vim-8.1.0105
vim-patch:8.1.{0105,0114,0116,0126,0138,0154,0479,0542,0936}
2021-03-28 13:40:34 -04:00
6d4a922e07 Merge pull request #14091 from euclidianAce/euclidianAce/nvim_win_hide
api: add vim.api.nvim_win_hide
2021-03-28 19:07:56 +02:00
45236981d8 run docgen 2021-03-28 19:03:35 +02:00
2ed5a77602 Merge pull request #14232 from mjlbach/fix_utf16_ranges_again
lsp: fix utf-16 ranges to use second return value for incremental sync
2021-03-28 03:02:29 -07:00
32cf278a19 lsp: fix utf-16 ranges to use second return value for incremental sync 2021-03-28 02:22:13 -07:00
a70d904ad0 vim-patch:8.1.0936: may leak memory when using 'vartabstop'
Problem:    May leak memory when using 'vartabstop'. (Kuang-che Wu)
Solution:   Fix handling allocated memory for 'vartabstop'. (closes vim/vim#3976)
55c77cf2ea
2021-03-28 08:40:37 +01:00
7fc58ec99a vim-patch:8.1.0542: shiftwidth() does not take 'vartabstop' into account
Problem:    shiftwidth() does not take 'vartabstop' into account.
Solution:   Use the cursor position or a position explicitly passed.
            Also make >> and << work better with 'vartabstop'. (Christian
            Brabandt)
f951416a83
2021-03-28 08:38:21 +01:00
facb1d897e vim-patch:8.1.0479: failure when setting 'varsofttabstop' to end in a comma
Problem:    Failure when setting 'varsofttabstop' to end in a comma. (Ralf
            Schandl)
Solution:   Reject value with trailing command.  Add test for invalid values
            (closes vim/vim#3544)
64f410742f
2021-03-28 08:37:04 +01:00
6f23291b8d vim-patch:8.1.0154: crash with "set smarttab shiftwidth=0 softtabstop=-1"
Problem:    Crash with "set smarttab shiftwidth=0 softtabstop=-1".
Solution:   Fall back to using 'tabstop'. (closes vim/vim#3155)
c9fe5ab3b0
2021-03-28 08:37:04 +01:00
18b73ea3c8 vim-patch:8.1.0138: negative value of 'softtabstop' not used correctly
Problem:    Negative value of 'softtabstop' not used correctly.
Solution:   Use get_sts_value(). (Tom Ryder)
33d5ab3795
2021-03-28 08:37:04 +01:00
2922f6e34b vim-patch:8.1.0126: various problems with 'vartabstop'
Problem:    Various problems with 'vartabstop'.
Solution:   Fix memory leak.  Fix crash. Add a few more tests. (Christian
            Brabandt, closes vim/vim#3076)
307ac5c68e
2021-03-28 08:37:04 +01:00
7ee09c61fe vim-patch:8.1.0116: display problem with 'vartabstop' and 'linebreak'
Problem:    Display problem with 'vartabstop' and 'linebreak'. (Chauca
            Fuentes)
Solution:   Call tabstop_padding(). (Christian Brabandt, closes vim/vim#3076)
a87b72cc31
2021-03-28 08:37:03 +01:00
3e55811acf vim-patch:8.1.0114: confusing variable name
Problem:    Confusing variable name.
Solution:   Rename new_ts to new_vts_array.  Change zero to NULL.
0119a59ffd
2021-03-28 08:37:03 +01:00
6752ac4968 vim-patch:8.1.0105: all tab stops are the same
Problem:    All tab stops are the same.
Solution:   Add the variable tabstop feature. (Christian Brabandt,
            closes vim/vim#2711)
04958cbaf2
2021-03-28 08:37:01 +01:00
b79596eb5e Merge pull request #14231 from mjlbach/fix_utf16_ranges
lsp: fix utf16 ranges for incremental sync
2021-03-27 19:02:48 -07:00
af683fdb57 lsp: fix utf16 ranges for incremental sync 2021-03-27 18:31:29 -07:00
2b663c061b viml: embed Lua syntax highlighting [skip ci] (#14213) 2021-03-28 00:43:06 +01:00
acd643bd49 Merge pull request #13621 from janlazo/vim-8.1.2326
vim-patch:8.1.{2326,2344,2398},8.2.0949
2021-03-27 11:29:32 -04:00
423f3bc3e2 test/old: skip Test_strptime() on Windows
POSIX strptime does not exist in Windows.
There is a C++ workaround but I don't know how to use it.
Julia ported BSD's "strptime()" but I can't compile the file
or embed the relevant code into src/nvim/os/time.c

I cannot use "#ifdef" in eval.lua because of function hashing.
"#ifdef" is required to point "strptime()" to NULL
such that "CheckFunction strptime" fails.
2021-03-27 10:58:01 -04:00
a7e0b0edbc vim-patch:8.2.0949: strptime() does not use DST
Problem:    Strptime() does not use DST.
Solution:   Set the tm_isdst field to -1. (Tomáš Janoušek, closes vim/vim#6230)
ea1233fccf
2021-03-27 10:53:42 -04:00
93e9cf4b6c vim-patch:8.1.2398: strptime() test fails on Japanese Mac
Problem:    strptime() test fails on Japanese Mac.
Solution:   Use %T instead of %X.
9a838fe543
2021-03-27 10:53:41 -04:00
3261ba98a2 vim-patch:8.1.2326: cannot parse a date/time string
Problem:    Cannot parse a date/time string.
Solution:   Add strptime(). (Stephen Wall, closes #)
10455d43fe

N/A patches for version.c:

vim-patch:8.1.2344: Cygwin: warning for using strptime()

Problem:    Cygwin: warning for using strptime().
Solution:   Move defining _XOPEN_SOURCE and __USE_XOPEN to vim.h. (Ken Takata,
            closes vim/vim#5265)  Use 700 for _XOPEN_SOURCE for mkdtemp().
6a228c6463
2021-03-27 10:53:41 -04:00
75a9db5b7d Merge pull request #14223 from janlazo/vim-8.2.2659
vim-patch:8.2.{1666,2045,2659,2662}
2021-03-27 10:10:11 -04:00
9118bf191e vim-patch:8.2.1666: the initial value of 'backupskip' can have duplicate items
Problem:    The initial value of 'backupskip' can have duplicate items.
Solution:   Remove duplicates, like when it is set later. (Tom Ryder,
            closes vim/vim#6940)
b00ef0508b
2021-03-27 09:29:18 -04:00
6da06bc249 vim-patch:8.2.2662: there is no way to avoid some escape sequences
Problem:    There is no way to avoid some escape sequences.
Solution:   Suppress escape sequences when the --not-a-term argument is used.
            (Gary Johnson)
7007e31bde

"Test_not_a_term" passes because Neovim does not support "--not-a-term" flag.
2021-03-27 08:27:44 -04:00
ff870232b8 test/old: run some tests from test_listlbr.vim
These tests pass without 'set encoding=latin1'.
2021-03-27 01:30:30 -04:00
1c49695d12 test/old: test_eval_func was removed 2021-03-27 01:18:07 -04:00
4bd919dc51 test/old: do not special-case test_autochdir
Use "CheckFunction" for standard error message
for missing "test_autochdir()".

Sync test_autochdir.vim to the latest Vim commit
because porting Vim patches for this file
modify other files and are too tedious to port.
2021-03-27 01:16:06 -04:00
ecd2729658 test/old: use CheckFunction, enable more tests
Some skipped tests have custom error messages.
Use ":CheckFunction" command for standard error message
on missing function.
2021-03-27 01:12:44 -04:00
618b17f575 vim-patch:8.2.2045: highlighting a character too much with incsearch
Problem:    Highlighting a character too much with incsearch.
Solution:   Check "search_match_endcol". (Christian Brabandt, closes vim/vim#7360)
448465e687
2021-03-27 01:12:44 -04:00
31e2546cc9 vim-patch:8.2.2659: eval test fails because for loop on string works
Problem:    Eval test fails because for loop on string works.
Solution:   Check looping over function reference fails.
c61cb8bfe1
2021-03-26 21:09:16 -04:00
f0ace6d419 Merge pull request #13778 from steelsojka/fix-duplicate-query-files
fix(treesitter): dedupe runtime file list
2021-03-26 22:25:15 +01:00
98f9df253e fix(treesitter): check highlight queries exist 2021-03-26 11:25:19 -05:00
3c2bc05f94 treesitter: Update to 0.19.4+2 2021-03-26 10:23:39 +01:00
095f5da79c Merge pull request #14210 from bfredl/bordaa2
floats: handle interaction with popupmenu and border correctly
2021-03-25 09:42:26 +01:00
3000f6c56b floats: handle interaction with popupmenu and border correctly 2021-03-25 09:06:09 +01:00
9481310c26 Merge pull request #14203 from janlazo/vim-8.2.2647
vim-patch:8.2.{400,402,2647,2648}
2021-03-24 19:10:38 -04:00
b951d1ff1d vim-patch:8.2.0402: setting local instead of global flag
Problem:    Setting local instead of global flag.
Solution:   Prepend "g:" to "test_is_flaky".
30d53e2c11
2021-03-23 22:42:52 -04:00
f6585cae50 vim-patch:8.2.0400: not all tests using a terminal are in the list of flaky tests
Problem:    Not all tests using a terminal are in the list of flaky tests.
Solution:   Introduce the test_is_flaky flag.
3cdcb090a6

Cherry-pick g:test_is_flaky from patch v8.2.0557.
Ensure that test_is_flaky variable is set from the global scope..

N/A patches for version.c:

vim-patch:8.2.2647: terminal test sometimes hangs

Problem:    Terminal test sometimes hangs.
Solution:   Wait for the shell to display a prompt.
f4a2ed0714

vim-patch:8.2.2648: terminal resize test sometimes hangs

Problem:    Terminal resize test sometimes hangs.
Solution:   Wait for the shell to display a prompt and other output.
c54f347d63

fixup! vim-patch:8.2.0400: not all tests using a terminal are in the list of flaky tests
2021-03-23 22:41:22 -04:00
1186f7dd96 Merge pull request #14191 from chentau/extmark_blockpaste
Extmarks: send correct buffer events on blockwise paste for nonuniform lines
2021-03-24 00:27:55 +01:00
7fbabbaa57 Extmarks: correct buffer events on blockwise paste 2021-03-23 14:06:57 -07:00
2a794b8f5d fix(treesitter): dedupe runtime file list 2021-03-23 12:58:27 -05:00
9f5c8226bb Merge pull request #14186 from mjlbach/feature/make_signature_help_beautiful
lsp: add syntax highlighting to signature help
2021-03-23 09:38:21 -07:00
ed20089877 Merge pull request #14194 from bfredl/provide_virt
memory error with ephemeral virt_text
2021-03-23 15:54:09 +01:00
927475bdf0 Fix(treesitter): Make treesitter.inspect_lang include last field name 2021-03-23 15:20:12 +01:00
a1a0bc618f Merge pull request #14190 from teto/fix-cursorlinenr
fix CursorLineNr with diff
2021-03-23 14:01:57 +01:00
06c191848b decorations: memory error with ephemeral virt_text 2021-03-23 13:58:18 +01:00
3e5efa50b6 Merge pull request #14193 from bfredl/msginit
screen: setup scrolling main screen when starting with display-=msgsep
2021-03-23 10:46:29 +01:00
80e122ae5d screen: setup scrolling main screen when starting with display-=msgsep 2021-03-23 09:34:36 +01:00
691a72bb68 Merge pull request #14124 from chentau/extmark_tab
Correctly splice extmarks on tab with `noexpandtab`
2021-03-23 08:59:14 +01:00
a92a8ef506 Correctly splice extmarks on tab with noexpandtab set 2021-03-22 20:26:25 -07:00
d41778c993 Merge pull request #14178 from andymass/vim-8.2.0088
[RFC] vim-patch 8.2.0088: insufficient tests for tags...
2021-03-22 20:35:24 -04:00
e0d0e46cf2 chore: add test for CursorLineNr with filler lines 2021-03-22 23:33:17 +01:00
f2e1709d49 fix: stop using CursorLineNr in front of fillers
filling lines in diff mode.
2021-03-22 23:33:17 +01:00
1df1098b0c Merge pull request #13998 from bfredl/border
floats: add MS-DOS mode (borders)
2021-03-22 23:27:59 +01:00
243820ebd0 floats: add borders (MS-DOS MODE) 2021-03-22 23:18:40 +01:00
3113d4befa lsp: add syntax highlighting to signature help 2021-03-22 10:57:21 -07:00
6fef28da58 Merge pull request #14184 from tjdevries/tjdevries/nit_diagnostics
lsp: some small diagnostic fixes
2021-03-22 10:07:52 -07:00
e5cfc7f3a0 wheel: move non-window code out of window.c 2021-03-22 15:42:26 +01:00
08ca5207cd w_grid_alloc: baseline impl 2021-03-22 15:42:26 +01:00
875979ec3f lsp: Unopened buffers return 0 for line count, which leads to broken positions 2021-03-22 10:22:23 -04:00
880fb0d146 lsp: Force re-display of diagnostics when opening a file 2021-03-22 10:21:56 -04:00
e25ebf6b4f Fix neovim tag bugs uncovered by vim-8.2.0088,
but not related to the patch.  Specifically:

    - settagstack()'s e_listreq is in the wrong place
    - in :ltag, vim_strncpy -> xstrlcpy length parameter is different
        xstrlcpy's length includes the null terminator (so add one)
    - in :ltag, STRNCAT -> xstrlcat takes dest size, not number to copy
        use snprintf instead
2021-03-21 12:06:23 -04:00
070e084a64 Merge pull request #14172 from janlazo/vim-8.2.2622
vim-patch:8.2.{2622,2624,2625,2626,2631,2634}
2021-03-21 12:04:06 -04:00
6519b18471 vim-patch:8.2.0088: insufficient tests for tags; bug in using extra tag field
Problem:    Insufficient tests for tags; bug in using extra tag field when
            using an ex command to position the cursor.
Solution:   Fix the bug, add more tests. (Yegappan Lakshmanan, closes vim/vim#5439)
830c1afc9d
2021-03-21 10:37:45 -04:00
c620ca4cc2 vim-patch:8.2.2634: 'tagfunc' does not indicate using a pattern
Problem:    'tagfunc' does not indicate using a pattern.
Solution:   Add the "r" flag. (Andy Massimino, closes vim/vim#7982)
f90c855c71
2021-03-21 10:35:26 -04:00
749a8b6be7 vim-patch:8.2.2631: commands from winrestcmd() do not always work properly
Problem:    Commands from winrestcmd() do not always work properly. (Leonid V.
            Fedorenchik)
Solution:   Repeat the size commands twice. (closes vim/vim#7988)
a0c8aea479
2021-03-21 00:26:42 -04:00
0bf9f10da0 vim-patch:8.2.2625: rss files not recognized
Problem:    Rss files not recognized.
Solution:   Recognize .rss as XML. (Kivin Locke, closes vim/vim#7987)
af125866db
2021-03-20 22:27:51 -04:00
429c6d2d4f vim-patch:8.2.2624: atom files not recognized
Problem:    Atom files not recognized.
Solution:   Recognize .atom as XML. (Kivin Locke, closes vim/vim#7986)
74b99f6ab6

N/A patches for version.c:

vim-patch:8.2.2622: GTK: error when starting up and -geometry is given

Problem:    GTK: error when starting up and -geometry is given. (Dominique
            Pellé)
Solution:   Use another function to get the monitor if the window has not been
            created yet. (closes vim/vim#7978)
a555e6fcb6

vim-patch:8.2.2626: GTK3: error when starting up and -geometry is given

Problem:    GTK3: error when starting up and -geometry is given. (Dominique
            Pellé)
Solution:   Use another function to get the monitor if the window has not been
            created yet. (closes vim/vim#7978)
240014321b
2021-03-20 22:27:47 -04:00
e5bef5974e Merge pull request #14171 from vrischmann/insert-text-empty
runtime/lua/vim/lsp: check emptyness in get_completion_word
2021-03-20 17:51:56 -07:00
24ad2c7067 runtime/lua/vim/lsp: check emptyness in get_completion_word 2021-03-21 00:30:01 +01:00
dc8da7ba40 Merge pull request #14060 from andymass/vim-8.2.1703
[RFC] vim-patch:8.2.{1693,1703,1705}
2021-03-20 18:08:16 -04:00
049213b419 Merge pull request #14164 from andymass/vim-8.1.2020
[RFC] vim-patch 8.{1.2020,2.0093,2.0422}: add win_splitmove()
2021-03-20 15:59:53 -04:00
79575cfe8a Fix a failing test (highlight_spec.lua) 2021-03-20 15:56:52 -04:00
7e89606591 vim-patch:8.2.1705: "verbose hi Name" reports incorrect info after ":hi clear"
Problem:    "verbose hi Name" reports incorrect info after ":hi clear".
Solution:   Store the script context. (Antony Scriven, closes vim/vim#6975)
e8df010498

Also adds src/nvim/testdir/script_util.vim which originates from patch 8.2.1366
(a6296200bd)
because some tests in test_highlight.vim use it for testing :verbose.
Should merge this and older related patches later.

Also, fix collateral damage to test_options.vim

test_options tests for file name completion in the test directory, but
since we've added a new file, the test output is now different.  This
test is slightly different from upstream anyway, so for now we just add
the file name.  This may change when more upstream patches are added
which alter this test.
2021-03-20 15:56:37 -04:00
b0c0c50d32 Merge pull request #14160 from jamessan/automatic-version-updates
ci(gh): Automatically create PR for version.c updates
2021-03-20 12:12:48 -04:00
eca091a77c ci(gh): Automatically create PR for version.c updates
[skip ci]
2021-03-20 12:11:22 -04:00
0cec2d39c9 vim-patch:8.2.0422: crash when passing popup window to win_splitmove()
Problem:    Crash when passing popup window to win_splitmove(). (john Devin)
Solution:   Disallow moving a popup window. (closes vim/vim#5816)
0f1563ffee

Add translated test for 8.2.0422 (popup->floating)
2021-03-19 23:02:34 -04:00
b2ec770070 vim-patch:8.2.0093: win_splitmove() can make Vim hang
Problem:    win_splitmove() can make Vim hang.
Solution:   Check windows exists in the current tab page. (closes vim/vim#5444)
7b94e77132
2021-03-19 23:02:34 -04:00
1ef4340f22 vim-patch:8.1.2020: it is not easy to change the window layout
Problem:    It is not easy to change the window layout.
Solution:   Add win_splitmove(). (Andy Massimino, closes vim/vim#4561)
d20dcb3d01
2021-03-19 23:02:28 -04:00
fa4ee00fa7 Merge pull request #14165 from mjlbach/feature/lsp_preview_location_syntax
lsp: set syntax instead of filetype for preview location highlighting
2021-03-19 13:35:14 -07:00
2358e52fc4 lsp: set syntax instead of filetype for preview location highlighting 2021-03-19 12:55:58 -07:00
0f7b6b2efd Merge pull request #14155 from janlazo/vim-8.2.2609
vim-patch:8.2.{2609,2611}
2021-03-18 20:49:42 -04:00
b5926f7f27 Merge pull request #14149 from Borwe/mine/uninstaller
[FEATURE] Add uninstall target for make and others
Closes #14105
2021-03-18 19:16:54 -04:00
f31b8dabfd Merge pull request #14144 from mfussenegger/lsp-workspace-edit-rename
lsp: Add support for create,rename,delete workspaceEdit resourceOperations
2021-03-18 12:27:16 -07:00
84213b5b9a lsp: Add support for delete workspaceEdit resource operation 2021-03-18 19:53:43 +01:00
191afb42be lsp: Add support for create workspaceEdit resource operation 2021-03-18 19:53:42 +01:00
5e401b693b lsp: Add support for file rename via workspaceEdit 2021-03-18 19:53:14 +01:00
bd2ea22a54 gitignore: src/nvim/testdir/test_result.log
PR https://github.com/neovim/neovim/pull/14063 added it by mistake.
2021-03-17 22:23:59 -04:00
2ae6705f87 vim-patch:8.2.2611: conditions for startup tests are not exactly right
Problem:    Conditions for startup tests are not exactly right.
Solution:   Check for type of GUI instead of MS-Windows. (Ozaki Kiichi,
            closes vim/vim#7976)
f8c52e8d08
2021-03-17 22:11:58 -04:00
f1f131d132 vim-patch:8.2.2609: test disabled on MS-Windows even though it should work
Problem:    Test disabled on MS-Windows even though it should work.
Solution:   Restore the condition for skipping the test. (Ken Takata,
            closes vim/vim#7970)
3214812997
2021-03-17 22:00:50 -04:00
0ab88c2ea8 Merge pull request #14145 from teto/remove-tshighlighter
chore: remove deprecated lua module tshighlighter
2021-03-16 18:44:41 +01:00
b0599d2708 Merge pull request #14148 from mjlbach/mkd_round_3
lsp: update lsp_markdown syntax to not clash with built-in markdown syntax
2021-03-16 09:08:56 -07:00
84f10a7970 Add uninstall target for make and others 2021-03-16 15:33:39 +03:00
2f64cda49e lsp: update lsp_markdown syntax to not clash with built-in markdown syntax 2021-03-15 22:58:54 -07:00
2b0c34053d chore(ts): show grammar that triggers the error
to help debugging
2021-03-16 01:57:32 +01:00
b540141876 chore: remove deprecated lua module tshighlighter 2021-03-16 01:41:28 +01:00
054eb31dc7 Merge pull request #14098 from mjlbach/fix_highlighting_lsp_markdown
lsp: fix highlighting for lsp markdown code blocks
2021-03-15 10:28:05 -07:00
e8a0ff001f Merge pull request #14076 from mfussenegger/treesitter019
treesitter: Update to 0.19.3
2021-03-15 18:06:26 +01:00
ff749e3213 Merge pull request #14142 from bfredl/un_ns
api: destabilize nvim_set_hl_ns
2021-03-15 10:55:40 +01:00
bb6d2c9b7c api: destabilize nvim_set_hl_ns
The sematics and signature of this API is going to change, but we
don't wanna delay 0.5 for it. Mark API as unstable for now.
2021-03-15 09:58:39 +01:00
f5daf55c10 Merge pull request #14140 from jamessan/delete-release
ci(GHA/release): Delete the release when creating a new nightly
2021-03-14 20:55:35 -04:00
ba758ac553 ci(GHA/release): Delete the release when creating a new nightly
This reverts #13733.  Disabling delete of the release leaves behind a
draft release associated with the previous nightly tag, which is
annoying to cleanup.

In the rare circumstances that the creation of a new nightly fails after
deleting the previous nightly, the job can be re-run or a nightly can be
missing for a day.
2021-03-14 19:53:45 -04:00
a8694ff9c1 Merge pull request #14139 from jamessan/release-packages
ci(GHA/release): Stop installing gcc-multilib
2021-03-14 19:37:00 -04:00
dfa01b820f ci(GHA/release): Stop installing gcc-multilib
Recent changes in Xenial have made it uninstallable and we aren't
actually using anything from it for the release builds.
2021-03-14 19:27:50 -04:00
bdf3aeeede Merge pull request #14123 from smolck/skip_ci
Don't run CI on draft PRs
2021-03-14 18:30:27 -04:00
f2847e7ea1 Don't run CI on draft PRs 2021-03-14 17:23:57 -05:00
b1f7c4e7d6 Merge pull request #14131 from janlazo/vim-8.2.2596
vim-patch:8.2.{2596,2601,2604}
2021-03-14 15:39:37 -04:00
c47dd5376e vim-patch:8.2.2604: GUI-specific command line arguments not tested
Problem:    GUI-specific command line arguments not tested.
Solution:   Add tests for several arguments. (Dominique Pellé, closes vim/vim#7962)
240309c9bf
2021-03-14 12:08:31 -04:00
9e4c1fa073 vim-patch:8.2.2601: memory usage test often fails on FreeBSD
Problem:    Memory usage test often fails on FreeBSD.
Solution:   Increase multiplier for upper limit.
6bce5856b5
2021-03-14 11:54:36 -04:00
519848f64e vim-patch:8.2.2596: :doautocmd may confuse scripts listening to WinEnter
Problem:    :doautocmd may confuse scripts listening to WinEnter.
Solution:   Do the current buffer last. (closes vim/vim#7958)
41cd80335c
2021-03-14 11:54:36 -04:00
3c8583e43b Merge pull request #14020 from chentau/float_resize
Update lines after shrinking floating window
2021-03-14 08:35:48 +01:00
314b222c25 Fix click on foldcolumn with vsplit (#14127) 2021-03-13 23:12:18 +01:00
9808c8d9dd Merge pull request #14126 from janlazo/vim-8.2.2593
vim-patch:8.2.{2593,2594,2595}
2021-03-13 10:38:21 -05:00
a1cdb6ca6a vim-patch:8.2.2595: setting 'winminheight' may cause 'lines' to change
Problem:    Setting 'winminheight' may cause 'lines' to change.
Solution:   Also take minimal height of other tabpages into account. (vim/vim#7899)
9e813b3dea
2021-03-13 10:16:23 -05:00
60670c1fd3 vim-patch:8.2.2594: alternate buffer added to session file even when it's hidden
Problem:    Alternate buffer added to session file even when it's hidden.
Solution:   Check the 'buflisted' option. (closes vim/vim#7951)
0756f757ed

N/A patches for version.c:

vim-patch:8.2.2593: list of distributed files is incomplete

Problem:    List of distributed files is incomplete.
Solution:   Add a file and rename another.
0de8e2d6a3
2021-03-13 09:06:57 -05:00
5d5e018a5c Merge pull request #14125 from janlazo/vim-8.2.2591
vim-patch:8.2.{2341,2452,2591}
2021-03-13 08:27:37 -05:00
a4ea602788 vim-patch:8.2.2341: expresison command line completion incomplete after "g:"
Problem:    Expresison command line completion shows variables but not
            functions after "g:". (Gary Johnson)
Solution:   Prefix "g:" when needed to a global function.
1bb4de5302

Port most of patch v8.2.0335 to complete script-local functions
if the name starts with "s:".
2021-03-12 23:20:56 -05:00
b650d2d8d9 vim-patch:8.2.2452: no completion for the 'filetype' option
Problem:    No completion for the 'filetype' option.
Solution:   Add filetype completion. (Martin Tournoij, closes vim/vim#7747)
d5e8c92816
2021-03-12 21:42:09 -05:00
ea99cbc85a vim-patch:8.2.2591: Poke files are not recognized
Problem:    Poke files are not recognized.
Solution:   Add a filetype entry. (Matt Ihlenfield)
c80f647512
2021-03-12 18:34:58 -05:00
d38508d88a Merge pull request #13567 from bfredl/termpipe
api: allow open non-current buffer as terminal (+ xmas bonus)
2021-03-12 16:52:05 +01:00
ed08936987 api: allow open non-current buffer as terminal (+ xmas bonus)
vim.api.nvim_chan_send(vim.api.nvim_open_term(0), io.open("/path/to/smile.cat", "r"):read("*a"))
2021-03-12 14:44:47 +01:00
dc8273f2f1 vim-patch:8.2.2588: build failure with tiny features (#14099)
Problem:    Build failure with tiny features.
Solution:   Add #ifdef.  Run recover test separately.
23b32a8d6b

N/A patches for version.c:

vim-patch:8.2.1048: build failure without the eval feature

Problem:    Build failure without the eval feature.
Solution:   Add dummy typedef.
9d40c63c7d

vim-patch:8.2.1828: build failure without the +eval feature

Problem:    Build failure without the +eval feature.
Solution:   Add dummys for ex_block and ex_endblock.
1b1e9df78b

vim-patch:8.2.2293: build failure with Motif

Problem:    Build failure with Motif. (Tony Mechelynck)
Solution:   Use empty_option instead of empty_options.
bb0956fc65

vim-patch:8.2.2410: build failure without the +profiling feature

Problem:    Build failure without the +profiling feature.
Solution:   Add dummy argument to macro.
ff0e57fe77

vim-patch:8.2.2514: Vim9: build error in tiny version

Problem:    Vim9: build error in tiny version.
Solution:   Add #ifdef.
2379f87eb4
2021-03-11 17:58:37 -05:00
8fe19d9d89 screen: make ui_compositor aware of the intended size of a float 2021-03-11 12:27:29 -08:00
1ce899db7d Merge pull request #14106 from mfussenegger/lsp-incremental-sync
lsp: Use incremental sync by default
2021-03-11 11:43:03 -08:00
16827817bb lsp: Use incremental sync by default
With the new implementation added in
https://github.com/neovim/neovim/pull/14079 I think this is now working
well enough to enable it by default.

There are high CPU usage issues popping up now and then and they might
at least partially be related to the full-text sync.
2021-03-11 20:13:52 +01:00
5d20fc4fc5 Merge pull request #14107 from mfussenegger/gen-docs
Update lsp, lua and api docs (gen_vimdoc.py)
2021-03-11 08:26:59 -08:00
02271009ca Update lsp, lua and api docs (gen_vimdoc.py) 2021-03-11 16:16:26 +01:00
6b7cde3dd0 lsp: fix highlighting for lsp markdown code blocks 2021-03-10 17:26:22 -08:00
097ec71bd8 aarch64/linux: fix build by updating LuaJIT (#14096) 2021-03-10 18:14:14 -05:00
4ed860a64c Merge pull request #14073 from mjlbach/feature/syntax_highlight_rule
lsp: add custom syntax rule for floating window
2021-03-10 14:15:24 -08:00
d1074e0077 lsp: Resolve codeLense server capabilities (#14056) 2021-03-10 17:02:09 -05:00
564dd7d8db lsp: get_language_id (#14092)
* Allow specifying a languageId for a lsp

For some languages the filetype might not match the languageId the
language server accepts. In these cases the config for the language
server can contain a function which gets the current buffer and filetype
and returns a languageId. When it isn't provided the filetype is used
instead.

Example:
```lua
require'lspconfig'.sourcekit.setup{
    get_language_id = function(bufnr, ft)
        return 'swift'
    end;
}
```

Closes #13093

* lsp: Change to get_language_id

Co-authored-by: Jan Dammshäuser <mail@jandamm.de>
2021-03-10 16:53:23 -05:00
3fbd9ed4ab api: clarify difference between win_hide and win_close 2021-03-10 13:29:01 -06:00
c29494b719 Merge pull request #14095 from mjlbach/lsp_incremental_endline_fix
lsp: fix endline such that it cannot point outside the buffer range
2021-03-10 09:37:30 -08:00
53414555eb lsp: fix endline such that it cannot point outside the buffer range 2021-03-10 09:17:20 -08:00
c266c2f36e tui: improve support for tmux, GNU Screen
Wrapping it in DCS allows the get_bg features to work with tmux, GNU Screen.
2021-03-11 00:45:16 +09:00
300e71de9c runtime/termdebug 82be4849eed0b8fbee45bc8da99b685ec89af59a (#13660)
port termdebug dissasembly window only (termdebug.vim)

This patch adds disassembly window to Termdebug

  :Asm should bring up disassembly window

or setting:

  g:termdebug_disasm_window

Values greater than 1 will set disasm window height.

Code works by calling gdb disassemble command, demangling output and
storing in Termdebug-asm-listing buffer + window.

Current pc address is parsed from 'addr=' cursor msg and we search for
that address in the disasm window. When the search fails, we execute a
new "disassemble $pc" command.

When in a location without a proper stack frame, "disassemble $pc" can
fail and in this case we add a +length argument and try again.

Tested with x86_64 gdb v10.1 and v8.2.1, and aarch64 gdb v7.12.
2021-03-10 08:20:22 -05:00
7844ca2e05 Merge pull request #14065 from bfredl/overlaymode
more virt_text display options
2021-03-10 13:28:07 +01:00
425bc438ae decorations: add additional styling of virt_text overlays 2021-03-10 12:11:05 +01:00
d49177afd9 lsp: add custom syntax rules for lsp floating window 2021-03-09 21:15:10 -08:00
0869cbd55c Merge pull request #14079 from mjlbach/incremental_sync
lsp: add incremental text synchronization
2021-03-09 21:03:31 -08:00
3a342f9cc9 api: add vim.api.nvim_win_hide 2021-03-09 22:51:56 -06:00
e4e51c69d7 lsp: add incremental text synchronization
* Implementation derived from and validated by vim-lsc authored by Nate
  Bosch
2021-03-09 20:14:08 -08:00
cc23c95bcc Merge pull request #14088 from janlazo/vim-8.2.2577
vim-patch:8.1.0783,8.2.{1507,2152,2438,2577}
2021-03-09 19:44:26 -05:00
7da8056607 vim-patch:8.2.2438: out of bounds compiler warning
Problem:    Out of bounds compiler warning.
Solution:   Increase the size of uf_name.
6a12e3342d

Do not set size of uf_name to avoid compiler warnings.
Port only the comments.
2021-03-09 18:38:04 -05:00
effd234960 vim-patch:8.2.1507: using malloc() directly
Problem:    Using malloc() directly.
Solution:   Use ALLOC_ONE().  Remove superfluous typecast.  (Hussam al-Homsi,
            closes vim/vim#6768)
51b6eb47b3
2021-03-09 18:38:04 -05:00
f7f7146588 vim-patch:8.2.2577: compiler warning for type conversion
Problem:    Compiler warning for type conversion.
Solution:   Add a typecast. (Mike Williams)
9355ae4149

N/A patches for version.c:

vim-patch:8.1.0783: compiler warning for signed/unsigned

Problem:    Compiler warning for signed/unsigned.
Solution:   Add type cast.  Change type of buffer. (Ozaki Kiichi, closes vim/vim#3827)
63c0ccd2b6

Neovim was refactored to prefer char type for string functions, not char_u.

vim-patch:8.2.2152: screenpos() does not include the WinBar offset

Problem:    screenpos() does not include the WinBar offset.
Solution:   Use W_WINROW() instead of directly using w_window. (closes vim/vim#7487)
8dd46e72cf

W_WINROW() was removed so port only the test changes.
The test is currently skipped.
2021-03-09 18:38:04 -05:00
e355cc8cc5 Merge pull request #13875 from smolck/vim_fn_error_on_api
vim.fn: throw error when trying to use API function
2021-03-09 23:12:23 +01:00
d1899bb5f4 use pcall_err 2021-03-09 15:23:42 -06:00
b73e653703 treesitter: Update to 0.19.3 2021-03-09 19:21:26 +01:00
7c204af87a Merge pull request #13686 from bfredl/fastevent
state: throttle batched event processing when input is available
2021-03-08 17:55:59 +01:00
f901149de4 state: throttle batched event processing when input is available
before, calling vim.schedule() from inside an event would execute
the scheduled callback immediately after this event without
checking for user input in between. Break event processing
whenever user input or an interrupt is available.
2021-03-08 16:08:58 +01:00
c12ea02e0b Merge pull request #14070 from janlazo/vim-8.2.2564
vim-patch:8.1.1016,8.2.{890,1513,1805,2345,2564}
2021-03-07 15:56:23 -05:00
5c4fbe34f9 Merge pull request #13993 from teto/gendoc
improve vimdoc generation
2021-03-07 17:20:09 +01:00
667e3bfb6e Merge pull request #13004 from jgehrig/jg-neovim-qt-runtime
fix Windows missing QtSVG DLL
2021-03-07 20:05:05 +09:00
8996a12d82 vim-patch:8.2.1513: cannot interrupt shell used for filename expansion
Problem:    Cannot interrupt shell used for filename expansion. (Dominique
            Pellé)
Solution:   Do set tmode in mch_delay(). (closes vim/vim#6770)
0981c8729e

Neovim does not run settmode() in os_delay() so this patch is mostly N/A.
Do not port Vim's flags (ie. MCH_DELAY_SETTMODE) for mch_delay().
2021-03-06 22:11:42 -05:00
f135e511c0 vim-patch:8.1.1016: MS-Windows: No color in shell when using "!" in 'guioptions
Problem:    MS-Windows: No color in shell when using "!" in 'guioptions.
Solution:   Don't stop termcap when using a terminal window for the shell.
            (vim-jp, closes vim/vim#4117)
049ca59236

N/A patches for version.c:

vim-patch:8.2.0890: no color in terminal window when 'termguicolor' is set

Problem:    No color in terminal window when 'termguicolor' is set.
Solution:   Clear the underline color. (closes vim/vim#6186)
1e5f8f6d65

vim-patch:8.2.1805: Unix: terminal mode changed when using ":shell"

Problem:    Unix: terminal mode changed when using ":shell".
Solution:   Avoid calling settmode() when not needed. (issue vim/vim#7079)
80361a5f2b

vim-patch:8.2.2345: no focus events in a terminal

Problem:    No focus events in a terminal.
Solution:   Add the t_fd and t_fe termcap entries and implement detecting
            focus events. (Hayaki Saito, Magnus Groß, closes vim/vim#7673,
            closes vim/vim#609, closes vim/vim#5526)
681fc3fa78

vim-patch:8.2.2564: focus events end Insert mode if 'esckeys' is not set

Problem:    Focus events end Insert mode if 'esckeys' is not set.
Solution:   Do not enable focus events when 'esckeys' is off. (closes vim/vim#7926)
51b477f74f
2021-03-06 22:03:29 -05:00
0496b572ac Merge pull request #13919 from TheAlakazam/lsplogfix
fix: fix empty line in lsp log after each run
2021-03-06 09:40:57 -08:00
b3dd856f2b Merge pull request #14052 from phaazon/fix/typo
Fix a typo in the Lua documentation for nvim_add_highlight().
2021-03-06 13:21:44 +01:00
399b47fddb Merge pull request #14066 from LeeWannacott/clarify-nvim-put
Clarify that nvim_put()'s {after} and {follow} parameters expect boolean values true, or false.
2021-03-06 13:17:42 +01:00
d8dff33e4b Added If true to show that {after} and {follow} parameters of nvim_put() are expecting boolean values 2021-03-07 00:54:13 +13:00
ea99e7f2ab Forgot to add colon to the {follow} parameters statement 2021-03-07 00:31:58 +13:00
cde94598ed Clarify that nvim_put()'s {after} and {follow} parameters expect boolean values true, or false. 2021-03-07 00:06:13 +13:00
82c09f7c0b lsp: add explicit entry on lsp log start
fix: address typo and review comments
2021-03-06 10:39:40 +05:30
3fbff98cfd Merge pull request #13793 from mjlbach/fix_terminating_eol_diagnostic
[RDY] lsp: fix diagnostic reported on terminating EOL character
2021-03-05 07:27:50 -08:00
8601e8b0d6 vim-patch:8.2.1703: ":highlight clear" does not restore default link
Problem:    ":highlight clear" does not restore default link.
Solution:   Remember the default link and restore it. (Antony Scriven,
            closes vim/vim#6970, closes vim/vim#4405)
213da551de
2021-03-05 01:45:54 -05:00
4e6b31d978 vim-patch:8.2.1693: "hi def" does not work for cleared highlight
Problem:    "hi def" does not work for cleared highlight.
Solution:   Check the "sg_cleared" flag. (Maxim Kim, closes vim/vim#6956,
            closes vim/vim#4405)
05eb5b9cae
2021-03-05 01:45:50 -05:00
8f4b9b8b7d Merge pull request #14048 from saadparwaiz1/runtime/haskell
Update Runtime Files For Haskell
2021-03-04 22:48:16 -05:00
115488105d Merge pull request #14059 from mjlbach/fix/no_notification_lsp_sigterm
lsp: don't invoke vim.notify on sigterm of language server
2021-03-04 16:02:43 -08:00
58be81d645 lsp: don't invoke vim.notify on sigterm of language server 2021-03-04 13:50:49 -08:00
c50b737d6f Merge pull request #14047 from mjlbach/feature/notify_on_crash
lsp: invoke vim.notify when client exits with code or signal other than 0
2021-03-04 12:27:46 -08:00
bdb2512325 lsp: invoke vim.notify when client exits with code or signal other than 0 2021-03-04 10:55:50 -08:00
e55c27fc6e more generic shebang for lua2dox_filter
previous one was not working/ or use /bin/sh
2021-03-04 15:44:40 +01:00
513ac58043 fix: section_name must be a dict {filename:name}
else it was triggering an error during regeneration of the files.
2021-03-04 15:44:40 +01:00
55d6699dfd chore: rename progress_callback to progress_handler 2021-03-04 15:42:05 +01:00
a167ae6d5d fix(flake): can now generate vimdoc
and removed warning about deprecated usage of stdenv.lib

also can run `make pylint shlint`.
2021-03-04 15:42:05 +01:00
f2fc44d50b [RDY] Fix click on foldcolumn if it has tabline (#13982)
* Fix click on foldcolumn if it has tabline
* Fixes to correctly determine if tablie was clicked when multigrid is enabled
* Separate foldcolumn checks into functions
* Add test case for click on foldcolumn with split window
* Fix foldcolumn click used nvim_input() on multigrid enabled
2021-03-04 13:54:22 +01:00
d7008418b7 Fix a typo in the Lua documentation for nvim_create_namespace(). 2021-03-04 13:48:13 +01:00
df4440024b vim-patch:30e9b3c42567 (#13936)
Update runtime files
30e9b3c425
2021-03-03 18:19:01 -05:00
6995fad260 Merge pull request #13973 from chentau/on_bytes_undofile
New versions of neovim will not read undofiles written by nvim before this merge (there will be an error message about incopmatible version). Nvim 0.4 (or an master up to bda12927be ) can be used to recover older undofiles, so if you worried about unsaved changes lurking around in undofiles it would make sense to keep such version around somewhere to recover them.

This is a necessary change to keep tree-sitter and plugins dependent on byte-level buffer change events fully working with undo states from a undofile. If there is a clear demand we might implement reading of the old format. Such recovered buffers will not be be fully functional with plugins relying on buffer updates or tree-sitter, however.
2021-03-03 09:45:06 +01:00
1888d9cbd0 runtime/haskell: 4f4d51a942cc2c6b3e936ee0f93f00c2d000065c
port syntax file only
2021-03-03 02:00:56 +00:00
6cfd5d7163 runtime/haskell: 8fe1000e9c3438d0ff36cf2340f0f0e48f8fb89f
port haskellcomplete file only
2021-03-03 01:55:43 +00:00
af0a9da975 runtime/cabal: 23515b4ef7580af8b9d3b964a558ab2007cacda5
port cabal, cabalconfig, cabalproject syntax file
2021-03-03 01:54:39 +00:00
4053b7b1ca runtime/cabal: 4f4d51a942cc2c6b3e936ee0f93f00c2d000065c
port cabal syntax file only
2021-03-03 01:54:33 +00:00
bda12927be Merge pull request #14041 from janlazo/vim-8.2.2560
vim-patch:8.1.{680,1901},8.2.{1043,2196,2236,2551.2559,2560}
2021-03-02 18:43:52 -05:00
1edc0285c4 vim-patch:8.2.1043: %a item in 'statusline' not tested
Problem:    %a item in 'statusline' not tested.
Solution:   Add a test. (Dominique Pellé, closes vim/vim#6318)
4014e2ceb0

Do not run test_statusline.vim in test_alot.vim
because test_statusline.vim runs separately in Vim since patch v8.2.0164.
2021-03-02 18:19:14 -05:00
f42e932df4 Extmarks: Save extmark undo information to undofile. 2021-03-02 12:45:54 -08:00
db96edb58d lsp: fix diagnostic reported on terminating EOL character 2021-03-02 09:42:00 -08:00
f32acc70e8 vim-patch:8.2.2236: 'scroll' option can change when setting the statusline
Problem:    'scroll' option can change when setting the statusline or tabline
            but the option context is not updated.
Solution:   Update the script context when the scroll option is changed as a
            side effect. (Christian Brabandt, closes vim/vim#7533)
746670604a
2021-03-02 00:35:52 -05:00
a5bacdbfb4 vim-patch:8.1.1901: the +insert_expand feature is not always available
Problem:    The +insert_expand feature is not always available.
Solution:   Graduate the +insert_expand feature.
e2c453d38f
2021-03-01 23:41:10 -05:00
e50875b3e3 vim-patch:8.2.2560: setting 'winminheigt' does not take tabline into account
Problem:    Setting 'winminheigt' does not take tabline into account.
Solution:   Subtract the tabline from the available height. (closes vim/vim#7899)
39d4cab494

N/A patches for version.c:

vim-patch:8.1.0680: not easy to see what features are unavailable

Problem:    Not easy to see what features are unavailable.
Solution:   Highlight disabled features in the :version output. (Nazri Ramliy,
            closes vim/vim#3756)
c85ffc9dab

vim-patch:8.2.2196: :version output has extra spaces in compile and link command

Problem:    :version output has extra spaces in compile and link command.
Solution:   Adjust QUOTESED. (closes vim/vim#7505)
abcbb0e9ad

vim-patch:8.2.2551: MS-Windows: colors test file is not installed

Problem:    MS-Windows: colors test file is not installed.
Solution:   Also copy runtime/colors/tools. (Ken Takata, closes vim/vim#7902)
d0bce504ec

vim-patch:8.2.2559: MS-Windows: guifont test fails on Windows XP

Problem:    MS-Windows: guifont test fails on Windows XP.
Solution:   Check windowsversion().
3650fd7098
2021-03-01 23:40:39 -05:00
6646280d1a chore: revert unrelated changes in test 2021-02-27 10:02:56 -06:00
1d4a7c6039 test: use assert_alive helper rather than eq 2021-02-27 09:38:38 -06:00
a9eeeec5d5 test: segfault test for empty buffer paste on term 2021-02-26 19:55:32 -06:00
409b2711fe fix: segfault when pasting in term with empty buffer 2021-02-26 19:38:07 -06:00
c1fbc2ddf1 Merge pull request #14022 from crispgm/lsp-start-error
lsp: prompt correct error when language server start fails
2021-02-26 02:41:29 -08:00
365c353c9a fix: show error when language server start fails and prevent future requests 2021-02-26 17:24:18 +08:00
0c7610cf9d Merge pull request #14014 from mfussenegger/textDocumentSync
LSP: Resolve text_document_save capability according to spec
2021-02-25 10:25:14 -08:00
a2b6e5ed4e Merge pull request #14004 from erw7/fix-fic
option: fix problem with fileignorecase not being set properly
2021-02-25 12:45:53 -05:00
eff7666163 LSP: Resolve text_document_save capability according to spec
Fixes https://github.com/neovim/neovim/issues/13989
See https://github.com/microsoft/language-server-protocol/issues/288
2021-02-25 10:08:14 +01:00
34d12e7dd7 path.c: fix path_fnamencmp
Fix the problem that the last comparison of strings when p_fic is true was
not ignore case.
2021-02-25 13:50:31 +09:00
6deabca3e7 eval: add fname_case to feature list 2021-02-25 13:50:31 +09:00
b2f1969f82 option: fix problem with fileignorecase not being set properly 2021-02-25 13:50:30 +09:00
e55ded00cf Merge pull request #14008 from mfussenegger/docs-update
Update lsp and api docs with gen_vimdoc changes
2021-02-24 15:37:24 -08:00
b5292a047d Update lsp and api docs with gen_vimdoc changes
Applies the changes generated with ./scripts/gen_vimdoc.py to add
missing documentation.
2021-02-24 23:44:52 +01:00
7d82aaa6f5 [LSP] Add in more docs for highlight groups with document_highlight() (#13614)
Currently it's not 100% clear that without setting these, using the autocomds
to utilize the `textDocument/documentHighlight` functionality, nothing will
actually be visible since the highlight groups don't have any details. This
just adds in a couple simple extra notes to make sure that's done
2021-02-24 17:23:47 +01:00
d290da70b7 Merge pull request #14001 from janlazo/vim-8.2.2545
vim-patch:8.2.{2545,2547,2548}
2021-02-24 09:26:17 -05:00
ab5083b5fc pos: define MAXCOL to INT_MAX
Partial port of patch v8.1.0953.
Remove useless casts on MAXCOL.
2021-02-23 23:00:06 -05:00
6b7cc45c48 fix: treesitter languagetree crash when using telescope buffer previewer (#13986) 2021-02-23 21:39:35 -05:00
ceed85ea43 vim-patch:8.2.2548: May get stuck in the cmdline window using :normal
Problem:    May get stuck in the cmdline window using :normal.
Solution:   Have nv_esc() return K_IGNORE.
7d41410a45
2021-02-23 20:27:04 -05:00
9b5e3ba32d vim-patch:8.2.2547: "%" command not accurate for big files
Problem:    "%" command not accurate for big files.
Solution:   Make it more accurate for files up to 21M lines. (Dominique Pellé,
            closes vim/vim#7889)
2c6553498e

N/A patches for version.c:

vim-patch:8.2.2545: errors and crash when terminal window is zero height

Problem:    Errors and crash when terminal window is zero height. (Leonid V.
            Fedorenchik)
Solution:   Do not resize when width or height is zero. (closes vim/vim#7890)
eba13e4ea2
2021-02-23 20:24:41 -05:00
0450e155d4 vim-patch:8.2.2233: cannot convert a byte index into a character index (#13978)
Problem:    Cannot convert a byte index into a character index.
Solution:   Add charidx(). (Yegappan Lakshmanan, closes vim/vim#7561)
17793ef23a
2021-02-22 20:13:14 -05:00
9d5f842807 lsp: remove deprecated references to 'callbacks' (#13945)
vim.lsp.callbacks was deprecated a few months ago. This is a cleanup before the release.
Use vim.lsp.handlers instead.
2021-02-23 00:02:51 +01:00
46a58b74f4 feat(lsp): use vim.notify for some errors (#13992) 2021-02-22 23:31:12 +01:00
fb2adadc9e Merge pull request #13988 from janlazo/vim-8.1.1310
vim-patch:8.1.1310: named function arguments are never optional
2021-02-22 15:04:16 -05:00
bca19138bf tui: fix possibility of evaluating uninitialized variables (#13987) 2021-02-22 16:55:28 +01:00
77bae79c07 fixup! vim-patch:8.1.1310: named function arguments are never optional 2021-02-22 09:27:49 -05:00
66b0ab0883 vim-patch:8.1.1310: named function arguments are never optional
Problem:    Named function arguments are never optional.
Solution:   Support optional function arguments with a default value. (Andy
            Massimino, closes vim/vim#3952)
42ae78cfff
2021-02-22 09:16:41 -05:00
7bcac75f30 Merge pull request #13952 from bfredl/overlay
decorations: allow virt_text overlay at any column
2021-02-22 10:17:44 +01:00
4781333a7a decorations: allow virt_text overlay at any column 2021-02-22 09:40:06 +01:00
595f6e4d64 vim-patch:8.2.2070: can't get the exit value in VimLeave(Pre) autocommands (#13981)
Problem:    Can't get the exit value in VimLeave or VimLeavePre autocommands.
Solution:   Add v:exiting like in Neovim. (Yegappan Lakshmanan, closes vim/vim#7395)
f0068c5154

Rearrange VimVarIndex enums and vimvars[] entries to sync with  Vim.

N/A patches for version.c:

vim-patch:8.2.2535: MS-Windows: cannot run all vim9 tests

Problem:    MS-Windows: cannot run all vim9 tests.
Solution:   Make test_vim9 target work.
723ef5db98
2021-02-20 23:45:14 -05:00
1caf58578c lsp: Fix text edits operating on the last line of a document (#13677)
`lines` can be empty, in which case `#lines[#lines]` failed with an
error:

    lsp/util.lua:214: attempt to get length of a nil value
2021-02-19 22:20:42 -05:00
b2fcfc65b7 lsp: client stop cleanups (#13877)
* lsp: client stop cleanups

* Add diagnostic clearing to client.stop() method used by nvim-lspconfig
* Clear diagnostic cache to prevent stale diagnostics on client restart

* lsp: Add test for vim.lsp.diagnostic.reset
2021-02-19 22:05:49 -05:00
4d5dbea4f4 [RFC] ":source" sources from current buffer if filename is omitted (#11444)
Fix https://github.com/neovim/neovim/issues/8722
2021-02-18 01:25:51 -05:00
d08e983c6b Merge pull request #13968 from janlazo/runtime-tar
runtime/tar: port latest files
2021-02-18 01:13:40 -05:00
b46a92f519 runtime/tar: 23515b4ef7580af8b9d3b964a558ab2007cacda5
Port tar files only in order to support '*.tar.zst' files.

Close https://github.com/neovim/neovim/pull/13337
2021-02-17 23:59:17 -05:00
d3c6f74498 runtime/tar: 8024f936368336241406137a2fa78ed5ee9000a6
Port tar runtime files only.
2021-02-17 23:54:40 -05:00
1d84277738 runtime/tar: 2963456ff2b740244b3a064785fe681b1998d75e
Port tar files for release v31 only.
2021-02-17 23:39:37 -05:00
18f90336cb vim-patch:8.2.2523: Svelte filetype not recognized (#13961)
Problem:    Svelte filetype not recognized.
Solution:   Add a detection rule. (Brian Ryall, closes vim/vim#7858)
c0fcb6e0b1
2021-02-18 00:22:48 +01:00
64b7d7ae78 vim-patch:8.2.2522: Beancount filetype not recognized (#13960)
Problem:    Beancount filetype not recognized.
Solution:   Add a detection rule. (Brian Ryall, closes vim/vim#7859)
9bbd883b35
2021-02-18 00:20:07 +01:00
2dd383c943 fix(flake): add debuginfo to nvim-debug (#13947)
nvim-debug was missing symbols.
adding the lock file to remove the flake warning message as well.
2021-02-17 18:58:40 +01:00
d623400cad Merge pull request #13944 from chentau/on_bytes_doc
Doc: update documentation for on_bytes
2021-02-17 13:14:18 +01:00
d966e0142d Doc: update documentation for on_bytes 2021-02-17 00:47:19 -08:00
4bc74c2431 netrw: move netrw_home to XDA_DATA_HOME (#13939) 2021-02-16 21:21:43 -05:00
5006881b0c Issue 12928: Windows missing QtSVG DLL
We should copy the entire output of windeployqt. Currently several DLLs
are missing including one required to display the window icon.
2021-02-16 19:34:16 -05:00
03383ee27b doc: Update vim_diff.txt (#13954)
Update vim_diff.txt to reflect the following patches:

patch 8.1.1113: making an autocommand trigger once is not so easy
patch 8.2.2128: there is no way to do something on CTRL-Z
patch 8.2.2508: cannot change the character displayed in non existing lines
patch 8.2.2518: 'listchars' should be window-local
2021-02-16 19:50:06 +01:00
772421f6b1 Merge pull request #13692 from mjlbach/fix_cursor_respect_current_line
fix_cursor: do not change line number when edit will not impact cursor row
2021-02-16 18:32:38 +01:00
7250d521c5 Merge pull request #13949 from janlazo/runtime-netrw
runtime/netrw: port missing Vim 8.1,8.2 runtime patches
2021-02-16 09:24:17 -05:00
44dac91501 runtime/netrw: 207f009326c8f878defde0e594d7d9ed9860106e
Port runtime/doc/pi_netrw.txt only.
2021-02-16 07:58:05 -05:00
d29553d4a9 runtime/netrw: 8024f936368336241406137a2fa78ed5ee9000a6
Port runtime/doc/pi_netrw.txt only.
2021-02-16 07:55:03 -05:00
44ba77e589 runtime/netrw: 2963456ff2b740244b3a064785fe681b1998d75e
Port netrw files for release v168 only.
2021-02-16 07:51:25 -05:00
8d2c76c80c runtime/netrw: 469bdbde1e8ea8110705327ab193acca79296742
Port runtime/doc/pi_netrw.txt only.
2021-02-15 21:32:28 -05:00
803be53cf7 runtime/netrw: 2ed639abdc4000436115f378e28320b7bee38a6e
Port runtime/doc/pi_netrw.txt only.
2021-02-15 21:31:30 -05:00
08947d1642 runtime/netrw: 91359014b359cf816bf943fe2c7d492996263def
Port netrw files for release v167 only.
2021-02-15 21:29:20 -05:00
9b662a57db runtime/netrw: 09c6f265b21065ffa9437837b1d0955137175e45
Port runtime/doc/pi_netrw.txt only.
2021-02-15 21:21:10 -05:00
68816c7e0a runtime/netrw: 574ee7bc1246070dba598f9561a2776aa1a10d07
Port runtime/doc/pi_netrw.txt only.
2021-02-15 21:19:47 -05:00
e35c766518 runtime/netrw: 5ef1c6a4838a9629b793f3ae676f72a764171b00
Port netrw files only.
2021-02-15 21:16:27 -05:00
dc3ca16a99 Merge pull request #13930 from janlazo/vim-8.2.1902
vim-patch:8.2.{54,64,576,925,1056,1058,1902,1903,1904}
2021-02-14 11:36:12 -05:00
147d40f2a0 vim-patch:8.2.0925: getcompletion() does not return command line arguments
Problem:    Getcompletion() does not return command line arguments.
Solution:   Add the "cmdline" option. (Shougo, closes vim/vim#1140)
1f1fd44ef7
2021-02-14 10:00:59 -05:00
96ca0e2142 Merge pull request #13935 from bfredl/undotime
autoread episode III: revenge of the trees
2021-02-14 14:53:36 +01:00
c7a65fe6a1 buffer_updates: autoload episode III: revenge of the trees 2021-02-14 11:10:36 +01:00
e87c30a196 vim-patch:8.2.0064: diffmode completion doesn't use per-window setting
Problem:    Diffmode completion doesn't use per-window setting.
Solution:   Check if a window is in diff mode. (Dominique Pell, closes vim/vim#5419)
efcc329020
2021-02-13 18:22:04 -05:00
54cd7298f8 vim-patch:8.2.0054: :diffget and :diffput don't have good completion
Problem:    :diffget and :diffput don't have good completion.
Solution:   Add proper completion. (Dominique Pelle, closes vim/vim#5409)
ae7dba8969
2021-02-13 18:17:25 -05:00
fd44bd4d4f vim-patch:8.2.1056: wrong display when mixing match conceal and syntax conceal
Problem:    Wrong display when mixing match conceal and syntax conceal.
Solution:   Adjust how conceal flags are used. (closes vim/vim#6327, closes vim/vim#6303)
211dd3fd82
2021-02-13 17:05:06 -05:00
34291eba80 vim-patch:8.2.1058: multiline conceal causes display errors
Problem:    Multiline conceal causes display errors.
Solution:   Do not allow conceal cross over EOL. (closes vim/vim#6326, closes vim/vim#4854,
            closes vim/vim#6302)
fc838d6cb0

Port test_conceal.vim but skip tests that require screendumps.
2021-02-13 16:15:00 -05:00
cdace43b6c vim-patch:8.2.1904: still using default option values after using ":badd +1"
Problem:    Still using default option values after using ":badd +1".
Solution:   Find a window where options were set.  Don't set the window when
            using ":badd".
89b693e562
2021-02-13 14:27:17 -05:00
a2aeed013c vim-patch:8.2.1903: buffer test fails with normal features
Problem:    Buffer test fails with normal features.
Solution:   Use 'numberwidth' instead of 'conceallevel' in the test.
37e4e03c67
2021-02-13 13:50:00 -05:00
6855a55d53 vim-patch:8.2.0576: some errors are not covered by tests
Problem:    Some errors are not covered by tests.
Solution:   Add a few more tests. (Dominique Pelle, closes vim/vim#5920)
067297e16a
2021-02-13 13:47:29 -05:00
9860d14af3 vim-patch:8.2.1902: default option values changed with :badd for existing buffer
Problem:    Default option values are changed when using :badd for an existing
            buffer.
Solution:   When calling buflist_new() pass a zero line number. (closes vim/vim#7195)
e974fa7b2b
2021-02-13 13:40:09 -05:00
5ad32885d4 vim-patch:8.2.2499: "vim -g --version" does not redirect output (#13922)
Problem:    "vim -g --version" does not redirect output.
Solution:   Reset gui.starting when showing version info. (closes vim/vim#7815)
3b678047bc

N/A patches for version.c:

vim-patch:8.1.2065: compiler warning building non-GUI with MinGW.

Problem:    Compiler warning building non-GUI with MinGW.
Solution:   Adjust #ifdefs. (Yegappan Lakshmanan, closes vim/vim#4964)
910c378d93

vim-patch:8.2.2500: build fails without the GUI feature

Problem:    Build fails without the GUI feature.
Solution:   Add #ifdef.
0bcadf14aa

vim-patch:8.2.2502: a few github actions are failing

Problem:    A few github actions are failing.
Solution:   Install setuptools-rust. (closes vim/vim#7823)
ca753ec862

vim-patch:8.2.2507: github build may fail if Ubuntu 20.04 is used

Problem:    Github build may fail if Ubuntu 20.04 is used.  Installing rust is
            not needed.
Solution:   Specify ubuntu-18.04 instead of latest. Update "pip" instead of
            installing rust. (Ozaki Kiichi, closes vim/vim#7820)
0fa09676c2
2021-02-13 12:00:36 -05:00
8399f48ca9 man.vim: :Man should not change global value of 'tagfunc' option (#13926) 2021-02-13 11:54:03 -05:00
52397aaa0d Merge pull request #13491 from seandewar/vim-8.2.1967
vim-patch:8.2.{1967,2058,2467}
2021-02-11 22:37:38 -05:00
4bc82a59b6 vim-patch:8.2.2467: script generated by :mkview changes alternate file
Problem:    Script generated by :mkview changes alternate file.
Solution:   Only write :balt in the session file. (Harish Rajagopal,
            closes vim/vim#7779)
139348f3e8
2021-02-11 19:00:55 +00:00
add0cf9a42 vim-patch:8.2.2058: using mkview/loadview changes the jumplist
Problem:    Using mkview/loadview changes the jumplist.
Solution:   Use ":keepjumps".  Don't let ":badd" or ":balt" change the
            jumplist. (closes vim/vim#7371)
3482be6a33

Definition for BufWinEnter autocmd in Test_mkview_loadview_jumplist()
was moved down a few lines until after the views are written, as in
Nvim, :loadview throws if the view file can't be opened.
2021-02-11 19:00:55 +00:00
d9dd360d2a vim-patch:8.2.1967: the session file does not restore the alternate file
Problem:    The session file does not restore the alternate file.
Solution:   Add ":balt".  Works like ":badd" and also sets the buffer as the
            alternate file.  Use it in the session file. (closes vim/vim#7269,
            closes vim/vim#6714)
59d8e56e04

Include minimal test_buffer.vim from patch 8.2.0243 for Test_balt().
Add entry for :balt to runtime/doc/index.txt from vim/vim#7819.
2021-02-11 19:00:24 +00:00
393095c1c6 cmake: Remove duplicate compile flags argument (#13920)
${C_FLAGS_ARRAY} is already part of ${gen_cflags} and does not
need to be passed explicitly.

Passing it a second time leads to macro redefinition warnings when
-D_FORTIFY_SOURCE=2 is given as part of CFLAGS because Neovim
enforces -D_FORTIFY_SOURCE=1.
2021-02-11 18:37:41 +01:00
1aec5ba85e Merge pull request #13908 from janlazo/vim-8.2.2489
vim-patch:8.1.0341,8.2.{2489,2490,2492,2495,2496}
2021-02-10 20:56:54 -05:00
81b4c88130 vim-patch:8.2.2490: 'wrap' option is always reset when starting diff mode
Problem:    'wrap' option is always reset when starting diff mode.
Solution:   Add the "followwrap" item in 'diffopt'. (Rick Howe, closes vim/vim#7797)
4223d43c0f
2021-02-10 18:20:02 -05:00
81c9cda296 vim-patch:8.2.2496: insufficien testing for text jumping fix
Problem:    Insufficien testing for text jumping fix.
Solution:   Add another test case.
5202929dab
2021-02-10 18:07:32 -05:00
c3dada3e5a vim-patch:8.2.2495: text jumps up and down when moving the cursor
Problem:    Text jumps up and down when moving the cursor in a small window
            with wrapping text and 'scrolloff' set.
Solution:   Adjust the computation of w_skipcol. (partly by Ghjuvan Lacambre,
            closes vim/vim#7813)
8f33ebfade
2021-02-10 18:07:31 -05:00
89143b5fc4 vim-patch:8.2.2492: command line buffer name cannot be translated
Problem:    Command line buffer name cannot be translated.
Solution:   Add _(). (Gabriel Dupras, closes vim/vim#7812)
b17ec4d427
2021-02-10 17:58:59 -05:00
787446886f vim-patch:8.1.0341: :argadd in empty buffer changes the buffer name
Problem:    :argadd in empty buffer changes the buffer name. (Pavol Juhas)
Solution:   Don't re-use the current buffer when not going to edit the file.
            (closes vim/vim#3397)  Do re-use the current buffer for :next.
32bbd00949
2021-02-10 17:54:24 -05:00
be981112b8 vim-patch:8.2.2489: current buffer is wrong after deletebufline() fails
Problem:    current buffer is wrong after deletebufline() fails to delete a
            line in another buffer.
Solution:   Restore the current buffer.
963ffa0a5a
2021-02-10 17:54:24 -05:00
61aea004d7 Merge pull request #13895 from bfredl/ar2
buffer updates: fix autoread but for real this time
2021-02-10 22:28:52 +01:00
94622ca66b buffer updates: add on_reload callback and handle it in treesitter parser 2021-02-10 18:58:46 +01:00
fa5f583981 treesitter: propagate on_detach event properly 2021-02-10 18:57:49 +01:00
230f2ff381 Merge pull request #13903 from glacambre/fix_prompt_for_number
Clear prompt_for_number messages
2021-02-10 18:51:33 +01:00
dbf3c5d953 Clear prompt_for_number messages
This fixes issues in GUIs:
https://github.com/akiyosi/goneovim/issues/94
https://github.com/glacambre/firenvim/issues/448
2021-02-10 13:04:02 +01:00
971e0ca903 fix(notify): Expected 3 arguments error (#13905) 2021-02-09 11:41:02 +01:00
8becdec391 vim-patch:8.2.2259: Test_Executable() fails when using chroot (#13907)
Problem:    Test_Executable() fails when using chroot.
Solution:   Ignore the difference between "sbin" and "bin".
a387083b2f

Cherry-pick Test_Executable() changes from patches v8.1.1921, v8.2.1432
to be in sync with Vim.

N/A patches for version.c:

vim-patch:8.1.0509: checking cwd not accessible fails for root

Problem:    Checking cwd not accessible fails for root. (James McCoy)
Solution:   Skip this part of the test for root. (closes vim/vim#3595)
0b38f54730

vim-patch:8.2.2487: terminal shows garbage after double-wide character

Problem:    Terminal shows garbage after double-wide character with a
            combining character. (Kyoichiro Yamada)
Solution:   Libvterm: do not add the width of the combining character to the
            glyph width. (closes vim/vim#7801)
4549dad874

vim-patch:8.2.2488: json_encode() gives generic argument error

Problem:    json_encode() gives generic argument error.
Solution:   Mention the type that can't be encoded. (issue vim/vim#7802)
a853089479
2021-02-08 22:10:43 -05:00
38ea2ce342 Merge pull request #13842 from vigoux/update-last-line
fix(buf_updates): send updates when putting past last line
2021-02-08 20:29:59 +01:00
b2b47e4618 Merge pull request #13899 from chentau/set_text_fix
correctly mark changed regions for set_text
2021-02-08 19:08:43 +01:00
3094bb4e38 fix(buf_updates): send updates when putting past last line
Fixes #13710
2021-02-08 19:08:42 +01:00
00423730b5 Merge pull request #13843 from teto/notif_provider
[RDY] Notification provider
2021-02-08 15:49:27 +01:00
02a3c41794 Merge pull request #13898 from janlazo/set_string_option_direct
Refactor option,var functions to use char for param type
2021-02-07 18:28:34 -05:00
d34846af74 option: use char* for get_option_value() param
'name' param is casted to char_u* within get_option_value().
Most calls to get_option_value() cast arg to 'name' from char to char_u.
Remove these pointless type casts.
2021-02-07 17:57:37 -05:00
b1df53e868 menu: use char* for set_context_in_menu_cmd() param
All calls to set_context_in_menu_cmd() cast "cmd" arg to char_u.
get_menu_cmd_nodes() doesn't require "cmd" to be unsigned char.
Use "char" type for "cmd" function param to reduce type casts.
2021-02-07 17:28:00 -05:00
0458b23d53 eval: use char* for set_var_lval() param
'op' param is casted to char_u* within set_val_lval().
Most calls to set_val_lval() cast arg to 'op' from char to char_u.
Remove these pointless type casts.
2021-02-07 17:27:59 -05:00
7484c7de9a eval: use char* for set_internal_string_var()
"name" param was cast to (const char *).
All calls to set_internal_string_var() cast from (char *) to (char_u *).
Remove these useless casts.
2021-02-07 17:27:59 -05:00
f1fdeaf667 option: use char* for set_string_option_direct()
"name" param was cast to (const char *).
All calls to set_string_option_direct() cast 1st arg
from (char *) to (char_u *).
Remove these useless casts.
2021-02-07 17:27:59 -05:00
05605bfc05 correctly mark changed regions for set_text 2021-02-07 13:50:29 -08:00
a7d9df996d Merge pull request #13894 from stsewd/ts-small-fixes
treesitter: small fixes
2021-02-07 15:23:41 +01:00
947f9a04d4 treesitter: small fixes
Mostly typos I found while reading the code.
2021-02-07 01:27:38 -05:00
b894fbcbe8 Merge pull request #13892 from janlazo/vim-8.1.2285
vim-patch:8.1.2285
2021-02-06 22:11:02 -05:00
f9c0af0180 eval: ll_range,ll_empty2 members are bool 2021-02-06 17:40:40 -05:00
bea99729dd vim-patch:8.1.2285: padding in structures wastes memory
Problem:    Padding in structures wastes memory.
Solution:   Move fields to avoid padding. (Dominique Pelle, closes vim/vim#5202)
d6beab0248

Skip "ml_line_len" member of "struct memline".
Patch v8.1.0579 was not ported.
2021-02-06 17:30:47 -05:00
336eb70822 vim-patch:8.2.2469: confusing error if :winsize has a wrong argument (#13889)
Problem:    Confusing error if :winsize has a wrong argument.
Solution:   Quote the argument in the error. (closes vim/vim#2523)
f5a5116a96

Cherry-pick Test_winsize_cmd() from patch v8.2.0243.
2021-02-06 12:24:24 -05:00
4526294848 Fix unused vararg 2021-02-06 11:06:33 -06:00
e455f0ba2d Merge pull request #13876 from jamessan/pty-term
fix(pty): Always use $TERM from the job's env dict
2021-02-06 09:06:34 -05:00
33f92fe025 fix(pty): Always use $TERM from the job's env dict
Before #12937, the only way to specify the `$TERM` for a pty job was
through the `TERM` key in the job's opts dict.  This was shuttled to the
child process throug a special field on the PtyProcess object and
injected into the environment after forking.

Now that we have a proper way to specify the environment for a job, we
can simply ensure that the env dict has a proper `TERM` set and avoid
the extra shuttling of data around.

This deprecates the use of the `TERM` option, but will still honor it if
present, although at a lower priority than a `TERM` present in the env
dict.

This also fixes #13874 because we're no longer trying to overwrite
`TERM` in the env dict with the special pty `term_name`.  Doing so
raises an internal error because of the existing key which, under
certain circumstances, would cause the "hit enter" prompt.  However,
since the child process had already forked, there was no way for the
user to acknowledge the prompt and we would just hang there.
2021-02-06 07:12:33 -05:00
f4f6cce952 Merge pull request #13888 from jamessan/win-ci
ci(gha/win): Do not rename python.exe to python3.exe if it exists
2021-02-06 07:10:58 -05:00
02a9663869 Merge pull request #13701 from erw7/fix-checkhealth
Fix checkhealth problems
2021-02-06 13:01:37 +09:00
957ac9442c Merge pull request #13702 from erw7/fix-build_stl_str_hl
buffer.c: fix problem of memory allocation
2021-02-06 12:56:20 +09:00
787339892d Merge pull request #12080 from erw7/feature-bracketed-paste-on-term
terminal: add bracketed pasting feature
2021-02-06 12:51:24 +09:00
8f24199490 ci(gha/win): Do not rename python.exe to python3.exe if it exists
GHA now provides python3.exe by default -- actions/python-versions#78

Ensure Python 2 directory is earlier in $PATH so bare python always
invokes Python 2.
2021-02-05 22:39:10 -05:00
c95e797b83 Merge pull request #13878 from bfredl/incmark
inccommand: preserve extmarks when undoing preview substitution
2021-02-05 08:50:53 +01:00
ad1a437835 vim.fn: add test for error 2021-02-04 09:22:27 -06:00
2d06538b5e remove extra line, remove () in error 2021-02-04 08:27:38 -06:00
209fb35acd tests: clean up lua/buffer_updates_spec.lua 2021-02-04 14:35:30 +01:00
aa50369897 inccommand: preserve extmarks when undoing preview substitution 2021-02-04 14:33:37 +01:00
94cf7bba00 lsp: Fix pumvisible() check introduced in #12900 (#13866)
`pumvisible()` returns a number, and numbers are always `true` in Lua,
so the return value needs to be checked explicitly.

Using https://github.com/neovim/neovim/pull/12900 as context, it appears
the intention was to move into the `if` branch when the completion popup
is not shown (i.e. `vim.fn.pumvisible() == 0`).
2021-02-04 12:35:17 +01:00
4dc41c0516 Change default for tpf option
Change the default of tpf to the same value as the default of xterm's
disallowedPasteControls, because it may be a security risk.
2021-02-04 15:20:05 +09:00
1e3fadb419 Add termpastefilter option
Change to specify a character to be filtered as an option when pasting on
the terminal.
2021-02-04 15:20:05 +09:00
14158e8d47 Change to filter control characters when pasting a terminal window
Change to filter the following control characters in the same way as
xterm.

\x00-\x07, \x0b-\x0c, \x0e-\x1f
2021-02-04 15:20:05 +09:00
81a30f4367 Add support for bracketed paste mode in terminal windows 2021-02-04 15:20:05 +09:00
b96db38af1 Merge pull request #13865 from janlazo/vim-8.2.2437
vim-patch:8.2.{2437,2439,2442,2446,2447,2448,2457,2458,2462,2464}
2021-02-03 22:36:52 -05:00
e65d0e53b1 vim.fn: throw error when trying to use API function 2021-02-03 18:13:04 -06:00
4a1a86a2be vim-patch.sh: remove unsupported files (#13570)
Add files listed in https://github.com/neovim/neovim/wiki/Merging-patches-from-upstream-Vim#na-not-applicable-patches.
2021-02-03 18:53:27 -05:00
da3f9778af vim-patch:8.2.2464: using freed memory if window closed in autocommand
Problem:    Using freed memory if window closed in autocommand. (houyunsong)
Solution:   Check the window still exists.
8ab375706e
2021-02-03 18:46:53 -05:00
02cda35cf7 vim-patch:8.2.2462: Coverity warns for not checking for fseek() error
Problem:    Coverity warns for not checking for fseek() error.
Solution:   Give an error message if fseek() fails.
2c363a2e95
2021-02-03 18:37:32 -05:00
8d3baf0791 vim-patch:8.2.2458: Coverity warns for :retab using freed memory
Problem:    Coverity warns for :retab using freed memory.
Solution:   Use the updated line pointer when moving text properties.
0dcd39bad5

N/A patches for version.c:

vim-patch:8.2.2457: Coverity warns for memory leak

Problem:    Coverity warns for memory leak.
Solution:   Free memory when out of memory.
4dba04256b
2021-02-03 18:33:52 -05:00
a90a43796a test: test vim-notify 2021-02-02 15:40:08 +01:00
bb22c78044 api: add nvim_notify
parameters are mandatory
2021-02-02 15:40:08 +01:00
65e51fca0e vim-patch:8.2.2447: 'foldlevel' not applied to folds restored from session
Problem:    'foldlevel' not applied to folds restored from session.
Solution:   Set 'foldlevel' after creaiting the folds. (closes vim/vim#7767)
f9547eb6ef
2021-02-01 21:42:26 -05:00
2a6580a8e2 vim-patch:8.2.2446: setting 'term' empty has different error if compiled with GUI
Problem:    Setting 'term' empty has different error if compiled with GUI.
Solution:   Insert "else". (closes vim/vim#7766)
5daa911626

N/A patches for version.c:

vim-patch:8.2.2437: deprecation warnings with default configuration

Problem:    Deprecation warnings with default configuration.
Solution:   Add -Wno-deprecated-declarations.
4d8479b335

vim-patch:8.2.2439: not easy to figure out what packages to get

Problem:    Not easy to figure out what packages to get when installing Vim on
            a new Ubuntu system.
Solution:   Mention explicit commands that are easy to follow.
3d2bb8b6f1

vim-patch:8.2.2442: automatic GUI selection does not check for GTK 3

Problem:    Automatic GUI selection does not check for GTK 3.
Solution:   Make SKIP_GTK3 empty for automatic GUI support.  Set SKIP_GTK3 to
            YES when checking for GTK2.
f272ae12ac

vim-patch:8.2.2448: compilation error with Ruby 3.0

Problem:    Compilation error with Ruby 3.0.
Solution:   Adjust #ifdefs and declaration. (Ken Takata, closes vim/vim#7761)
9d20daffc2
2021-02-01 21:34:12 -05:00
cc1851c9fd Add clangd cache to ignore (#13856)
While standard library is cached to a user's directory such as
$XDG_CACHE_HOME, directory-specific clangd indexes are stored to .cache
subdirectory.
https://github.com/llvm/clangd-www/blob/main/design/indexing.md#backgroundindex
2021-01-31 23:03:35 -05:00
563d7b694b tests: add test for cursor postion when deleting buffer lines 2021-01-31 12:43:48 -08:00
9f2335937e fix_cursor: do not change line number when edit will not impact cursor
row
2021-01-31 11:57:22 -08:00
e85c8dff69 Merge pull request #12937 from jamessan/term-env 2021-01-31 13:25:16 -05:00
81794204ce ci(sr.ht): Use RelWithDebInfo builds
Many compiler checks rely on optimizations being enabled, so we want
these to show up in CI.  Use RelWithDebInfo instead of Release so that
assert() statements aren't compiled out.
2021-01-31 11:28:52 -05:00
27a7a4d384 Use abort() instead of assert(false) for things that should never happen
assert() is compiled out for release builds, but we don't want to
continue running in these impossible situations.

This also resolves the "implicit fallthrough" warnings for the asserts
in switch cases.
2021-01-31 11:28:52 -05:00
b2713f11b4 vim-patch:8.2.2430: :vimgrep expands wildcards twice (#13853)
Problem:    :vimgrep expands wildcards twice.
Solution:   Do not expand wildcards a second time.
f8c6a17180
2021-01-31 10:10:22 -05:00
035ee868ae fix(pty_proc/macOS): Properly set the environment for the child
Binding _NSGetEnviron()'s return value to a local variable and then
re-binding that is incorrect.  We need to directly update what
_NSGetEnviron() refers to.
2021-01-31 07:54:22 -05:00
db734ae994 test(job): Ensure job-specific env var overrides global env var 2021-01-31 07:54:21 -05:00
a199363be2 Pass environment on to pty processes on Windows
vim-patch:8.2.0239: MS-Windows: 'env' job option does not override existing vars

Problem:  MS-Windows: 'env' job option does not override existing
          environment variables.  (Tim Pope)
Solution: Set the environment variables later. (Yasuhiro Matsumoto,
          closes vim/vim#5485, closes vim/vim#5608)
355757aed6

Co-authored-by: erw7 <erw7.github@gmail.com>
2021-01-31 07:54:21 -05:00
a54ac073fb eval/environ: Prefer the last definition of an env var
It's possible for the environment variable block given to nvim to
contain multiple definitions for the same env var.  In this case, nvim
should preserve the last one defined.
2021-01-31 07:54:21 -05:00
8eec9c7d5b Common handling of required/ignored env vars
When starting a pty job, there are certain env vars that we need to
either add or remove.  Currently, there are two relevant scenarios.

* Removing irrelevant env vars on Unix, mostly related to the terminal
  hosting nvim since they do not apply to a libvterm-hosted terminal.

* Adding required env vars for Windows jobs.
2021-01-31 07:54:20 -05:00
ef7c6b972a Support specifying "env" option for termopen()
Co-authored-by: erw7 <erw7.github@gmail.com>
2021-01-31 07:54:20 -05:00
7f50c69268 Use dict_T to pass env vars to process spawning code
Co-authored-by: Matthieu Coudron <mattator@gmail.com>
2021-01-31 07:54:20 -05:00
55add1c1c8 version.c: update [ci skip] (#13705)
vim-patch:8.2.2307: a shell command in the vimrc causes terminal output
vim-patch:8.2.2312: build failure with Ruby 3.0 and 32 bits
vim-patch:8.2.2326: build error with +eval feature but without +spell
vim-patch:8.2.2337: configure test for GTK only says "no"
vim-patch:8.2.2346: Codecov reports every little coverage drop
vim-patch:8.2.2347: build failure without GUI
vim-patch:8.2.2348: no check for modified files after focus gained
vim-patch:8.2.2352: if focus lost/gained is received twice code is not ignored
vim-patch:8.2.2358: wrong #ifdef for use_xterm_like_mouse()
vim-patch:8.2.2383: focus escape sequences are not named
vim-patch:8.2.2407: old jumplist code is never used
vim-patch:8.2.2408: MinGW: "--preprocessor" flag no longer supported
vim-patch:8.2.2431: warning for -fno-strength-reduce with Clang 11
vim-patch:8.2.2432: libvterm tests are executed even when libtool doesn't work
2021-01-30 20:48:49 -05:00
4e8a01a306 Merge pull request #13835 from saadparwaiz1/runtime/zsh
Update Runtime Files For Zsh
2021-01-30 18:34:16 -05:00
3f81f5c7a4 feat: adds vim.notify
Adds function to notify the user like this:
`:lua vim.notify("hello user")`
embeds log levels vim.log.levels.

you can then reassign vim.notify to for instance
```
function notify_external(msg, log_level, opts)
	vim.fn.jobstart({"notify-send", msg })
end
```
2021-01-31 00:18:22 +01:00
55fed9a2b0 runtime/zsh: 23515b4ef7580af8b9d3b964a558ab2007cacda5
port zsh compiler only
2021-01-30 20:50:04 +00:00
bf1da7424d runtime/zsh: 23515b4ef7580af8b9d3b964a558ab2007cacda5
port zsh ftplugin only.
2021-01-30 20:50:04 +00:00
7722eb0953 runtime/zsh: b17893aa940dc7d45421f875f5d90855880aad27
port zsh ftplugin only
2021-01-30 20:50:04 +00:00
da61cca9f7 runtime/zsh: 23515b4ef7580af8b9d3b964a558ab2007cacda5
port zsh syntax file only
2021-01-30 20:50:04 +00:00
d89cbb62ab runtime/zsh: b17893aa940dc7d45421f875f5d90855880aad27
port zsh syntax file only
2021-01-30 20:50:04 +00:00
44802202be runtime/zsh: 96f45c0b6fc9e9d404e6805593ed1e0e6795e470
Port zsh syntax file only
2021-01-30 20:50:04 +00:00
c4d0211fea Merge pull request #13852 from janlazo/vim-8.2.2037
vim-patch:8.2.{2037,2038}
2021-01-30 21:31:20 +01:00
150859d717 test/old: rewrite method code in test_compiler.vim
Patch v8.1.1803 and related method patches are not ported yet.
Revert this commit when those patches are ported.
2021-01-30 13:40:28 -05:00
647c9c558b vim-patch:8.2.2038: compiler test fails on MS-Windows
Problem:    Compiler test fails on MS-Windows.
Solution:   Sort the found compiler plugin names.
142f23544c
2021-01-30 13:37:26 -05:00
8aae1521e5 vim-patch:8.2.2037: compiler test depends on list of compiler plugins
Problem:    Compiler test depends on list of compiler plugins.
Solution:   Compare with the actual list of compiler plugins.
60bc8e7244
2021-01-30 13:37:25 -05:00
ad98b84008 Merge pull request #13833 from janlazo/vim-8.2.2412
vim-patch:8.2.{2412,2418,2420,2425}
2021-01-29 18:02:43 -05:00
1376994f15 vim-patch:8.2.2425: cursor on invalid line with range and :substitute
Problem:    Cursor on invalid line with range and :substitute.
Solution:   Do not move the cursor when skipping commands. (closes vim/vim#3434)
df2c2988bb

Cherry-pick Test_for_invalid() from patch v8.1.0736.
2021-01-29 00:12:24 -05:00
c77b679ecd vim-patch:8.2.2420: too many problems with using all autocommand events
Problem:    Too many problems with using all autocommand events.
Solution:   Disallow defining an autocommand for all events.
9a046fd08b

Delete Test_wipe_cbuffer().
Commit dc5f4a3cc2 should have removed it.
2021-01-28 23:43:15 -05:00
f05ffaef1c vim-patch:8.2.2418: color not changed if ModeMsg highlight is set in InsertEnter
Problem:    Color not changed if ModeMsg highlight is set in InsertEnter
            autocmd event. (Paul Swanson)
Solution:   Call highlight_changed() after triggering InsertEnter.
            (closes vim/vim#7751)
2e6cdb91e8
2021-01-28 23:04:27 -05:00
2bde381d28 vim-patch:8.2.2412: not all fields in "cstack" are initialized
Problem:    Not all fields in "cstack" are initialized which might cause a
            crash.
Solution:   Use CLEAR_FIELD().
ce0370d9e6
2021-01-28 20:40:30 -05:00
8950f4e94a Merge pull request #13784 from runiq/get_extmark_by_id-limit_break
doc: remove nvim_buf_get_extmark_by_id limit opt
2021-01-28 18:27:24 +01:00
9feb47ec4b Merge pull request #13836 from teto/contribute-doc
doc: link wiki on how to improve/build doc
2021-01-28 15:20:29 +01:00
12cd9e4c08 doc: link wiki on how to improve/build doc
We generate some part of the doc from lua which complexifies the process a bit so we've added a wiki page explaining this.
2021-01-27 21:15:52 +01:00
459a6c845e lsp/tests: Ensure client is stopped in basic_init tests (#13798) 2021-01-27 15:32:07 +01:00
271cec291a Merge pull request #13719 from chentau/lua_compl
Add completion to lua
2021-01-27 07:40:10 +01:00
f0ccac0ba4 lint 2021-01-26 17:09:35 -08:00
d82688973d lua: complete methods in metatables 2021-01-26 17:04:32 -08:00
d95a465b43 Don't show entire context when completing 2021-01-26 17:04:32 -08:00
901dd79f6a feat: add completion to ':lua' 2021-01-26 17:04:31 -08:00
4d1fc167a8 Merge pull request #13828 from vigoux/ts-bump-c-runtime
deps(treesitter): bump C parser and runtime
2021-01-26 18:51:41 +01:00
6d07d18f91 deps(treesitter): bump C parser and runtime
It's been a while since we bumped the C parser version, and a few ABI
versions have been realised since.
2021-01-26 15:17:10 +01:00
78f0f00cd5 Merge pull request #13820 from janlazo/vim-8.2.2392
vim-patch:8.2.{2392,2399,2402}
2021-01-25 21:20:14 -05:00
1a6d89eb90 lsp: match textDocument/didChange eol behavior (#13792)
We should be consistent in sending the EOL character to servers(I think). Julia expects this to match on bufwrite, or it crashes when vim appends the newline during the write process.
2021-01-25 17:52:40 +01:00
687ff6566a vim-patch:8.2.2402: some filetypes not detected
Problem:    Some filetypes not detected.
Solution:   Detect Ruby Signature and Puppet related files. (Doug Kearns)
8323cab31c
2021-01-24 21:56:54 -05:00
69d1094271 vim-patch:8.2.2399: fold test fails in wide terminal
Problem:    Fold test fails in wide terminal.
Solution:   Adjust the test. (Dominique Pelle, closes vim/vim#7731, closes vim/vim#7739)
7cf0c114d6
2021-01-24 14:19:54 -05:00
2ce7e4e8a7 vim-patch:8.2.2392: fennel filetype not recognized
Problem:    Fennel filetype not recognized.
Solution:   Detect with pattern and hashbang. (Chinmay Dalal, closes vim/vim#7729)
402115f1c2
2021-01-24 14:15:16 -05:00
69103ff0cf Merge pull request #13807 from spywhere/min-size-auto-sign
Auto sign column with minimum size support
2021-01-23 22:46:29 +01:00
444e60ab39 Merge pull request #13819 from runiq/extmark_gravity_docs
Doc: Generate API docs for buf_set_extmark gravity
2021-01-23 20:29:45 +01:00
08f2aa5917 Doc: Generate API docs for buf_set_extmark gravity
Cf. #13679
2021-01-23 19:32:18 +01:00
3a3e6742f9 lsp: clear diagnostics on client shutdown (#13788) 2021-01-23 17:43:06 +01:00
24b60322a2 Merge pull request #13818 from janlazo/vim-8.2.2379
vim-patch:8.2.{2375,2379,2384,2385}
2021-01-22 12:23:58 -05:00
30ef922f39 vim-patch:8.2.2385: "gj" and "gk" do not work correctly when inside a fold
Problem:    "gj" and "gk" do not work correctly when inside a fold.
Solution:   Move check for folding. (closes vim/vim#7724, closes vim/vim#4095)
e71996bd08
2021-01-22 09:03:44 -05:00
93402606fa Merge pull request #13603 from matveyt/master
Missing argument for package.loadlib()
2021-01-22 14:14:19 +01:00
dd089c398c Missing argument for package.loadlib()
Allow for foo.bar.baz module name

Make luaopen_module() name compatible with Lua 5.1
2021-01-22 10:12:22 +01:00
bdfd023f81 Merge pull request #13813 from notomo/fix-nvim-echo-clear
api(echo): should clear cmdline before echo
2021-01-22 09:59:02 +01:00
b803bfa5aa Merge pull request #13679 from chentau/gravity
Extmarks api: allow for gravity
2021-01-22 09:55:00 +01:00
b8ea076ad1 vim-patch:8.2.2375: test for RGB color skipped in the terminal
Problem:    Test for RGB color skipped in the terminal.
Solution:   Run the GUI if possible.
09fbedc8dc

Cherry-pick Test_highlight_RGB_color() from patch v8.2.1077
to port this patch.
2021-01-21 23:35:30 -05:00
4bd7f1133b vim-patch:8.2.2384: turtle filetype not recognized
Problem:    Turtle filetype not recognized.
Solution:   Add a rule to detect turtle files. (closes vim/vim#7722)
5e6a7aa2b2
2021-01-21 23:19:16 -05:00
94cb3b4b35 vim-patch:8.2.2379: do spell suggestions twice if 'spellsuggest' contains number
Problem:    Finding spell suggestions twice if 'spellsuggest' contains number.
Solution:   Only do internal suggestions once.  (closes vim/vim#7713)
77a849c4b3
2021-01-21 21:59:35 -05:00
1607dd071f Update Ukrainian translation (#13785) 2021-01-21 21:24:05 -05:00
d3989ea8e8 api(echo): should clear cmdline before echo 2021-01-21 21:49:42 +09:00
d68026c9ed Merge pull request #13673 from notomo/add-nvim-echo
api: nvim_echo
2021-01-20 18:54:03 +01:00
83ea08ddf3 opt: add tests (#13783) 2021-01-20 23:57:21 +07:00
52675915a7 opt: address linting issues (#13783) 2021-01-20 23:57:21 +07:00
fcd6eea217 opt: update docs on signnumber (#13783) 2021-01-20 23:57:21 +07:00
b7d60c0483 opt: better handling number bounds (#13783) 2021-01-20 23:57:21 +07:00
f1f170a2e7 opt: reduce hardcoded values (#13783) 2021-01-20 23:57:21 +07:00
cee09bb2aa opt: minimum sign size for auto (#13783) 2021-01-20 23:57:21 +07:00
8e86f5e460 api: nvim_echo 2021-01-20 16:41:39 +01:00
1785ac3e37 Merge pull request #13794 from nvim-treesitter/fix-languagetree-contains
fix(languagetree): use tree nodes instead of regions in contains
2021-01-20 15:49:48 +01:00
ed558e269a fix(languagetree): use tree nodes instead of regions in contains 2021-01-20 06:52:47 -06:00
d9c1586e4a Merge pull request #13765 from jvgrootveld/ts-default-start-end-row-on-capture
treesitter: default start and end row when omitted
2021-01-20 10:32:48 +01:00
d6d4e3d1ae lsp: remove duplicate settings validation (#13789) 2021-01-18 21:02:30 -05:00
f9b3110549 lsp: validate and document server settings (#13698)
* update lua documentation
* run docgen
2021-01-18 14:11:37 -05:00
3f63100d5b LSP: Fix nil settings handling in workspace/configuration (#13708)
The `workspace/configuration` handler could fail with the following
error if `config.settings` is nil:

    runtime/lua/vim/lsp/util.lua:1432: attempt to index local 'settings' (a nil value)"

This ensures that `config.settings` is always initialized to an empty
table.
2021-01-18 19:33:10 +01:00
51936126d3 Merge pull request #13767 from srafi1/rm-restricted-mode-docs
Remove -Z flag from --help message
2021-01-18 09:30:36 -05:00
4d1e7e5b12 Update nvim.appdata.xml to reflect version 0.4.4 (#13754)
Set release date based on commit ee77d8665f
2021-01-18 09:29:32 -05:00
fe02c65395 doc: remove nvim_buf_get_extmark_by_id limit opt
Passing any key but `details` in the opts results in an error.
2021-01-18 13:34:08 +01:00
1a4d380b5a LSP: Add in clientInfo to initalize_params. (#13757)
* Add in clienInfo to initalize_params.

Some servers (like Metals in my case) will actually pull this
info from the initalize_params and display it in the logs. I
know from the server perspective it helps at times to have this
available to pull from to have more details about the client and
version. You can see that this is part of the spec here:

microsoft.github.io/language-server-protocol/specification#initialize
2021-01-18 10:13:26 +01:00
6d659bb338 lsp: add client/registerCapability handler (#13780)
Until we support dynamicRegistration, we should handle the client/registerCapability in core. There are still some language servers that send this request despite dynamicRegistration not being registered client-side (we got an upstream fix for the node ones, but this depends on them bumping vscode-languageserver-node).
2021-01-18 10:11:19 +01:00
41eea59dcf doc: Add link to Homebrew formula in README (#13782)
The page is useful because it contains:

    How to install it
    Package information (e.g. current version)
    List of dependencies
    Analytics (how many people are using it)
2021-01-18 09:41:25 +01:00
61437c20b5 api: add vim.version (#13762)
retrun a structured version dict
:lua print(vim.inspect(vim.version()))

{
  api_compatible = 0,
  api_level = 7,
  api_prerelease = true,
  major = 0,
  minor = 5,
  patch = 0
}
2021-01-18 09:37:18 +01:00
9bed991cfb treesitter: Fix linter warning and add helper function to remove duplicated logic
This function returns the start and stop value if set else the node's range is used
When the node's range is used, the stop is incremented by 1 to make the search inclusive
2021-01-18 08:17:12 +01:00
702208daa6 Merge pull request #13775 from janlazo/vim-8.2.2353
vim-patch:8.2.{2353,2355,2360,2361,2366,2368}
2021-01-17 15:01:22 -05:00
7cced24e93 vim-patch:8.2.2368: insufficient tests for setting options
Problem:    Insufficient tests for setting options.
Solution:   Add a few tests. (Dominique Pellé, closes vim/vim#7695)
85773bf32b

Cherry-pick some test cases for Test_set_error()
from patches v8.2.0540, v8.2.0551.
2021-01-17 14:17:40 -05:00
78620dbd28 ci(GHA): install perl on osx
Fix missing header files in system perl.
2021-01-17 12:42:28 -05:00
402f2bda13 vim-patch:8.2.2361: Vim9: no highlight for "s///gc" when using 'opfunc'
Problem:    Vim9: no highlight for "s///gc" when using 'opfunc'.
Solution:   Reset 'lazyredraw' temporarily. (closes vim/vim#7687)
7c886db915
2021-01-17 12:42:28 -05:00
6a01b3fcc3 vim-patch:8.2.2366: when using ":sleep" the cursor is always displayed
Problem:    When using ":sleep" the cursor is always displayed.
Solution:   Do not display the cursor when using ":sleep!". (Jeremy Lerner,
            closes vim/vim#7688)
e2edc2ed4a

Cursor showing/hiding is moved from core to TUI.
":sleep!" behaves the same as ":sleep".
2021-01-17 12:42:28 -05:00
abcd982bf0 vim-patch:8.2.2360: test leaves file behind
Problem:    Test leaves file behind.
Solution:   Delete the right file. (Dominique Pellé, closes vim/vim#7689)
a3b494d6af
2021-01-17 12:42:27 -05:00
562877c135 vim-patch:8.2.2355: stray test failure on Appveyor
Problem:    Stray test failure on Appveyor.
Solution:   Finish insert command.
97c6943e11
2021-01-17 12:42:27 -05:00
7befdb3419 vim-patch:8.2.2353: spartql files are not detected
Problem:    Spartql files are not detected.
Solution:   Add the sparql filetype.  (closes vim/vim#7679)
17d015b243
2021-01-17 12:42:27 -05:00
0f2d37f11f Merge pull request #13774 from mjlbach/log_warn_cache
log.c: warn instead of error on failed stdpath('cache') creation
2021-01-16 23:40:36 -05:00
640febaca7 log.c: warn instead of error on failed stdpath('cache') creation 2021-01-16 18:58:11 -08:00
abbfaf286f logs: make kXDGCacheHome if it doesn't exist (#13758) 2021-01-16 21:14:59 +01:00
8bbf1e2e3c remove -Z line translations 2021-01-15 21:43:10 -05:00
1f49adc085 remove -Z entry from --help 2021-01-15 21:42:39 -05:00
a2818819bb treesitter: default start and end row when omitted
Add support for default start and end row when omitted in the
query:iter_captures and query:iter_matches functions.

When the start and end row values are omitted, the values of the given
node is used. The end row value is incremented by 1 to include the node end
row in the match.

Updated tests and docs accordingly.
2021-01-15 21:44:40 +01:00
0fad952a2b Merge pull request #13750 from janlazo/vim-8.2.2329
vim-patch:8.2.{2329,2334}
2021-01-14 20:56:30 -05:00
2390a0d3c4 Merge pull request #13752 from vigoux/ts-buffer-always-curbuf
fix(treesitter): use source() method on attach
2021-01-14 13:18:11 +01:00
acf6ed5541 fix(treesitter): use source() method on attach
Fixes an issue that tree-sitter always attached to the current buffer,
instead of the provided buffer.
2021-01-14 12:01:50 +01:00
d953614e72 vim-patch:8.2.2334: Pascal-like filetypes not always detected
Problem:    Pascal-like filetypes not always detected.
Solution:   Improved Puppet, InstantFPC and Pascal detection. (Doug Kearns,
            closes vim/vim#7662)
a0122dcd1c
2021-01-13 18:25:00 -05:00
ea8756f85d logging: move to XDG_CACHE_HOME (#13739)
while there is some controversy, stdpath('cache') looks like  a better fit for logs than stdpath('data'): you can remove logs without preventing nvim to work which fits the XDG_CACHE_HOME definition of `user specific non-essential data files`.
2021-01-13 23:20:21 +01:00
bd02e29443 vim-patch:8.2.2329: not all ways Vim can be started are tested
Problem:    Not all ways Vim can be started are tested.
Solution:   Add a test for different program names. (Dominique Pellé,
            closes vim/vim#7651)
df4c9af7e7
2021-01-13 09:35:00 -05:00
2ac0ca2025 change end_right_gravity error behavior 2021-01-12 18:32:16 -08:00
77a6049e07 lsp: fix on_attach signature documentation (#13723)
* trim trailing whitespace from docs
2021-01-12 22:47:34 +01:00
953a548454 lsp: remove references to LspInstall (#13738)
and adjust sumneko setup instructions
2021-01-12 22:09:41 +01:00
9f3b2a757b lsp: Add severity_limit for other diagnostics features (#13528)
* lsp: Add severity_limit for other diagnostics

* docs and tests

* fix: lint

* Add to other types

* fix: lint
2021-01-12 12:58:50 -05:00
e0a4399adc fix(lsp): Allow subsequent text document edits to pass (#13534)
* fix: Allow subsequent text document edits to pass

* fixup: cleaner code

* add tests
2021-01-11 11:39:11 -05:00
0c0c3ee330 Merge pull request #13735 from jamessan/brew-failures 2021-01-11 10:25:28 -05:00
ad43f789e7 Merge pull request #13439 from shade-of-noon/man-iskeyword
[RDY] man.vim: Set iskeyword explicitly.
2021-01-11 08:07:47 -05:00
6d67cf8647 ci(gha): brew unlink gcc@8/@9 to fix upgrade issues 2021-01-11 00:01:37 -05:00
0f03b3f3aa ci(gha): brew upgrade before installing 2021-01-10 23:40:30 -05:00
0af5a56e47 Merge pull request #13733 from jupblb/patch-release-2
Do not delete the nightly release
2021-01-10 22:18:52 -05:00
0860d9c164 Use uv_os_homedir and current directory as backup when $HOME is not set (#13657)
Close https://github.com/neovim/neovim/issues/8614

Use uv_os_homedir and current directory as backup if HOME env is not set.
Allocate homedir only if var is not NULL.
2021-01-10 19:46:25 -05:00
3d41ce90df Do not delete the nightly release 2021-01-10 23:29:34 +01:00
635930dcd7 Merge pull request #13704 from teto/fix-fold-list
screen.c: fix last character on foldtext
2021-01-10 22:44:23 +01:00
cb457f5f7f buffer.c: remove useless 'for' loops. 2021-01-09 15:36:14 +09:00
b535575acd runtime/elm: acc224064033e5cea21ef7f1eefb356ca06ff11d (#13718)
Port ftplugin, syntax and indent Elm files.

Ref: #13193
2021-01-08 19:48:56 -05:00
87afc90317 screen.c: fix an issue with wrap and folds
Before this commit, a folded line would display a trailing character
with
bin/nvim -u ~/test.vim --cmd "hi NonText ctermbg=3" --cmd "hi Search ctermbg=2" --cmd "set listchars+=extends:X nowrap list"  ~/test.txt
2021-01-07 21:58:57 +01:00
fe1ebea339 Merge pull request #13689 from janlazo/vim-8.2.0050
vim-patch:8.1.{1731,1764,2111,2126},8.2.{50,590}
2021-01-06 21:17:44 +01:00
b419e39a2a screen.c: fix last character on foldtext
Last character on a folded line was sometimes highlighted with the
"Search" highlight. Solves this along with some remaining "curwin".
2021-01-06 21:02:40 +01:00
6249059d4b checkhealth: fix terminfo problems on Windows
fixes #13415
2021-01-06 12:43:58 +09:00
b77e21b35c checkhealth: fix problem where &shada is empty
fixes #13700
2021-01-06 12:17:45 +09:00
2ea3127697 screen.c: fix display of signcolumn=auto in diffs (#13688)
sign_id was not reset when filler lines were involved, thus causing a
bad alignment between columns.

You could check that before this commit,

    bin/nvim -u NORC  --cmd "setglobal signcolumn=yes:4" --cmd "set diffopt+=foldcolumn:0" -d ../test1.txt ../test2.txt

would result in an irregular column width.
2021-01-05 21:23:35 +01:00
2bfd0ba8ae LSP: Add diagnostic tags to client capabilities (#13578)
pyright (possibly others) does not send any hint diagnostics if we do not have tagSupport in PublishDiagnosticsClientCapabilities. This PR just adds them.
2021-01-05 21:15:08 +01:00
0efc713136 contrib: update nix flake to use flake-utils (#13685) 2021-01-05 21:12:21 +01:00
25cb2c722e vim-patch:8.2.0590: no 'backspace' value allows ignoring the insertion point
Problem:    No 'backspace' value allows ignoring the insertion point.
Solution:   Add the "nostop" and 3 values. (Christian Brabandt, closes vim/vim#5940)
aa0489e12d
2021-01-05 09:47:38 -05:00
5b897acfc1 test/old: restore test_backspace_opt.vim
Porting it to test/functional/legacy/backspace_opt_spec.lua
was a mistake.
Tests pass after commenting out some lines for Vi compatibility.

File is copied from Vim as of patch v8.2.0540.
Patch v8.2.0540 cannot be fully ported yet.
This file is a prequisite for future v8.2.x patches.
2021-01-05 09:47:38 -05:00
4f53ebaceb vim-patch:8.2.0050: after deleting a file mark it is still in viminfo
Problem:    After deleting a file mark it is still in viminfo.
Solution:   When a file mark was deleted more recently than the mark in the
            merged viminfo file was updated, do not store the mark. (Pavol
            Juhas, closes vim/vim#5401, closes vim/vim#1339)
8cd6cd8087

Neovim's ShaDa is incompatible with Vim's "viminfo"
so "viminfo" tests fail.

N/A patches for version.c:

vim-patch:8.1.1731: command line history not read from viminfo on startup

Problem:    Command line history not read from viminfo on startup.
Solution:   Get history length after initializing it.
26b654a5df

vim-patch:8.1.1764: ":browse oldfiles" is not tested

Problem:    ":browse oldfiles" is not tested.
Solution:   Add a test.
5328cb8986

vim-patch:8.1.2111: viminfo file not sufficiently tested

Problem:    Viminfo file not sufficiently tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5009)
2a8d3b8997

vim-patch:8.1.2126: viminfo not sufficiently tested

Problem:    Viminfo not sufficiently tested.
Solution:   Add more test cases.  Clean up comments. (Yegappan Lakshmanan,
            closes vim/vim#5032)
6bd1d77067
2021-01-05 09:47:38 -05:00
6127661024 forgot to update tests 2021-01-05 00:39:07 -08:00
231f75e086 change gravity to be a boolean flag, and add corresponding flag for end position of extmark 2021-01-05 00:28:34 -08:00
adbf2dd86b Merge pull request #13687 from paddor/master
remove trailing tabs
2021-01-05 07:59:39 +01:00
eaab8e494d buffer.c: fix problem of memory allocation 2021-01-05 15:09:43 +09:00
6d5626f355 remove trailing tabs 2021-01-04 20:10:34 +01:00
9223d1450d Merge pull request #13590 from bfredl/tsquery
treesitter: simplify query reading logic
2021-01-04 16:17:34 +01:00
5fcc247c6e Merge pull request #11906 from bfredl/moreblock
consider "-- more --" state to be blocking
2021-01-04 11:14:07 +01:00
885c2f7281 treesitter: simplify query reading logic
Only the plugin/package manager should "manage" after/. Consumers of
nvim_get_runtime_file() should not need to special case it (if your plugin
manager is broken then fix it instead).

Don't use vim.fn.readfile(). Lua can already read files. It is even
better at it than vim script.

expose M.get_query_files(). Listing the queries is essential for user
config debug, and let plugins do fun things with it.
Abstraction-by-obscurity is not useful (plugins can just cargo cult copy
the code anyway, better with public entry points).
2021-01-04 11:06:02 +01:00
4cdc8b1efd input: consider "-- more --" state to be blocking, fixes #11899 2021-01-04 09:41:25 +01:00
10b278bdae allow for extmark gravity to be set through api 2021-01-03 13:59:24 -08:00
a1ed941a78 vim-patch:8.2.0861: cannot easily get all the current marks (#13676)
Problem:    Cannot easily get all the current marks.
Solution:   Add getmarklist(). (Yegappan Lakshmanan, closes #6032)
cfb4b47de0

Cherry-pick the column number fix from patch v8.2.0871
because patch v8.2.0871 cannot be fully ported
without the method patches.

Co-authored-by: Peter Wolf <pwolf2310@gmail.com>
2021-01-03 15:33:21 -05:00
fff4facdc4 LSP: fix messageRequest to not return nested title (#13674)
* LSP: fix window/showMessageRequest to not return nested title

* Add window/showMessageRequest handler to docs
2021-01-03 20:31:09 +01:00
fd960a33e4 fix: check for valid buffer handles in modify_keymap (#13543)
Fixes #13541
Neovim would crash when trying to map a key on non existant buffer
2021-01-03 19:14:18 +01:00
ae63dc264a Merge pull request #13669 from bfredl/sortsplice
buffer updates: mark sorted region as changed.
2021-01-03 18:28:21 +01:00
a58d96a7ed buffer updates: mark sorted region as changed.
NB: currently this invalidates all extmarks inside the region.
Later on within-line extmarks could be preserved
2021-01-03 14:47:37 +01:00
adb01190c4 tests: make treesitter its own category 2021-01-03 14:47:29 +01:00
7a81a0c073 Merge pull request #13665 from janlazo/vim-8.2.0917
vim-patch:8.1.{1667,1672,1822},8.2.{407,917}
2021-01-03 10:10:10 +01:00
84d08358b7 ci: Fix typo in release.yml that prevents optimized nightly build (#13671)
Assuming the `CMAKE_BUILD_TYPE` directive is case-sensitive, this *actually* prevents the nightly build from being optimized. Even if it doesn't, the typo causes `:checkhealth` to issue a dummy warning in the Performance section.
2021-01-03 02:19:03 +01:00
ebcdcad0b7 Merge pull request #13670 from janlazo/vim-8.2.2274
vim-patch:8.2.{456,458,461,470,2274,2277}
2021-01-02 20:18:18 -05:00
c3931495b2 vim-patch:8.2.0470: Test_confirm_cmd_cancel() can fail on a slow system
Problem:    Test_confirm_cmd_cancel() can fail on a slow system.
Solution:   Use WaitForAssert(). (Ozaki Kiichi, closes vim/vim#5861)
7b1b36b1cb
2021-01-02 18:49:25 -05:00
30e8c1779f vim-patch:8.2.0461: confirm test fails on amd64 system
Problem:    Confirm test fails on amd64 system. (Alimar Riesebieter)
Solution:   Add an extra WaitForAssert(). (Dominique Pelle)
9207d1f523
2021-01-02 18:48:31 -05:00
d216314e5b vim-patch:8.2.0458: missing feature check in test function
Problem:    Missing feature check in test function.
Solution:   Add check commands.
bea9023d42
2021-01-02 18:47:06 -05:00
df40d973cc vim-patch:8.2.0456: Test_confirm_cmd is flaky
Problem:    Test_confirm_cmd is flaky.
Solution:   Add a term_wait() call. (closes vim/vim#5854)
72749f062f

Cherry-pick Test_confirm_cmd() from patch v8.2.0203
because that patch modifies multiple files.
Copied code is based on Test_confirm_cmd() as of patch v8.2.0456.

N/A patches for version.c:

vim-patch:8.2.2274: badge for Travis is outdated

Problem:    badge for Travis is outdated.
Solution:   Update badge for move from travis-ci.org to travis-ci.com.
2f91e2f8da

vim-patch:8.2.2277: missing backslash

Problem:    Missing backslash.
Solution:   Add backslash.
9281c6cae4
2021-01-02 18:46:31 -05:00
215aa83b2a vim-patch:8.1.1822: confusing error message when range is not allowed
Problem:    Confusing error message when range is not allowed.
Solution:   With ADDR_NONE give e_norange.  Change e_invaddr to e_invrange for
            consistency.
0acae7acc4
2021-01-02 12:20:35 -05:00
cb5ba225f8 vim-patch:8.2.0407: no early check if :find and :sfind have an argument
Problem:    No early check if :find and :sfind have an argument.
Solution:   Add EX_NEEDARG.
2d10cd4780

Cherry-pick Test_find_cmd() from patch v8.2.0270.
Use "exe 'cd ' . save_dir" pattern
because patches v8.1.1291, v8.1.2278 are not ported yet.
Cherry-pick modeline from patch v8.1.1432.
2021-01-02 12:20:35 -05:00
ffc3df51f1 vim-patch:8.1.1667: flags for Ex commands may clash with other symbols
Problem:    Flags for Ex commands may clash with other symbols.
Solution:   Prepend with EX_.
8071cb2c64

N/A patches for version.c:

vim-patch:8.1.1672: "make cmdidxs" doesn't work

Problem:    "make cmdidxs" doesn't work.
Solution:   Update macro names. (Naruhiko Nishino, closes vim/vim#4660)
d94ac0caca

Error message for src/nvim/ex_cmds.lua
which omits the "EX_" prefix for the flags.
2021-01-02 12:20:35 -05:00
01eda00962 vim-patch:8.2.0917: quickfix entries do not suport a "note" type
Problem:    Quickfix entries do not suport a "note" type.
Solution:   Add support for "note". (partly by Yegappan Lakshmanan,
            closes vim/vim#5527, closes vim/vim#6216)
e928366de5
2021-01-02 12:20:34 -05:00
48caf1df85 Merge pull request #13649 from mjlbach/move_from_nvim-lspconfig
LSP: Move workspace/configuration from nvim-lspconfig to core
2021-01-01 23:52:48 +01:00
4a0a6f7bff LSP: progress callback should only update existing dict for reports (#13652)
Change the update of the client.messages.progress table to overwrite only the percentage and message properties on $report, Previously we were overwriting the table which meant client.messages.progress[token].message.title was wiped on report.
2021-01-01 23:51:47 +01:00
5eccfd2b2e Merge pull request #13655 from janlazo/vim-8.2.2255
vim-patch:8.1.{1241,1261,1275,1281,1549,1590,1881,2079,2322,2360,2411},8.2.{113,388,934,2255,2258,2260,2269}
2021-01-01 17:40:26 -05:00
52bfaea70e test/win: skip vargs memory usage on Github Actions
This test can fail on any of the Windows builds
because Github Actions does not provide enough stability
and enough memory for all runners..

Check test requirements before running any test cases
to avoid duplicate checks.
2021-01-01 17:13:43 -05:00
fc191352e9 vim-patch:8.2.2269: not all :hardcopy code covered by tests
Problem:    Not all :hardcopy code covered by tests.
Solution:   Test more combinations. (Dominique Pellé, closes vim/vim#7595)
edc10b541b
2021-01-01 16:56:25 -05:00
60855116f0 vim-patch:8.2.0388: printmbcharset option not tested
Problem:    Printmbcharset option not tested.
Solution:   Add a test.  Enable PostScript for AppVeyor build. (Dominique
            Pelle, closes vim/vim#5783)
833805a486
2021-01-01 16:56:24 -05:00
85c658e388 vim-patch:8.2.2260: window resize test fails in very wide terminal
Problem:    Window resize test fails in very wide terminal.
Solution:   Resize using the 'columns' option.  (Vladimir Lomov, closes vim/vim#7592)
5efe0e5d16
2021-01-01 16:56:24 -05:00
b580cf83bd vim-patch:8.2.2258: not all OCaml related files are detected
Problem:    Not all OCaml related files are detected.
Solution:   Update OCaml file type detection.  (Markus Mottl, closes vim/vim#7590)
beef4eeda5
2021-01-01 16:56:24 -05:00
7718826edf docs: nvim_buf_set_text 2021-01-01 14:24:40 -05:00
dac3b35ece Merge pull request #11833 from bfredl/set_text
nvim_buf_set_text
2021-01-01 20:21:09 +01:00
90f619f140 Merge pull request #13592 from bfredl/setmouse
ui: make 'mouse' handling in external UI more consistent
2021-01-01 20:04:09 +01:00
39d098f9f9 api: set_text: fix some byte count issues
add byte count tests

update documentation
2021-01-01 19:51:58 +01:00
f7d01a65d5 api: set_text: more tests, and fixing lint
removing pending virtcol tests

Allow passing in empty array as a shorthand for array with empty string; add more documentation

add check for start_row as well
2021-01-01 19:51:58 +01:00
45b14f88db api: set_text: rebase, update to new api, and add more tests 2021-01-01 19:51:45 +01:00
29ad2ebc16 api: set_text: fix validation and some issues
fix double free because intermediary lines weren't xmemdup'd.

NL-for-NUL dance.

Normalize row indices and perform more validation.

Adjust the cursor position if it's on the right side of the replacement.

Tests and documentation.
2021-01-01 19:51:37 +01:00
9be19b770d api: set_text: first stab at nvim_buf_set_text 2021-01-01 19:51:24 +01:00
86ae394aeb vim-patch:8.2.0934: lhelpgrep twice in help window doesn't jump to the help topic
Problem:    Running lhelpgrep twice in a help window doesn't jump to the help
            topic.
Solution:   Check whether any window with the location list is present.
            (Yegappan Lakshmanan, closes vim/vim#6215)
ec98e93a82
2021-01-01 13:28:35 -05:00
134ea0c935 vim-patch:8.1.2360: quickfix test coverage can still be improved
Problem:    Quickfix test coverage can still be improved.
Solution:   Add more test cases. (Yegappan Lakshmanan, closes vim/vim#5276)
15a7bdcb77
2021-01-01 13:20:27 -05:00
6db86cb2d3 ui: make 'mouse' handling in external UI more consistent
before the behaviour of 'mouse' was inconsistent in external UI,
as some remapping logic would check has_mouse() and others don't
(no difference in TUI or vim classic). With this change, the behaviour
is consistently up to the UI decide (see ui.txt edit)

Behaviour of tui.c is unaffected by this change.
2021-01-01 15:47:44 +01:00
3847b58a13 vim-patch:8.1.2411: function argument copied unnecessarily
Problem:    Function argument copied unnecessarily.
Solution:   Use the argument directly.
1b03a193b3
2021-01-01 04:58:05 -05:00
d7b577d6ab vim-patch:8.1.1281: cannot specify a count with :chistory
Problem:    Cannot specify a count with :chistory.
Solution:   Add a count to :chistory and :lhistory. (Yegappan Lakshmanan,
            closes vim/vim#4344)
8ffc7c8b5f
2021-01-01 04:58:05 -05:00
d1608f7503 vim-patch:8.1.1275: cannot navigate to errors before/after the cursor
Problem:    Cannot navigate to errors before/after the cursor.
Solution:   Add the :cbefore and :cafter commands. (Yegappan Lakshmanan,
            closes vim/vim#4340)
cf6a55c4b0
2021-01-01 04:58:05 -05:00
5cf94effee test, legacy/assert_spec.lua: fix few tests fail
Adjust failing tests to current behavior due to changes in assert_fails
behavior by fbd6a86.
2021-01-01 04:58:05 -05:00
35dc6d6e87 vim-patch:8.1.1261: no error for quickfix commands with negative range
Problem:    No error for quickfix commands with negative range.
Solution:   Add ADDR_UNSIGNED and use it for quickfix commands.  Make
            assert_fails() show the command if the error doesn't match.
25190db225

N/A patches for version.c:

vim-patch:8.2.0113: "make cmdidxs" fails

Problem:    "make cmdidxs" fails.
Solution:   Allow address for ":cquit".  Add --not-a-term to avoid a delay.
9b24dfcb9f
2021-01-01 04:57:50 -05:00
f3bbc92476 LSP: add test for workspace/configuration handler 2021-01-01 01:40:46 -08:00
e467d29390 LSP: Move workspace/configuration handler from nvim-lspconfig to core 2021-01-01 01:40:33 -08:00
8742082661 LSP: Add helper function from accessing language server settings from nvim-lspconfig 2021-01-01 01:40:33 -08:00
a66d63f36e test, provider/define_spec.lua: fix few tests fail
fbd6a86 changes the behavior of :command-range and no longer allows
arbitrary numbers. Adjust tests to reflect this behavior.
2021-01-01 04:30:55 -05:00
f3c242c13c vim-patch:8.1.1241: Ex command info contains confusing information
Problem:    Ex command info contains confusing information.
Solution:   When using the NOTADR flag use ADDR_OTHER for the address type.
            Cleanup code using NOTADR.  Check for errors in
            create_cmdidxs.vim.  Adjust Makefile to see the errors.
b731689e85

Use Lua's "assert()" to make an invalid command definition
a compilation error.

Misc changes:

Remove 'RESTRICT' flag.
Neovim does not support "restricted" mode
since commit 7777532ceb.

TODO:
Do not generate files before Lua assertions
so that CMake always runs the generator script
if the previous build has an invalid command definition.
2021-01-01 04:30:55 -05:00
cf3a861017 vim-patch:8.1.1549: quickfix test fails
Problem:    Quickfix test fails.
Solution:   Negate result of bt_quickfix().
61eeeea8e6

Patch v8.1.1547 introduces the bug that is fixed by this patch.

N/A patches for version.c:

vim-patch:8.1.1590: popup window test fails

Problem:    Popup window test fails.
Solution:   Add "scrollbar" to expected result.
6c6a603cd2

vim-patch:8.1.1881: popup window test fails in some configurations

Problem:    Popup window test fails in some configurations.
Solution:   Check that screendumps can be made.
f4665e78f2

vim-patch:8.1.2079: popup window test fails without +terminal

Problem:    Popup window test fails without +terminal.
Solution:   Check for the +terminal feature.
d2c1fb476d

vim-patch:8.1.2322: quickfix test fails in very big terminal

Problem:    Quickfix test fails in very big terminal.
Solution:   Adjust the expected result for the width. (Masato Nishihata,
            closes vim/vim#5244)
ffc4fb8fee

Patch v8.1.2339 reverts the change but patch v8.1.2340 restores it.
Port of patch v8.1.2340 was merged and includes changes from patches
v8.1.2320, v8.1.2322, v8.1.2339.

vim-patch:8.2.2255: Tcl test fails

Problem:    Tcl test fails.
Solution:   Change option handling.
1779ff4842
2020-12-31 19:16:30 -05:00
f3a8c930a4 Merge pull request #13653 from janlazo/revert-10848
Revert #10848
2020-12-31 18:44:41 -05:00
b01a60b1aa Revert "vim-patch:8.1.0822: peeking and flushing output slows down execution"
This reverts commit 0519a75f6e.
2020-12-31 16:44:53 -05:00
27548e3cd0 Revert "vim-patch:8.1.1189: mode is not cleared when leaving Insert mode"
This reverts commit 4afddb8f57.
2020-12-31 16:44:53 -05:00
723e009214 Revert "vim-patch:8.1.1192: mode is not cleared when leaving Insert mode with mapped Esc"
This reverts commit 44bb7147e4.

Avoid regression mentioned in c64cce906e (commitcomment-45554271)
2020-12-31 16:44:53 -05:00
74b343a6f2 Merge pull request #13650 from jamessan/windows-binaries
ci: Add Windows binaries to the release
2020-12-31 01:09:27 -05:00
0aa6b40599 ci: Add Windows binaries to the release 2020-12-31 00:14:37 -05:00
0efbab5f5e Merge pull request #13644 from jamessan/ci-tweaks 2020-12-30 22:13:01 -05:00
00247ecadc Merge pull request #13646 from janlazo/vim-8.2.2247
vim-patch:8.1.{172,1230,1727},8.2.2247
2020-12-30 20:34:56 -05:00
fd507e2788 LSP: window/showMessageRequest (#13641)
Another 3.16 compatibility. Solves Vue crashing currently. Currently not handling the return result, but would allow opening web browser in this case.
2020-12-31 00:09:33 +01:00
e256777b5a Merge pull request #13648 from teto/fix-fold-hl
adds a test to check syntax is taken into account in open folds
2020-12-30 23:55:00 +01:00
28b7574c94 lsp: Disable capabilities not currently supported by language client handlers (#13638)
Several language servers are incorrectly invoking handlers which are not yet implemented in core.
2020-12-30 23:54:02 +01:00
329547bf70 doc: Fix some spelling errors (#13636)
- Change 'conenvience' to 'convenient'
- Change 'lsp-handers' to 'lsp-handlers'
2020-12-30 23:39:05 +01:00
9c68aac37b tests: check highlights work in open folds
to prevent a regression we just witnessed
2020-12-30 23:32:40 +01:00
61c9d2a213 fix(flake): enable make functionaltest
otherwise busted is not provided/found and functionaltests are disabled.
2020-12-30 23:32:40 +01:00
fb90b6ec98 LSP: implement window/workDoneProgress/create (#13640) 2020-12-30 23:17:35 +01:00
bc8f2fdca4 vim-patch:8.1.1727: code for viminfo support is spread out
Problem:    Code for viminfo support is spread out.
Solution:   Move to code to viminfo.c. (Yegappan Lakshmanan, closes vim/vim#4686)
defa067c54

N/A patches for version.c:

vim-patch:8.1.1230: a lot of code is shared between vim.exe and gvim.exe

Problem:    A lot of code is shared between vim.exe and gvim.exe.
Solution:   Optionally put the shared code in vim.dll. (Ken Takata,
            closes vim/vim#4287)
afde13b62b

vim-patch:8.2.2247: VMS: various smaller problems

Problem:    VMS: various smaller problems.
Solution:   Fix VMS building and other problems. (Zoltan Arpadffy)
467676d468
2020-12-30 15:55:18 -05:00
3ea77f50cb vim-patch:8.1.0172: 'viminfofile' option does not behave like a file name
Problem:    'viminfofile' option does not behave like a file name.
Solution:   Add the P_EXPAND flag. (closes vim/vim#3178)
c229e54a69
2020-12-30 15:55:18 -05:00
2f1dc21379 ci(GHA): Disable fail-fast for CI checks 2020-12-30 09:52:42 -05:00
5964c0597a Remove Appveyor badge 2020-12-30 09:49:35 -05:00
52163c66b9 fix(fold): highlight even in folds (#13643) 2020-12-30 15:17:41 +01:00
69fc6c2de0 Merge pull request #13552 from janlazo/vim-8.1.0149
vim-patch:8.1.{149,151,790,2100}
2020-12-29 23:15:10 -05:00
d2837d5efc vim-patch:8.1.2100: :mksession is not sufficiently tested
Problem:    :mksession is not sufficiently tested.
Solution:   Add more test cases. (Yegappan Lakshmanan, closes vim/vim#4993)
ee1a2b5a2a
2020-12-29 22:35:25 -05:00
f0a8ccff8f vim-patch:8.1.0790: code for creating tabpages in session is too complex
Problem:    Code for creating tabpages in session is too complex.
Solution:   Simplify the code. (Jason Franklin)
57a6bf0567
2020-12-29 22:31:21 -05:00
c60f7c2064 vim-patch:8.1.0151: mksession test fails on MS-Windows
Problem:    Mksession test fails on MS-Windows.
Solution:   Always use an argument for :lcd.
81e2ac7bb6
2020-12-29 22:31:21 -05:00
ca2551bc9b vim-patch:8.1.0149: session is wrong with multiple tabs when :lcd was used
Problem:    The generated sessions file does not restore tabs properly if :lcd
            was used in one of them.
Solution:   Create the tab pages before setting the directory. (Yee Cheng
            Chin, closes vim/vim#3152)
26d4b896a7
2020-12-29 22:31:20 -05:00
c762f5220b vim-patch:8.2.2244: crash when making the window width negative (#13633)
Problem:    Crash when making the window width of the not-current window
            negative.
Solution:   Make sure the window width is not negative. (closes vim/vim#7568)
89015a6759

N/A patches for version.c:

vim-patch:8.0.1617: Win32: :shell command in the GUI crashes

Problem:    Win32: :shell command in the GUI crashes.
Solution:   Handle the situation that "cmd" is NULL. (Yasuhiro Matsumoto,
            closes vim/vim#2721)
42f652f733

vim-patch:8.1.0244: no redraw when using a STOP signal on Vim and then CONT

Problem:    No redraw when using a STOP signal on Vim and then a CONT signal.
Solution:   Catch the CONT signal and force a redraw. (closes vim/vim#3285)
917e32bda5

vim-patch:8.1.0302: crash when using :suspend and "fg"

Problem:    Crash when using :suspend and "fg".
Solution:   Undo patch 8.1.244.
f1883479be

vim-patch:8.1.0548: crash when job callback unloads a buffer

Problem:    Crash when job callback unloads a buffer. (James McCoy)
Solution:   Don't round up the wait time to 10 msec in ui_inchar().
1341024e08

vim-patch:8.1.1652: GUI: popup window doesn't close on mouse movement

Problem:    GUI: popup window doesn't close on mouse movement. (Paul Jolly)
Solution:   Generate mouse-move events when a popup window is visible.
49fe95f225

vim-patch:8.1.1695: Windows 10: crash when cursor is at bottom of terminal

Problem:    Windows 10: crash when cursor is at bottom of terminal.
Solution:   Position the cursor before resizing. (Yasuhiro Matsumoto,
            closes vim/vim#4679)
f49a692259

vim-patch:8.2.2246: cursor keys not recognized at the hit-Enter prompt

Problem:    Cursor keys not recognized at the hit-Enter prompt after executing
            an external command.
Solution:   Change the codes for the extra cursor keys. (closes vim/vim#7562)
            Tune the delays to avoid test flakyness.
4d8c96d466
2020-12-29 21:15:36 -05:00
28a0f6b17d Merge pull request #13629 from jamessan/remove-old-ci 2020-12-28 21:47:00 -05:00
18512649e6 ci(travis): Remove jobs covered by GHA 2020-12-28 21:19:48 -05:00
7dbc82912a ci(appveyor): Remove now that GHA is testing Windows 2020-12-28 21:19:18 -05:00
a06c256ec8 Merge pull request #13540 from erw7/add-gha-for-windows-vs2017 2020-12-28 21:15:38 -05:00
f5383705d1 Merge pull request #13624 from janlazo/vim-8.2.2234
vim-patch:8.1.1032,8.2.{429,1785,2234,2235,2237,2241}
2020-12-28 20:14:48 -05:00
b0215afc84 fix(fold): dont highlight search results on folded lines (#13616)
Behavior may change in future but for now stick to legacy behavior.
2020-12-29 01:19:24 +01:00
d712c30fff vim-patch:8.2.0429: no warning when test checks for option that never exists
Problem:    No warning when test checks for option that never exists.
Solution:   In tests check that the option can exist.
c5a8fdc42d
2020-12-28 18:34:01 -05:00
26dfeb42dd vim-patch:8.1.1032: warnings from clang static analyzer
Problem:    Warnings from clang static analyzer. (Yegappan Lakshmanan)
Solution:   Fix relevant warnings.
2c519cf3bf
2020-12-28 18:34:01 -05:00
0e913a0812 vim-patch:8.2.2234: command line wildmenu test often fails with Unix GUI
Problem:    Command line wildmenu test often fails with Unix GUI.
Solution:   Skip the test where it is expected to fail.
3e112acc22

Include modeline fix for ASAN build.

N/A patches for version.c:

vim-patch:8.2.1785: compiler warning for strcp() out of bounds

Problem:    Compiler warning for strcp() out of bounds. (Christian Brabandt)
Solution:   use memmove() instead.
3f974ff45e

vim-patch:8.2.2235: build failure with some Ruby versions

Problem:    Build failure with some Ruby versions.
Solution:   Adjust the code for Ruby 3.0. (Ozaki Kiichi, closes vim/vim#7564)
dace9f785f

vim-patch:8.2.2237: CI on Mac fails in sed command

Problem:    CI on Mac fails in sed command.
Solution:   Set LC_ALL to "C". (Ozaki Kiichi, closes vim/vim#7565)
ed1e4c9a70

vim-patch:8.2.2241: Build with Ruby and clang may fail

Problem:    Build with Ruby and clang may fail.
Solution:   Adjust congigure and sed script. (Ozaki Kiichi, closes vim/vim#7566)
864a28b6a6
2020-12-28 18:33:50 -05:00
93762072d1 lsp: Use correct bufnr for documentHighlight handler (#13622) 2020-12-29 00:05:30 +01:00
a58c5509d9 Merge pull request #13607 from janlazo/vim-8.2.2221
vim-patch:8.1.2227,8.2.{315,928,1007,1052,1121,1580,2221,2229,2231,2232}
2020-12-27 17:14:31 -05:00
cff4cad25a vim-patch:8.2.2231: when "--remote file" is used "file" is not reloaded
Problem:    When "--remote file" is used "file" is not reloaded.
Solution:   When a :drop command is used for a file that is already displayed
            in a window and it has not been changed, check if it needs to be
            reloaded. (closes vim/vim#7560)
e4862a0fe6

Remove unused "focus" parameter from "buf_check_timestamp()".
It was meant for removed GUI code.
2020-12-27 14:37:19 -05:00
883114e882 vim-patch:8.2.0928: many type casts are used for vim_strnsave()
Problem:    Many type casts are used for vim_strnsave().
Solution:   Make the length argument size_t instead of int. (Ken Takata,
            closes vim/vim#5633)  Remove some type casts.
df44a27b53

N/A patches for version.c:

vim-patch:8.2.0315: build failure on HP-UX system

Problem:    Build failure on HP-UX system.
Solution:   Use LONG_LONG_MIN instead of LLONG_MIN.  Add type casts for switch
            statement. (John Marriott)
c593bec412

vim-patch:8.2.1052: build failure with older compilers

Problem:    Build failure with older compilers.
Solution:   Move declaration to start of block.
7acde51832

vim-patch:8.2.2229: build failure without the +eval feature

Problem:    build failure without the +eval feature.
Solution:   Add #ifdef.
39cb2dab18

vim-patch:8.2.2232: compiler error for falling through into next case

Problem:    Compiler error for falling through into next case.
Solution:   Move FALLTHROUGH below the #endif
9618a25b9c
2020-12-27 14:05:41 -05:00
f2be59d8f8 Merge pull request #13611 from HARSH-SHETH/typo
Fixed a typo.
2020-12-27 17:56:09 +01:00
b9c48e1d75 Fixed a typo.
Changed 'reqesting' to 'requesting' in /runtime/doc/api.txt file
2020-12-27 10:19:21 +05:30
ed0131e3d9 vim-patch:8.2.1580: wildmenu does not work properly
Problem:    Wildmenu does not work properly.
Solution:   Do not call may_do_incsearch_highlighting() if completion is in
            progress.
a60053b8f4
2020-12-26 21:27:18 -05:00
b90ae75668 vim-patch:8.2.1121: command completion not working after ++arg
Problem:    Command completion not working after ++arg.
Solution:   Move skipping up. (Christian Brabandt, closes vim/vim#6382)
743d062020
2020-12-26 21:10:13 -05:00
684172ae82 vim-patch:8.2.1007: completion doesn't work after ":r ++arg !"
Problem:    Completion doesn't work after ":r ++arg !".
Solution:   Skip over "++arg". (Christian Brabandt, closes vim/vim#6275,
            closes vim/vim#6258)
c8cb883015
2020-12-26 21:04:40 -05:00
0aa2c7e2ec vim-patch:8.1.2227: layout wrong if 'lines' changes while cmdline window is open
Problem:    Layout wrong if 'lines' changes while cmdline window is open.
Solution:   Do not restore the window layout if 'lines' changed.
            (closes vim/vim#5130)
1c329c04be
2020-12-26 18:22:04 -05:00
a51248ea17 vim-patch:8.2.2221: if <Down> is mapped on the command line 'wildchar' is inserted
Problem:    If <Down> is mapped on the command line 'wildchar' is inserted.
Solution:   Set KeyTyped when using 'wildchar'. (closes vim/vim#7552)
b0ac4ea5e1
2020-12-26 13:28:28 -05:00
c64cce906e Merge pull request #10848 from janlazo/vim-8.1.1189
vim-patch:8.1.{822,1189,1192}
2020-12-26 03:38:54 -05:00
44bb7147e4 vim-patch:8.1.1192: mode is not cleared when leaving Insert mode with mapped Esc
Problem:    Mode is not cleared when leaving Insert mode with mapped Esc.
Solution:   Clear the mode when redraw_cmdline is set. (closes vim/vim#4269)
4c25bd785a
2020-12-26 02:34:13 -05:00
4afddb8f57 vim-patch:8.1.1189: mode is not cleared when leaving Insert mode
Problem:    Mode is not cleared when leaving Insert mode.
Solution:   Clear the mode when got_int is set. (Ozaki Kiichi, closes vim/vim#4270)
abc7c7fc5a
2020-12-25 19:25:30 -05:00
0519a75f6e vim-patch:8.1.0822: peeking and flushing output slows down execution
Problem:    Peeking and flushing output slows down execution.
Solution:   Do not update the mode message when global_busy is set.  Do not
            flush when only peeking for a character. (Ken Takata)
cb574f4154
2020-12-25 19:25:30 -05:00
84faeb07d0 Merge pull request #13602 from janlazo/vim-8.2.2206
vim-patch:8.1.2212,8.2.{51,782,856,1174,1212,2206,2211}
2020-12-25 11:11:31 -05:00
43834b24ac vim-patch:8.2.2206: :exe command line completion only works for first argument
Problem:    :exe command line completion only works for first argument.
Solution:   Skip over text if more is following. (closes vim/vim#7546)
4941b5effd

Port "IS_WHITE_OR_NUL" macro from patch v8.2.0562
as "ascii_iswhite_or_nul()" inline function.

N/A patches for version.c:

vim-patch:8.2.0782: cannot build with Lua on MS-Windows

Problem:    Cannot build with Lua on MS-Windows.
Solution:   Add DLL symbol for luaL_Loadstring. (Ken Takata)
df1643a6a7

vim-patch:8.2.0856: CTRL-S stops output

Problem:    CTRL-S stops output.
Solution:   Invert the IXON flag. (closes vim/vim#6166)
928eec649b

vim-patch:8.2.1212: cannot build with Lua 5.4

Problem:    Cannot build with Lua 5.4.
Solution:   Use luaL_typeerror instead defining it. (closes vim/vim#6454)
5551b131da

vim-patch:8.2.2211: MS-Windows: can't load Python dll if not in the path

Problem:    MS-Windows: can't load Python dll if not in the path.
Solution:   Use the InstallPath registry entry. (Kelvin Lee, closes vim/vim#7540)
b2f9e0e2c5
2020-12-25 10:20:29 -05:00
1e823986e9 vim-patch:8.2.1174: no test for the "recording @x" message
Problem:    No test for the "recording @x" message.
Solution:   Add a test. (Dominique Pellé, closes vim/vim#6427)
11a5b19a8c
2020-12-25 10:17:01 -05:00
8cf4a02bf2 vim-patch:8.1.2212: cannot see the selection type in :reg output
Problem:    Cannot see the selection type in :reg output. (Ayberk Aydın)
Solution:   Add c/l/b. (Christian Brabandt, closes vim/vim#5110, closes vim/vim#4546)
3691f1ee72

Patch v8.1.0999 is not ported so ":registers" does not omit register 1.
2020-12-25 10:17:00 -05:00
0813bb021a vim-patch:8.2.0051: command line completion test skipped
Problem:    Command line completion test skipped. (Christian Brabandt)
Solution:   Invert condition.
731a799bb9

Cherry-pick Test_cmdline_complete_bang() from patch v8.2.0049.
2020-12-25 10:17:00 -05:00
8c8cc35926 Merge pull request #13595 from teto/fix-filler
de curwinify some functions
2020-12-24 22:43:27 +01:00
88ae03bcdb feat(sign):Allow signs to be 0 width (#13290)
Adds support for signs to be 0 cells wide. If all signs of the same
group have no width, the signcolumn will not be rendered for that group.
2020-12-24 17:33:52 +01:00
6c28bddfad Merge pull request #13599 from janlazo/vim-8.2.2197
vim-patch:8.1.{1837,1840},8.2.{907,2197,2203}
2020-12-24 17:03:37 +01:00
c56377bac6 vim-patch:8.2.2203: Moodle gift files are not recognized
Problem:    Moodle gift files are not recognized.
Solution:   Add a filetype pattern. (Delim Temizer)
b34f337472
2020-12-24 09:23:35 -05:00
f35118ade4 vim-patch:8.2.0907: when using :global clipboard isn't set correctly
Problem:    When using :global clipboard isn't set correctly.
Solution:   Set "clip_unnamed_saved" instead of "clip_unnamed". (Christian
            Brabandt, closes vim/vim#6203, closes vim/vim#6198)
07188fc5ef
2020-12-24 09:18:33 -05:00
172f619b9a vim-patch:8.1.1837: popup test fails if clipboard is supported but not working
Problem:    Popup test fails if clipboard is supported but not working.
Solution:   Add the "clipboard_working" feature. Also use Check commands
            instead of "if" and "throw".  And remove stray ch_logfile().
4999a7fb65

Treat "clipboard_working" feature as an alias to "clipboard" feature.

N/A patches for version.c:

vim-patch:8.1.1840: Testing: WorkingClipboard() is not accurate

Problem:    Testing: WorkingClipboard() is not accurate.
Solution:   Check feature clipboard_working instead.
52992feafe

Neovim did not port WorkingClipboard() for the legacy tests.
2020-12-24 09:18:33 -05:00
6897ce4417 vim-patch:8.2.2197: assert arguments order reversed
Problem:    Assert arguments order reversed.
Solution:   Swap the arguments. (Christian Brabandt, closes vim/vim#7531)
9f63a65f22
2020-12-24 09:18:33 -05:00
4dfc5bb2d0 Merge pull request #13537 from bfredl/rpcabort
rpc: don't handle stale requests on already closed channel
2020-12-24 14:34:47 +01:00
7afd4526f2 Merge pull request #13591 from janlazo/vim-8.1.1805
vim-patch:8.1.1805,8.2.{116,1025}
2020-12-23 21:37:08 -05:00
7add3ef996 fix: appease linter 2020-12-24 00:21:05 +01:00
95352f490a rpc: don't handle stale requests on already closed channel 2020-12-23 23:58:56 +01:00
6eecd4230d lsp: Fire LspDiagnosticsChanged before returning (#13483)
Run hook even when transitioning from some diagnostics to no diagnostics
2020-12-23 23:29:37 +01:00
45166313cc refactor: de-curwin-ify update_topline/curs_columns 2020-12-23 16:53:35 +01:00
4d9520ec86 refactor: pass the window to get_(side)scrolloff_value
to less rely on curwin
2020-12-23 16:21:10 +01:00
e193dbd7e8 vim-patch:8.2.1025: tabpage menu and tabline not sufficiently tested
Problem:    Tabpage menu and tabline not sufficiently tested.
Solution:   Add tests. (Yegappan Lakshmanan, closes vim/vim#6307)
8c524f76eb

Cherry-pick Test_entering_digraph() from patch v8.2.1022.
Cherry-pick :CheckGui from patch v8.1.1826.
2020-12-23 02:29:43 -05:00
afa5a11363 vim-patch:8.2.0116: BufEnter autocmd not triggered on ":tab drop"
Problem:    BufEnter autocmd not triggered on ":tab drop". (Andy Stewart)
Solution:   Decrement autocmd_no_enter for the last file. (closes vim/vim#1660,
            closes vim/vim#5473)
c10b521628

N/A patches for version.c:

vim-patch:8.1.1805: au_did_filetype is declared twice

Problem:    Au_did_filetype is declared twice.
Solution:   Remove it from autocmd.c. (closes vim/vim#4767)
6cd57d4466
2020-12-23 02:21:46 -05:00
d0668b36a3 Merge pull request #13586 from janlazo/vim-8.1.1047
vim-patch:8.1.{1047,1101,1212},8.2.{742,749,769,874,2142,2189,2192}
2020-12-22 19:53:44 -05:00
b602fe74b0 vim-patch:8.2.2189: cannot repeat a command that uses the small delete register
Problem:    Cannot repeat a command that uses the small delete register.
Solution:   Store the register name instead of the contents. (Christian
            Brabandt, closes vim/vim#7527)
032a2d050b

N/A patches for version.c:

vim-patch:8.2.2192: Codecov on github actions fails

Problem:    Codecov on github actions fails.
Solution:   Revert to codecov script. (Ozaki Kiichi, closes vim/vim#7529)
e5492609b3
2020-12-22 18:15:01 -05:00
0561243771 vim-patch:8.2.2142: memory leak when heredoc is not terminated
Problem:    Memory leak when heredoc is not terminated.
Solution:   Free heredoc_trimmed.
fffdf4754f
2020-12-22 18:08:47 -05:00
dd515b7097 vim-patch:8.2.0874: signals test is a bit flaky
Problem:    Signals test is a bit flaky.
Solution:   Flush the XautoOut file.  Delete files that may be left behind
            from a failure. (Dominique Pelle, closes vim/vim#6179)
d14fd5285e
2020-12-22 18:08:47 -05:00
caf2620f18 vim-patch:8.2.0769: VimLeavePre not triggered when Vim is terminated
Problem:    VimLeavePre not triggered when Vim is terminated.
Solution:   Unblock autocommands.
129d6bf6b3
2020-12-22 18:08:47 -05:00
40f9b1dd2c vim-patch:8.2.0749: TERM signal test fails on FreeBSD
Problem:    TERM signal test fails on FreeBSD.
Solution:   Do not check the messages, the may appear anywhere. (Dominique
            Pelle, closes vim/vim#6075)
55ba4b844f
2020-12-22 18:08:35 -05:00
8355ea2588 vim-patch:8.2.0742: handling of a TERM signal not tested
Problem:    Handling of a TERM signal not tested.
Solution:   Add a test for SIGTERM. (Dominique Pelle, closes vim/vim#6055)
48a687148c
2020-12-22 18:08:35 -05:00
0914faf7fa vim-patch:8.1.1212: signal PWR is not tested
Problem:    Signal PWR is not tested.
Solution:   Test that PWR updates the swap file. (Dominique Pelle,
            closes vim/vim#4312)
520e245237
2020-12-22 18:08:35 -05:00
7e63bbe4ec vim-patch:8.1.1101: signals test may fail in the GUI
Problem:    Signals test may fail in the GUI.
Solution:   Skip the test for the GUI. (Yee Checng Chin, closes vim/vim#4202)
690a905a01
2020-12-22 18:08:35 -05:00
2b781a6d7f vim-patch:8.1.1047: WINCH signal is not tested
Problem:    WINCH signal is not tested.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#4158)
db77b84ac2
2020-12-22 18:08:35 -05:00
b931a554d7 GHA/osx: workaround for brew update error (#13584) 2020-12-22 08:47:46 -05:00
7b65a9135e Merge pull request #13581 from janlazo/vim-8.2.2174
vim-patch:8.2.{2174,2175,2176,2177,2181}
2020-12-21 22:30:15 -05:00
07425d45e6 vim-patch:8.2.2181: valgrind warnings for using uninitialized value
Problem:    Valgrind warnings for using uninitialized value.
Solution:   Do not use "start" or "end" unless there is a match.
a3d10a508c
2020-12-21 21:34:18 -05:00
1eab3584ba vim-patch:8.2.2177: pattern "^" does not match if first character is combining
Problem:    Pattern "^" does not match if the first character in the line is
            combining. (Rene Kita)
Solution:   Do accept a match at the start of the line. (closes vim/vim#6963)
ef2dff52de
2020-12-21 21:27:13 -05:00
5e80b90ef4 vim-patch:8.2.2176: crash with a sequence of fold commands
Problem:    Crash with a sequence of fold commands.
Solution:   Bail out when there are no folds at all.  Add a test (Dominique
            Pellé) (closes vim/vim#7515)
6a78f32844

N/A patches for version.c:

vim-patch:8.2.2174: Mac version doesn't specify the CPU architecture

Problem:    Mac version doesn't specify the CPU architecture.
Solution:   Add "arm64" or "x86_64". (Yee Cheng Chin, closes vim/vim#7519)
8c9d98a8af

vim-patch:8.2.2175: github actions: clang-11 handling suboptimal

Problem:    Github actions: clang-11 handling suboptimal.
Solution:   Separate step of installing clang-11. Get ubuntu release name
            dynamically. (Ozaki Kiichi, closes vim/vim#7514)
9aff970204
2020-12-21 19:10:43 -05:00
aa3b17d04a lsp: Add <nomodeline> to doautocmd calls (#13576)
When using "au User LspDiagnosticsChanged redrawstatus!", modelines get processed again (see h: doautocmd). Fortunately this can be suppressed using the <nomodeline> flag. this replaces every doautocmd call, that issues a User command, with doautocmd <nomodeline>.
2020-12-21 20:03:50 +01:00
f15441be4b Merge pull request #13573 from janlazo/vim-8.1.1872
vim-patch:8.1.1872,8.2.1966
2020-12-21 09:28:26 -05:00
ebb0cbc6cc vim-patch:8.2.1966: popup becomes current window after closing a terminal window
Problem:    Popup becomes current window after closing a terminal window.
Solution:   When restoring the window after executing autocommands, check that
            the window ID is still the same.  (Naruhiko Nishino,
            closes vim/vim#7272)
cbcd9cbd77
2020-12-20 23:17:03 -05:00
d1142e02bf vim-patch:8.1.1872: when Vim exits because of a signal, VimLeave is not triggered
Problem:    When Vim exits because of a signal, VimLeave is not triggered.
            (Daniel Hahler)
Solution:   Unblock autocommands when triggering VimLeave. (closes vim/vim#4818)
c7226684c8
2020-12-20 20:36:55 -05:00
a1ec36ff31 Merge pull request #13572 from janlazo/vim-8.2.0180
vim-patch:8.2.{180,686,2166,2171}
2020-12-20 19:22:18 -05:00
afe7c43025 vim-patch:8.2.2171: valgrind warning for using uninitialized value
Problem:    Valgrind warning for using uninitialized value.
Solution:   Do not use "startp" or "endp" unless there is a match.
61e07b2394
2020-12-20 18:13:17 -05:00
06869a6940 vim-patch:8.2.2166: auto format doesn't work when deleting text
Problem:    Auto format doesn't work when deleting text.
Solution:   Make "x" trigger auto format. (closes vim/vim#7504)
d0a1dee3f1
2020-12-20 17:03:36 -05:00
0476f049f4 vim-patch:8.2.0686: formatoptions not sufficiently tested
Problem:    Formatoptions not sufficiently tested.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#6031)
2eaeaf3c31

Cherry-pick Test_fo_a_w() from patch v8.2.0482.
2020-12-20 17:00:34 -05:00
7fc59461a8 vim-patch:8.2.0180: test for wrapmargin fails if terminal is not 80 columns
Problem:    Test for wrapmargin fails if terminal is not 80 columns.
Solution:   Vertical split the window. (Ken Takata, closes vim/vim#5554)
0c3064b39b
2020-12-20 16:56:37 -05:00
1e59134834 lsp: add $/progress report (#13294)
Heavily inspired by https://github.com/nvim-lua/lsp-status.nvim.
listen to the LspProgressUpdate event to update your statusline.
2020-12-20 21:59:25 +01:00
b1711e6f92 foldcolumn: support "auto" (#13571)
"set foldcolumn=auto" is documented but not supported.
Support it by making it behave as "auto:1", similar to "signcolumn".

Close https://github.com/neovim/neovim/pull/13561
2020-12-20 15:20:42 -05:00
abcbc5a9f3 lsp: Fix text payload in didSave notification (#13363)
According to the specification[1] the payload must look like this:

    interface DidSaveTextDocumentParams {
    	/**
    	 * The document that was saved.
    	 */
    	textDocument: TextDocumentIdentifier;

    	/**
    	 * Optional the content when saved. Depends on the includeText value
    	 * when the save notification was requested.
    	 */
    	text?: string;
    }

`text` must be on the same level as `textDocument´.

Where `TextDocumentIdentifier` is:

    interface TextDocumentIdentifier {
	/**
	 * The text document's URI.
	 */
	uri: DocumentUri;
    }

[1]: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_didSave
2020-12-20 18:12:39 +01:00
fa46123998 doc: Fix vim.lsp.diagnostic.get_next (#13495) 2020-12-20 16:17:11 +01:00
8e9aa81919 vim-patch:8.2.1289: crash when using a custom completion function (#13565)
Problem:    Crash when using a custom completion function.
Solution:   Initialize all of the expand_T. (closes vim/vim#6532)
c841afff6a

Cherry-pick CLEAR_POINTER macro from patch v8.2.0559.

N/A patches for version.c:

vim-patch:8.1.1295: when vimrun.exe does not exist external command may fail

Problem:    When vimrun.exe does not exist external command may fail.
Solution:   Use "cmd /c" twice to get the same behavior. (Ken Takata,
            closes vim/vim#4355)
98ffe4c6d8

vim-patch:8.2.2155: warning from Github actions for code analysis

Problem:    Warning from Github actions for code analysis.
Solution:   Remove the "git checkout HEAD^2" block.
18f69229c5

vim-patch:8.2.2156: Github actions run on pusing a tag

Problem:    Github actions run on pusing a tag.
Solution:   Don't run CI on tag push. Omit coveralls on pull-request.
            (Ozaki Kiichi, closes vim/vim#7489)
b5b77378bc

vim-patch:8.2.2158: CI on cirrus times out, coveralls doesn't always run

Problem:    CI on cirrus times out, coveralls doesn't always run.
Solution:   Set timeout to 20 minutes. Adjust condition. (closes vim/vim#7493)
6e562fcc07
2020-12-20 16:14:19 +01:00
9539d46bb1 Merge pull request #13563 from janlazo/vim-8.2.2161
vim-patch:8.1.0470,8.2.{2161,2163}
2020-12-20 02:06:53 -05:00
7390cc8b29 vim-patch:8.1.0470: pointer ownership around fname_expand() is unclear
Problem:    Pointer ownership around fname_expand() is unclear.
Solution:   Allow b_ffname and b_sfname to point to the same allocated memory,
            only free one.  Update comments.
3d6014f033
2020-12-19 22:52:30 -05:00
e465157ecd vim-patch:8.2.2163: crash when discarded exception is the current exception
Problem:    Crash when discarded exception is the current exception.
Solution:   Compare the execption with current_exception. (closes vim/vim#7499)
13656f02e4
2020-12-19 21:38:17 -05:00
6ee8964d46 vim-patch:8.2.2161: arguments -T and -x not tested yet
Problem:    Arguments -T and -x not tested yet.
Solution:   Add a test. (Dominique Pellé, closes vim/vim#7490
1f33e0a7c4

Neovim does not support '-T' command line argument so skip the test.

Ref a16eab9e57
2020-12-19 21:30:12 -05:00
7e4c912565 Merge pull request #13559 from janlazo/vim-8.2.0162
vim-patch:8.1.1657,8.2.{162,262,264,272}
2020-12-19 15:18:33 -05:00
fb0ecf9e70 GHA/osx: remove python 2to3 2020-12-19 14:18:26 -05:00
f12bbf62cc Merge pull request #13558 from TysonAndre/php-syntax-update
runtime/php: 1c6737b20a5cf71751b180461cea22fc76d8870c
2020-12-19 13:08:21 -05:00
a4c41ba931 runtime/php: 1c6737b20a5cf71751b180461cea22fc76d8870c
Port php syntax file only.

Ref https://github.com/neovim/neovim/issues/12844
2020-12-19 12:39:10 -05:00
cd0a4040c4 runtime/php: 47e13953ffdbb9f163b901196dec8c2100b72edd
Port php syntax file only.
2020-12-19 12:39:07 -05:00
bec4172aa9 runtime/php: 5ef1c6a4838a9629b793f3ae676f72a764171b00
Port php syntax file only.
2020-12-19 12:39:04 -05:00
5491a728fe vim-patch:8.2.0272: ":helptags ALL" gives error for some directories
Problem:    ":helptags ALL" gives error for directories without write
            permission. (Matěj Cepl)
Solution:   Ignore errors for ":helptags ALL". (Ken Takata, closes vim/vim#5026,
            closes vim/vim#5652)
414b796627

Cherry-pick Test_helptag_cmd() from patch v8.2.0203.
2020-12-19 10:39:15 -05:00
945ae2c72b vim-patch:8.1.1657: Terminal: screen updates from 'balloonexpr' are not displayed
Problem:    Terminal: screen updates from 'balloonexpr' are not displayed.
Solution:   Update the screen if needed.  Fix the word position for
            "mousemoved".
7ba343e634
2020-12-19 10:39:14 -05:00
b35061fb64 vim-patch:8.2.0264: fileformat test still fails on MS-Windows
Problem:    Fileformat test still fails on MS-Windows.
Solution:   Set fileformat of buffer in the right place.
a36c830a32
2020-12-19 10:39:14 -05:00
09b7163f5d vim-patch:8.2.0262: fileformat test fails on MS-Windows
Problem:    Fileformat test fails on MS-Windows.
Solution:   Set fileformat of buffer.
50434bd74c

Cherry-pick Test_fileformat_plusplus_read() from patch v8.2.0261.
2020-12-19 10:39:14 -05:00
46afc1def8 Add <Enter> to existing vim syntax highlighting for angle-bracket notation (#13553) 2020-12-19 10:22:50 -05:00
5ce328df40 vim-patch:8.1.0734: the hlsearch state is not stored in a session file (#13547)
Problem:    The hlsearch state is not stored in a session file.
Solution:   Add "nohlsearch" if appropriate. (Jason Franklin)
e3c74d249a

Vi default for 'sessionoptions' includes 'options'.
Use 'set sessionoptions&vi' to use Vim's default 'sessionoptions'.
If a test sets 'sessionoptions',
reset 'sessionoptions' at the end of the test.

N/A patches for version.c:

vim-patch:8.2.0119: message test fails on some platforms

Problem:    Message test fails on some platforms. (Elimar Riesebieter)
Solution:   Add type cast to vim_snprintf() argument. (Dominique Pelle)
1470dc35c4

vim-patch:8.2.0234: message test fails on SunOS

Problem:    Message test fails on SunOS.
Solution:   Adjust expectation for printf "%p". (Ozaki Kiichi, closes vim/vim#5595)
d5b9914938

vim-patch:8.2.2149: popupwin test for latin1 sometimes fails

Problem:    Popupwin test for latin1 sometimes fails.
Solution:   Wait for the script to finish.
4c5bdb99ad

vim-patch:8.2.2150: Github actions CI isn't used for all available platforms

Problem:    Github actions CI isn't used for all available platforms.
Solution:   Update the github workflows. (Ozaki Kiichi, closes vim/vim#7433)
8ea05de6aa

vim-patch:8.2.2151: $dir not expanded when configure checks for moonjit

Problem:    $dir not expanded when configure checks for moonjit.
Solution:   Use double quotes instead of single quotes. (closes vim/vim#7478)
a79a8944da

vim-patch:8.2.2153: popupwin test for latin1 still fails sometimes

Problem:    Popupwin test for latin1 still fails sometimes.
Solution:   Wait for the "cat" command to finish.
b125b535bb

vim-patch:8.2.2154: popupwin test for terminal buffer fails sometimes

Problem:    Popupwin test for terminal buffer fails sometimes.
Solution:   Wait for the prompt to appear.
0353f56ddb
2020-12-17 21:13:17 -05:00
f007a140ab vim-patch:8.2.2147: quickfix window title not updated in all tab pages (#13545)
Problem:    Quickfix window title not updated in all tab pages.
Solution:   Update the quickfix window title in all tab pages. (Yegappan
            Lakshmanan, closes vim/vim#7481, closes vim/vim#7466)
530bed993e
2020-12-17 09:14:19 -05:00
934b8e172e GHA: integrate unix and windows settings 2020-12-17 15:47:11 +09:00
2debabb080 Merge pull request #13355 from notomo/check-textlock-in-api
api: add textlock check
2020-12-16 15:40:21 +01:00
5e202f69b3 Merge pull request #13367 from nvim-treesitter/offset-lang-injection
feat(treesitter): add offset predicate for language injection
2020-12-16 13:59:36 +01:00
30ef8c693c test: textlock api error 2020-12-16 21:57:24 +09:00
93ba977793 docs: add check_textlock attribute 2020-12-16 21:57:24 +09:00
958ebc7337 Merge pull request #13539 from vigoux/ts-fix-icmnosplit
fix: also splice extmarks in preview buffers
2020-12-16 12:05:01 +01:00
abdb2b4d29 GHA: fix build problems on Windows 2020-12-16 15:27:35 +09:00
d7051705d0 ci: setup GitHub actions for windows 2020-12-16 13:12:14 +09:00
25e20da550 feat(buffer_updates): allow ignoring when previewing
Also adds a test that we actually subscribe to buffer events when in
CMDPREVIEW.
2020-12-15 22:29:27 +01:00
d0112693a3 fix: also splice extmarks in preview windows
We indeed need to adjust extmarks in preview windows.

Fixes #12967
2020-12-15 15:34:55 +01:00
c3b9c35876 Merge pull request #13538 from jamessan/mac-locale
fix: Include auto/config.h before HAVE_* preprocessor checks
2020-12-15 08:54:04 -05:00
929f194145 feat(treesitter): add offset predicate for language injection
refactor(treesitter): add directives to queries
2020-12-15 07:03:47 -06:00
6c2eb903a9 fix: Include auto/config.h before HAVE_* preprocessor checks
Closes #13533
2020-12-15 07:43:44 -05:00
356319f356 api: add textlock check 2020-12-15 20:24:33 +09:00
82100a6bdb healthcheck: fix health check issue with shada file (#13291)
- If the shada file is set with shada option n, use it.
- If the shadafile is NONE, it does not check for file read/write access.
- If the shada file does not exist, try to create it.
2020-12-13 21:49:29 -05:00
d6115c9964 Merge pull request #12624 from qvacua/build-arm64-mac 2020-12-13 21:25:04 -05:00
e8ae3ade77 Fix lsp tests breaking from new LuaJIT version
Apparently the new version of LuaJIT changed the consistency with which it
sorted table dictionaries. IIRC lua sorts dictionary keys by memory address, so
it would appear that the reasons tests were previously passing was because of
a differentiation in the implementation of the lua runtime.

Ensure that array fields in the lsp protocol tables are consistently created,
by using ipair when generating arrays for completionItemKind and
symbolItemKind.

For CodeActionKind, the current implementation includes both the keys and the
values in the array. This is incorrect. Ensure that only the values are
included in the array and sort them for consistency.
2020-12-13 21:03:27 -05:00
9c5b4c87e1 third-party: Always set DEPLOYMENT_TARGET when building LuaJIT on macOS
LuaJIT build now requires specifying a deployment target, so use the
same baseline as our nightly builds.

Co-authored-by: Christian Clason <christian.clason@uni-due.de>
2020-12-13 21:03:27 -05:00
27ddaa39db Do not set pagezero_size and image_base for LuaJIT >= 2.1.0-beta3
This is properly handled in LuaJIT now and setting causes "Malformed
Mach-o file" error when running the resulting binary on arm64 Macs.
2020-12-13 21:03:27 -05:00
12709c475b Use the latest luajit for arm64 Mac compatibility. 2020-12-13 21:03:19 -05:00
0285fae5ec Merge pull request #13526 from janlazo/vim-8.1.0839
vim-patch:8.1.{839,1630,2382},8.2.{669,739,1911,2136,2140}
2020-12-13 16:35:56 -05:00
cb579bbaed vim-patch:8.1.1630: various small problems
Problem:    Various small problems.
Solution:   Various small improvements.
e809a4ed30
2020-12-13 15:58:41 -05:00
3026a5f41d vim-patch:8.2.2136: Vim9: Using uninitialized variable
Problem:    Vim9: Using uninitialized variable.
Solution:   Initialize "len" to zero.  Clean up fnamemodify().
c530852315

N/A patches for version.c:

vim-patch:8.1.0839: when using VTP wrong colors after a color scheme change

Problem:    When using VTP wrong colors after a color scheme change.
Solution:   When VTP is active always clear after a color scheme change.
            (Nobuhiro Takasaki, closes vim/vim#3872)
f58d81a187

vim-patch:8.1.2382: MS-Windows: When using VTP bold+inverse doesn't work

Problem:    MS-Windows: When using VTP bold+inverse doesn't work.
Solution:   Compare with the default colors. (Nobuhiro Takasaki, closes vim/vim#5303)
a050b9471c

vim-patch:8.2.0669: MS-Windows: display in VTP is a bit slow

Problem:    MS-Windows: display in VTP is a bit slow.
Solution:   Optimize the code. (Nobuhiro Takasaki, closes vim/vim#6014)
4e5534fab7

vim-patch:8.2.0739: incomplete profiling when exiting because of a dealy signal

Problem:    Incomplete profiling when exiting because of a dealy signal.
Solution:   Call __gcov_flush() if available.
b415168a98

vim-patch:8.2.1911: tiny build fails

Problem:    Tiny build fails.
Solution:   Add #ifdef.
977fd0b327

vim-patch:8.2.2140: build failure with tiny features

Problem:    Build failure with tiny features.
Solution:   Add #ifdef.
2a3cd3af45
2020-12-13 15:40:19 -05:00
9c56d8e5f7 Merge pull request #13522 from janlazo/vim-8.2.2130
vim-patch:8.1.1089,8.2.2130
2020-12-12 17:49:09 -05:00
d5ab4b800c vim-patch:8.1.1089: tutor does not check $LC_MESSAGES
Problem:    Tutor does not check $LC_MESSAGES.
Solution:   Let $LC_MESSAGES overrule $LANG. (Miklos Vajna, closes vim/vim#4112)
b44b7add8a
2020-12-12 16:38:23 -05:00
7bbe8a4900 vim-patch:8.2.2130: Insert mode completion messages end up in message history
Problem:    Insert mode completion messages end up in message history.
Solution:   Set msg_hist_off. (closes vim/vim#7452
cc2335896b
2020-12-12 14:07:16 -05:00
257c0f89a9 Merge pull request #13523 from janlazo/javascript-runtime
Update Javascript runtime
2020-12-12 13:31:47 -05:00
4fa6aa90ad runtime/javascript: 207f009326c8f878defde0e594d7d9ed9860106e
Port javascript and javascript react ftplugins only.
2020-12-12 11:40:25 -05:00
a8860b033f runtime/javascript: e7b1ea0276cc83cd5c612f3189a174a60d57b5ed
Port javascript autocomplete file only.
2020-12-12 11:38:33 -05:00
a2f8a795cd runtime/javascript: 388a5d4f20b4b64341d1604aa238cab85827b892
Port javascript syntax file only.

Ref https://github.com/neovim/neovim/issues/13185
2020-12-12 11:38:31 -05:00
552ff68349 runtime/javascript: 09c6f265b21065ffa9437837b1d0955137175e45
Port javascriptreact.vim syntax only.

Ref https://github.com/neovim/neovim/issues/13185
2020-12-12 11:38:28 -05:00
e2be382977 runtime/javascript: 5be4ceecea5520265066eac972460ebb1cdf05e7
Port javascript syntax files only.

Ref: https://github.com/neovim/neovim/issues/13185
2020-12-12 11:38:25 -05:00
4f9e7a512d Merge pull request #13521 from janlazo/nvim-8.1.2246
vim-patch:8.1.2246
2020-12-12 09:07:23 -05:00
b6723e1ea0 Merge pull request #13486 from bfredl/bufnoreload
fileio: detach buffer when buffer was reloaded (like with :edit)
2020-12-12 09:55:49 +01:00
da5c547ee3 vim-patch:8.1.2246: some tests are still in old style
Problem:    Some tests are still in old style.
Solution:   Change a few tests to new style. (Yegappan Lakshmanan)
1f068233c1
2020-12-11 23:39:11 -05:00
cb8e0d07b3 test/old: cherry-pick patch v8.1.1955 changes for test_trycatch.vim 2020-12-11 23:39:10 -05:00
aed5a53d5f test/old: cherry-pick patch 8.1.0711 changes for test_trycatch.vim 2020-12-11 23:39:10 -05:00
cacdef5ff1 Merge pull request #13489 from janlazo/issue-13485
eval: executable(), exepath() accept strings only
2020-12-11 23:36:15 -05:00
da58242fb8 test/functional/eval: assert that executable() fixtures are executable 2020-12-11 22:59:43 -05:00
5ccc79e880 eval: executable(), exepath() accept strings only
Cherry-pick f_executable(), f_exepath(), check_for_string() from patch 8.2.2117.
Rename check_for_string() to tv_check_for_string().
7bb4e74c38

Close https://github.com/neovim/neovim/issues/13485
2020-12-11 21:20:20 -05:00
062576f679 vim-patch:8.2.0047: cannot skip tests for specific MS-Windows platform (#13461)
Problem:    Cannot skip tests for specific MS-Windows platform.
Solution:   Add windowsversion().
0c1e3744ff
2020-12-11 19:45:22 -05:00
a82bcf9d9c unused macros: Remove a five unused macros. (#13517)
Removes:
- GET_CHARTAB
- PRT_PS_DEFAULT_BUFFER_SIZE
- key_t
- PROP_MASK
- SCTX_INIT

Referring #13505.
2020-12-11 19:41:20 -05:00
f2ec058602 tests: Take into account magic hyphen. (#13518)
In Lua patterns the hyphen works like a non-greedy version of Vim's `*`.
- Use `%-` when you need a literal hyphen.
- If you don't need a regular expression at all, use something like
  ```
  string.find(text, pattern, 1, true)
  ```
  so that the pattern is regarded as a plain, non-magical string.
  See [1] and [2] in the Lua manual.

[1]: https://www.lua.org/manual/5.1/manual.html#pdf-Patterns
[2]: https://www.lua.org/manual/5.1/manual.html#pdf-string.find
2020-12-11 18:54:39 -05:00
4620ad604f Merge pull request #13515 from neovim/revert-13514-patch-1
Revert "Use oldest macOS version for release workflow"
2020-12-11 13:07:30 -05:00
50a76a0e5d Revert "Use oldest macOS version for release workflow" 2020-12-11 13:07:07 -05:00
b8e12ebf20 Merge pull request #13514 from mhanberg/patch-1
Use oldest macOS version for release workflow
2020-12-11 12:40:19 -05:00
81aa780909 Use oldest macOS version for release workflow 2020-12-11 11:57:19 -05:00
77c60206df vim-patch:8.1.1900: sign test fails in the GUI (#13511)
Problem:    Sign test fails in the GUI.
Solution:   Catch and ignore the exception.
d933c82ff4

Port Test_sign_funcs() changes from patch 8.1.1899.
Test_sign_funcs_multi() in patch 8.1.1899 cannot be ported
without earlier sign patches..

N/A patches for version.c:

vim-patch:8.1.0954: arguments of semsg() and siemsg() are not checked

Problem:    Arguments of semsg() and siemsg() are not checked.
Solution:   Add function prototype with __attribute__.
0d8562a999

vim-patch:8.2.2126: Ruby: missing function prototype

Problem:    Ruby: missing function prototype.
Solution:   Add the prototype.
0e12140550
2020-12-11 10:10:33 -05:00
763de8dd8f macros.h: Remove unused CURSOR_BAR_RIGHT macro. (#13506)
Closes #13505.
2020-12-11 07:43:29 -05:00
faa47eafff vim-patch:8.2.0005: duplication in version info (#13502)
Problem:    Duplication in version info.
Solution:   Use preprocessor string concatenation. (Ken Takata, closes vim/vim#5357)
5021225656
2020-12-10 21:07:20 -05:00
a92dbf49bf ex_cmds: port cmd_addr_T and ADDR_NONE (#13492)
Patch 8.1.1241 is too hard to port in 1 commit.
https://github.com/neovim/neovim/pull/13079 is too hard to review
and seems to be blocked.

Use 'int' type for some  addr variables to suppress 'switch/case' warnings.
2020-12-10 19:48:18 -05:00
52e660e857 Merge pull request #13482 from dm1try/propagate_lua_file_loading_errors
runtime: propagate lua parsing errors while using "require"
2020-12-10 12:15:40 +01:00
99007bcc12 Merge pull request #13450 from nvim-treesitter/fix-unknown-language-parser
fix(treesitter): don't throw an error for missing injected langs
2020-12-10 11:12:39 +01:00
3421485253 runtime: propagate lua parsing errors while using "require" 2020-12-10 10:53:28 +01:00
00f60c2ce7 vim-patch:8.2.1833: when reading from stdin dup() is called twice (#13498)
Problem:    When reading from stdin dup() is called twice.
Solution:   Remove the dup() in main.c. (Ken Takata, closes vim/vim#7110)
204ade6bcb

N/A patches for version.c:

vim-patch:8.2.2109: "vim -" does not work well when modifyOtherKeys is enabled

Problem:    "vim -" does not work well when modifyOtherKeys is enabled and a
            shell command is executed on startup.
Solution:   Only change modifyOtherKeys when executing a shell command in raw
            mode.
8a3da6a368

vim-patch:8.2.2110: cannot use ":shell" when reading from stdin

Problem:    Cannot use ":shell" when reading from stdin. (Gary Johnson)
Solution:   Revert patch 8.2.1833.
8e1cbb55c3

vim-patch:8.2.2111: GTK: menu background is the same color as the main window

Problem:    GTK: Menu background is the same color as the main window.
Solution:   Fix white space around the test in another way. (closes vim/vim#7437,
            closes vim/vim#7427)
023fd5d213

vim-patch:8.2.2113: MS-Windows GUI: crash after using ":set guifont=" four times

Problem:    MS-Windows GUI: crash after using ":set guifont=" four times.
Solution:   Check for NULL pointer. (Ken Takata, closes vim/vim#7434)
1b3e0727ce

vim-patch:8.2.2116: MS-Windows GUI: test for 'guifont' is incomplete

Problem:    MS-Windows GUI: test for 'guifont' is incomplete.
Solution:   Set 'renderoptions'. (Christian Brabandt)
2c78a772fd

vim-patch:8.2.2118: dead code in the job support

Problem:    Dead code in the job support. (Dominique Pellé)
Solution:   Define USE_ARGV before checking for it.
f46bf5204c

vim-patch:8.2.2119: GTK3: status line background color is wrong

Problem:    GTK3: status line background color is wrong.
Solution:   Don't change the code for earlier GTK3 versions. (closes vim/vim#7444)
7988a6f0e9
2020-12-09 21:23:51 -05:00
638f5d5b95 Merge pull request #13497 from seandewar/vim-8.2.2121
vim-patch:8.2.{2121,2123}
2020-12-09 19:12:48 -05:00
de5372c8c0 man.vim: Add double click mapping. 2020-12-09 18:17:53 -04:00
9900e68ae3 vim-patch:8.2.2123: after using a complete popup the buffer is listed
Problem:    After using a complete popup the buffer is listed. (Boris
            Staletic)
Solution:   Make the buffer unlisted.
d356fc65d2
2020-12-09 19:28:03 +00:00
b8a0304bb9 vim-patch:8.2.2121: internal error when using \ze before \zs in a pattern
Problem:    Internal error when using \ze before \zs in a pattern.
Solution:   Check the end is never before the start. (closes vim/vim#7442)
a7a691cc14
2020-12-09 19:02:57 +00:00
bfed67e00e Merge pull request #13494 from jamessan/release-fixes
GHA: Use oldest OS images to build releases
2020-12-09 07:49:58 -05:00
3881bc2295 GHA: Use oldest OS images to build releases
Closes #13493
2020-12-09 07:39:20 -05:00
fb1c08a86f doc: Fix incorrect LSP diagnostic-related helptags (#13388) 2020-12-09 11:21:16 +01:00
222a0452fa doc: Add missing parameter end_pos for range_formatting (#13481) 2020-12-09 11:19:56 +01:00
3974c4bce3 feat(nix): add flake.nix (#13487)
`flakes` is a feature available in the unstable version of the `nix` package manager
to ease the distribution of nix expressions see https://www.tweag.io/blog/2020-05-25-flakes/ .

Nix excels at software reproducibility and is available/can be
installed on different distributions (ubuntu/void/debian etc) as well
as macOS.

This flakes contains 3 packages that can be installed via for instance
`nix run 'github:neovim/neovim?dir=contrib#nvim-debug'`
or
`nix run 'github:neovim/neovim?dir=contrib'` for the default version.

you can register an alias
`nix registry add neovim 'github:neovim/neovim?dir=contrib'`
and the previous commands become:
`nix run neovim`
2020-12-09 09:15:37 +01:00
08ec36efaf feat: Allow incremental sync & lsp flags (#13371) 2020-12-08 21:09:33 -05:00
74089a9086 fileio: detach buffer when buffer was reloaded (like with :edit) 2020-12-08 18:40:52 +01:00
4383c0f952 Merge pull request #13478 from seandewar/vim-8.2.2106
vim-patch:8.2.2106: TOML files are not recognized
2020-12-07 18:22:03 -05:00
8329f624de vim-patch:8.2.2106: TOML files are not recognized
Problem:    TOML files are not recognized.
Solution:   Match *.toml. (issue vim/vim#7432)
b237ae7b83
2020-12-07 18:03:29 +00:00
85bce4d13d Merge pull request #13473 from ostera/patch-1
Fix typo on treesitter.txt help page
2020-12-07 13:29:54 +01:00
c86ba6dea4 Fix typo on treesitter.txt help page 2020-12-07 08:08:23 +01:00
ee5ece084c Merge pull request #13471 from jamessan/release-fixes 2020-12-06 22:31:30 -05:00
b32124fce2 GHA: Perform a full checkout for release workflow
This is needed to get a tag-based version from `git describe` rather
than just the commit.
2020-12-06 21:01:11 -05:00
2b594b9c81 Use vX.Y.Z-dev+{git-describe} for development versions 2020-12-06 21:01:11 -05:00
7477703586 Merge pull request #13468 from janlazo/vim-8.1.0818
vim-patch:8.1.{818,1131,2064},8.2.{587,879,1021,1296,2104}
2020-12-06 20:39:53 -05:00
8ae34ab780 log: use uv_gettimeofday() for Windows
POSIX gettimeofday() is not portable.
2020-12-06 19:26:33 -05:00
a4e18e50ef runtime/doc: strftime() is always available 2020-12-06 19:26:33 -05:00
c46b67333f vim-patch:8.2.1296: some part of using 'smarcase' was not tested
Problem:    Some part of using 'smarcase' was not tested.
Solution:   Add more tests. (Dominique Pellé, closes vim/vim#6538)
d66cdcd43a
2020-12-06 19:26:33 -05:00
7bb92b7787 vim-patch:8.2.1021: Ruby interface not tested enough
Problem:    Ruby interface not tested enough.
Solution:   Add a couple more tests. (Dominique Pellé, closes vim/vim#6301)
a190548e91
2020-12-06 17:53:43 -05:00
fb7285b5d7 vim-patch:8.1.2064: MS-Windows: compiler warnings for unused arguments
Problem:    MS-Windows: compiler warnings for unused arguments.
Solution:   Add UNUSED. (Yegappan Lakshmanan, closes vim/vim#4963)
bd67aac279

N/A patches for version.c:

vim-patch:8.1.0818: MS-Windows: cannot send large data with ch_sendraw()

Problem:    MS-Windows: cannot send large data with ch_sendraw().
Solution:   Split write into several WriteFile() calls. (Yasuhiro Matsumoto,
            closes vim/vim#3823)
240583869a

vim-patch:8.1.1131: getwinpos() does not work in the MS-Windows console

Problem:    getwinpos() does not work in the MS-Windows console.
Solution:   Implement getwinpos().
16c34c3765

vim-patch:8.2.0587: compiler warning for unused variable

Problem:    Compiler warning for unused variable.
Solution:   Add UNUSED.
21cfe500f3

vim-patch:8.2.0879: compiler warning for unused function argument

Problem:    Compiler warning for unused function argument.
Solution:   Add UNUSED.
f9ca08e95f

vim-patch:8.2.2104: build problem with Ruby 2.7

Problem:    Build problem with Ruby 2.7.
Solution:   Adjust function declarations. (Ozaki Kiichi, closes vim/vim#7430)
d5a986f460
2020-12-06 17:47:17 -05:00
5855a3ea7b Merge pull request #13449 from nvim-treesitter/fix-language-for-range
fix(treesitter): incorrect method name call
2020-12-06 23:27:38 +01:00
53e9adeddd Merge pull request #13472 from jamessan/macos-nightly
GHA: Include runtime in macos release tarball
2020-12-06 17:06:01 -05:00
f4809916d3 GHA: Include runtime in macos release tarball 2020-12-06 16:47:12 -05:00
08c0eef52a Merge pull request #13467 from jamessan/release-fixes 2020-12-06 09:52:22 -05:00
f9bd3f9cb5 GHA: Use full version in release description
Closes #13466
2020-12-06 09:50:16 -05:00
cdf362a488 GHA: Fix event_name check for nightly builds 2020-12-06 09:00:47 -05:00
ef3230f35b Merge pull request #13464 from jamessan/release-fixes
GHA: Delete nightly tag before creating new release
2020-12-05 20:44:07 -05:00
44ba5c4168 GHA: Delete nightly tag before creating new release 2020-12-05 20:14:51 -05:00
d76c10ef1d Merge pull request #13455 from bfredl/deprecated
api: move deprecated functions to separate files
2020-12-05 23:31:18 +01:00
463cf74182 Merge pull request #13454 from tk-shirasaka/fix/send-win_hide
ui: Fix win_hide distination grid
2020-12-05 21:22:19 +01:00
31787a91dc Merge pull request #13458 from jamessan/release-fixes 2020-12-05 13:08:48 -05:00
18360290d0 GHA: Generate correct appimage for release/nightly 2020-12-05 13:04:33 -05:00
dfc4111e42 GHA: Do not run CI for tags 2020-12-05 13:04:25 -05:00
e11f3fb726 GHA: Rename "Nightly release" to "Release" 2020-12-05 13:04:02 -05:00
f7fd7ba745 GHA: Automatically create a release for versioned tags 2020-12-05 13:03:57 -05:00
7ab458f929 GHA: Add support for manually creating a release 2020-12-05 13:01:57 -05:00
1b53544111 GHA: Use meeDamian/github-release to create/update release 2020-12-05 13:01:38 -05:00
de0ecf3e03 Fixed lint error 2020-12-06 02:25:38 +09:00
38f4e6541f vim-patch:8.2.2091: MS-Windows: build warnings (#13451)
Problem:    MS-Windows: build warnings.
Solution:   Add a #pragma to suppress the deprecation warning. (Ken Takata)
            Avoid using a non-ASCII character. (closes vim/vim#7421)
29d2f45c88

N/A patches for version.c:

vim-patch:8.1.1883: options test fails

Problem:    Options test fails.
Solution:   Add entry for 'completepopup'.
9513d91be0

vim-patch:8.2.2089: libvterm test fails to build on Mac

Problem:    Libvterm test fails to build on Mac.
Solution:   Adjust configure to remove a space between -L and the path that
            follows.
6cd42db9dc
2020-12-05 11:04:48 -05:00
bb6229449d Moved temporary variable to where it's used 2020-12-05 23:48:59 +09:00
b1ef6de620 api: move deprecated functions to separate files
Most these are just calls to non-deprecated variants, and take up
unnecessary space and search hits in the other files.
2020-12-05 14:34:17 +01:00
9601e7c5d5 ui: Fix win_hide distination grid
When create tab, win_hide sent to new tab and new tab's previous tab.
So, if created tab that not next tab (eg. $tabnew cmd),
send win_hide to not current tab, and fixed this.
2020-12-05 20:18:51 +09:00
c348e816fc Merge pull request #13452 from jamessan/appimage 2020-12-04 21:11:56 -05:00
8997c8b563 GHA: Build appimage for nightly 2020-12-04 21:07:06 -05:00
fd53e5ee2c GHA: Stop installing test dependencies for nightly build 2020-12-04 20:50:54 -05:00
b940cbb858 Merge pull request #13417 from shade-of-noon/man_count.13411
runtime: Fix man.vim count handling.
2020-12-04 18:36:54 -05:00
e15c5f58df fix(treesitter): don't throw an error for missing injected langs 2020-12-04 16:56:29 -06:00
2985c17867 fix(treesitter): incorrect method name call 2020-12-04 16:15:47 -06:00
0c8d6ab536 Merge pull request #13445 from jamessan/build-artifacts
GHA: Publish nightly builds for Linux and macOS
2020-12-04 11:44:45 -05:00
16157258be GHA: Publish nightly builds for Linux and macOS 2020-12-04 11:25:14 -05:00
6c344a75d4 Merge pull request #13173 from tjdevries/tjdevries/option_info
api: add option metadata
2020-12-04 13:45:32 +01:00
17a58043a3 api/options: cleanup the fixup 2020-12-04 13:29:44 +01:00
ced951c2aa api/options: fixup 2020-12-04 13:29:44 +01:00
3b3c006ae3 api/options: cleanup 2020-12-04 13:29:44 +01:00
35767912bb api/options: add option metadata 2020-12-04 13:29:27 +01:00
e8153ad9c2 man.vim: Set iskeyword explicitly.
This also fixes `:Man!`, which wasn't setting 'iskeyword' to contain
parentheses, etc.
2020-12-04 08:14:40 -04:00
44be2dfca1 Merge pull request #13434 from janlazo/vim-8.2.2076
vim-patch:8.1.{1013,1774},8.2.{1164,1673,1907,2076,2077,2078,2085,2086}
2020-12-03 21:31:29 -05:00
2bcae20242 vim-patch:8.2.2085: Qt translation file is recognized as typescript
Problem:    Qt translation file is recognized as typescript.
Solution:   Check the first line for "<?xml". (closes vim/vim#7418)
c0d670ce16
2020-12-03 18:58:30 -05:00
f85386d170 vim-patch:8.2.1907: complete_info().selected may be wrong
Problem:    Complete_info().selected may be wrong.
Solution:   Update cp_number if it was never set. (issue vim/vim#6945)
f9d51354de

Misc changes:

For variables and function parameters that use "Direction" enum values,
update their type from from "int" to "Direction".
It is hard to review function parameters that must accept
"Direction" enum values only.
2020-12-03 18:58:29 -05:00
6bc1844b11 vim-patch:8.2.1673: complete_info() selected index has an invalid value
Problem:    complete_info() selected index has an invalid value. (Ben Jackson)
Solution:   Set the index when there is only one match. (closes vim/vim#6945)
            Add test for complete_info().
b806aa5bd9
2020-12-03 18:58:29 -05:00
c6b780bdd1 vim-patch:8.2.2078: illegal memory access when using :print on invalid text
Problem:    Illegal memory access when using :print on invalid text. (Dhiraj
            Mishra)
Solution:   Check for more composing characters than supported. (closes vim/vim#7399)
1cbfc9914d

N/A patches for version.c:

vim-patch:8.1.1013: MS-Windows: Scrolling fails when dividing the screen

Problem:    MS-Windows: Scrolling fails when dividing the screen.
Solution:   Position the cursor before calling ScrollConsoleScreenBuffer().
            (Nobuhiro Takasaki, closes vim/vim#4115)
3b5fef6a99

vim-patch:8.1.1774: test is silently skipped

Problem:    Test is silently skipped.
Solution:   Throw "Skipped".
3c610c9638

vim-patch:8.2.1164: text cleared by checking terminal properties not redrawn

Problem:    Text cleared by checking terminal properties not redrawn. (Alexey
            Radkov)
Solution:   Mark the screen characters as invalid. (closes vim/vim#6422)
96916ac67a

vim-patch:8.2.2076: MS-Windows console: sometimes drops typed characters

Problem:    MS-Windows console: sometimes drops typed characters.
Solution:   Do not wait longer than 10 msec for input. (issue vim/vim#7164)
c478ee3d83

vim-patch:8.2.2077: build failure with small features

Problem:    Build failure with small features.
Solution:   Add #ifdef.
a452b808b4

vim-patch:8.2.2086: libvterm tests are only run on Linux

Problem:    Libvterm tests are only run on Linux.
Solution:   Use static libraries. (Ozaki Kiichi, closes vim/vim#7419)
476268c387
2020-12-03 18:58:23 -05:00
f5e0f17968 lsp: Change diagnosticg.get_all to return {bufnr: Diagnostic[]} (#13310)
Allows users to associate the diagnostics with the right bufnr.
2020-12-03 14:22:15 -05:00
5c7141cc71 lsp: Make open_floating_preview buffers ephemeral (#13437)
Fixes #13429.
2020-12-03 14:20:56 -05:00
fa73bb70fc lsp: Fix "unsupported_method" error when the buffer does not have an LSP Server (#13175) 2020-12-03 01:00:54 -05:00
8fb786e415 vim-patch:8.2.0602: :unlet $VAR does not work properly (#13238)
Problem:    :unlet $VAR does not work properly.
Solution:   Make ":lockvar $VAR" fail.  Check the "skip" flag.
7e0868efcf

Include patch 8.2.0601 changes so that ex_unletlock() can execute a callback if there are no errors.
2020-12-02 08:44:13 -05:00
d80f262f89 Merge pull request #13428 from janlazo/nvim-8.0.1525
vim-patch:8.0.{858,953,1525}
2020-12-01 19:02:38 -05:00
72c22862dc Merge pull request #12235 from dm1try/add_init_lua
add init.lua as an alternative user config
2020-12-01 18:54:50 +01:00
f88c2490c7 Merge pull request #13425 from bfredl/secretcharm
ex_getln: add secret charm
2020-12-01 17:32:48 +01:00
518fe0e8a2 test/wildmode_spec: override $PS1
User config may set $PS1 for a colored prompt.
It breaks the screen tests.
2020-12-01 08:52:34 -05:00
4b74996dbc test/timer_spec: increase base timeout
The following keeps happening in my local environment
because the timeout is too short.

[  FAILED  ] test/functional/eval/timer_spec.lua @ 208: timers do not crash when processing events in the handler
test/functional/eval/timer_spec.lua:219: retry() attempts: 1
test/helpers.lua:73: Expected objects to be the same.
Passed in:
(number) 0
Expected:
(number) 1
2020-12-01 08:52:34 -05:00
56f5e3bd6b vim-patch:8.0.1525: using :wqa exits even if a job runs in a terminal window
Problem:    Using :wqa exits even if a job runs in a terminal window. (Jason
            Felice)
Solution:   Check if a terminal has a running job. (closes vim/vim#2654)
7a76092a51
2020-12-01 08:52:33 -05:00
eb387ae530 executor: use new nlua_ name pattern 2020-12-01 10:51:31 +01:00
c65d3fd67b doc: mention init.lua
use a generic name instead of "init.vim" in starting.txt
2020-12-01 10:51:31 +01:00
33f324796c startup: allow lua files as session one 2020-12-01 10:51:31 +01:00
767cd8b17b startup: add init.lua as an alternative user config, fixes #7895 2020-12-01 10:51:25 +01:00
13b8857300 path: add helper for checking a file extension 2020-12-01 10:50:38 +01:00
70d0bee765 Merge pull request #13426 from yegappan/vimdiff
Update vim_diff.txt
2020-12-01 10:41:33 +01:00
11249ad021 vim-patch:8.0.0953: get "no write since last change" error in terminal window
Problem:    Get "no write since last change" error in terminal window.
Solution:   Use another message when closing a terminal window. Make ":quit!"
            also end the job.
f5be7cd016
2020-12-01 01:13:49 -05:00
24ab81bd46 fixup! vim-patch:8.0.0858: check if job terminal is running #10908 2020-12-01 00:16:23 -05:00
e20ee69952 Update vim_diff.txt 2020-11-30 20:48:52 -08:00
a1a4dd34ea Merge pull request #13419 from janlazo/vim-8.2.2067
vim-patch:8.1.2264,8.2.{617,620,628,2067,2069}
2020-11-30 20:59:40 -05:00
c3a45032e6 Merge pull request #13378 from mgnsk/fix-undeclared-identifier 2020-11-30 20:27:13 -05:00
bed9839f46 ex_getln: add secret charm
Opt in to this secret world using

    set wildchar=0
    " already the default, but remove if non-zero existing config:
    set wildcharm=0

now you can map 'wildmode' just like any mode:

    cnoremap <tab> <c-z>
    function! Spacey()
      return getcmdline()[-1:] == "/" ? "\<bs>" : ""
    endfunc
    cnoremap <expr> / wildmenumode() ? Spacey()."/<c-z>" : "/"

Possibly asked questions:

What about backwards compatibility?
====

Just do nothing and your existing 'wildchar' and 'wildcharm' will keep working.

Doesn't `<c-z>` mean suspend?
====

Not in cmdline mode. If it would then the recommended wildcharm would not
have been `<c-z>` to start with.

My config relies on `:<c-z>` being a synonym to `:<nop>`!
====
just no.
2020-12-01 00:57:52 +01:00
21c6b40a59 fall back to os_realpath 2020-11-30 19:27:56 +02:00
f348923934 Fix undeclared identifier when HAVE_READLINK is not defined 2020-11-30 19:27:56 +02:00
87279bb809 vim-patch:8.1.2264: there are two test files for :let
Problem:    There are two test files for :let.
Solution:   Merge the two files.
fcf8a8743b

N/A patches for version.c:

vim-patch:8.2.0617: new error check triggers in Swedish menu

Problem:    New error check triggers in Swedish menu.
Solution:   Insert backslash. (Mats Tegner, closes vim/vim#5966)
d2662ad2de

vim-patch:8.2.0620: error in menu translations

Problem:    Error in menu translations.
Solution:   Insert a backslash before a space.
0d6fe631f7

vim-patch:8.2.0628: error in menu translations

Problem:    Error in menu translations.
Solution:   Insert a backslash before a space in one more file. (Shun Bai,
            Emir Sari)
e71ebb46a2
2020-11-30 01:18:33 -05:00
8562c2cb6b test/old: partial port of patch 8.1.0736
Required for patch 8.1.2264.
2020-11-30 01:18:33 -05:00
b3ddc23507 test/old: partial port of patch 8.1.0711
Patch 8.1.0711 is too difficult to merge in 1 commit.
2020-11-30 01:18:33 -05:00
5706ff15ed vim-patch:8.2.2069: the quickfix window is not updated after setqflist()
Problem:    The quickfix window is not updated after setqflist().
Solution:   Update the quickfix buffer. (Yegappan Lakshmanan, closes vim/vim#7390,
            closes vim/vim#7385)
287153c5d4

N/A patches for version.c:

vim-patch:8.2.2067: cursor position in popup terminal is wrong

Problem:    Cursor position in popup terminal is wrong.
Solution:   Don't check the flags.
f5452691ba
2020-11-29 21:12:31 -05:00
ba2e94d223 runtime: Fix man.vim count handling.
Here I use a negative number to decide whether the count has been
explicitly set. I think it unlikely that negative sections will ever be
created given that negative numbers complicate argument handling:
```
$ man -1 foo
man: invalid option -- '1'
```
and given that there's already precedence for alphanumeric sections like
`3p`, `3x`, `n`, etc.

---

This does work, though:
```
$ man -S -3 baz
```
With `man baz.-3` and `man 'baz(-3)'`, (GNU) man *might* consider `-3`
internally as a section, but in the end reports as if the whole
argument was the name of a topic:
```
$ man 'baz(-3)'
No manual entry for baz(-3)
```

---

Closes #13411.
2020-11-29 19:56:15 -04:00
aec61074a9 Merge pull request #13404 from jarimayenburg/filetype_docker
[RDY] runtime: Updated Dockerfile syntax with latest from Vim upstream
2020-11-29 11:31:14 -05:00
abb61cd01a runtime/dockerfile.vim: ebdf3c964a901fc00c9009689f7cfda478342c51
Port only dockerfile.vim from upstream
ebdf3c964a
2020-11-29 16:31:09 +01:00
ff1e3048cc runtime/dockerfile.vim: 560979ed4f0216f902a2c247e937f00a27dcb198
Port only dockerfile.vim from upstream
560979ed4f
2020-11-29 16:30:31 +01:00
15e616a057 folds: use Folded highlight even with spell on (#13393)
the highlight was not used with spell enabled on folded lines.
Thanks to lervag for the nice report.
2020-11-29 14:26:59 +01:00
dc6593a84a doc: fix lsp statusline examle (#13286)
Co-authored-by: Damien Rajon <damien@askmarty.io>
2020-11-29 14:24:52 +01:00
8b2887bd56 Merge pull request #13288 from acomagu/reduce-memory-usage-lsp-rpc
lsp: Reduce memory usage for buffering the message from LSP
2020-11-28 21:43:25 -05:00
900228a20f lsp: Reduce memory usage for buffering the message from LSP. 2020-11-29 06:49:44 +09:00
a35c54b2ae vim-patch:8.2.0095: cannot specify exit code for :cquit (#13407)
Problem:    Cannot specify exit code for :cquit.
Solution:   Add optional argument. (Thinca, Yegappan Lakshmanan, closes vim/vim#5442)
1860bde9d3

Co-authored-by: erw7 <erw7.github@gmail.com>
2020-11-28 21:28:57 +01:00
7294a20bbc Merge pull request #13405 from bfredl/newlog
initialization: enable logging in set_init_1()
2020-11-28 18:39:00 +01:00
b8ec6a5775 initialization: delay logging in set_init_1() 2020-11-28 16:55:06 +01:00
ba13b94f5a Merge pull request #13402 from janlazo/vim-8.2.2056
vim-patch:8.1.0951,8.2.{271,594,965,1370,2056,2059}
2020-11-27 21:27:07 -05:00
a3922e03a9 vim-patch:8.2.0271: the "num64" feature is available everywhere
Problem:    The "num64" feature is available everywhere and building without
            it causes problems.
Solution:   Graduage the "num64" feature. (James McCoy, closes vim/vim#5650)
82f654e092

Restore Test_printf_spec_b() from patch 7.4.2221..

N/A patches for version.c:

vim-patch:8.2.0594: MS-Windows: cannot build with WINVER set to 0x0501

Problem:    MS-Windows: cannot build with WINVER set to 0x0501.
Solution:   Only use inet_ntop() when available. (Ozaki Kiichi, closes vim/vim#5946)
b6fb0516ec

vim-patch:8.2.0965: has_funcundefined() is not used

Problem:    Has_funcundefined() is not used.
Solution:   Delete the function. (Dominique Pellé, closes vim/vim#6242)
5055c56cfb

vim-patch:8.2.1370: MS-Windows: warning for using fstat() with stat_T

Problem:    MS-Windows: warning for using fstat() with stat_T.
Solution:   use _fstat64() if available. (Naruhiko Nishino, closes vim/vim#6625)
c753478b82

vim-patch:8.2.2056: configure fails when building with implicit-function-declaration

Problem:    Configure fails when building with the
            "implicit-function-declaration" error enabled, specifically on Mac.
Solution:   Declear the functions like in the source code. (suggestion by
            Clemens Lang, closes vim/vim#7380)
ce7be3a0e6
2020-11-27 21:24:59 -05:00
628a1caa69 vim-patch:8.2.2059: Amiga: can't find plugins
Problem:    Amiga: can't find plugins.
Solution:   Do not use "**" in the pattern. (Ola Söder, closes vim/vim#7384)
6ee874d378
2020-11-27 21:24:59 -05:00
7b8b786062 vim-patch:8.1.0951: using WIN64 even though it is never defined
Problem:    Using WIN64 even though it is never defined.
Solution:   Only use _WIN64. (Ken Takata, closes vim/vim#3997)
44b443c5db
2020-11-27 20:28:54 -05:00
d956842751 Merge pull request #13397 from adrian5/filetype-gitrebase
runtime: Patch gitrebase filetype
2020-11-27 09:20:33 -05:00
70c2849bc9 gitrebase.vim: patch runtime/syntax to 664f3cf3f21
vim/vim@664f3cf3f2
2020-11-27 04:30:56 +01:00
23ef9d2dbc gitrebase.vim: patch runtime/syntax to c08ee7476b1
vim/vim@c08ee7476b
2020-11-27 04:28:07 +01:00
37e2751c37 gitrebase.vim: patch runtime/ftplugin to c08ee7476
vim/vim@c08ee7476b
2020-11-27 04:16:36 +01:00
6af64d384f Merge pull request #13315 from ThomasFeher/colorscheme_terminal
Fix colors in terminal by maintaining COLORTERM
2020-11-26 14:04:25 -05:00
d8963c434f Fix colors in terminal by maintaining COLORTERM
Fixes https://github.com/neovim/neovim/issues/10836
2020-11-26 18:36:22 +01:00
10a5f40f9e Merge pull request #13386 from glepnir/glepnir-patch-1 2020-11-26 17:00:49 +09:00
0e7f965a1b use if_nil variable replace vim.F.if_nil 2020-11-26 14:32:38 +08:00
4537ff659e Merge pull request #13375 from janlazo/vim-8.2.2041
vim-patch:8.1.{2290,2390},8.2.{242,257,302,303,462,991,996,2041,2042,2043,2047,2048,2049,2054}
2020-11-25 22:48:53 -05:00
fe5dc26648 vim-patch:8.2.0462: previewwindow test fails on some systems
Problem:    Previewwindow test fails on some systems. (James McCoy)
Solution:   Wait a bit after sending the "o". (closes vim/vim#5849)
37bb030cd9

Cherry-pick Test_popup_and_previewwindow_dump() changes
from patches 8.1.1585, 8.1.2373.

N/A patches for version.c:

vim-patch:8.2.0242: preview popup window test fails with long directory name

Problem:    Preview popup window test fails with long directory name. (Jakub
            Kądziołka)
Solution:   Use "silent cd". (closes vim/vim#5615)
799439a5d8

vim-patch:8.2.2042: build failure with +profile but without +reltime

Problem:    Build failure with +profile but without +reltime.
Solution:   Adjust #ifdef. (Christian Brabandt, closes vim/vim#7361)
813196784a

vim-patch:8.2.2043: GTK3: white border around text stands out

Problem:    GTK3: white border around text stands out.
Solution:   Use current theme color. (closes vim/vim#7357, issue vim/vim#349)
ff94bd9e47

vim-patch:8.2.2047: Amiga: FEAT_ARP defined when it should not

Problem:    Amiga: FEAT_ARP defined when it should not.
Solution:   Adjust #ifdef. (Ola Söder, closes vim/vim#7370)
36fe7b287e

vim-patch:8.2.2048: Amiga: obsolete code

Problem:    Amiga: obsolete code.
Solution:   Remove the unused lines. (Ola Söder, closes vim/vim#7373)
3a3b691042

vim-patch:8.2.2049: Amiga: obsolete function

Problem:    Amiga: obsolete function.
Solution:   Remove the function. (Ola Söder, closes vim/vim#7374)
d653293c80

vim-patch:8.2.2054: Amiga: FEAT_ARP defined when it should not

Problem:    Amiga: FEAT_ARP defined when it should not.
Solution:   Adjust "||" to "&&" in #ifdef. (Ola Söder, closes vim/vim#7375)
d49a35a1c3
2020-11-25 22:08:26 -05:00
dd00c74737 Lsp: fix vim.F.ifnil to vim.F.if_nil (#13384) 2020-11-25 21:17:03 -05:00
0d83a1c43f LSP: Feature/add workspace folders (#12638)
* First implementation of workspace folders
* Add completion for current directory
* Add tracking of workspace folders
* Add workspace folder listing
* Add checks on adding/removing workspaces
* Add appropriate initialization options
* Add documentation
* Make workspaceFolders available wherever client is
2020-11-25 21:07:02 +01:00
2d5dd85eef screen.c: Allow showbreak to override cursorline. (#13372)
I also added relevant tests.

Close #13369
2020-11-25 16:47:03 +01:00
104749440d Merge pull request #13379 from bfredl/runtime
runtime: extract 'runtimepath' and 'packpath' logic to its own file
2020-11-25 13:15:01 +01:00
ca7fa2a43a Merge pull request #13357 from vigoux/luahl-priority
feat(luahl): add priority mechanism
2020-11-25 12:43:08 +01:00
72d29847d6 runtime: extract 'runtimepath' and 'packpath' logic to its own file
No code changes, except for added ILOG for the calculated startup path
2020-11-25 12:15:55 +01:00
c0a6989d93 feat(luahl): add priority mechanism
Base priority is 0x1000, in order to stay kinda backward compatible.
Also set tree-sitter default highlight to 100 (middle-ish value)
2020-11-25 10:10:05 +01:00
8d7fa8962b vim-patch:8.2.0996: using "aucmdwin" in win_gettype() is not ideal
Problem:    Using "aucmdwin" in win_gettype() is not ideal.
Solution:   Rename to "autocmd".
40a019f157
2020-11-25 02:46:20 -05:00
9b2efe6b7d vim-patch:8.2.0991: cannot get window type for autocmd and preview window
Problem:    Cannot get window type for autocmd and preview window.
Solution:   Add types to win_gettype(). (Yegappan Lakshmanan, closes vim/vim#6277)
0fe937fd86

Cherry-pick test_preview.vim,test_window_cmd.vim changes
from patch v8.2.0522.
2020-11-25 02:45:00 -05:00
ede747c2cc vim-patch:8.2.0257: cannot recognize a terminal in a popup window
Problem:    Cannot recognize a terminal in a popup window.
Solution:   Add the win_gettype() function.
00f3b4e007
2020-11-25 02:10:44 -05:00
ea3aaa020f Merge pull request #13374 from bkegley/patch-1
fix(treesitter): docs reflect parser:parse()
2020-11-25 08:02:08 +01:00
a9186501f6 vim-patch:8.1.2390: test94 is old style, fix 7.4.441 not tested
Problem:    Test94 is old style, fix 7.4.441 not tested.
Solution:   Turn test94 into a new style test.  Add tests for the fix in patch
            7.4.441. (Yegappan Lakshmanan, closes vim/vim#5316)
309976ec1f
2020-11-25 01:31:38 -05:00
b0d3f47e90 vim-patch:8.2.0303: TermChanged test fails in the GUI
Problem:    TermChanged test fails in the GUI.
Solution:   Skip the test when running the GUI.
d28e0b3652
2020-11-24 22:52:06 -05:00
11e64de511 Merge pull request #13373 from jamessan/github-actions 2020-11-24 22:42:40 -05:00
eae90b37c3 vim-patch:8.2.0302: setting 'term' may cause error in TermChanged autocommand
Problem:    Setting 'term' may cause error in TermChanged autocommand.
Solution:   Use aucmd_prepbuf() to switch to the buffer where the autocommand
            is to be executed. (closes vim/vim#5682)
0c81d1b112
2020-11-24 22:29:41 -05:00
3a573a9e2f vim-patch:8.1.2290: autocommand test fails
Problem:    Autocommand test fails.
Solution:   Remove 'closeoff' from 'diffopt'.
a9aa86ff95
2020-11-24 22:17:52 -05:00
ec53d43f84 vim-patch:8.2.2041: haskell filetype not optimally recognized
Problem:    Haskell filetype not optimally recognized.
Solution:   Recognize all *.hsc files as Haskell. (Marcin Szamotulski,
            closes vim/vim#7354)
a09bee322e
2020-11-24 22:03:36 -05:00
21eb2e5ef8 fix(treesitter): docs reflect parser:parse()
Update docs to document that `parser:parse()` now returns a table of trees
2020-11-24 20:56:47 -06:00
0bb565b13b GHA: Force CCACHE_DIR=$HOME/.ccache 2020-11-24 21:26:03 -05:00
be9bd43502 ci: Only setup ipv6 on macOS for Travis 2020-11-24 21:26:03 -05:00
0d7777e9bc GHA: brew required software 2020-11-24 21:26:02 -05:00
36fe82ff98 env.sh: Handle no flavor being specified 2020-11-24 21:26:02 -05:00
0c022c03ee GHA: Add macOS CI 2020-11-24 21:26:02 -05:00
d93e397232 ci: s/TRAVIS_OS_NAME/CI_OS_NAME/ for non-Travis-specific code 2020-11-24 21:26:02 -05:00
1731ef3176 GHA: Rename linux workflow to CI 2020-11-24 21:26:01 -05:00
7caa622afc Merge pull request #13368 from vigoux/langtree-fixes
languagetree: call changedtree callback per tree
2020-11-24 21:30:13 +01:00
7574918dc7 vim-patch:8.1.0825: code for autocommands is mixed with file I/O code (#13305) 2020-11-24 14:53:38 -05:00
e6d1656831 languagetree: call changedtree callback per tree
Also fix a typo
2020-11-24 16:53:03 +01:00
a6bd52d877 Merge pull request #13366 from bfredl/path3a
api: enable nvim_get_runtime_file to find subdirectories
2020-11-24 16:47:48 +01:00
7e0e0782a1 vim-patch:8.2.2036: buffer messed up if creating the quickfix window fails (#13365)
Problem:    Current buffer is messed up if creating a new buffer for the
            quickfix window fails.
Solution:   Check that creating the buffer succeeds. (closes vim/vim#7352)
9e40c4b15e
2020-11-24 09:12:58 -05:00
d285fa73da api: enable nvim_get_runtime_file to find subdirectories 2020-11-24 14:18:46 +01:00
71d4f5851f man.vim: Use page title instead of full path. (#13353)
In commit 63f0ca3263, `tagfunc` was introduced to
`runtime/autoload/man.vim`. Nonetheless the tag function instead
of using a short buffer name (e.g. `man://foo(3)`) uses the full
path to the man page (e.g. `man:///usr/share/.../foo.3.gz`). This
behaviour is inconsistent with `:Man!`, thus this commit.

Closes #13334
2020-11-24 09:48:06 +01:00
60158dfb81 checkhealth: support virtual env dir with spaces 2020-11-24 09:39:11 +01:00
dd876a1548 Merge pull request #13322 from teto/remove_curwin
refactor: pass window to was_set_insecurely
2020-11-24 07:10:55 +01:00
7eb0c16dc8 fix(fold): use Folded highlight even with spell on
Partially addresses https://github.com/neovim/neovim/issues/12982. It's
more a quickfix while reworking folds.
2020-11-23 21:06:56 +01:00
4f1fc0f6d5 refactor: pass window to was_set_insecurely
working on get_foldtext and wanted to get rid of the curwin backup/restore.
Turns out it's not possible else f_foldtext is run on the same window.
Kept the cleanup anyway.
2020-11-23 21:06:56 +01:00
2d36b62eda Merge pull request #13270 from vigoux/ts-range-ranges
treesitter: allow table to be used as ranges
2020-11-23 18:42:08 +01:00
fb52790d1c Merge pull request #13358 from jamessan/ubuntu-20.04-gha 2020-11-23 09:27:35 -05:00
b155e6b54c Merge pull request #11148 from janlazo/vim-8.0.1455
vim-patch:8.0.1455,8.1.{2115,2361}
2020-11-23 09:19:11 -05:00
52d76f0a32 fix(treesitter): allow ranges in set_included_ranges 2020-11-23 15:09:32 +01:00
9ff6760b2d treesitter: refactor some things 2020-11-23 14:56:27 +01:00
80d1c4da5f ci: Only try installing python-pynvim if Py2 pip is present 2020-11-23 08:43:37 -05:00
1e7d937e16 GHA: Switch to ubuntu-20.04 image for Linux
Stop explicitly installing Ubuntu's python package, since most of the
Python 2 packages (and importantly pip/setuptools) have been removed in
this Ubuntu version.
2020-11-23 08:42:24 -05:00
029b5d036d Merge pull request #13354 from jamessan/ea.skip-providers 2020-11-23 08:37:04 -05:00
dd3583836b vim-patch:8.1.2361: MS-Windows: test failures related to VIMDLL
Problem:    MS-Windows: test failures related to VIMDLL.
Solution:   Adjust code and tests. (Ken Takata, closes vim/vim#5283)
310c32e892
2020-11-23 07:45:24 -05:00
1aae464222 vim-patch:8.1.2115: MS-Windows: shell commands fail if &shell contains a space
Problem:    MS-Windows: shell commands fail if &shell contains a space.
Solution:   Use quotes instead of escaping. (closes vim/vim#4920)
2efc44b3f0

Always double-quote &shell if it contains a space.
Neovim does not support escaping space with backslash, unlike Vim.

N/A patches for version.c:

vim-patch:8.0.1455: if $SHELL contains a space then 'shell' is incorrect

Problem:    If $SHELL contains a space then the default value of 'shell' is
            incorrect. (Matthew Horan)
Solution:   Escape spaces in $SHELL. (Christian Brabandt, closes vim/vim#459)
4bfa8af141

vim-patch:8.2.1194: test failure because shell prompt differs

Problem:    Test failure because shell prompt differs.
Solution:   Set the shell prompt.
a4dc6f92bb
2020-11-23 07:45:24 -05:00
43ec616414 Merge pull request #13252 from nvim-treesitter/language-tree
Language tree
2020-11-23 10:44:45 +01:00
1a631026a9 feat(treesitter): add language tree
Implement the LanguageTree structure to enable language injection.

This is done be removing the old Parser metatable and replacing by the
new structure, with the same API (almost).

Some noticeable differences :
  - `parser:parse()` now returns a table of trees
  - There is no incremental parsing for child (injected) languages

Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
2020-11-23 08:06:17 +01:00
e26d074fed Add eap->skip checks to script_host_{execute_file,do_range}
As a safety measure, return immediately from these functions if
eap->skip is set.  This is set when VimL is being parsed, to skip past
dead code, and should not be executed.
2020-11-22 22:48:04 -05:00
503e758a2f do_one_cmd: Remove :pyxdo/:pyxfile from "handle <bar>" switch
In 8f288698e4, these commands were
incorrectly added to the switch that determines whether a command needs
to parse for "|" on their own when ea.skip is set.

This means that "if 0 | pyxfile foo.py | endif" would execute foo.py
when it should do nothing.  Removing them from the switch skips to the
end of `do_one_cmd()`, avoiding running any script.
2020-11-22 22:46:51 -05:00
cd691f2b6f Merge pull request #13333 from adrian5/filetype-xml
runtime: Patch xml, xmllint, xmlformat filetypes
2020-11-22 22:01:15 -05:00
ee8f530b40 Merge pull request #13348 from adrian5/filetype-gitconfig
runtime: Patch gitconfig.vim syntax
2020-11-22 21:41:34 -05:00
093c44d697 Merge pull request #13351 from janlazo/vim-8.1.1598
vim-patch:8.1.{1598,1601,2332},8.2.2032
2020-11-22 19:42:28 -05:00
2d35706b97 xml.vim: patch runtime/syntax to 4ceaa3a6e0b8cb299
vim/vim@4ceaa3a6e0
2020-11-22 22:47:39 +01:00
f1b826778e xml.vim: patch runtime/syntax to 96f45c0b6fc9e9d40
vim/vim@96f45c0b6f
2020-11-22 22:45:05 +01:00
4230c54660 xml.vim: patch runtime/indent to 4ceaa3a6e0b8cb299
vim/vim@4ceaa3a6e0
2020-11-22 22:42:02 +01:00
e175cebf17 xml.vim: patch runtime/indent to 96f45c0b6fc9e9d40
vim/vim@96f45c0b6f
2020-11-22 22:40:08 +01:00
fad90537c2 xmllint.vim: patch runtime/compiler to 1c6737b20a5
vim/vim@1c6737b20a
2020-11-22 22:36:17 +01:00
6068b907cb Merge pull request #13345 from shade-of-noon/lingering-e145
Remove leftover handling of restricted mode.
2020-11-22 16:11:22 -05:00
5705bb1250 Merge pull request #13352 from jamessan/isCI
test: Add GitHub actions support to helpers.isCI
2020-11-22 15:35:09 -05:00
15e5acada9 vim-patch:8.1.2332: missing file in refactoring
Problem:    Missing file in refactoring.
Solution:   Update missing file.
556ae8ea28
2020-11-22 15:07:06 -05:00
4d4d77a3c4 po: Remove E145 error message. 2020-11-22 15:46:47 -04:00
070d7c2950 runtime: Remove error handling for E145.
Restricted mode (-Z) has been removed per #11996.
Some runtime files had lingering error handling (error
identifier `E145`) so I cleaned them up.
2020-11-22 15:46:47 -04:00
4ad7092abf test: Add GitHub actions support to helpers.isCI 2020-11-22 14:41:55 -05:00
e2a2efc432 vim-patch:8.2.2032: cabalconfig and cabalproject filetypes not recognized
Problem:    Cabalconfig and cabalproject filetypes not recognized.
Solution:   Detect more cabal files. (Marcin Szamotulski, closes vim/vim#7339)
dcbab75db3

N/A patches for version.c:

vim-patch:8.1.1598: update to test file missing

Problem:    Update to test file missing.
Solution:   Update the popup window test file.
53a95d6584

vim-patch:8.1.1601: missing changes to popup window test file

Problem:    Missing changes to popup window test file.
Solution:   Add those changes.
8da4181631
2020-11-22 13:30:38 -05:00
fc0f57228d xmlformat.vim: patch runtime/autoload to eab6dff19
vim/vim@eab6dff19f
2020-11-22 18:05:02 +01:00
67612b1766 xmlformat.vim: patch runtime/autoload to 96f45c0b6
vim/vim@96f45c0b6f
2020-11-22 18:00:23 +01:00
7dfeadb0fc Merge pull request #13347 from janlazo/vim-8.1.0650
vim-patch:8.1.0650,8.2.{1216,1217}
2020-11-22 00:03:52 -05:00
4c14410af6 vim-patch:8.2.1217: startup test depends on random source file
Problem:    Startup test depends on random source file.
Solution:   Write a test file to find quickfix errors in.
1e1f612bd4

N/A patches for version.c:

vim-patch:8.2.1216: startup test fails

Problem:    Startup test fails.
Solution:   Adjust expected values for deleted lines.
b6e4e4c6f7
2020-11-21 22:45:46 -05:00
485e5022fc test/old: cherry-pick patch 8.2.0509 for Test_q_arg() 2020-11-21 22:45:39 -05:00
e632e30b8a test/old: cherry-pick patch 8.1.2373 for test_startup.vim 2020-11-21 22:45:39 -05:00
04463f027a gitconfig.vim: patch runtime/syntax to c08ee7476b1
vim/vim@c08ee7476b
2020-11-22 04:43:16 +01:00
b0b57a2a6a gitconfig.vim: patch runtime/syntax to 5be4ceecea5
vim/vim@5be4ceecea
2020-11-22 04:34:44 +01:00
c4cef4ec93 vim-patch:8.1.0650: command line argument -q [errorfile] is not tested
Problem:    Command line argument -q [errorfile] is not tested.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#3730)
54948183d2
2020-11-21 22:28:26 -05:00
74eed35f95 Merge pull request #13338 from shade-of-noon/patch-1
Restricted mode (-Z) lingering references.
2020-11-21 21:02:16 -05:00
185732a1f8 Merge pull request #13340 from janlazo/vim-8.2.2025
vim-patch:8.1.1749,8.2.{579,2025,2027,2028,2029}
2020-11-21 18:20:44 -05:00
297567780e eval: use VAR_UNLOCKED enum, not the direct value 2020-11-21 15:35:05 -05:00
ce3668ed39 vim-patch:8.2.2027: Coverity warnts for uninitialized field
Problem:    Coverity warnts for uninitialized field.
Solution:   Set "v_lock".
9681f71392
2020-11-21 15:35:05 -05:00
5a4f049c38 vim-patch:8.2.2029: Coverity warns for not checking return value
Problem:    Coverity warns for not checking return value.
Solution:   Check that u_save_cursor() returns OK.
5546688fb6
2020-11-21 15:35:04 -05:00
5ea38abd53 vim-patch:8.2.2028: Coverity warns for using an uninitialized variable
Problem:    Coverity warns for using an uninitialized variable.
Solution:   Initialize to NULL.
896ad2c33e

N/A patches for version.c:

vim-patch:8.1.1749: Coverity warns for using negative index

Problem:    Coverity warns for using negative index.
Solution:   Move using index inside "if".
736cd2cfbe

vim-patch:8.2.0579: Coverity warns for unused value

Problem:    Coverity warns for unused value.
Solution:   Change order and use "else if".
4d5d0dfe94

vim-patch:8.2.2025: Amiga: Not all colors are used on OS4

Problem:    Amiga: Not all colors are used on OS4.
Solution:   Adjust the #ifdef to include __amigaos4__. (Ola Söder,
            closes vim/vim#7328)
2d718267f4
2020-11-21 15:34:44 -05:00
e192a4600a Merge pull request #13307 from janlazo/vim-8.1.0777
vim-patch:8.1.{323,777,933,938},8.2.{178,248,547,581,592,646,658,793,1608,1975,1991,1992,1993,1994,1998,1999,2003,2007,2008,2009}
2020-11-21 10:52:16 -05:00
5c92ee5d71 Update vim_diff.txt
Update for restricted mode removal.
2020-11-21 11:18:23 -04:00
60e1e60b88 Grammar - remove superfluous word. 2020-11-21 10:05:18 -04:00
fec2fb7e49 Remove restricted mode (-Z) from man page.
As per #11996, restricted mode (-Z) has been removed. Nonetheless in #11996 the man page was not updated. Hence this PR.
2020-11-21 09:41:59 -04:00
3c2402e5c2 Merge pull request #13250 from bfredl/missinglink
allow nvim_set_hl to break existing links
2020-11-21 13:11:17 +01:00
a4986ab47f decorations: allow nvim_set_hl to break existing links
also add `default` flag to NOT break existing links/defs
2020-11-21 11:24:14 +01:00
2a5307202b menu: remove winbar code
No unmerged Vim patch, applicable to Neovim, depend on WinBar feature.
It was merged only for merging Vim patches.
It is currently useless in Neovim.
Remove it to avoid rendering issues.

Close https://github.com/neovim/neovim/issues/12689
2020-11-20 20:27:12 -05:00
172d5b6561 test: rewrite powershell tests to remove timeout
TSAN kept failing and Appveyor sometimes fails on the same test.
2020-11-20 19:55:17 -05:00
0c86e70bf0 vim-patch:8.2.1608: Vim9: getchar() test fails with GUI
Problem:    Vim9: getchar() test fails with GUI.
Solution:   Avoid that getchar(0) gets stuck on K_IGNORE.
15183b41c4

N/A patches for version.c:

vim-patch:8.1.0323: reverse order of VTP calls only needed the first time

Problem:    Reverse order of VTP calls only needed the first time.
Solution:   Add a flag to remember the state. (Nobuhiro Takasaki, closes vim/vim#3366)
2551c037e4

vim-patch:8.1.0777: Win32: using pipes for channel does not work well

Problem:    Win32: using pipes for channel does not work well.
Solution:   Use a larger buffer and handle overlaps. (Yasuhiro Matsumoto,
            closes vim/vim#3782)
b091f30bf3

vim-patch:8.1.0933: When using VTP scroll region isn't used properly

Problem:    When using VTP scroll region isn't used properly.
Solution:   Make better use of the scroll region. (Nobuhiro Takasaki,
            closes vim/vim#3974)
6982f42f33

vim-patch:8.1.0938: background color is wrong in MS-Windows console

Problem:    Background color is wrong in MS-Windows console when not using VTP.
Solution:   Use g_attrCurrent. (Nobuhiro Takasaki, closes vim/vim#3987)
21edde8742

vim-patch:8.2.0178: with VTP the screen may not be restored properly

Problem:    With VTP the screen may not be restored properly.
Solution:   Add another set of saved RGB values. (Nobuhiro Takasaki,
            closes vim/vim#5548)
df54382eac

vim-patch:8.2.0248: MS-Windows: dealing with deprecation is too complicated

Problem:    MS-Windows: dealing with deprecation is too complicated.
Solution:   Use io.h directly. Move _CRT_SECURE_NO_DEPRECATE to the build
            file. Suppress C4091 warning by setting "_WIN32_WINNT". (Ken
            Takata, closes vim/vim#5626)
2f18975088

vim-patch:8.2.0547: Win32: restoring screen not always done right

Problem:    Win32: restoring screen not always done right.
Solution:   Use a more appropriate method. (Nobuhiro Takasaki, closes vim/vim#5909)
e7f234120f

vim-patch:8.2.0581: Win32 console: the cursor position is always top-left

Problem:    Win32 console: the cursor position is always top-left.
Solution:   Revert the patch for restoring screen.
81ccbf199f

vim-patch:8.2.0592: MS-Windows with VTP: cursor is not made invisible

Problem:    MS-Windows with VTP: cursor is not made invisible.
Solution:   Output the code to make the cursor visible or invisible. (Nobuhiro
            Takasaki, closes vim/vim#5941)
2695de63e3

vim-patch:8.2.0646: t_Co uses the value of $COLORS in the GUI

Problem:    t_Co uses the value of $COLORS in the GUI. (Masato Nishihata)
Solution:   Ignore $COLORS for the GUI. (closes vim/vim#5992)
759d81549c

vim-patch:8.2.0658: HP-UX build fails when setenv() is not defined

Problem:    HP-UX build fails when setenv() is not defined.
Solution:   Change "colors" to "t_colors". (John Marriott)
affc8fd2cd

vim-patch:8.2.0793: MS-Windows: cannot build GUI with small features

Problem:    MS-Windows: cannot build GUI with small features. (Michael Soyka)
Solution:   Add #ifdef around use of windowsVersion. (Ken Takata)
1e1d2e89fa

vim-patch:8.2.1975: Win32: memory leak when encoding conversion fails

Problem:    Win32: memory leak when encoding conversion fails.
Solution:   Free the allocated memory. (Ken Takata, closes vim/vim#7277)
bbf9f344af

vim-patch:8.2.1991: Coverity warns for not using the ga_grow() return value

Problem:    Coverity warns for not using the ga_grow() return value.
Solution:   Bail out if ga_grow() fails. (Yegappan Lakshmanan, closes vim/vim#7303)
ca359cbedd

vim-patch:8.2.1992: build fails with small features

Problem:    Build fails with small features.
Solution:   Add #ifdef.
4792a679f9

vim-patch:8.2.1993: occasional failure of the netbeans test

Problem:    Occasional failure of the netbeans test.
Solution:   Add "silent!". (Yegappan Lakshmanan, closes vim/vim#7304)
50dc3ecc64

vim-patch:8.2.1994: MS-Windows: MinGW always does a full build

Problem:    MS-Windows: MinGW always does a full build.
Solution:   Only check if $OUTDIR exists. (Masamichi Abe, closes vim/vim#7311)
c4390fe6c0

vim-patch:8.2.1998: terminal Cmd test sometimes fails to close popup

Problem:    Terminal Cmd test sometimes fails to close popup.
Solution:   Add "term_finish" option.
27f4f6baee

vim-patch:8.2.1999: terminal popup test sometimes fails

Problem:    Terminal popup test sometimes fails.
Solution:   Wait for the popup to close.
e6329e4c55

vim-patch:8.2.2003: build error with +conceal but without +popupwin

Problem:    Build error with +conceal but without +popupwin.
Solution:   Add #ifdef. (Tom Ryder, closes vim/vim#7316)
1efefda623

vim-patch:8.2.2007: test for insert mode in popup is not reliable

Problem:    Test for insert mode in popup is not reliable.
Solution:   Wait for the popup to disappear. (Ozaki Kiichi, closes vim/vim#7321)
17ab28daa0

vim-patch:8.2.2008: MS-Windows GUI: handling channel messages lags

Problem:    MS-Windows GUI: handling channel messages lags.
Solution:   Reduce the wait time from 100 to 10 msec. (closes vim/vim#7097)
032f40afb8

vim-patch:8.2.2009: MS-Windows: setting $LANG in gvimext only causes problems

Problem:    MS-Windows: setting $LANG in gvimext only causes problems.
Solution:   Do not set $LANG. (Ken Takata, closes vim/vim#7325)
382319211a
2020-11-20 19:55:04 -05:00
97ffa158aa Merge pull request #12004 from erw7/fix-paste 2020-11-20 12:08:31 -05:00
a539a12d72 test: add functional test for segmented response from terminal 2020-11-20 09:26:17 -05:00
6c1e1fe772 test,unit: Change test according to change of bg color response processing
Adjust the test for handle_background_color() according to
bd0275182b1c1b14c43dc4fc7e9f9da05071e56c.
2020-11-20 09:26:17 -05:00
8923a3df83 TUI: fix processing of bg color response
Terminal responses may be fragmented. In that case, the problem that was
not processed normally and was processed in the same way as user input
is corrected.

fixes #11393.
2020-11-20 09:26:17 -05:00
db5d2c86b3 TUI: fix bracket paste getting stuck
fixes #11699, #11991.
2020-11-20 09:25:57 -05:00
978857e0c2 Merge pull request #12592 from jamessan/fix-mod-keys 2020-11-20 09:15:39 -05:00
480b04122e Merge pull request #13321 from seandewar/vim-8.2.2011
vim-patch:8.2.{2006,2011}
2020-11-19 23:34:13 -05:00
da4e7ed4e9 Merge pull request #13330 from adrian5/filetype-gitcommit
runtime: Patch gitcommit.vim syntax
2020-11-19 23:19:08 -05:00
9e405c44b9 gitcommit.vim: patch runtime/syntax to c08ee7476b1
vim/vim@c08ee7476b
2020-11-20 02:44:05 +01:00
dee5dfd930 gitcommit.vim: patch runtime/ftplugin to c08ee7476
vim/vim@c08ee7476b
2020-11-20 02:39:43 +01:00
b0f967a06e vim-patch:8.2.2011: "syn sync" reports a very large number
Problem:    "syn sync" reports a very large number.
Solution:   Use "at the first line".
9950280d37
2020-11-19 17:35:51 +00:00
a18f050e51 vim-patch:8.2.2006: .pbtxt files are not recognized
Problem:    .pbtxt files are not recognized.
Solution:   Recognize .pbtxt as protobuf text buffers. (closes vim/vim#7326)
88774a30c0
2020-11-19 17:35:41 +00:00
ad56527247 Merge pull request #13319 from bfredl/bfredlpackages
startup: load files from the "start" directory of each entry in 'packpath' (as documented)
2020-11-19 15:36:44 +01:00
a119fe15da startup: load files from &packpath . '/start/{pluginname}'
Quoting the existing docs:

    Packages are loaded.  These are plugins, as above [&runtimepath], but
    found in the "start" directory of each entry in 'packpath'.  Every
    plugin directory found is added in 'runtimepath' and then the plugins
    are sourced.

Also tj didn't think I could do it.
2020-11-19 14:31:07 +01:00
569e5c86bf Merge pull request #13316 from bfredl/vim-8.2.2005
vim-patch:8.2.2005: redoing a mapping with <Cmd> doesn't work properly
2020-11-18 19:45:40 +01:00
790fd58714 Merge pull request #13318 from tjdevries/fix_vigouxs_segfaulting_mistakes
fix: NULL segfaults brought to you by @vigoux
2020-11-18 18:43:02 +01:00
2f8eaad6d8 fix: NULL segfaults brought to you by @vigoux 2020-11-18 11:16:38 -05:00
147917369e vim-patch:8.2.2005: redoing a mapping with <Cmd> doesn't work properly
Problem:    Redoing a mapping with <Cmd> doesn't work properly.
Solution:   Fill the redo buffer.  Use "<SNR>" instead of a key code.
            (closes vim/vim#7282)
c77534c303
2020-11-18 15:09:17 +01:00
8c4648421a Merge pull request #13308 from Shougo/vim-8.2.1995
vim-patch:8.2.1995: the popup menu can cause too much redrawing
2020-11-17 15:25:11 +01:00
b98348258d vim-patch:8.2.1995: the popup menu can cause too much redrawing
Problem:    The popup menu can cause too much redrawing.
Solution:   Reduce the length of the displayed text. (Yasuhiro Matsumoto,
            closes vim/vim#7306)
714cbe5b21
2020-11-17 14:42:29 +09:00
ce70edb80e Merge pull request #13302 from blueyed/fix-deps-luv-static
deps: fix BuildLuv without bundled libuv
2020-11-16 18:58:22 -05:00
a88bc4d95e keymap: Preserve S- modifier when C- is present
Closes #12037
2020-11-16 18:52:23 -05:00
e76f26d4e7 tui/input: Add S- modifier for chords with capital ASCII
termkey_strfkey() formats ctrl-l and ctrl-shift-l as <C-l> and <C-L>,
respectively.  Nvim wants the latter to look like <C-S-L>, since <C-l>
and <C-L> are interpreted the same way.

This is only required when the Ctrl modifier is present.
2020-11-16 18:52:23 -05:00
e62beab719 Understand Escape as another name for Esc
This allows us to remove special-case handling of Esc in
forward_modified_utf8(), which was always sending "<Esc>" to nvim even
when there were modifiers present.

Closes #12584
2020-11-16 18:52:16 -05:00
dd48198e62 Merge pull request #13303 from vigoux/fix-13298
fix(floatwin): don't always use winheight
2020-11-16 21:23:09 +01:00
ba21ea51b0 Merge pull request #13304 from rockerBOO/docs-fix-nvim_lsp-lspconfig
docs: Change nvim_lsp to lspconfig
2020-11-16 19:07:23 +01:00
2fb778c2ae docs: Change nvim_lsp to lspconfig 2020-11-16 11:35:34 -05:00
6a2cd57886 fix(floatwin): don't always use winheight 2020-11-16 14:37:24 +01:00
4c6628a7eb deps: fix BuildLuv without bundled libuv
Fixes:

    % rm -rf .deps
    % cmake -DUSE_BUNDLED_LUV=ON -DUSE_BUNDLED=OFF -S third-party -B .deps
    % cmake --build .deps
    ...
    [ 50%] Building C object CMakeFiles/luv.dir/src/luv.c.o
    /home/daniel/Vcs/neovim/.deps/build/src/luv/src/luv.c:20:10: fatal error: c-api/compat-5.3.h: No such file or directory
       20 | #include "c-api/compat-5.3.h"
          |          ^~~~~~~~~~~~~~~~~~~~
    compilation terminated.

This was broken since 78f1eccc8, where apparently the `LUA_COMPAT53_DIR`
was defined in a wrong location.
2020-11-16 13:52:50 +01:00
6169167f90 Merge pull request #13300 from rockerBOO/docs-nvim_lsp-to-lspconfig
docs: Update nvim_lsp to lspconfig
2020-11-16 11:33:05 +01:00
ecbcca44e7 docs: Update ISSUE_TEMPLATE for lsp_bug_report 2020-11-16 03:47:23 -05:00
fb19663851 docs: Follow conventions 2020-11-16 01:13:15 -05:00
46ab054b1d docs: Update nvim_lsp to lspconfig 2020-11-16 01:10:55 -05:00
1b8867ab39 Merge pull request #13293 from janlazo/vim-8.2.1976
vim-patch:8.2.{1979,1981,1982,1985,1987}
2020-11-15 18:18:12 +01:00
bcadf324cb Merge pull request #13297 from jamessan/github-actions 2020-11-15 09:17:49 -05:00
af88b0891e GHA: Add tsan job to the matrix 2020-11-14 21:29:02 -05:00
3b0a729f9c GHA: Use matrix to de-duplicate workflow definition
The general skeleton of each job is the same, so consolidate the
definition to a single job with an explicit matrix.

Use conditional steps to handle steps that are unique to a certain job
(e.g., installing clang-11 for better ASAN support).
2020-11-14 21:29:02 -05:00
392ec5a43f ci: Remove $CCACHE_CPP2
The env var is being set to the default value, as of ccache 3.3, which
is available in Zesty and newer.  All of our CI is using Bionic, so this
is already available.
2020-11-14 21:28:59 -05:00
5271f1e2c9 GHA: Move env var setup into env.sh to keep it DRY 2020-11-14 21:28:12 -05:00
87aaa8e837 globals: eliminate "enc_utf8" macro
"enc_utf8" macro evaluates to "true".
Continue dead code removal, started in https://github.com/neovim/neovim/pull/13275.
2020-11-14 17:23:51 -05:00
35874208b8 globals: eliminate "has_mbyte" macro
"has_mbyte" always evaluates to "true".
Continue dead code removal, started in https://github.com/neovim/neovim/pull/13275.
2020-11-14 17:23:51 -05:00
78c380f947 vim-patch:8.2.1982: quickfix window now updated when adding invalid entries
Problem:    Quickfix window now updated when adding invalid entries.
Solution:   Update the quickfix buffer properly. (Yegappan Lakshmanan, closes
            vim/vim#7291, closes vim/vim#7271)
2ce7790348

N/A patches for version.c:

vim-patch:8.2.1979: "term_opencmd" option of term_start() is truncated

Problem:    "term_opencmd" option of term_start() is truncated. (Sergey
            Vlasov)
Solution:   Allocate the buffer to hold the command. (closes vim/vim#7284)
47c5ea44b9

vim-patch:8.2.1981: MinGW: parallel compilation might fail

Problem:    MinGW: parallel compilation might fail.
Solution:   Add dependencies on $(OUTDIR). (Masamichi Abe, closes vim/vim#7287)
8496c9eadb

vim-patch:8.2.1985: crash when closing terminal popup with <Cmd> mapping

Problem:    Crash when closing terminal popup with <Cmd> mapping.
Solution:   Check b_term is not NULL. (closes vim/vim#7294)
02764713a7

vim-patch:8.2.1987: MS-Windows: Win32.mak is no longer needed

Problem:    MS-Windows: Win32.mak is no longer needed.
Solution:   Do not include Win32.mak. (Jason McHugh, closes vim/vim#7290)
6453cc8078
2020-11-14 17:23:48 -05:00
39b3eb34c2 ci: Install gem binaries to ~/.local/bin
That directory is already part of `$PATH`, so let's reuse it instead of
trying to figure what version-specific path binaries gem normally uses.
2020-11-14 17:23:35 -05:00
0798ad3a3a lsp: Expose all diagnostics (#13285)
* lsp: Remove duplicate `diagnostics` fallback in diagnostic.display

* lsp: Expose all diagnostics

Before the changes in #12655 it was possible to retrieve all diagnostics
via `vim.lsp.util.diagnostics_by_buf`.

This adds a `diagnostic.get_all()` to enable users to retrieve all
diagnostics.

Use cases for that could include loading all diagnostics into the
quickfix list, or to build an enhanced goto_next that can move across
buffers.
2020-11-14 14:39:05 -05:00
27d630926c Merge pull request #13275 from janlazo/vim-8.1.0805
vim-patch:8.1.{805,806,809,810,811}
2020-11-14 19:35:26 +01:00
d8c69adbab Merge pull request #12698 from erw7/fix-popupmenu-with-rl
ui: fix problem with the popupmenu when rightleft is set
2020-11-13 23:09:57 -05:00
7c4f349661 Merge pull request #13287 from jamessan/github-actions 2020-11-13 14:13:42 -05:00
aaca2c1c4d feat(lua): improve error message to make it actionable (#13276)
* improve error message to make it actionable
2020-11-13 19:50:03 +01:00
7ac3c39e39 README: Replace Travis CI badge with GH Linux CI 2020-11-13 13:38:13 -05:00
c96acac4d3 GHA: Invalidate cache if cmake files or third-party/ change 2020-11-13 13:38:12 -05:00
25a8385cd1 ci: Rename travis_fold to ci_fold and add GHA support 2020-11-13 13:38:12 -05:00
eb96bec4bb ci/before_script.sh: Remove early exit for lint job
lualint requires building dependencies, so allow the job to take
advantage of the cache.
2020-11-13 13:36:58 -05:00
c7443b82a9 GHA: Update cache directory if all steps succeeded 2020-11-13 13:36:58 -05:00
ef0d558a3b GHA: Include ccache output in cache 2020-11-13 13:36:58 -05:00
f23b906ddd GHA: Skip tests that fail due to actions/runner#241 2020-11-13 13:36:57 -05:00
808eb44f4a GHA: Add ~/.local/bin to $PATH 2020-11-13 13:36:57 -05:00
e2e032a52a GHA: Add lint job to Linux workflow 2020-11-13 13:36:57 -05:00
eb2aaed5cc Add Linux ASAN GitHub Action 2020-11-13 13:36:56 -05:00
d0714e87d6 build: Rename TRAVIS_BUILD_DIR to CI_BUILD_DIR 2020-11-13 13:36:56 -05:00
86eba08a4b build: Rename TRAVIS_CI_BUILD variable to CI_BUILD 2020-11-13 13:36:56 -05:00
35325ddac0 doc: fixup sign information (#13281)
Thanks to @sunzoje for finding the outdated documentation.
2020-11-13 00:02:40 -05:00
f75be5e9d5 lsp: vim.lsp.diagnostic (#12655)
Breaking Changes:
- Deprecated all `vim.lsp.util.{*diagnostics*}()` functions.
    - Instead, all functions must be found in vim.lsp.diagnostic
    - For now, they issue a warning ONCE per neovim session. In a
      "little while" we will remove them completely.
- `vim.lsp.callbacks` has moved to `vim.lsp.handlers`.
    - For a "little while" we will just redirect `vim.lsp.callbacks` to
      `vim.lsp.handlers`. However, we will remove this at some point, so
      it is recommended that you change all of your references to
      `callbacks` into `handlers`.
    - This also means that for functions like |vim.lsp.start_client()|
      and similar, keyword style arguments have moved from "callbacks"
      to "handlers". Once again, these are currently being forward, but
      will cease to be forwarded in a "little while".
- Changed the highlight groups for LspDiagnostic highlight as they were
  inconsistently named.
    - For more information, see |lsp-highlight-diagnostics|
- Changed the sign group names as well, to be consistent with
  |lsp-highlight-diagnostics|

General Enhancements:
- Rewrote much of the getting started help document for lsp. It also
  provides a much nicer configuration strategy, so as to not recommend
  globally overwriting builtin neovim mappings.

LSP Enhancements:
- Introduced the concept of |lsp-handlers| which will allow much better
  customization for users without having to copy & paste entire files /
  functions / etc.

Diagnostic Enhancements:
- "goto next diagnostic" |vim.lsp.diagnostic.goto_next()|
- "goto prev diagnostic" |vim.lsp.diagnostic.goto_prev()|
    - For each of the gotos, auto open diagnostics is available as a
      configuration option
- Configurable diagnostic handling:
    - See |vim.lsp.diagnostic.on_publish_diagnostics()|
    - Delay display until after insert mode
    - Configure signs
    - Configure virtual text
    - Configure underline
- Set the location list with the buffers diagnostics.
    - See |vim.lsp.diagnostic.set_loclist()|
- Better performance for getting counts and line diagnostics
    - They are now cached on save, to enhance lookups.
    - Particularly useful for checking in statusline, etc.
- Actual testing :)
    - See ./test/functional/plugin/lsp/diagnostic_spec.lua
- Added `guisp` for underline highlighting

NOTE: "a little while" means enough time to feel like most plugins and
plugin authors have had a chance to refactor their code to use the
updated calls. Then we will remove them completely. There is no need to
keep them, because we don't have any released version of neovim that
exposes these APIs. I'm trying to be nice to people following HEAD :)

Co-authored: [Twitch Chat 2020](https://twitch.tv/teej_dv)
2020-11-12 22:21:34 -05:00
5d6ecfa3c7 vim-patch:8.1.0805: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, part 1.
135059724f
2020-11-12 21:22:06 -05:00
93c18867a0 vim-patch:8.1.0810: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, part 4.
264b74fa54
2020-11-12 18:12:05 -05:00
f494516ccd vim-patch:8.1.0809: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, part 3.
a12a161b8c
2020-11-12 02:11:23 -05:00
e2504d2192 vim-patch:8.1.0806: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, part 2.
fc3abf47fb
2020-11-12 01:12:58 -05:00
54495c9816 vim-patch:8.1.0811: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, the final chapter.
30276f2beb
2020-11-12 00:40:07 -05:00
4ae31c46f7 Merge pull request #13273 from janlazo/vim-8.2.1972
vim-patch:8.2.{1972,1973,1974}
2020-11-11 23:08:44 -05:00
6d58f1eace vim-patch:8.2.1973: finding a patch number can be a bit slow
Problem:    Finding a patch number can be a bit slow.
Solution:   Use binary search. (closes vim/vim#7279)
232f4612e2
2020-11-11 14:36:00 -05:00
3013d0edfc vim-patch:8.2.1972: crash when recreating nested fold
Problem:    Crash when recreating nested fold.
Solution:   Check for empty growarray. (closes vim/vim#7278)
5e1f22ff61

N/A patches for version.c:

vim-patch:8.2.1974: Vim9: test for has('gui_running') fails with VIMDLL

Problem:    Vim9: test for has('gui_running') fails with VIMDLL.
Solution:   Adjust the #ifdef. (Ken Takata, closes vim/vim#7276)
29b281ba8d
2020-11-11 14:17:03 -05:00
4875db2e56 Merge pull request #11996 from georg3tom/remove_restricted
Removed restricted mode - Fix #11972
2020-11-11 19:39:08 +01:00
7777532ceb Removed restricted mode - Fix #11972 2020-11-11 18:07:58 +01:00
0a95549d66 options.lua: add short descriptions (#6288)
add one-liner option descriptions in src/nvim/options.lua
They are taken from optwin.vim and should be easier to use in a
programmatic manner, for instance in a "palette", like in telescope
`:Telescope vim_options`.
2020-11-11 00:06:10 +01:00
a4fea2884d Merge pull request #13266 from jamessan/pvs-check 2020-11-10 12:59:05 -05:00
31366c44c4 Add PVS comment to new source files 2020-11-10 11:19:59 -05:00
088161a945 pvs: Exclude xdiff from analysis and comment munging 2020-11-10 10:00:25 -05:00
65993c444a Use the free PVS-Studio license
As of release 7.10, PVS Studio requires a license, even for the "check
me" comment based analyzing.
2020-11-10 09:42:28 -05:00
bb7ed42089 Merge pull request #13263 from jamessan/tree-sitter-detect
Align naming of FindTreeSitter cmake file and variables
2020-11-09 23:02:08 -05:00
f67b3ea39c Update the differences with Vim. (#13239)
:cquit can use count to set the exit code
	patch 8.2.0095: cannot specify exit code for :cquit

:tchdir tab-local current-directory
	patch 8.1.1218: cannot set a directory for a tab page

Autocmd Events:
	- DirChanged
	    patch 8.0.1459: cannot handle change of directory
	- TextYankPost
	    patch 8.0.1394: cannot intercept a yank command

tabpagenr() "#" argument
    g<Tab> goes to the last-accessed tabpage.
	patch 8.2.1401: cannot jump to the last used tabpage

hl-QuickFixLine
	patch 8.0.0641: cannot set a separate highlighting for the quickfix line

v:event
	patch 8.0.1394: cannot intercept a yank command

K in help documents can be used like CTRL-].
	Updated as part of a runtime update.
	4c05fa08c9
2020-11-09 23:01:54 -05:00
e786fb5afb Merge pull request #13244 from tk-shirasaka/fix/multigrid-click-foldcolumn
ui: Fix click on foldcolumn when ext_multigrid is enabled
2020-11-10 00:54:54 +01:00
1451b14873 Align naming of FindTreeSitter cmake file and variables
`find_package(Foo ...)` expects to find a file FindFoo.cmake and the
resulting variables to be named `Foo_...`.  If those don't all match up,
then the detection does not work properly.

Closes #13262
2020-11-09 15:15:03 -05:00
5e7626a5c6 Fix alignment issue 2020-11-10 00:36:26 +09:00
42ffa2d62e Merge pull request #13205 from romgrk/add-bufmodified-autocmd
Implement BufModifiedSet autocmd
2020-11-09 12:23:14 +01:00
11326761c7 test: update BufModifiedSet to be paranoid 2020-11-09 04:06:53 -05:00
743f7c8f72 fix: address issues for BufModifiedSet 2020-11-09 04:05:25 -05:00
19bb177512 Add test case for fold on multigrid 2020-11-09 15:05:23 +09:00
4e6f00dd29 gcc/analyzer: fix false positives for NULL (#13248)
Close https://github.com/neovim/neovim/issues/13158
2020-11-08 22:48:17 -05:00
94062831b3 Merge pull request #13255 from janlazo/pvs-547-560
pvs: fix v547, v560 errors
2020-11-08 20:34:01 -05:00
55fb5324ef pvs/v547: comment out code for 'adjustment == 1'
That code never runs.
Comment it out in case that it is required for debugging marktree.c.

Use 'const' to mark constant variables.
2020-11-08 18:09:28 -05:00
212d4bce48 pvs/v560: decoration item is always truthy 2020-11-08 17:51:12 -05:00
09c46b6c40 pvs/v547: remove useless ternary for string size 2020-11-08 17:48:03 -05:00
368403a9e6 ui: Fix click on foldcolumn when ext_multigrid is enabled 2020-11-09 02:12:39 +09:00
5caaacaafe Merge pull request #13253 from theHamsta/fix-baselang-order
tree-sitter: Put base languages first in queries
2020-11-08 16:46:25 +01:00
0276c8addd tree-sitter: Put base languages first in queries
This reverts the handling of base languages to the old way how
nvim-treesitter handled them. When a language extends a base language
it usually wants to be able to overwrite queries.

Related: https://github.com/nvim-treesitter/nvim-treesitter/issues/633
2020-11-08 13:55:42 +01:00
6b5975a1eb doc: add BufModifiedSet 2020-11-07 23:22:54 -05:00
45d9f4fe6f test: fix BufModifiedSet 2020-11-07 22:17:18 -05:00
3628d1ef72 tests: add functional test for BufModifiedSet 2020-11-07 19:18:00 -05:00
56f842e873 fix: finish renaming to BufModifiedSet 2020-11-07 19:17:43 -05:00
c3a82fbae5 fix: rename to BufModifiedSet 2020-11-07 19:09:51 -05:00
24db59ca8f feat: implement BufModified autocmd 2020-11-07 19:02:52 -05:00
5161ff88fa lsp: fix formatting_sync with multiple clients (#13233)
buf_request_sync returns a table indexed by the client id, so when
starting a second client on a separate buffer, result[1] will be nil.

Closes #13232.

Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
2020-11-07 23:31:55 +01:00
df750e7248 vim-patch:8.2.1964: not all ConTeXt files are recognized (#13245)
Problem:    Not all ConTeXt files are recognized.
Solution:   Add two patterns. (closes vim/vim#7263)
faebda8cc1
2020-11-07 15:03:14 -05:00
4c7ad9527d Add v:event flag on DirChanged signaling switching window (#13153)
Closes #9909
2020-11-07 12:02:06 -05:00
643f4a1787 Merge pull request #13241 from bfredl/decoration
decoration: split out "decoration" from "extmark" module
2020-11-07 15:34:32 +01:00
e5d83a3bf3 Merge pull request #13117 from romgrk/add-scroll-events
Implement scroll autocommand
2020-11-07 15:13:20 +01:00
0fce70252d doc: fix WinScrolled details 2020-11-07 06:25:07 -05:00
8497d4b3ea decoration: split out "decoration" from "extmark" module
Decorations will only grow more complex. move the to a separate
file, so that extmark.c remains about extmarks.
2020-11-07 09:55:17 +01:00
d7f639d4e8 fix: lint doc-comments 2020-11-07 03:47:52 -05:00
cedfc1b747 my fight with the linter (tome II) 2020-11-06 23:44:32 -05:00
da134270d3 Merge pull request #13237 from janlazo/vim-8.2.1959
vim-patch:8.1.2422,8.2.{1959,1961,1962,1963}
2020-11-06 22:15:10 -05:00
4ed6f69497 my fight with the linter 2020-11-06 20:06:52 -05:00
038e98fd7d vim-patch:8.2.1961: various comments can be improved
Problem:    Various comments can be improved.
Solution:   Various comment adjustments.
22286895fc
2020-11-06 20:03:05 -05:00
0522962f15 vim-patch:8.2.1959: crash when terminal buffer name is made empty
Problem:    Crash when terminal buffer name is made empty. (Dhiraj Mishra)
Solution:   Fall back to "[No Name]". (closes vim/vim#7262)
00806bceb6

N/A patches for version.c:

vim-patch:8.1.2422: "make depend" does not work correctly for libvterm

Problem:    "make depend" does not work correctly for libvterm.
Solution:   Fix build dependencies. And a few minor improvements.
9810cfbe55

vim-patch:8.2.1962: netbeans may access freed memory

Problem:    Netbeans may access freed memory.
Solution:   Check the buffer pointer is still valid.  Add a test. (Yegappan
            Lakshmanan, closes vim/vim#7248)
32e5ec0b01

vim-patch:8.2.1963: crash when using a popup window with "latin1" encoding

Problem:    Crash when using a popup window with "latin1" encoding.
Solution:   Don't use ScreenLinesUC when enc_utf8 is false. (closes vim/vim#7241)
927495b1fe
2020-11-06 20:03:00 -05:00
40a742725c vim-patch:8.1.0268: file type checking has too many #ifdef (#13182)
Problem:    File type checking has too many #ifdef.
Solution:   Always define the S_IF macros. (Ken Takata, closes vim/vim#3306)
d569bb0299
2020-11-06 17:59:28 -05:00
d17e508796 Merge pull request #13227 from bfredl/earlyinspect
lua: make vim.inspect available early so it can be used for path debugging
2020-11-05 18:43:00 +01:00
1b0e4a5906 lua: make vim.inspect available early so it can be used for path debugging 2020-11-05 14:46:41 +01:00
0227091fb9 Merge pull request #13229 from ElPiloto/more_treesitter_doc
[RDY] doc: Supplement documentation for treesitter.
2020-11-05 12:08:55 +01:00
9162cc5417 Update runtime/doc/treesitter.txt
Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
2020-11-05 09:14:33 +00:00
9cc702ae11 Add g:loaded_matchit check (#13226)
I have added g:loaded_matchit check to skip matchit loading like other default plugins.
2020-11-04 18:46:03 -05:00
33560002b4 healthcheck: suggest to skip tests perl provider (#13223)
CPAN tests are unreliable on Windows.
CI does the same to reduce flaky,slow builds.
2020-11-04 18:40:34 -05:00
d1bed96778 doc: Fix treesitter doc PR. 2020-11-04 19:55:12 +00:00
44180c3553 doc: Supplement documentation for treesitter.
- Describe query components (capture, match, pattern). Not
well-described in tree-sitter documentation.

- Describe Query() object. Not actually described anywhere in
documenation.
2020-11-04 17:45:38 +00:00
ee3acef386 Merge pull request #13224 from janlazo/vim-8.2.1944
vim-patch:8.1.{1829,1956,2234},8.2.1944
2020-11-04 08:15:16 -05:00
8a3a9ffa3d Merge pull request #13225 from erw7/fix-build-msvc
third-party: fix build failures in MSVC
2020-11-04 13:47:39 +01:00
9d355b8b0d Merge pull request #13219 from vigoux/ts-extract-tree
treesitter: separate tree and parser
2020-11-04 13:46:19 +01:00
05cef2f105 third-party: fix build failures in MSVC 2020-11-04 19:51:54 +09:00
c7d460c197 treesitter: separate tree and parser
While this might sound silly, it is needed for further improvements.
2020-11-04 08:14:20 +01:00
fa9dd9abf3 vim-patch:8.1.1956: screenshot tests may use a different encoding
Problem:    Screenshot tests may use a different encoding. (Dominique Pelle)
Solution:   Always set 'encoding' to "utf-8" when running Vim in a terminal.
            (closes vim/vim#4884)
0fdddeeb66

Comment out the encoding change in shared.vim
because Neovim always uses utf-8 for internal character encoding.
2020-11-04 01:51:49 -05:00
7ef3e2b880 vim-patch:8.1.1829: difference in screenshots
Problem:    Difference in screenshots.
Solution:   Update screenshots.  Change checks in a few more tests.
            (closes vim/vim#4789)
39de6413c8

N/A patches for version.c:

vim-patch:8.1.2234: get_short_pathname() fails depending on encoding

Problem:    get_short_pathname() fails depending on encoding.
Solution:   Use the wide version of the library function. (closes vim/vim#5129)
3f39697b73

vim-patch:8.2.1944: Netbeans test is flaky

Problem:    Netbeans test is flaky.
Solution:   Add a short delay. (Yegappan Lakshmanan, closes vim/vim#7246)
6fd3a4ba23
2020-11-04 00:09:07 -05:00
aaaad0f593 vim-patch:8.2.1947: crash when using "zj" without folds (#13222)
Problem:    Crash when using "zj" without folds. (Sean Dewar)
Solution:   Check for at least one fold. (closes vim/vim#7245)
c136a3528b
2020-11-03 22:44:08 -05:00
eee0668818 Merge pull request #13214 from vigoux/ts-bump-0.17.3
deps(tree-sitter): bump to 0.17.3
2020-11-03 16:29:50 +01:00
805b9a2e7b Merge pull request #13212 from lucc/patch-2
[RDY] docs: Fix typo
2020-11-03 15:22:41 +01:00
9e9137ef04 deps(tree-sitter): dump to 0.17.3
Also test the the bundling works correctly.
2020-11-03 13:40:44 +01:00
a766695c8b Merge pull request #12931 from vigoux/treesitter-bundled
bundle: move tree-sitter as a bundled dep
2020-11-03 13:36:25 +01:00
8e73cf6731 tree-sitter: ignore some tests on windows
Weirdl this test is failing, but can't reproduce locally, this is an
unnecessary blocker for this PR.
2020-11-03 10:39:36 +01:00
823cc66509 deps(treesitter): bump up to 0.17.1 2020-11-03 10:39:36 +01:00
3eb241d831 bundle: move tree-sitter as a bundled dep
fixup! bundle: move tree-sitter as a bundled dep

fixup! bundle: move tree-sitter as a bundled dep
2020-11-03 10:39:35 +01:00
432f3240f1 docs: Fix typo in example code 2020-11-03 10:05:26 +01:00
a061d53e18 Merge pull request #13211 from bfredl/fastruntime
api: gotta get the runtime fast
2020-11-03 10:00:25 +01:00
13e0ca3e19 Merge branch 'master' into add-scroll-events 2020-11-03 03:11:08 -05:00
4d9e5764d2 api: gotta get the runtime fast 2020-11-03 08:43:42 +01:00
5b5848f2fb Merge pull request #13209 from janlazo/vim-8.2.1942
vim-patch:8.2.{1165,1942}
2020-11-02 23:54:03 -05:00
0d9fa42d83 fixup! startup: handle autoload and lua packages during startup 2020-11-02 22:37:07 -05:00
1b728490d3 vim-patch:8.2.1942: insufficient test coverage for the Netbeans interface
Problem:    Insufficient test coverage for the Netbeans interface.
Solution:   Add more tests. Fix an uncovered bug. (Yegappan Lakshmanan,
            closes vim/vim#7240)
dbfa795d8b

N/A patches for version.c:

vim-patch:8.2.1165: insufficient testing for the Tcl interface

Problem:    Insufficient testing for the Tcl interface.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#6423)
e4358906fd
2020-11-02 22:12:52 -05:00
186ba3b688 Merge pull request #13178 from steelsojka/fix-empty-main-query-file
fix(treesitter): account for no main query file
2020-11-02 18:16:37 +01:00
bab5b2fbda Merge pull request #13119 from bfredl/luartp
lua: handle require'package.mod' during startup
2020-11-02 18:11:14 +01:00
c60c7375f5 startup: handle autoload and lua packages during startup
¡NO HAY BANDA!
2020-11-02 15:21:36 +01:00
dc14b1468a lsp: remove vim.NIL from processing (#13174)
* lsp: remove vim.NIL from processing

* lsp: remove instances of vim.NIL
2020-11-02 08:50:44 -05:00
6224ec3d4a Merge pull request #13204 from janlazo/vim-8.2.1938
vim-patch:8.1.{2030,2063},8.2.{864,1086,1938}
2020-11-02 01:37:05 -05:00
4b65e4aeab vim-patch:8.2.1086: possibly using freed memory when text properties used
Problem:    Possibly using freed memory when text properties used when
            changing indent of a line.
Solution:   Compute the offset before calling ml_replace().
cf30643ae6
2020-11-01 21:11:02 -05:00
f9adb3eccb vim-patch:8.2.0864: pragmas are indented all the way to the left
Problem:    Pragmas are indented all the way to the left.
Solution:   Add an option to indent progmas like normal code. (Max Rumpf,
            closes vim/vim#5468)
d881b516da

N/A patches for version.c:

vim-patch:8.1.2030: tests fail when build with normal features and terminal

Problem:    Tests fail when build with normal features and terminal.
            (Dominique Pelle)
Solution:   Disable tests that won't work. (closes vim/vim#4932)
997d42427e

vim-patch:8.1.2063: some tests fail when +balloon_eval_term is missing

Problem:    Some tests fail when +balloon_eval_term is missing but
            _balloon_eval is present. (Dominique Pelle)
Solution:   Check the right feature in the test. (closes vim/vim#4962)
1e82a784ac

vim-patch:8.2.1938: wiping out a terminal buffer makes some tests fail

Problem:    Wiping out a terminal buffer makes some tests fail.
Solution:   Do not wipe out the terminal buffer unless wanted.
a46765a797
2020-11-01 19:55:40 -05:00
90f3a8ba29 Merge pull request #13203 from janlazo/vim-8.2.1936
vim-patch:8.2.1936
2020-11-01 16:39:30 -05:00
d1091bc658 Merge pull request #12870 from bfredl/themepark
Color themes (per window/line) and lua theme providers
2020-11-01 21:54:51 +01:00
442ad4bb63 fixup! rename: user_funcs -> userfunc 2020-11-01 13:22:52 -05:00
5db836bbca fixup! eval.c: factor out eval/funcs.c #11828 2020-11-01 13:21:33 -05:00
c146eddc8b api: add API for themes
co-author: hlpr98 <hlpr98@gmail.com> (dict2hlattrs function)

orange is sus??

NOVEMBER DAWN

erase the lie that is redraw_later()
2020-11-01 19:14:56 +01:00
4b398413e4 vim-patch:8.2.1936: session sets the local 'scrolloff' value to the global value
Problem:    Session sets the local 'scrolloff' value to the global value.
Solution:   Do not let restoring the global option value change the local
            value.
388908352f
2020-11-01 12:21:52 -05:00
ff11247837 fixup! refactor: move session functions to ex_session.c 2020-11-01 12:17:39 -05:00
720d442d19 lsp: complete support for CodeActionKinds to capabilities (#13180)
We support applying all kinds in the spec equivalently and some servers (including dartls) won't send code actions if support for the relevant kinds is not explicitly stated in the client capabilities. Therefore, this PR makes that support explicit.

Also, as we support all CodeActionKinds, we should also mark the server as supporting code actions when it specifies code action kinds. This is also done in this PR.
2020-11-01 18:11:32 +01:00
ba1ff71078 Merge pull request #13197 from janlazo/vim-8.2.1925
vim-patch:8.2.{639,666,1925,1926,1929,1932}
2020-11-01 12:03:56 -05:00
8821587748 Merge pull request #13192 from bfredl/nodeid
] treesitter: add node:id()
2020-11-01 17:27:38 +01:00
106a6c9548 Merge pull request #13090 from vigoux/tree-sitter-parse-error
tree-sitter: error out when parsing fails
2020-11-01 17:26:31 +01:00
057e21b1e7 vim-patch:8.2.0666: Ruby test fails on MS-Windows
Problem:    Ruby test fails on MS-Windows.
Solution:   Remove the "maintainer" line. (Ken Takata, closes vim/vim#6015)
88e6cc2539

Cherry-pick feature check from patch 8.1.1544.
Cherry-pick test_ruby.vim changes from patch 8.2.0183.
2020-11-01 09:28:39 -05:00
7af8de0dab vim-patch:8.2.0639: MS-Windows: messages test still fails
Problem:    MS-Windows: messages test still fails.
Solution:   Filter out the maintainer message.
49b2fb36ca
2020-11-01 09:28:39 -05:00
bbaf721fc3 vim-patch:8.2.1926: cannot use a space in 'spellfile'
Problem:    Cannot use a space in 'spellfile'. (Filipe Brandenburger)
Solution:   Permit using a space. (closes vim/vim#7230)
b2620202c7
2020-11-01 09:28:39 -05:00
925ddd2839 vim-patch:8.2.1925: list/dict test fails
Problem:    List/dict test fails.
Solution:   Correct expected exception.
6d967125ad

Cherry-pick e_dictkey[] change from patch 8.2.1924.

N/A patches for version.c:

vim-patch:8.2.1929: MS-Windows: problem loading Perl 5.32

Problem:    MS-Windows: problem loading Perl 5.32.
Solution:   Define NO_THREAD_SAFE_LOCALE. (Ken Takata, closes vim/vim#7234)
0289065e41

vim-patch:8.2.1932: compiler warnings when building with Athena GUI

Problem:    Compiler warnings when building with Athena GUI.
Solution:   Fix function signatures.
963734e316
2020-11-01 09:28:33 -05:00
31738fe8f1 treesitter: fix wrong string formatting 2020-11-01 15:07:11 +01:00
03c478ae53 treesitter: add node:id() 2020-11-01 14:59:17 +01:00
d3a63a1f71 tree-sitter: error out when parsing fails
This can happen when there is ABI mismatches, and removes the assumption
parsing alwasy succeeds (which is wrong).
2020-11-01 12:40:31 +01:00
c7c8652146 fix: remove xxx comment 2020-11-01 05:00:20 -05:00
ca7449db46 Merge pull request #13163 from erw7/fix-appveyor
ci/appveyor: change to update package database
2020-11-01 11:19:46 +09:00
bc68653a86 Merge pull request #13167 from romgrk/vim-8.2.1909
vim-patch:8.2.1909: number of status line items is limited to 80
2020-10-31 20:31:42 -04:00
10bf69a43e vim-patch:8.2.1909: number of status line items is limited to 80
Problem:    Number of status line items is limited to 80.
Solution:   Dynamically allocate the arrays. (Rom Grk, closes vim/vim#7181)
8133cc6bf4

The members of stl_item_T have not been prefixed with stl_ contrary to
the vim patch because the amount of stl_ prefixes on single lines of
code in that region was hurtful to readability.
2020-10-31 19:54:06 -04:00
a58d06ebfc tests: separate scroll test for horizontal/vertical scroll 2020-10-31 17:29:21 -04:00
98024853f4 lsp: Remove snippet lies (#13183)
We don't actually support snippets in core in the way that users would
truly expect. So, by default, we will not say that builtin-lsp has
`snippetSupport`.

To re-enable, users can do the following:

First, get a capabilities dictionary with

`local capabilities = vim.lsp.protocol.make_client_capabilities()`

Then override

`capabilities.textDocument.completion.completionItem.snippetSupport = true`

and then pass those capabilties to the setup function.

```
nvim_lsp.server_name.setup {
  ...,
  capabilities = capabilities,
  ...,
}
```

See https://github.com/neovim/neovim/issues/12795
2020-10-30 10:58:12 -04:00
9fee5f1423 Merge pull request #13172 from janlazo/vim-8.2.1910
vim-patch:8.1.{2034,2050},8.2.{131,913,929,1521,1910,1913,1922}
2020-10-30 08:56:38 -04:00
d9a58573fd tests: make scroll tests pass 2020-10-30 03:22:52 -04:00
037ffd54dc Fix clipboard provider detection (#13190)
Fixes #13189
2020-10-29 21:35:20 -04:00
4e24e31a6b vim-patch:8.2.0929: v:register is not cleared after an operator was executed
Problem:    v:register is not cleared after an operator was executed.
Solution:   Clear v:register after finishing an operator (Andy Massimino,
            closes vim/vim#5305)
cc613031b9
2020-10-29 18:36:38 -04:00
026c8dde87 vim-patch:8.1.2034: dark them of GTK 3 not supported
Problem:    Dark them of GTK 3 not supported.
Solution:   Add the "d" flag in 'guioptions'. (Jonathan Conder, closes vim/vim#4934)
50bf7ce0c9
2020-10-29 18:36:38 -04:00
3d6584223d vim-patch:8.2.0131: command line is not cleared when switching tabs
Problem:    Command line is not cleared when switching tabs and the command
            line height differs.
Solution:   Set the "clear_cmdline" flag when needed. (Naruhiko Nishino,
            closes vim/vim#5495)
479950f6c9
2020-10-29 18:36:38 -04:00
5329cb2e5c vim-patch:8.2.1521: reading past end of buffer when reading spellfile
Problem:    Reading past end of buffer when reading spellfile. (Yegappan
            Lakshmanan)
Solution:   Store the byte length and check for it.
07399e7f07
2020-10-29 18:36:38 -04:00
cb6b5e5540 vim-patch:8.2.1910: reading past the end of the command line
Problem:    Reading past the end of the command line.
Solution:   Check for NUL. (closes vim/vim#7204)
caf73dcfad

Cherry-pick undo_cmdmod() from patch 8.2.1137.

N/A patches for version.c:

vim-patch:8.1.2050: popup window test fails in some configurations

Problem:    Popup window test fails in some configurations. (James McCoy)
Solution:   Clear the command line.
7e0f462db5

vim-patch:8.2.0913: code for resetting v:register is duplicated

Problem:    Code for resetting v:register is duplicated.
Solution:   Add reset_reg_var().
439c036ed0

reset_reg_var() is not ported.
Use set_reg_var(get_default_register_name()) instead.

vim-patch:8.2.1913: GTK GUI: rounding for the cell height is too strict

Problem:    GTK GUI: rounding for the cell height is too strict.
Solution:   Round up above 15/16 of a pixel. (closes vim/vim#7203)
70cf45810c

vim-patch:8.2.1922: Win32: scrolling problems when part of window is off-screen

Problem:    Win32: scrolling doesn't work properly when part of window is
            off-screen.
Solution:   Fall back to GDI scrolling if part of the window is off-screen.
            Handle multi-monitor setup better. (Ken Takata, closes vim/vim#7219)
185577e47e
2020-10-29 18:36:05 -04:00
c6ccdda26a Merge pull request #12750 from foleyfactor/fix-hanging-messages
TJ told me to merge
2020-10-28 16:15:36 +01:00
e27af09052 fix(treesitter): account for no main query file 2020-10-28 07:34:11 -05:00
e606654ac2 doc: update doc: s/Scroll/WinScrolled/ 2020-10-28 04:49:49 -04:00
929d00db0f tests: add functional test for WinScrolled 2020-10-28 04:32:25 -04:00
bc21843228 feat: implement a working WinScrolled autocmd 2020-10-28 03:59:26 -04:00
fd7aa6768a lsp: Fix case where active_signature == vim.NIL (#13114) 2020-10-27 22:39:24 -04:00
29deb5dc31 ci/appveyor: change to update package database 2020-10-27 10:49:51 +09:00
b6897ebc0c Merge pull request #13116 from skippi/vim-8.1.1769
vim-patch:8.1.{1769, 1772, 1791},8.2.{1747}
2020-10-26 18:42:19 -04:00
6a0cb2a948 vim-patch:8.2.1747: result of expand() unexpectedly depends on 'completeslash'
Problem:    Result of expand() unexpectedly depends on 'completeslash'.
Solution:   Temporarily reset 'completeslash'. (Yasuhiro Matsumoto,
            closes vim/vim#7021)
8f187fc630
2020-10-26 15:22:23 -05:00
f8fd3d44ac vim-patch:8.1.1791: 'completeslash' also applies to globpath()
Problem:    'completeslash' also applies to globpath().
Solution:   Add the WILD_IGNORE_COMPLETESLASH flag. (test by Yasuhiro
            Matsumoto, closes vim/vim#4760)
2020-10-26 15:22:23 -05:00
c203f89ace vim-patch:8.1.1772: options test still fails on MS-Windows
Problem:    Options test still fails on MS-Windows.
Solution:   Check buffer-local value of 'completeslash'.
b78564d022
2020-10-26 15:22:22 -05:00
089f4f8e4a vim-patch:8.1.1769: 'shellslash' is also used for completion
Problem:    'shellslash' is also used for completion.
Solution:   Add the 'completeslash' option. (Yasuhiro Matsumoto, closes vim/vim#3612)
ac3150d385
2020-10-26 15:20:12 -05:00
a22fe09b90 Merge pull request #13154 from fsouza/fix-callback-logic
[RDY] lsp: fix fallback for callback in method_unsupported
2020-10-25 22:09:41 +01:00
4ba5b4a864 Merge pull request #13084 from erw7/fix-tui-cooked-mode
tui: fix problem that TTY does not go into raw mode
2020-10-25 22:05:03 +01:00
7fef16e1d6 lsp: Store diagnostics for unloaded buffers (#13102)
To avoid loading buffers https://github.com/neovim/neovim/pull/12440
changed the logic to not process diagnostics for unloaded buffers.

This is problematic for language servers where compile errors or build
errors are reported via diagnostics. These errors may prevent the
language server from providing all functions and it is difficult for
users to debug it without having access to the errors.

For example, with eclipse.jdt.ls there may be a problem with gradle (the
build tool for java), it results in a diagnostics like this:

    org.gradle.toolingapi/build.gradle|1 col 1| Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.8.1-bin.zip'.

This would be invisible to users unless the user happens to open the
right file. In this case the user would actually never see the error,
because the language server isn't attached to the build configuration
files.

This changes the behaviour to at least store the diagnostics. The other
operations which are more expensive are still skipped.
2020-10-25 14:27:11 -04:00
c984a888b8 Merge pull request #13151 from janlazo/vim-8.2.1892
vim-patch:8.1.1260,8.2.{87,393,506,618,1102,1892,1896,1899,1901}
2020-10-25 13:54:57 -04:00
c3ef198132 Merge pull request #13077 from tjdevries/tjdevries/buf_apis_1
api: nvim_buf_delete
2020-10-25 18:46:57 +01:00
a868cd920a vim-patch:8.2.1901: variable completion does not work in command line window
Problem:    Variable completion does not work in command line window.
Solution:   Use the "prevwin". (closes vim/vim#7198)
4ff2f2fb6b

N/A patches for version.c:

vim-patch:8.2.1899: crash in out-of-memory situation

Problem:    Crash in out-of-memory situation.
Solution:   Bail out if shell_name is NULL. (Dominique Pellé, closes vim/vim#7196)
67def64a4e
2020-10-25 12:48:37 -04:00
1f0f92f8ec lsp: fix fallback for callback in method_unsupported
Missed this #12764. My bad :((
2020-10-25 08:17:34 -04:00
36f78412f9 vim-patch:8.2.0393: Coverity warns for not using return value
Problem:    Coverity warns for not using return value.
Solution:   Add (void).
c030063329
2020-10-25 02:32:13 -04:00
41184660be vim-patch:8.2.0506: Coverity complains about ignoring return value
Problem:    Coverity complains about ignoring return value.
Solution:   Add (void).
d1e9dc2723
2020-10-25 02:27:52 -04:00
d2a38dab80 move.c: dont invalidate viewport when no scroll happened 2020-10-25 02:25:22 -04:00
63d4a6537d vim-patch:8.1.1862: Coverity warns for not using return value
Problem:    Coverity warns for not using return value.
Solution:   Add "(void)" to avoid the warning.
9c272a9e52
2020-10-25 02:24:33 -04:00
b7cd7e0e5c vim-patch:8.2.1102: Coverity gets confused by an unnecessary NULL check
Problem:    Coverity gets confused by an unnecessary NULL check.
Solution:   Remove the check for NULL.
9004949221
2020-10-25 02:10:47 -04:00
6312792d8a lsp: only send buf requests to servers that support the request (#12764)
Refactors how required capabilities are detected and validated, and make
sure requests are only sent to clients that support it (and only fail if
no clients support the provided method).

The validation happens at the buf_request level, because we assume that
if someone is sending the request directly through the client, they know
what they're doing. Also, let unknown methods go through.

This is extracted from #12518 and closes #12755.

Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
2020-10-25 00:28:15 -04:00
a67bcb3fbf vim-patch:8.2.0618: echoing a null list results in no output
Problem:    Echoing a null list results in no output. (Yegappan Lakshmanan)
Solution:   Return "[]" instead of NULL in echo_string_core().
db950e4c03
2020-10-24 23:30:23 -04:00
8b13ff0d0a vim-patch:8.1.1260: comparing with pointer instead of value
Problem:    Comparing with pointer instead of value.
Solution:   Add a "*". (Ken Takata, closes vim/vim#4336)
e4f5f3aa3d
2020-10-24 23:30:23 -04:00
59a8b7fcd9 vim-patch:8.2.0087: crash in command line expansion when out of memory
Problem:    Crash in command line expansion when out of memory.
Solution:   Check for NULL pointer.  Also make ExpandGeneric() static.
            (Dominique Pelle, closes vim/vim#5437)
61d7c0d52c

N/A patches for version.c:

vim-patch:8.2.1892: valgrind warns for using uninitialized access in tests

Problem:    Valgrind warns for using uninitialized access in tests.
Solution:   Fix condition for breaking out of loop. (Dominique Pellé,
            closes vim/vim#7187)
9c24cd11e2

vim-patch:8.2.1896: valgrind warns for using uninitialized memory

Problem:    Valgrind warns for using uninitialized memory.
Solution:   NUL terminate the SmcOpenConnection() error message. (Dominique
            Pellé, closes vim/vim#7194)
e1be11864d
2020-10-24 23:30:23 -04:00
b59b8dd5b5 options: add fallback value to .indir member (#13150)
Required for patch v8.1.1769.
2020-10-24 22:30:04 -04:00
e37651deb7 Merge pull request #13137 from erw7/fix-pum-pos
Fix popupmenu position issue
2020-10-25 11:01:07 +09:00
a1596f0b0b scroll: use win->w_viewport_invalid 2020-10-24 20:16:58 -04:00
bcf79c62bc tests: add test for Scroll autocmd 2020-10-24 05:48:00 -04:00
ffe1a067df docs: add documentation for Scroll autocmd 2020-10-24 04:57:15 -04:00
d4033db6a0 scroll: cleanup unnecessary code & comments 2020-10-24 04:56:43 -04:00
932585fd91 Merge pull request #13132 from willelz/markdown
runtime: Patch syntax/markdown.vim
2020-10-23 22:11:10 -04:00
2786d96fac Merge pull request #13145 from janlazo/vim-8.2.0901
vim-patch:8.2.{901,912}
2020-10-23 12:29:05 -04:00
78ec28bca8 vim-patch:8.2.0912: a few test cases for CJK formatting are disabled
Problem:    A few test cases for CJK formatting are disabled.
Solution:   Fix the tests and enable them. (closes vim/vim#6212)
11f1ffd182
2020-10-23 08:57:16 -04:00
2894649c2e vim-patch:8.2.0901: formatting CJK text isn't optimal
Problem:    Formatting CJK text isn't optimal.
Solution:   Properly break CJK lines. (closes vim/vim#3875)
e52702f003
2020-10-23 08:57:16 -04:00
9280a69a6d Merge pull request #13131 from janlazo/vim-8.2.0952
vim-patch:8.2.{952,1885,1887}
2020-10-23 08:56:07 -04:00
f5c9065f3e Fix popupmenu position issue 2020-10-23 12:36:32 +09:00
49b8d43052 vim-patch:8.2.1885: filetype tests unnessarily creates swap files
Problem:    Filetype tests unnessarily creates swap files.
Solution:   Disable 'swapfile'. (Ken Takata, closes vim/vim#7183)
2733779a1a

N/A patches for version.c:

vim-patch:8.2.1887: Github actions not optimally configured

Problem:    Github actions not optimally configured.
Solution:   Run CI on any pushed branches. Set fail-fast. (Ozaki Kiichi,
            closes vim/vim#7184)
15ab48f088
2020-10-22 18:27:48 -04:00
d69a8a3fc4 vim-patch:8.2.0952: no simple way to interrupt Vim
Problem:    No simple way to interrupt Vim.
Solution:   Add the SigUSR1 autocommand, triggered by SIGUSR1. (Jacob Hayes,
            closes vim/vim#1718)
be5ee8686a
2020-10-22 18:24:08 -04:00
a83b76790b fixup: fixup: fixup: fixup: 2020-10-22 16:21:35 -04:00
7fca3ddcca fixup: some small nit picks 2020-10-22 16:08:32 -04:00
1afe6dd2f4 fixup: bfredl comments 2020-10-22 16:08:32 -04:00
78556aba7d api: nvim_buf_delete 2020-10-22 16:08:32 -04:00
df726408d7 lsp: Fix "client has shut down" errors during initializing (#13103)
Language servers can already send log messages to the client while the
server is still being initialized.

This currently leads to "client has shut down" messages which are
confusing to the user as the server is properly starting.

To fix this this changes the `get_client_by_id` method to also return a
client if it is still initializing.
2020-10-22 14:59:17 -04:00
634315c6f7 markdown.vim: patch runtime to ade0d3946801
vim/vim@ade0d39468
2020-10-22 15:38:18 +09:00
471e9f53ff markdown.vim: patch runtime/ftplugin to c08ee7476b19
vim/vim@c08ee7476b
2020-10-22 15:37:29 +09:00
78cd1b9f5a Merge pull request #13128 from janlazo/vim-8.2.0268
vim-patch:8.1.1877,8.2.{268,1874,1875,1877,1878,1881,1883}
2020-10-22 00:27:59 -04:00
3f0850e9f0 vim-patch:8.2.1874: can't do something just before leaving Insert mode
Problem:    Can't do something just before leaving Insert mode.
Solution:   Add the InsertLeavePre autocommand event. (closes vim/vim#7177)
b53e13a91a

N/A patches for version.c:

vim-patch:8.1.1877: graduated features scattered

Problem:    Graduated features scattered.
Solution:   Put graduated and obsolete features together.
ffc0716af8

vim-patch:8.2.1875: warning when building GTK gui

Problem:    Warning when building GTK gui.
Solution:   Add missing function parameter.
3da855c8e2

vim-patch:8.2.1877: test for function list fails

Problem:    Test for function list fails.
Solution:   Move "obsolete" comments one line up.
b8f519e538

vim-patch:8.2.1878: GTK: error for redefining function

Problem:    GTK: error for redefining function. (Tony Mechelynck)
Solution:   Remove "gtk_" prefix from local functions and prepend "gui_" to
            global functions.
8a99e66b4f

vim-patch:8.2.1881: cannot build with GTK3

Problem:    Cannot build with GTK3.
Solution:   Adjust form functions.
692d1a51e7

vim-patch:8.2.1883: compiler warnings when using Python

Problem:    Compiler warnings when using Python.
Solution:   Adjust PyCFunction to also have the second argument.  Use "int"
            return type for some functions.  Insert "(void *)" to get rid of
            the remaining warnings.
4ce5fe4c87
2020-10-21 23:36:56 -04:00
07022306e2 vim-patch:8.2.0268: trycatch test fails
Problem:    Trycatch test fails.
Solution:   When calling function fails only check for following command, do
            not give another error.
40d9da2a43
2020-10-21 21:06:52 -04:00
10ac5ada31 Merge pull request #13107 from alexgenco/rubyeval
vim-patch:8.1.1056: no eval function for Ruby
2020-10-21 21:04:49 -04:00
b83d8223ff implement scroll autocommand 2020-10-21 16:18:20 -04:00
da3b59fc8e Install pre-release neovim gem in CI
The `ruby_eval` RPC message will be available in neovim-ruby
0.9.0.pre.*. That will become 0.9.0 once `rubyeval` is merged to neovim.

The `--version` argument isn't needed, as `gem` should pick the latest
release.
2020-10-21 10:20:21 -07:00
ed0a70087a vim-patch:8.1.1056: no eval function for Ruby
Problem:    No eval function for Ruby.
Solution:   Add rubyeval(). (Ozaki Kiichi, closes vim/vim#4152)
e99be0e6d2
2020-10-21 10:20:21 -07:00
0f590ae2a8 Merge pull request #13123 from janlazo/vim-8.2.1871
vim-patch:8.2.{6,1002,1871}

Revert patches 8.1.0877 and 8.1.1015 from #13083.
2020-10-21 08:32:02 -04:00
dff3a0d449 Revert "vim-patch:8.1.0877: new buffer used every time the quickfix window is opened"
This reverts commit e82b8ddef1.

Fix https://github.com/neovim/neovim/issues/13104
2020-10-20 22:07:45 -04:00
7b2fd21560 Revert "vim-patch:8.1.1015: quickfix buffer shows up in list, can't get buffer number"
This reverts commit 4cd69151cf.
2020-10-20 22:07:45 -04:00
87f31b4c86 vim-patch:8.2.0006: test using long file name may fail
Problem:    Test using long file name may fail. (Vladimir Lomov)
Solution:   Limit the name length. (Christian Brabandt, closes vim/vim#5358)
6e43b30a85

N/A patches for version.c:

vim-patch:8.2.1002: test may fail when run directly

Problem:    Test may fail when run directly.
Solution:   Check if g:run_nr exists. (Christian Brabandt, closes vim/vim#6285)
ceb2e77510
2020-10-20 20:43:33 -04:00
5621bc66d6 vim-patch:8.2.1871: using %v in 'errorformat' may fail before %Z
Problem:    Using %v in 'errorformat' may fail before %Z.
Solution:   Set qf_viscol only when qf_col is set. (closes vim/vim#7169)
c95940c06a
2020-10-20 18:03:14 -04:00
77dc891bfb Merge pull request #13125 from bfredl/artifical-ci
docs: update api
2020-10-20 22:02:06 +02:00
18bf216993 docs: update api 2020-10-20 21:57:07 +02:00
75996a2cdd vim-patch:8.2.1804: resolve('/') returns an empty string (#13121)
Problem:    resolve('/') returns an empty string.
Solution:   Don't remove single slash. (closes vim/vim#7074)
50c4e9e08f

Cherry-pick the test rename from Test_resolve() to Test_resolve_unix()
from patch 8.1.0894.

N/A patches for version.c:

vim-patch:8.1.0929: no error when requesting ConPTY but it's not available

Problem:    No error when requesting ConPTY but it's not available.
Solution:   Add an error message. (Hirohito Higashi, closes vim/vim#3967)
5acd987258

vim-patch:8.1.1535: popup select test fails on Mac

Problem:    Popup select test fails on Mac.
Solution:   Skip test if clipboard feature not available.
650a63748c

vim-patch:8.1.1536: popup select test still fails on Mac

Problem:    Popup select test still fails on Mac.
Solution:   Set 'clipboard' to "autoselect"
1755ec4278

vim-patch:8.1.1604: popup window scroll test is flaky

Problem:    Popup window scroll test is flaky.
Solution:   Add a delay between scroll events.
13b47c37a6

vim-patch:8.1.1668: popup window test is a bit flaky on some systems

Problem:    Popup window test is a bit flaky on some systems.
Solution:   Clear the command line. (Naruhiko Nishino, closes vim/vim#4656)
8ccabf624e

vim-patch:8.1.1935: test for text property popup window is flaky

Problem:    Test for text property popup window is flaky.
Solution:   Remove the undo message
57441d6fa0

vim-patch:8.1.2347: MacOS: build fails

Problem:    MacOS: build fails.
Solution:   Don't define _XOPEN_SOURCE for Mac.
84f903326d

vim-patch:8.2.0351: terminal in popup test is still a bit flaky

Problem:    Terminal in popup test is still a bit flaky.
Solution:   Clear and redraw before opening the popup.
3e919d2924

vim-patch:8.2.0752: terminal in popup window test is a bit flaky

Problem:    Terminal in popup window test is a bit flaky.
Solution:   Wait for shell job status to be "run".  Mark as flaky test.
e06a28f5e3

vim-patch:8.2.1087: possible memory leak when file expansion fails

Problem:    Possible memory leak when file expansion fails.
Solution:   Clear the grow array when returning FAIL.  Use an error message
            instead of an empty string.
566cc8c72b

vim-patch:8.2.1863: json code not sufficiently tested

Problem:    Json code not sufficiently tested.
Solution:   Add more test cases. (Dominique Pellé, closes vim/vim#7166)
e3c65ce4e5
2020-10-20 09:29:34 -04:00
38efa1730f Merge pull request #13118 from bfredl/mudholland
A Mudholland Dr. Recast
2020-10-19 23:14:55 +02:00
07cc231142 A Mudholland Dr. Recast
The commit summary maybe does not make sense, but calling a function
that does not wait on anything `wait()` makes even less sense.
2020-10-19 21:48:06 +02:00
eaee3d9297 Merge pull request #13111 from janlazo/vim-8.2.0862
vim-patch:8.2.{862,943,1547}
2020-10-18 13:39:22 -04:00
ce99d049e7 vim-patch:8.2.1547: various comment problems
Problem:    Various comment problems.
Solution:   Update comments.
02c037a4be
2020-10-18 12:25:48 -04:00
54d07b648c vim-patch:8.2.0943: displaying ^M or ^J depends on current buffer
Problem:    Displaying ^M or ^J depends on current buffer.
Solution:   Pass the displayed buffer to transchar(). (closes vim/vim#6225)
32ee627750

N/A patches for version.c:

vim-patch:8.2.0862: ":term ++curwin" makes the current buffer hidden

Problem:    ":term ++curwin" makes the current buffer hidden. (Harm te
            Hennepe)
Solution:   Do not hide the current buffer. (closes vim/vim#6170)
b10090928c
2020-10-18 01:24:02 -04:00
9817d99140 Merge pull request #13043 from tkuneck/fix-min-float-win-size
[RDY] Opts.wrap_at is sometimes a bool, ensure it falls back to a valid num…
2020-10-17 22:30:01 -04:00
e744631647 Merge pull request #13100 from janlazo/vim-8.1.2141
vim-patch:8.1.{2141,2419}
2020-10-17 21:48:51 -04:00
0ad5b34170 Merge pull request #12053 from tjdevries/tjdevries/nicer_validate
vim.validate(): include stacktrace in message
2020-10-17 16:47:18 -04:00
bd80671786 Merge pull request #13101 from skippi/vim-8.2.0868
vim-patch:8.2.0868
2020-10-17 16:01:22 -04:00
b5cd052037 Merge pull request #13106 from janlazo/vim-8.2.1856
vim-patch:8.1.1795,8.2.1856
2020-10-17 15:10:15 -04:00
8c9d9fa304 vim-patch:8.2.0868: trim() always trims both ends
Problem:    trim() always trims both ends.
Solution:   Add an argument to only trim the beginning or end. (Yegappan
            Lakshmanan, closes vim/vim#6126)
2245ae18e3
2020-10-17 14:07:35 -05:00
242af4dc99 vim-patch:8.1.1795: no syntax HL after splitting windows with :bufdo
Problem:    No syntax HL after splitting windows with :bufdo. (Yasuhiro
            Matsumoto)
Solution:   Trigger Syntax autocommands in buffers that are active.
            (closes vim/vim#4761)
c7f1e40021
2020-10-17 13:48:52 -04:00
e1ec2b0729 vim-patch:8.2.1856: "2resize" uses size of current window
Problem:    "2resize" uses size of current window.
Solution:   Use size of resized window. (Yasuhiro Matsumoto, closes vim/vim#7152)
9668cc57a1
2020-10-17 12:33:36 -04:00
c8ce098e71 Merge pull request #13105 from janlazo/vim-8.2.0728
vim-patch:8.2.{444,778,1219,1384,1557}
2020-10-17 12:24:52 -04:00
b9fe30cac2 vim-patch:8.2.1557: crash in :vimgrep when started as "vim -n"
Problem:    Crash in :vimgrep when started as "vim -n". (Raul Segura)
Solution:   Check mfp pointer. (Yegappan Lakshmanan, closes vim/vim#6827)
997cd1a17f
2020-10-17 11:09:35 -04:00
afd4888c6a vim-patch:8.2.1384: no ATTENTION prompt for :vimgrep first match file
Problem:    No ATTENTION prompt for :vimgrep first match file.
Solution:   When there is an existing swap file do not keep the dummy buffer.
            (closes vim/vim#6649)
8ce4b7ed85
2020-10-17 11:02:21 -04:00
a2e1bcd176 vim-patch:8.2.1219: symlink not followed if dirname ends in //
Problem:    Symlink not followed if dirname ends in //.
Solution:   Resolve symlink earlier. (Tomáš Janoušek, closes vim/vim#6454)
5966ea105e
2020-10-17 02:23:03 -04:00
1d736a1ae2 vim-patch:8.2.0444: swap file test fails on some systems
Problem:    Swap file test fails on some systems.
Solution:   Preserve the swap file. Send NL terminated keys.
d36ef573b2

Cherry-pick Test_swap_prompt_splitwin() from patch 8.2.0301.
2020-10-16 23:01:29 -04:00
96a555346b vim-patch:8.2.0728: messages about a deadly signal are not left aligned
Problem:    Messages about a deadly signal are not left aligned.
Solution:   Output a CR before the NL. (Dominique Pelle, vim/vim#6055)
69212b11d1
2020-10-16 22:44:07 -04:00
306d96cd10 vim-patch:8.1.2419: with a long file name the hit-enter prompt appears
Problem:    With a long file name the hit-enter prompt appears. (J. Lewis
            Muir)
Solution:   When checking for text to wrap don't do this when outputing a CR.
0efd1bdcf4
2020-10-16 21:56:55 -04:00
288f7f8558 Merge pull request #13030 from Happy-Dude/quickfix_warning
Fix quickfix.c warning message on EMSGN macro #hacktoberfest
2020-10-16 21:51:50 -04:00
c4cbf16c91 vim-patch:8.1.2141: :tselect has an extra hit-enter prompt
Problem:    :tselect has an extra hit-enter prompt.
Solution:   Do not set need_wait_return when only moving the cursor.
            (closes vim/vim#5040)
e8070987c6
2020-10-16 20:19:24 -04:00
0af18a6a43 Merge pull request #13097 from janlazo/vim-8.2.1850
vim-patch:8.2.1850

scripts/vim-patch.sh: include --shortstat with -m
2020-10-16 10:33:57 -04:00
074745d924 Fix shellcheck error SC2155
Close https://github.com/neovim/neovim/pull/11765
2020-10-15 22:51:19 -04:00
82b09bc9d2 scripts/vim-patch.sh: include --shortstat with -m 2020-10-15 22:51:19 -04:00
f319e4608e vim-patch:8.2.1850: "vat" does not select tags correctly over line break
Problem:    "vat" does not select tags correctly over line break.
Solution:   Adjust the search pattern. (Aufar Gilbran, closes vim/vim#7136)
a604ccc959

Use 'const char*' for spat,mpat,epat params of do_searchpair()
to reduce (char_u *) casts.

Cherry-pick Test_string_html_objects() changes from patch 8.2.0655.
2020-10-15 22:51:10 -04:00
3566244d0e gen_ex_cmds: simplify writes to defsfile (#13096)
defsfile:write() is executed multiple times to append strings.
Some of these can be combined into a format string, wrapped in [[]].
It is easier to read and insert strings via "%s".

defsfile now has a trailing comma for "cmdnames" array
but it does not break the build.
2020-10-15 19:07:54 -04:00
4b00916e94 Merge pull request #13092 from janlazo/vim-8.1.1403
vim-patch:8.1.{95,103,221,269,975,978,1403,1569,1856,1983,2014,2365,2406},8.2.{573,616,710,957,1020,1036,1038,1743,1842,1843}
2020-10-14 22:56:32 -04:00
3183b09a5e vim-patch:8.1.0269: Ruby Kernel.#p method always returns nil
Problem:    Ruby Kernel.#p method always returns nil.
Solution:   Copy p method implementation from Ruby code. (Masataka Pocke
            Kuwabara, closes vim/vim#3315)
51e9fbf1c7
2020-10-14 22:00:40 -04:00
4543af9d53 vim-patch:8.1.0221: not enough testing for the Ruby interface
Problem:    Not enough testing for the Ruby interface.
Solution:   Add more tests. (Dominique Pelle, closes vim/vim#3252)
edd6aacb01

Modified some tests to make them pass for Neovim.
Some tests will always fail because +ruby is externalized in Neovim.
Skip failing ruby tests for now.
2020-10-14 22:00:40 -04:00
e396eb549e vim-patch:8.1.0978: blob not tested with Perl
Problem:    Blob not tested with Perl.
Solution:   Add more test coverage.  Fixes a crash. (Dominique Pelle,
            closes vim/vim#4037)
2472ae81df

This commit is only to match test_perl.vim from Vim 8.1.0978
so that test_perl.vim patches are easier to port.
2020-10-14 08:54:01 -04:00
3d2cd64744 vim-patch:8.2.0710: Netbeans test sometimes fails
Problem:    Netbeans test sometimes fails.
Solution:   Mark any test using an external command as flaky.
4a070cc82e
2020-10-14 08:54:01 -04:00
bddd67a331 vim-patch:8.1.0095: dialog for ":browse tabnew" says "new window"
Problem:    Dialog for ":browse tabnew" says "new window".
Solution:   Use "new tab page". (closes vim/vim#3053)
39902a06d9
2020-10-14 08:54:00 -04:00
b946bcbc3b vim-patch:8.2.1842: crash when USE_FNAME_CASE is defined and using :browse
Problem:    Crash when USE_FNAME_CASE is defined and using :browse.
Solution:   Don't use read-only memory for ".". (Yegappan Lakshmanan,
            closes vim/vim#7123)
21cbe175ee
2020-10-14 08:54:00 -04:00
01dff1fbfb vim-patch:8.2.0957: compiler warning for uninitialized variable
Problem:    Compiler warning for uninitialized variable. (Tony Mechelynck)
Solution:   Initialize one variable.
2d4070d3b0
2020-10-14 08:54:00 -04:00
32baed519c vim-patch:8.2.0573: using :version twice leaks memory
Problem:    using :version twice leaks memory
Solution:   Only initialize variables once. (Dominique Pelle, closes vim/vim#5917)
278e83863b

Cherry-pick test_alot.vim change from patch v8.2.0164
so that test_expr.vim and test_version.vim do not conflict.
Cherry-pick modeline from patch v8.2.1432.

N/A patches for version.c:

vim-patch:8.1.0103: long version string cannot be translated

Problem:    Long version string cannot be translated.
Solution:   Build the string in init_longVersion().
35fb6fbf72

vim-patch:8.1.0975: using STRNCPY() wrongly. Warning for uninitialized variable

Problem:    Using STRNCPY() wrongly. Warning for uninitialized variable.
Solution:   Use mch_memmove(). Initialize variable. (Yasuhiro Matsumoto,
            closes vim/vim#3979)
c666388367

vim-patch:8.1.1403: cannot build without the timer feature

Problem:    Cannot build without the timer feature.
Solution:   Add #ifdef.
35d5af6c0b

vim-patch:8.1.1569: cannot build with signs but without diff feature

Problem:    Cannot build with signs but without diff feature.
Solution:   Move #ifdef. (Tom Ryder)
bf8c3adef2

vim-patch:8.1.1856: popup preview test fails sometimes

Problem:    popup preview test fails sometimes. (Christian Brabandt)
Solution:   Clear the command line.
78d629a385

vim-patch:8.1.1983: compiler nags for uninitialized variable and unused function

Problem:    Compiler nags for uninitialized variable and unused function.
Solution:   Add unnecessary initialization.  Move function inside #ifdef.
ea781459b9

vim-patch:8.1.2014: terminal altscreen test fails sometimes

Problem:    Terminal altscreen test fails sometimes.
Solution:   Use WaitFor().
b9c79cf5cc

vim-patch:8.1.2365: missing tests for recent popupwin changes

Problem:    Missing tests for recent popupwin changes.
Solution:   Add test cases.
20ebbeac46

vim-patch:8.1.2406: leaking memory in test_paste and test_registers

Problem:    Leaking memory in test_paste and test_registers.
Solution:   Free the old title.  Don't copy expr_line.
6b649ac4fd

vim-patch:8.2.0616: build error when disabling the diff feature

Problem:    Build error when disabling the diff feature.
Solution:   Move parenthesis outside of #ifdef. (Tom Ryder)
e770598f31

vim-patch:8.2.1020: popupwin test fails in the GUI

Problem:    Popupwin test fails in the GUI.
Solution:   Send GUI byte sequence for <C-S-a>.
b326edf5b3

vim-patch:8.2.1036: popupwin test fails sometimes

Problem:    Popupwin test fails sometimes.
Solution:   Use WaitForAssert() instead of a sleep.
373c65104e

vim-patch:8.2.1038: popupwin test fails

Problem:    Popupwin test fails.
Solution:   Fix WaitForAssert() argument.
b2b218d89b

vim-patch:8.2.1743: cannot build without the eval feature

Problem:    Cannot build without the eval feature.
Solution:   Move shorten_dir outside of #ifdef.
273af497ca

vim-patch:8.2.1843: Netbeans: with huge buffer number memory allocation may fail

Problem:    Netbeans: with huge buffer number memory allocation may fail.
Solution:   Check for size overflow.
b9616af23f
2020-10-14 08:52:45 -04:00
2e70fee1e9 tui: fix problem with uv_tty_set_mode failing due to signal
fixes #12322.
2020-10-13 11:44:15 +09:00
759a05407f Merge pull request #12953 from vigoux/tshl-custom-parser
treesitter: various improvements to prepare for language injection
2020-10-13 00:08:16 +02:00
95238598e4 treesitter: allow multiple highlighters per buffer 2020-10-12 18:23:14 +02:00
bdbc56f931 treesitter: allow custom parser for highlighter
Also allow to get parser ranges.

This will be useful for language injection, allowing us to tweak the
parser's ranges on the fly.

Update runtime/lua/vim/treesitter.lua

Co-authored-by: Paul Burlumi <paul@burlumi.com>
2020-10-12 18:23:14 +02:00
d198aa511a Merge pull request #13059 from vigoux/ts-runtime-queries
treesitter: runtime queries
2020-10-12 11:57:09 +02:00
1709210a53 Fix multiple typos (#13063)
* Fix multiple typos in `src/nvim/api/ui_events.in.h`
* Below spellings are corrected:
  * Definitions
  * Revision
  * Performance

* Typo fix `presense` should be presence

* Typo fix, follwed -> followed

* Typo fix, attemping -> attempting

* Typo fix, duplicate 'the'

* Typo fix, bounaries -> boundaries

* Revert "Typo fix, bounaries -> boundaries"

This reverts commit 24779e55e596f7534585938a7e532830ad2fa83c.

* Revert "Typo fix, duplicate 'the'"

This reverts commit 1d41d74f78736e67821a15edc9c174a2c3024f87.

* Revert "Typo fix, attemping -> attempting"

This reverts commit d8b2860dfcac366af7afae1f09946ed0aee4a34e.
2020-10-12 09:28:12 +02:00
3dffa2cc42 Merge pull request #13088 from janlazo/vim-8.2.1834
vim-patch:8.2.{1834,1837}
2020-10-12 00:41:12 -04:00
aa930196a7 vim-patch:8.2.1837: using "gn" after "gN" does not work
Problem:    Using "gn" after "gN" does not work.
Solution:   Extend the other end of the Visual area. (closes vim/vim#7109)
c07b7f701f

N/A patches for version.c:

vim-patch:8.2.1834: PyEval_InitThreads() is deprecated in Python 3.9

Problem:    PyEval_InitThreads() is deprecated in Python 3.9.
Solution:   Do not call PyEval_InitThreads in Python 3.9 and later. (Ken
            Takata, closes vim/vim#7113)  Avoid warnings for functions.
efc0d94afc
2020-10-11 22:29:58 -04:00
3a597cb1a0 tui: fix problem that TTY does not go into raw mode
fixes #13073.
2020-10-12 10:11:47 +09:00
d3f544002c treesitter: runtime queries
Runtime queries just work like ftplugins, that is:

- Queries in the `after` directory are sourced _after_ the "base" query
- Otherwise, the last define query takes precedence.

Queries can be found in the `queries` directory.

Update runtime/lua/vim/treesitter/query.lua

Co-authored-by: Paul Burlumi <paul@burlumi.com>
2020-10-11 21:18:28 +02:00
ac5af6051b Merge pull request #11318 from janlazo/vim-8.1.1201
vim-patch:8.1.{560,1204,1206}
2020-10-11 13:46:23 -04:00
8f03d1e431 test/old: skip Test_addr_all() for now
It needs patch v8.1.0341 to pass.
Patch v8.1.0341 fails Test_nocatch_wipe_all_buffers().
2020-10-11 12:25:45 -04:00
41cfdba22b vim-patch:8.1.1206: user command parsing and listing not properly tested
Problem:    User command parsing and listing not properly tested.
Solution:   Add more tests. (Dominique Pelle, closes vim/vim#4296)
d1f90bbcab
2020-10-11 11:53:41 -04:00
ff104e197d vim-patch:8.1.1204: output of :command with address completion is not nice
Problem:    Output of :command with address completion is not nice.
Solution:   Shorten the address completion names.
a561a41a70
2020-10-11 11:53:40 -04:00
e8c2a8269e vim-patch:8.1.0560: cannot use address type "other" with with user command
Problem:    Cannot use address type "other" with with user command.
Solution:   Add "other" to the list. (Daniel Hahler, closes vim/vim#3655)  Also
            reject "%" for commands with "other".  Add some more tests.
51a7454cd2
2020-10-11 11:53:40 -04:00
b9776ff5b7 Merge pull request #13083 from janlazo/vim-8.1.1281
vim-patch:8.1.{523,720,877,988,1015,1036},8.2.{1101,1820,1823,1829,1830,1831}
2020-10-11 11:17:22 -04:00
2f9252304c vim-patch:8.2.1823: "gN" does not select the matched string
Problem:    "gN" does not select the matched string.
Solution:   Move the cursor to the start of the match.
28f224b2c1

N/A patches for version.c:

vim-patch:8.2.1820: Vim9: crash when error happens in timer callback

Problem:    Vim9: crash when error happens in timer callback.
Solution:   Check that current_exception is not NULL. (closes vim/vim#7100)
820d55a50b

vim-patch:8.2.1829: warnings when executing Github actions

Problem:    Warnings when executing Github actions.
Solution:   Use another method to set environment variables. (Ken Takata,
            closes vim/vim#7107)
bd6428b9e7

vim-patch:8.2.1830: MS-Windows: Python3 issue with stdin

Problem:    MS-Windows: Python3 issue with stdin.
Solution:   Check if stdin is readable. (Ken Takata, closes vim/vim#7106)
c6ed254d9f

vim-patch:8.2.1831: file missing from distribution

Problem:    File missing from distribution.
Solution:   Add the github code analyses file.
ef16c90423
2020-10-11 09:18:02 -04:00
4a54472098 vim-patch:8.2.1101: no error when using wrong arguments for setqflist()
Problem:    No error when using wrong arguments for setqflist() or
            setloclist().
Solution:   Check for the error.
be7a50c22f
2020-10-11 01:24:54 -04:00
bdd0c31fb0 vim-patch:8.1.1036: quickfix function arguments are inconsistent
Problem:    Quickfix function arguments are inconsistent.
Solution:   Pass a list pointer to more functions. (Yegappan Lakshmanan,
            closes vim/vim#4149)
9afe5e9cc0
2020-10-10 23:56:09 -04:00
4cd69151cf vim-patch:8.1.1015: quickfix buffer shows up in list, can't get buffer number
Problem:    Quickfix buffer shows up in list, can't get buffer number.
Solution:   Make the quickfix buffer unlisted when the quickfix window is
            closed.  get the quickfix buffer number with getqflist().
            (Yegappan Lakshmanan, closes vim/vim#4113)
647e24ba3d
2020-10-10 22:58:39 -04:00
9606317486 vim-patch:8.1.0988: deleting location list buffer breaks location list window
Problem:    Deleting a location list buffer breaks location list window
            functionality.
Solution:   (Yegappan Lakshmanan, closes vim/vim#4056)
d82a81cad9

Cherry-pick Xqbuf_test() changes from patch 8.1.0892.
Patch 8.1.0892 triggers a memory leak.
2020-10-10 22:04:25 -04:00
e82b8ddef1 vim-patch:8.1.0877: new buffer used every time the quickfix window is opened
Problem:    New buffer used every time the quickfix window is opened.
Solution:   Reuse the buffer. (Yegappan Lakshmanan, closes vim/vim#3902)
ee8188fc74
2020-10-10 20:20:56 -04:00
e9004e2af0 vim-patch:8.1.0720: cannot easily change the current quickfx list index
Problem:    Cannot easily change the current quickfx list index.
Solution:   Add the "idx" argument to setqflist(). (Yegappan Lakshmanan,
            closes vim/vim#3701)
5b69c22fd2
2020-10-10 15:28:07 -04:00
0e056d4a06 vim-patch:8.1.0523: opening window from quickfix leaves empty buffer behind
Problem:    Opening window from quickfix leaves empty buffer behind.
Solution:   Add qf_jump_newwin(). (Yegappan Lakshmanan, closes vim/vim#2574)
b244373bec

Close https://github.com/neovim/neovim/pull/12855
2020-10-10 15:28:06 -04:00
f7cc3ae0b7 Merge pull request #13038 from bfredl/multiluahl
api: multiple decoration providers at once
2020-10-10 18:31:46 +02:00
6bf414c0d7 whine 2020-10-10 18:27:01 +02:00
81c508cf61 screen: untangle static and dynamic decorations 2020-10-10 17:54:46 +02:00
405044a412 Merge pull request #12904 from erw7/vim-8.1.0431
vim-patch:8.{1.0431,1.0489,2.1677}
2020-10-10 10:31:02 -04:00
88e6e7e08c because reasons (undefined behavior) 2020-10-10 16:00:20 +02:00
0b615dae07 api: multiple decoration providers at once 2020-10-10 15:16:45 +02:00
11ec53e558 Merge pull request #13081 from bfredl/usdt2
basic support for usdt probes
2020-10-10 14:49:11 +02:00
d4fc7b25e8 basic support for usdt probes 2020-10-10 09:52:12 +02:00
ce5a260c9e Merge pull request #13075 from vigoux/ts-check-parser-version
treesitter: check language ABI version on load
2020-10-09 11:22:22 +02:00
15ad7c0d27 Merge pull request #13074 from janlazo/vim-8.1.1717
vim-patch:8.1.{746,1717,2294,2303,2405},8.2.0007
2020-10-08 20:32:13 -04:00
2bfe2018d6 vim-patch:8.2.0007: popup menu positioned wrong with folding in two tabs
Problem:    Popup menu positioned wrong with folding in two tabs.
Solution:   Update the cursor line height. (closes vim/vim#5353)
09dd2bb336
2020-10-08 19:04:51 -04:00
56bb5993d9 vim-patch:8.1.2405: matchadd_conceal test fails under valgrind
Problem:    matchadd_conceal test fails under valgrind.
Solution:   Use WaitForAssert() and wait a bit longer.
1f9a028def
2020-10-08 18:31:46 -04:00
818e794f12 vim-patch:8.1.2303: cursor in wrong position after horizontal scroll
Problem:    Cursor in wrong position after horizontal scroll.
Solution:   Set w_valid_leftcol.  (closes vim/vim#5214, closes vim/vim#5224)
08f23636ae
2020-10-08 18:31:46 -04:00
910bbc3cca vim-patch:8.1.2294: cursor pos wrong with concealing and search causes a scroll
Problem:    Cursor position wrong when characters are concealed and asearch
            causes a scroll.
Solution:   Fix the cursor column in a concealed line after window scroll.
            (closes vim/vim#5215, closes vim/vim#5012)
cbee635eee
2020-10-08 18:31:46 -04:00
d5bc62a5ce vim-patch:8.1.1717: last char in menu popup window highlighted
Problem:    Last char in menu popup window highlighted.
Solution:   Do not highlight an extra character twice.
f914a33c9c

N/A patches for version.c:

vim-patch:8.1.0746: highlighting not updated with conceal and 'cursorline'

Problem:    Highlighting not updated with conceal and 'cursorline'. (Jason
            Franklin)
Solution:   Do not use a zero line number.  Check if 'conceallevel' is set for
            the current window.
bbee8d5122
2020-10-08 18:31:46 -04:00
6f6c55717a treesitter: check language ABI version on load
This is will avoid some issues at runtime.
2020-10-08 21:31:09 +02:00
ca6815115c provider: update supported Python versions (#13070)
Python 3.9 was released, so we need to add support for the upcoming Python 3.10.
Python 3.5 and earlier reached their end-of-life.

PEP 478: Python 3.5  Release Schedule: https://www.python.org/dev/peps/pep-0478
PEP 596: Python 3.9  Release Schedule: https://www.python.org/dev/peps/pep-0596
PEP 619: Python 3.10 Release Schedule: https://www.python.org/dev/peps/pep-0619
2020-10-08 11:52:17 +02:00
3ea5df0f04 Merge pull request #13029 from aufarg/vim-8.2.1345
[RDY] vim-patch:8.2.{1345,1488}
2020-10-07 19:52:40 -04:00
8ba5f4d19c Merge pull request #13064 from janlazo/vim-8.1.2325
vim-patch:8.1.{1683,1686,1692,1705,2325},8.2.1599
2020-10-07 17:58:38 -04:00
a893593a9f vim-patch:8.2.1488: text does not scroll when inserting above first line
Problem:    Text does not scroll when inserting above first line.
Solution:   Adjust off-by-one error. (Ken Takata, closes vim/vim#6739)
9dc1917f42
2020-10-07 23:41:50 +08:00
e852bad3a7 vim-patch:8.2.1345: Redraw error when using visual block and scroll
Problem:    Redraw error when using visual block and scroll.
Solution:   Add check for w_topline. ( closes vim/vim#6597)
f8992d47cd
2020-10-07 23:41:38 +08:00
670a577c6b vim-patch:8.2.1599: missing line end when skipping a long line with :cgetfile
Problem:    Missing line end when skipping a long line with :cgetfile.
Solution:   Fix off-by-one error. (closes vim/vim#6870)
59941cbd80
2020-10-07 01:37:50 -04:00
4a6e201e37 vim-patch:8.1.1705: using ~{} for a literal dict is not nice
Problem:    Using ~{} for a literal dict is not nice.
Solution:   Use #{} instead.
4c6d90458b
2020-10-07 01:03:48 -04:00
20fc7ef161 vim-patch:8.1.1692: using *{} for literal dict is not backwards compatible
Problem:    Using *{} for literal dict is not backwards compatible. (Yasuhiro
            Matsumoto)
Solution:   Use ~{} instead.
b8be54dcc5
2020-10-07 00:56:38 -04:00
d109a33144 vim-patch:8.1.1686: "*" of "*{" is recognized as multipy operator
Problem:    "*" of "*{" is recognized as multipy operator. (Yasuhiro Matsumoto)
Solution:   Check for the "{".
2898ebb44c
2020-10-07 00:44:53 -04:00
7ca5dc2519 vim-patch:8.1.1683: dictionary with string keys is longer than needed
Problem:    Dictionary with string keys is longer than needed.
Solution:   Use *{key: val} for literaly keys.
d5abb4c877

Vim's popup,textprop features are N/A.
Neovim has not polyfilled their APIs.
Skip docs and tests for these features.
2020-10-07 00:36:48 -04:00
fa1e740e60 vim-patch:8.1.2325: crash when using balloon with empty line
Problem:    Crash when using balloon with empty line.
Solution:   Handle empty lines. (Markus Braun)
9ae862ebba

Port Test_balloon_split() from patch 8.0.1318 for merging only.
It won't run because of the function check.
2020-10-06 23:48:15 -04:00
a260d5def3 Merge pull request #13060 from janlazo/vim-8.1.2310
vim-patch:8.1.{1619,1771,1624,2274,2310,2401},8.2.{554,1806}
2020-10-06 19:09:48 -04:00
7454b11ec1 vim-patch:8.1.1624: when testing in the GUI may try to run gvim in a terminal
Problem:    When testing in the GUI may try to run gvim in a terminal.
Solution:   Add the -v argument. (Yee Cheng Chin, closes vim/vim#4605)  Don't skip
            tests that work now.
0d702028fe
2020-10-06 17:57:05 -04:00
dfd1c6c417 vim-patch:8.1.1619: tests are not run with GUI on Travis
Problem:    Tests are not run with GUI on Travis.
Solution:   Add a testgui job. (Ozaki Kiichi, closes vim/vim#4609)
435f9f06ca

N/A patches for version.c:

vim-patch:8.1.1771: options test fails on MS-Windows

Problem:    Options test fails on MS-Windows.
Solution:   Add correct and incorrect values for 'completeslash'.
d4404b4391

vim-patch:8.1.2274: newlines in 'balloonexpr' result only work in the GUI

Problem:    Newlines in 'balloonexpr' result only work in the GUI.
Solution:   Also recognize newlines in the terminal. (closes vim/vim#5193)
d1c1c82389

vim-patch:8.2.0554: the GUI doesn't set t_Co

Problem:    The GUI doesn't set t_Co.
Solution:   In the GUI set t_Co to 256 * 256 * 256. (closes vim/vim#5903)
acc770a10f

vim-patch:8.2.1806: MS-Windows with Python: Vim freezes after import command

Problem:    MS-Windows with Python: Vim freezes after import command.
Solution:   Use either "NUL" or "CONIN$" when reopening stdin. (Yasuhiro
            Matsumoto, closes vim/vim#7083)
253b16a4ab
2020-10-06 17:56:41 -04:00
779b188db6 vim-patch:8.1.2401: :cexpr does not handle | in expression
Problem:    :cexpr does not handle | in expression.
Solution:   Remove EX_TRLBAR and set nextcmd pointer.
88a3e2b2ac
2020-10-06 17:45:19 -04:00
3ad6fb804f vim-patch:8.1.2310: no proper test for directory changes in quickfix
Problem:    No proper test for directory changes in quickfix.
Solution:   Add a test that uses multiple directories. (Yegappan Lakshmanan,
            closes vim/vim#5230)
d8a8c4ca08
2020-10-06 17:45:18 -04:00
7b89353985 lua: vim.wait allows control of fast events (#13053)
* lua: vim.wait allows control of fast events

* fixup: remove requirement of function for easier waiting

* fixup: lint

* fixup: bfredl comments
2020-10-06 12:58:05 -04:00
07fde6c394 Merge pull request #13037 from janlazo/runtime-typescript
runtime: sync typescript runtime files with Vim
2020-10-06 09:03:21 -04:00
753a86c01a Merge pull request #13054 from erw7/fix-msg-is-a-directory-on-Windows
fileio: fix "is a directory" warning on Windows
2020-10-06 09:20:28 +02:00
3cc1b5c5b9 runtime/typescript: 3d1cde8a2f28dce2c82d2b2b4c5e35e6662030e0
Port typescript ftplugin and compiler files only.

3d1cde8a2f
2020-10-05 23:24:43 -04:00
95fd5ed8c9 runtime/typescript: 91359014b359cf816bf943fe2c7d492996263def
Port typescript syntax changes only.

91359014b3
2020-10-05 23:20:45 -04:00
0f1d679531 runtime/typescript: 09c6f265b21065ffa9437837b1d0955137175e45
Port typescript syntax files only.
Close https://github.com/neovim/neovim/issues/12125

09c6f265b2
2020-10-05 23:20:45 -04:00
8810973da4 runtime/typescript.vim: 96f45c0b6fc9e9d404e6805593ed1e0e6795e470
Port "runtime/indent/typescript.vim" changes only.
Close https://github.com/neovim/neovim/pull/12716.

96f45c0b6f
2020-10-05 23:20:45 -04:00
27b811dc1f Merge pull request #13042 from godlygeek/unmapped_meta_is_esc
Treat unmapped ALT/META as ESC+c in all modes

Closes #7972
2020-10-05 22:07:52 -04:00
c043e806a5 fileio: fix "is a directory" warning on Windows
The porting of vim/vim@c8fe645 by #13040 on Windows was incomplete.
This fixes that and makes the "is a directory" warning appear properly
on Windows as well.
2020-10-06 10:31:50 +09:00
f8a5b4bdce Merge pull request #13039 from janlazo/vim-8.2.1790
vim-patch:8.1.{1812,2024,2239,2242,2247,2249,2253},8.2.{354,603,609,665,1570,1790,1792,1801}
2020-10-05 20:31:19 -04:00
c76fc7942b Merge pull request #13040 from Shougo/vim-8.2.1793
[RDY] vim-patch:8.2.1793: not consistently giving the "is a directory" warning
2020-10-05 20:28:55 -04:00
0f078bdde8 vim-patch:8.2.1793: not consistently giving the "is a directory" warning
Problem:    Not consistently giving the "is a directory" warning.
Solution:   Adjust check for illegal file name and directory. (Yasuhiro
            Matsumoto, closes vim/vim#7067)
c8fe645c19
2020-10-06 08:21:51 +09:00
674844086b vim-patch:8.2.1801: undo file not found when using ":args" or ":next"
Problem:    Undo file not found when using ":args" or ":next".
Solution:   Handle like editing another file. (closes vim/vim#7072)
55b419b871
2020-10-05 18:18:14 -04:00
b35b7222ee vim-patch:8.1.2024: delete call commented out for debugging
Problem:    Delete call commented out for debugging.
Solution:   Restore the delete call. (Christian Brabandt)
9283f92008
2020-10-05 18:18:14 -04:00
8bd38863e6 vim-patch:8.1.1812: reading a truncted undo file hangs Vim
Problem:    Reading a truncted undo file hangs Vim.
Solution:   Check for reading EOF. (closes vim/vim#4769)
fb06d767a8
2020-10-05 18:18:14 -04:00
da5bd45e5a vim-patch:8.2.0665: wrongly assuming Python executable is called "python"
Problem:    Wrongly assuming Python executable is called "python".
Solution:   Use detected python command. (Ken Takata, closes vim/vim#6016)
            Also use CheckFunction if possible.
a161cb5ddd

CheckPython() is used only in test_terminal.vim as of patch 8.2.1794.
test_terminal.vim is no-opt in Neovim.
I ported it only for merging Vim patches.

N/A patches for version.c:

vim-patch:8.1.2239: CI fails when running tests without building Vim

Problem:    CI fails when running tests without building Vim.
Solution:   Skip creating doc tags if the execute does not exist.
1a577433ac

vim-patch:8.1.2242: creating docs tags uses user preferences

Problem:    Creating docs tags uses user preferences. (Tony Mechelynck)
Solution:   Add "--clean".
70def98a95

vim-patch:8.1.2247: "make vimtags" does not work in runtime/doc

Problem:    "make vimtags" does not work in runtime/doc.
Solution:   Test existence with "which" instead of "test -x". (Ken Takata)
e890b9f5dd

vim-patch:8.1.2249: "make vimtags" does not print any message

Problem:    "make vimtags" does not print any message.
Solution:   Add a message that the tags have been updated.
d047840ce4

vim-patch:8.1.2253: using "which" to check for an executable is not reliable

Problem:    Using "which" to check for an executable is not reliable.
Solution:   Use "command -v" instead.  Also exit with error code when
            generating tags has an error. (closes vim/vim#5174)
ad4de52510

vim-patch:8.2.0354: Python 3.9 does not define _Py_DEC_REFTOTAL

Problem:    Python 3.9 does not define _Py_DEC_REFTOTAL. (Zdenek Dohnal)
Solution:   Remove it, it was only for debugging.
a65bb53514

vim-patch:8.2.0603: configure does not detect moonjit

Problem:    Configure does not detect moonjit.
Solution:   Add check for moonjit. (Shlomi Fish, closes vim/vim#5947)
f49e564082

vim-patch:8.2.0609: configure does not detect moonjit correctly

Problem:    Configure does not detect moonjit correctly.
Solution:   Double the brackets. (Ozaki Kiichi)
ad4dc83389

vim-patch:8.2.1570: configure check for dirfd() does not work on HPUX

Problem:    Configure check for dirfd() does not work on HPUX. (Michael Osipov)
Solution:   Use AC_TRY_LINK instead of AC_TRY_COMPILE. (closes vim/vim#6838)
9d8bfae50f

vim-patch:8.2.1790: MS-Windows with Python: crash when executed from Vifm

Problem:    MS-Windows with Python: crash when executed from Vifm.
Solution:   Use NUL instead of CONIN. (Ken Takata, closes vim/vim#7061, closes vim/vim#7053)
794771cfd8

vim-patch:8.2.1792: Configure does not recognize Racket 6.1+

Problem:    Configure does not recognize Racket 6.1+.
Solution:   Add a check for "rktio". (closes vim/vim#7062)
588d241d44
2020-10-05 18:17:45 -04:00
2f06413dfb Treat unmapped ALT/META as ESC+c in all modes
In #8226 <A-x> and <M-x> were changed to behave like <Esc>x in insert
mode when no mapping exists. This commit backs out that change and
replaces it with a more general one that makes unmapped ALT and META
keypresses as <Esc>+char in all modes. This fixes an unnecessary and
confusing inconsistency between modes.
2020-10-05 15:27:04 -04:00
8e77d70e29 test/vim.validate(): assert normalized stacktrace
- The previous commit lost information in the tests. Instead, add some
  more "normalization" substitutions in pcall_err(), so that the general
  shape of the stacktrace is included in the asserted text.
- Eliminate contains(), it is redundant with matches()
2020-10-05 09:47:59 -04:00
aad7a74053 vim.validate(): include stacktrace in message 2020-10-05 09:47:59 -04:00
e3afb30e69 Merge pull request #13045 from jamessan/unicode-13 2020-10-05 06:40:29 -04:00
7996d9ece1 Merge pull request #13023 from G-flat/pvs-v1001
[RDY] PVS/V1001: Remove assignment to unused variable
2020-10-05 12:31:33 +02:00
8972eea2e1 PVS/V1001: Remove assignment to unused variable 2020-10-05 15:17:14 +08:00
b0769729c8 Merge pull request #1 from neovim/master
rebase
2020-10-05 15:15:10 +08:00
1d08dfab5b PVS/V1001: Prepare for rebase 2020-10-05 15:14:50 +08:00
1a49346319 PVS/V1001: Remove assignment to unused variable 2020-10-05 14:16:51 +08:00
f7aeac7263 Merge pull request #12999 from PaperMountainStudio/resolv-ipv6
runtime: backport IPv6 support to resolv.vim
2020-10-04 16:22:19 -04:00
aadf85f3ca Update unicode files 2020-10-04 11:50:38 -04:00
ec057d40f3 Download emoji-data from UNIDATA/ 2020-10-04 11:50:29 -04:00
6d066af27a Opts.wrap_at is sometimes a bool, ensure it falls back to a valid number in the call to math.min 2020-10-04 01:06:44 -07:00
f6ac375604 Merge pull request #13026 from janlazo/vim-8.2.1779
vim-patch:8.1.{2143},8.2.{841,1779,1780,1784,1787}
2020-10-03 02:12:54 -04:00
86ab4a1cb4 vim-patch:8.2.0841: 'verbose' value 16 causes duplicate output
Problem:    'verbose' value 16 causes duplicate output.
Solution:   Combine levels 15 and 16 into one message. (Christian Brabandt,
            closes vim/vim#6153)
823654bc06
2020-10-03 01:06:24 -04:00
970d6ee0d1 vim-patch:8.1.2143: cannot see each command even when 'verbose' is set
Problem:    Cannot see each command even when 'verbose' is set.
Solution:   List each command when 'verbose' is at least 16.
4facea310c

Cherry-pick Test_tselect() from patch 8.1.2141.
It requires screendump so it won't run.
I cannot port it to a lua screen test.
2020-10-02 23:13:28 -04:00
2000e1621d vim-patch:8.2.1787: crash with 'incsearch' and very long line
Problem:    Crash with 'incsearch' and very long line.
Solution:   Check whether regprog becomes NULL. (closes vim/vim#7063)
795aaa1e84

N/A patches for version.c:

vim-patch:8.2.1784: commits are not scanned for security problems

Problem:    commits are not scanned for security problems
Solution:   Enable Github code scanning. (Christian Brabandt, closes vim/vim#7057)
fa79be6b10
2020-10-02 23:13:28 -04:00
25513049b3 vim-patch:8.2.1780: statusline not updated when splitting windows
Problem:    Statusline not updated when splitting windows.
Solution:   Call status_redraw_all(). (Jason Franklin, closes vim/vim#5496)
668008be66
2020-10-02 22:31:55 -04:00
72914cd7f2 vim-patch:8.2.1779: some debian changelog files are not recognized
Problem:    Some debian changelog files are not recognized.
Solution:   Add */debian/changelog. (Jason Franklin)
0022675aa3
2020-10-02 22:31:55 -04:00
f126721357 Fix quickfix.c warning message on EMSGN macro
```
/Users/stahn_mchan/sources/neovim/src/nvim/quickfix.c:1775:5: warning: format specifies type 'long' but the argument has type 'int64_t' (aka 'long long')
      [-Wformat]
    EMSGN("quickfix_busy not zero on exit: %ld", (long)quickfix_busy);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                           %lld
/Users/stahn_mchan/sources/neovim/src/nvim/message.h:49:63: note: expanded from macro 'EMSGN'
```
2020-10-02 03:24:39 -05:00
c10c2fab5b Merge pull request #12968 from erw7/fix-substitute2
fix substitute problem with inccommand
2020-10-02 09:56:57 +02:00
f1b39f91a5 extmark: Change nvim_buf_set_extmark to not create undo data 2020-10-02 11:41:30 +09:00
b2f9c2b6c1 undo: fix possibility of aborting 2020-10-02 11:41:30 +09:00
620c8fdfe9 extmark: fix decoration ploblems with extmark
54ce101 changed the way undo entries are created when adding decorations.
This creates all sorts of problems.This change fixes the problem by
reverting to the previous behavior.
2020-10-02 11:41:30 +09:00
62c53ac3cf PVS/V1001: Add cast to return statement 2020-10-02 07:29:44 +08:00
ccceab9659 PVS/V1001: Correct returned variable typo 2020-10-02 07:24:40 +08:00
a9851bfbb1 Merge pull request #13014 from erw7/fix-fold
screen.c: fix buffer overflow due to folding
2020-10-01 17:21:41 +02:00
06258772da PVS/V1001: Remove assignment to unused variable 2020-10-01 22:37:14 +08:00
8154c77bef screen.c: fix buffer overflow due to folding
fixes #12988.
2020-10-01 17:25:19 +09:00
94c743348e runtime: backport IPv6 support to resolv.vim
from commits bc93cebb692f47488d66f078d1728031e9be35e7 and
b17893aa940dc7d45421f875f5d90855880aad27 from vim
2020-10-01 10:25:09 +02:00
36a5c394a5 Merge pull request #12987 from janlazo/vim-8.1.1563
vim-patch:8.1.{1319,1563,1591},8.2.{42,499}
2020-10-01 00:38:59 -04:00
9bac43b1fb userfunc: abort early on invalid refs
Cherry-pick set_ref_in_call_stack() changes from patch 8.1.1575.
2020-09-30 21:00:18 -04:00
594a69579f vim-patch:8.2.0042: clearing funccal values twice
Problem:    Clearing funccal values twice.
Solution:   Remove clearing individual fields.
eac7ce01e9
2020-09-30 21:00:18 -04:00
578b0b0b52 vim-patch:8.2.0499: calling a lambda is slower than evaluating a string
Problem:    Calling a lambda is slower than evaluating a string.
Solution:   Make calling a lambda faster. (Ken Takata, closes vim/vim#5727)
f10806b250

Port "uf_flags" constants from patch 8.2.1054 to sync with Vim.
Port user_func_error() from patch 8.2.0149.
Port Test_lambda_scope() changes from patch 8.1.0736 so that it passes.
2020-09-30 21:00:17 -04:00
2a57dce9f2 vim-patch:8.1.1319: computing function length name in many places
Problem:    Computing function length name in many places.
Solution:   compute name length in call_func().
6ed8819822

In call_func(), reassign "len" param to (int)STRLEN(funcname)
instead of using vim_strsave() which runs strlen().
"len" param is checked for v:lua functions.
call_func() states that strlen() is used if "len" is set to -1.
2020-09-30 21:00:17 -04:00
4edf7b9ff2 vim-patch:8.1.1591: on error garbage collection may free memory in use
Problem:    On error garbage collection may free memory in use.
Solution:   Reset may_garbage_collect when evaluating expression mapping.
            Add tests. (Ozaki Kiichi, closes vim/vim#4579)
7d491c4253
2020-09-30 21:00:17 -04:00
7cb38d5ac4 vim-patch:8.1.1563: crash when using closures
Problem:    Crash when using closures.
Solution:   Set reference in varlist of funccal when running the garbage
            collector. (Ozaki Kiichi, closes vim/vim#4554, closes vim/vim#4547)
6e5000d493
2020-09-30 21:00:17 -04:00
3430e40c60 vim-patch:8.2.1775: MS-Windows: adding a long quickfix list is slow (#13019)
vim-patch:8.2.1775: MS-Windows: adding a long quickfix list is slow

Problem:    MS-Windows: adding a long quickfix list is slow.
Solution:   Shorten the buffer name only for the first entry. (Yegappan
            Lakshmanan, closes vim/vim#7039, closes vim/vim#7033)
8ec92c9779

N/A patches for version.c:

vim-patch:8.1.2226: cannot use system copy/paste in non-xterm terminals

Problem:    Cannot use system copy/paste in non-xterm terminals.
Solution:   Instead of setting 'mouse' to "a" set it to "nvi" in defaults.vim.
5b418992cf

vim-patch:8.2.1772: cannot use CTRL-W <Down> to move out of a terminal window

Problem:    Cannot use CTRL-W <Down> to move out of a terminal window.
Solution:   Use special_to_buf() instead of mb_char2bytes(). (closes vim/vim#7045)
f43e7ac4ee

vim-patch:8.2.1774: GTK: hang when forced to exit

Problem:    GTK: hang when forced to exit.
Solution:   Do not clean up "mainwin" when really_exiting is set.
            (Zdenek Dohnal, closes vim/vim#7042)
32fbc4f247

vim-patch:8.2.1776: filetype.vim may be loaded twice

Problem:    Filetype.vim may be loaded twice.
Solution:   Do "syntax on" after "filetype on". (Adam Stankiewicz,
            closes vim/vim#7049)
17bb4d4607
2020-09-30 20:58:36 -04:00
c007b961f5 Merge pull request #12733 from KillTheMule/lnume
[RDY]: Fix buffer_updates on blockwise paste
2020-09-30 22:34:41 +02:00
02dcc3c11a Fix byte updates for blockwise paste at buffer end 2020-09-30 21:28:21 +02:00
c1a740ae33 bytetrack: add blockwise paste test 2020-09-30 20:10:06 +02:00
ba515622fb Fix buffer_updates on blockwise paste
Fixes #12718.
2020-09-30 20:10:05 +02:00
e5d98d8569 LSP: Fix separator width on hover (fixes #13006, #12998) (#13007)
* fix insert_separator conditional
* only draw separator over wrapped width
2020-09-30 18:03:40 +02:00
3c5141d2cf treesitter: add string parser (#13008) 2020-09-30 09:32:43 -04:00
d5adc8c00e Merge pull request #12903 from justinmk/checkcores
lua/check_cores(): check uname instead of TRAVIS_OS_NAME
2020-09-30 08:18:05 +02:00
d0d1f0f9a6 Merge pull request #13012 from janlazo/vim-8.1.1965
vim-patch:8.1.{1965,1970,1980,1992},8.2.0840
2020-09-29 22:34:00 -04:00
0d100032b8 vim-patch:8.2.0840: search match count wrong when only match is in fold
Problem:    Search match count wrong when only match is in fold.
Solution:   Update search stats when in a closed fold. (Christian Brabandt,
            closes vim/vim#6160, closes vim/vim#6152)
6cb0726215
2020-09-29 21:36:00 -04:00
83ebe0c998 vim-patch:8.1.1992: the search stat moves when wrapping at the end of the buffer
Problem:    The search stat moves when wrapping at the end of the buffer.
Solution:   Put the "W" in front instead of at the end.
16b58ae9f3
2020-09-29 21:36:00 -04:00
a307489a79 vim-patch:8.1.1980: fix for search stat not tested
Problem:    Fix for search stat not tested.
Solution:   Add a screenshot test. (Christian Brabandt)
0f63ed33fd
2020-09-29 19:45:06 -04:00
37c6cbc758 vim-patch:8.1.1970: search stat space wrong, no test for 8.1.1965
Problem:    Search stat space wrong, no test for 8.1.1965.
Solution:   Fix check for cmd_silent.  Add a test. (Christian Brabandt)
19e8ac72e9
2020-09-29 19:30:29 -04:00
621f7b607f vim-patch:8.1.1965: search count message is not displayed when using a mapping
Problem:    The search count message is not displayed when using a mapping.
            (Gary Johnson)
Solution:   Ignore cmd_silent for showing the search count. (Christian
            Brabandt)
359ad1a6f9
2020-09-29 19:23:46 -04:00
090551a802 Merge pull request #12996 from teto/foldcol
folds: pass column on fold creation
2020-09-29 06:40:10 +02:00
6f2138eb03 vim-patch:8.2.1757: Mac: default locale is lacking the encoding (#12994)
vim-patch:8.2.1757: Mac: default locale is lacking the encoding

Problem:    Mac: default locale is lacking the encoding.
Solution:   Add ".UTF-8 to the locale. (Yee Cheng Chin, closes vim/vim#7022)
a5fe91e6dc

Cherry-pick test_environ.vim changes from patch 8.2.1432.
2020-09-28 20:20:48 -04:00
12fdb114d1 folds: pass column on fold creation
useful if we want to have inline folds later and/or let users create
folds that remember their start/end columns.
2020-09-28 23:53:10 +02:00
f520c1ef85 test: Fix failing test in case of special .bashrc (#12920)
The test of "replace environment" in the test module of
`test/functional/core/job_spec.lua` failed in case the bashrc file of
the user running the test has special actions in it (such actions were
printing to the screen from inside this file, or changing the bash mode
to be vi).

In order to fix this problem, the test now sets the shell to be
`/bin/sh` before running the command. Setting the shell to be `/bin/sh`
causes the running shell to run without the configuration of the user,
and so the test passes even in case of special .bashrc.
This change was done only for platforms other than Windows since it is
not relevant in windows.

The fix was applied to the specific test, even though it is possible
that related issues will arise in other tests. It seems like a big
overhead to make the fix work on all the possible tests, and it does not
worth this cost.
2020-09-28 22:20:49 +02:00
c5ceefca79 vim-patch:8.2.1754: completion with spell checking not tested (#12992)
vim-patch:8.2.1754: completion with spell checking not tested

Problem:    Completion with spell checking not tested.
Solution:   Add a test case. (Dominique Pellé, closes vim/vim#7024)
8c7ad3631a

Cherry-pick GetMessages() from patch 8.2.0666.
Comment out the code that checks for "Messages maintainer:" line
because Neovim's ":messages" command does not output it
and patches for the "methods" feature (ie. foo->bar) are not ported yet.

https://github.com/neovim/neovim/pull/5160
2020-09-27 15:08:41 -04:00
8bc55f656a Merge pull request #12922 from AlxHnr/master
Use HTTPS for downloading spell files
2020-09-27 09:29:23 -04:00
430ad9ab20 Merge pull request #12986 from janlazo/vim-8.2.1738
vim-patch:8.1.{524,1613},8.2.{1088,1713,1715,1717,1721,1725,1735,1738,1745}
2020-09-26 11:56:45 -04:00
e22c15682a test/old: enable passing tests
Some TODO tests are passing now.

test_override('ALL', 1) clears previous overrides
so it's safe to comment out and execute the test.

Replace test_feedinput() with nvim_input().
Replace test_setmouse with nvim_input_mouse().
Note that test_setmouse is 1-based and nvim_input_mouse is 0-based.
2020-09-26 10:14:50 -04:00
c14d2399f6 doc: test_garbagecollect_now() was ported 2020-09-26 10:14:50 -04:00
25b9a400a9 vim-patch:8.2.1725: not all Pascal files are recognized
Problem:    Not all Pascal files are recognized.
Solution:   Add filetype patterns. (Doug Kearns)
44aaf5416e
2020-09-26 10:14:50 -04:00
6e6b660e95 vim-patch:8.2.1088: a very long translation might cause a buffer overflow
Problem:    A very long translation might cause a buffer overflow.
Solution:   Trunctate the message if needed.
6378b21d6d

N/A patches for version.c:

vim-patch:8.1.0524: terminal test fails on Windows

Problem:    Terminal test fails on Windows.
Solution:   Skip Test_terminal_does_not_truncate_last_newlines() for now.
c2c02574ec

vim-patch:8.1.1613: popup window test fails with Athena and Motif

Problem:    Popup window test fails with Athena and Motif.
Solution:   Compute the highlight attribut when the GUI is not active.
a83e70000f

vim-patch:8.2.1713: Motif GUI: crash when setting menu colors

Problem:    Motif GUI: crash when setting menu colors. (Andrzej Bylicki)
Solution:   Add {} to make "n" incremented correctly. (closes vim/vim#6989,
        closes vim/vim#5948)
7795bfea6d

vim-patch:8.2.1715: Motif GUI: commented out code missed {}

Problem:    Motif GUI: commented out code missed {}.
Solution:   Add {} and reenable the code. (similar to vim/vim#6989)
26cd3063b2

vim-patch:8.2.1717
Problem:    MS-Windows installer doesn't have Russian translations.
Solution:   Add Russian translations. (closes vim/vim#6985)
809fcecddc

vim-patch:8.2.1721: MS-Windows installer doesn't work

Problem:    MS-Windows installer doesn't work.
Solution:   Write "Russian" in ASCII. (closes vim/vim#6995, see #).
7f9c9c51a3

vim-patch:8.2.1735: Github actions appear to timeout too soon

Problem:    Github actions appear to timeout too soon.
Solution:   use "timeout" instead of "ping".
851d108313

vim-patch:8.2.1738: Mac: str2float() recognizes comma instead of decimal point

Problem:    Mac: str2float() recognizes comma instead of decimal point.
Solution:   Set LC_NUMERIC to "C". (closes vim/vim#7003)
509f8031b2

vim-patch:8.2.1745: tiny version doesn't build

Problem:    Tiny version doesn't build.
Solution:   Add dummy ex_var() function.
d47f50b331
2020-09-26 10:14:42 -04:00
4a996bc431 lsp: Add vim.lsp.buf.range_code_action() (#12962)
Allows to execute code_action for a given range.
:'<,'>lua vim.lsp.buf.range_code_action()
2020-09-24 21:53:08 +02:00
f1fbb9e9ca Merge pull request #12515 from teto/remove-foldline-final
screen.c: remove fold_line
2020-09-24 21:48:53 +02:00
a958039f0a screen: more work on fold_line replacement 2020-09-24 19:31:58 +02:00
f8134f2fd1 screen.c: remove fold_line
as well as copy_text_attr, text_to_screenline.
Display of folded line is now done via win_line, which reduces code
deduplication.
As fold_line was a trimmed down version of win_line, this change brings
new features such CursorLineNr highighting even on folded line, as well
as CursorLine highlighting.
2020-09-24 15:43:25 +02:00
b9ceac4650 Merge pull request #12955 from vigoux/vim-8.2.0953
[RFC] vim-patch:8.2.{0953,0955,0956,1678}
2020-09-24 09:10:52 +02:00
ca28cf5362 vim-patch:8.2.1678: crash when using ":set" after ":ownsyntax"
Problem:    Crash when using ":set" after ":ownsyntax".
Solution:   Make sure 'spelloptions' is not NULL. (closes vim/vim#6950)
d1f76afaf9
2020-09-24 08:09:38 +02:00
0b42e3fedb vim-patch:8.2.0956: spell test fails
Problem:    Spell test fails.
Solution:   Add missing change the spell checking.
e0ebeda4d8
2020-09-24 08:09:38 +02:00
cf4543a564 vim-patch:8.2.0955: build fails
Problem:    Build fails.
Solution:   Add missing struct change.
215f49c4d7
2020-09-24 07:13:39 +02:00
a08959bc7a vim-patch:8.2.0953: spell checking doesn't work for CamelCased words
Problem:    Spell checking doesn't work for CamelCased words.
Solution:   Add the "camel" value in the new option 'spelloptions'.
            (closes vim/vim#1235)
362b44bd4a
2020-09-24 07:13:39 +02:00
4f8d98e583 lsp: Handle ContentModified the same way as RequestCancelled (#12803)
* Added the ContentModified error to be hidden from users, like RequestCancelled
* Fixed tests (and ill-formed lua code)
* Simplified if-expression
2020-09-22 21:54:34 +02:00
78539dda95 Merge pull request #12888 from nguymin4/update-cfilter
vim-patch: Update cfilter to 1.1
2020-09-21 19:02:03 -04:00
bd7360b39a funding: Bountysource Salt -> GitHub Sponsors & Open Collective [ci skip] (#12959)
We have a GitHub Sponsors page for the neovim organization now:

  - https://github.com/sponsors/neovim

It can be reached by clicking on the "Sponsor" button on the
[organization page](https://github.com/neovim).

This commit replaces Salt by GitHub Sponsors and Open Collective.
2020-09-21 20:47:02 +02:00
dc4f81b49c Update doc
vim/vim@8ffc7c8b

vim-patch:8.1.1281
2020-09-21 11:29:51 +03:00
f8e5c6e99d Sync cfilter 1.1 from vim
vim/vim@fc65cabb
2020-09-21 11:29:02 +03:00
42d13b90fe Merge pull request #12945 from jamessan/has_include-fix
Only use __has_include when it is defined
2020-09-20 14:57:20 -04:00
461c18edad Only use __has_include when it is defined
Per GCC's documentation:

> The __has_include operator by itself, without any operand or parentheses, acts as a predefined macro so that support for it can be tested in portable code. Thus, the recommended use of the operator is as follows:
>
>     #if defined __has_include
>     #  if __has_include (<stdatomic.h>)
>     #    include <stdatomic.h>
>     #  endif
>     #endif
>
> The first ‘#if’ test succeeds only when the operator is supported by the version of GCC (or another compiler) being used. Only when that test succeeds is it valid to use __has_include as a preprocessor operator.
2020-09-20 11:45:56 -04:00
9f704c88a5 Merge pull request #12938 from janlazo/vim-8.1.0285
vim-patch:8.1.{285,1782,1972,2261,2263},8.2.{240,817,824,1549,1676,1696}
2020-09-19 17:40:55 -04:00
905c2eb359 Merge pull request #12939 from bfredl/pastetest
test: buffer updates: add visual charwise paste test
2020-09-19 18:12:44 +02:00
df46f91977 vim-patch:8.1.2263: 'noesckeys' test fails in GUI
Problem:    'noesckeys' test fails in GUI.
Solution:   Skip the test in the GUI.
215ba3b636

Cherry-pick "CheckNotGui" command from patch 8.1.1826.
2020-09-19 10:57:57 -04:00
17106b96e9 vim-patch:8.1.2261: with modifyOtherKeys set 'noesckeys' doesn't work
Problem:    With modifyOtherKeys set 'noesckeys' doesn't work. (James McCoy)
Solution:   Disable modifyOtherKeys while in Insert mode when 'noesckeys' is
            set. (closes vim/vim#5180)
177c9f2f06
2020-09-19 10:57:57 -04:00
d3e0d29919 vim-patch:8.2.0824: still not enough memory allocated when converting string
Problem:    Still not enough memory allocated when converting string with
            special character.
Solution:   Reserve space for expanding K_SPECIAL. (closes vim/vim#6130)
1919371b2b
2020-09-19 10:57:57 -04:00
ccfb69ab36 vim-patch:8.2.0817: not enough memory allocated when converting string
Problem:    Not enough memory allocated when converting string with special
            character.
Solution:   Reserve space for modifier code. (closes vim/vim#6130)
f7271e8316

Cherry-pick Test_eval(), Test_nr2char() from patch 8.2.0448.
2020-09-19 10:57:57 -04:00
31513a6f2d vim-patch:8.1.1972: no proper test for getchar()
Problem:    No proper test for getchar().
Solution:   Add a test with special characters.
5d712e4672

N/A patches for version.c:

vim-patch:8.1.0285: compiler warning for conversion

Problem:    Compiler warning for conversion.
Solution:   Add a type cast. (Mike Williams)
d7cc163570

vim-patch:8.1.1782: MS-Windows: system() has temp file error with 'noshelltemp'

Problem:    MS-Windows: system() has temp file error with 'noshelltemp'.
Solution:   Check s_dont_use_vimrun. (Ken Takata, closes vim/vim#4754)
0e6bfb9b2e

vim-patch:8.2.0240: using memory after it was freed

Problem:    Using memory after it was freed. (Dominique Pelle)
Solution:   Do not mix converion buffer with other buffer.
408030e8d0

vim-patch:8.2.1549: "r" fails if 'esckeys' is off and modifyOtherKeys is used

Problem:    The "r" command fails for keys with modifiers if 'esckeys' is off
            and modifyOtherKeys is used. (Lauri Tirkkonen)
Solution:   Temporarily disable bracketed paste and modifyOtherKeys if
            'esckeys' is off. (closes vim/vim#6809)
ca774f6753

vim-patch:8.2.1676: compiler warnings for function typecast

Problem:    Compiler warnings for function typecast.
Solution:   Add an intermediate cast to "void *".
a4224860a4

vim-patch:8.2.1696: unused (duplicate) macros

Problem:    Unused (duplicate) macros.
Solution:   Remove the macros.
2c12f89055
2020-09-19 10:57:35 -04:00
3610d0091f test: buffer updates: add visual charwise paste test 2020-09-19 15:50:35 +02:00
cea2417f30 Merge pull request #12935 from vigoux/byte-change-lines
buf_updates: fix wrong updates on linewise change
2020-09-19 11:02:32 +02:00
2f2c73265f lint: is lint 2020-09-19 10:14:13 +02:00
0ba2b955af util: make __asan_* prototypes available for ENHANCED printf debuging 2020-09-19 10:05:27 +02:00
b7fc7ac6a1 buffer updates: fix issues with "change" operator 2020-09-19 10:01:00 +02:00
4cc2a7af4b tests: lua buffer updates: reorg check_events() 2020-09-19 09:58:31 +02:00
179f0bca18 buf_updates: fix wrong updates on linewise change 2020-09-18 17:54:49 +02:00
569e75799d lsp: remove popup No signature available. (#12915)
* lsp: remove popup No signature available.

 If no signatures. we shouldn't popup No signature available ..It will make noise when use
` api.nvim_command("autocmd CompleteDone <buffer> lua vim.lsp.buf.signature_help()")`

* fix ci test failed remove whitespace

* print message when no signature help

* Add comment
2020-09-18 09:37:53 -04:00
6dc815530b buf_updates: fix updates for empty buffers (#12926)
On empty buffers, when editing the first line, the line is buffered, causing offset to be < 0. While the buffer is not actually empty, the buffered line has not been flushed (and should not be) yet, so the call is valid but an edge case.
2020-09-17 23:34:28 +02:00
2d9ae21664 Merge pull request #12872 from nvim-treesitter/extmarks-wrong-boundcheck
Extmarks: allow to set extranges past final newline
2020-09-17 22:59:20 +02:00
cecc45efb1 api(extmarks): allow extrange past final newline 2020-09-17 21:23:52 +02:00
53efdedca9 runtime: update g:spellfile_URL to URL used in Vim 8
See vim/vim@7ff7846
2020-09-17 13:31:55 +02:00
d4b4335fe3 Merge pull request #12911 from vigoux/bytetrack-formatoption-ro
treesitter: filter updates on <CR>
2020-09-16 19:53:39 +02:00
9a7f111db6 treesitter: filter updates on <CR>
This fixes an error when fo=ro, when hitting <CR> to insert a new
comment line.
2020-09-16 16:35:17 +02:00
aa98527ce7 Merge pull request #12917 from bfredl/bytes_setline
buf_attach: fix buffer updates with setline()
2020-09-16 16:34:24 +02:00
cf522488cc Merge pull request #12914 from janlazo/vim-8.2.1675
vim-patch:8.1.{2108,2222,2338},8.2.{637,1526,1675,1684}
2020-09-16 08:51:28 -04:00
34c0f7af04 buf_attach: fix buffer updates with setline() 2020-09-16 13:50:16 +02:00
c3f4610922 Merge pull request #12912 from nvim-treesitter/treesitter-docs
docs: Move treesitter docs in their own file
2020-09-16 10:07:51 +02:00
2ed48e71d3 vim-patch:8.1.2222: accessing invalid memory
Problem:    Accessing invalid memory. (Dominique Pelle)
Solution:   Reset highlight_match every time.  (closes vim/vim#5125)
7ab5d77666
2020-09-15 23:00:35 -04:00
ba16475549 vim-patch:8.1.2108: cannot close the cmdline window from CmdWinEnter
Problem:    Cannot close the cmdline window from CmdWinEnter. (George Brown)
Solution:   Reset cmdwin_result earlier. (Christian Brabandt, closes vim/vim#4980)
23324a0b35
2020-09-15 23:00:35 -04:00
eb981a01e3 vim-patch:8.2.1684: "gF" does not use line number after file in Visual mode
Problem:    "gF" does not use line number after file in Visual mode.
Solution:   Look for ":123" after the Visual area. (closes vim/vim#6952)
efd5d8a967

Cherry-pick test_gf_visual changes from patch 8.2.1040.
2020-09-14 18:54:07 -04:00
cc484928d5 vim-patch:8.2.0637: incsearch highlighting does not work for ":sort!"
Problem:    Incsearch highlighting does not work for ":sort!".
Solution:   Skip over the exclamation point. (closes vim/vim#5983)
333015a46e
2020-09-14 18:19:45 -04:00
ea03032018 vim-patch:8.1.2338: using Visual mark sith :s gives E20 if not set
Problem:    Using Visual mark sith :s gives E20 if not set.
Solution:   Ignore errors when handling 'incsearch'. (closes vim/vim#3837)
c672525b48

N/A patches for version.c:

vim-patch:8.2.1526: line in testdir Makefile got commented out

Problem:    Line in testdir Makefile got commented out. (Christian Brabandt)
Solution:   Revert.
228e62975e

vim-patch:8.2.1675: MinGW: testdir makefile deletes non-existing file

Problem:    MinGW: testdir makefile deletes non-existing file.
Solution:   Use another way to delete the output file if it already exists.
            (Michael Soyka)
05c1acd5e1
2020-09-14 18:19:45 -04:00
484a6d3205 vim-patch:8.2.1677: memory access errors when calling setloclist() in autocommand
Problem:    Memory access errors when calling setloclist() in an autocommand.
Solution:   Give an error if the list was changed unexpectedly. (closes vim/vim#6946)
4d170af0a9
2020-09-15 03:29:18 +09:00
924cab4cef docs: Move treesitter docs in their own file 2020-09-14 19:04:33 +02:00
f34eeba2d8 lsp: fix failed switch window error (#12900)
* fix failed switch window error

* checks if  window already exists
2020-09-14 11:03:02 -04:00
4a2618c817 doc: Add docs for uri functions (#12887) 2020-09-14 09:12:17 -04:00
20f7b94284 Merge pull request #12905 from janlazo/vim-8.1.0555
vim-patch:8.1.{499,555,556,584,640,1148,1704},8.2.0902
2020-09-13 12:46:32 -04:00
80eafef3bb vim-patch:8.1.0489: crash when autocmd clears vimpgrep location list
Problem:    Crash when autocmd clears vimpgrep location list.
Solution:   Return from qf_jump_edit_buffer() early. (Yegappan Lakshmanan)
b6f1480a6a
2020-09-14 00:31:19 +09:00
8105fc89c4 vim-patch:8.1.1704: C-R C-W does not work after C-G when using 'incsearch'
Problem:    C-R C-W does not work after C-G when using 'incsearch'.
Solution:   Put cursor at end of the match. (Yasuhiro Matsumoto, closes vim/vim#4664)
69a5b86794
2020-09-13 08:25:20 -04:00
25992df761 vim-patch:8.1.1148: CTRL-L with 'incsearch' does not pick up char under cursor
Problem:    CTRL-L with 'incsearch' does not pick up char under cursor.
            (Smylers)
Solution:   Do not compare the position with the cursor position. (Hirohito
            Higashi, closes vim/vim#3620)
730f48fe36
2020-09-13 08:25:20 -04:00
476c50903a vim-patch:8.1.0499: :2vimgrep causes an ml_get error
Problem:    :2vimgrep causes an ml_get error
Solution:   Pass tomatch pointer instead of value. (Yegappan Lakshmanan)
1c29943416
2020-09-13 08:25:20 -04:00
cc049a5612 vim-patch:8.1.0640: get E14 while typing command :tab with 'incsearch' set
Problem:    Get E14 while typing command :tab with 'incsearch' set.
Solution:   Do not give an error when looking for the command. (Yasuhiro
            Higashi)
548e598573
2020-09-13 08:25:20 -04:00
4327fe8da5 vim-patch:8.2.0902: using searchcount() in 'statusline' causes an error
Problem:    Using searchcount() in 'statusline' causes an error.
Solution:   Avoid saving/restoring the search patten recursively.
            (closes vim/vim#6194)
442a85369f
2020-09-13 08:25:20 -04:00
ce32545708 vim-patch:8.1.0556: saving/restoring search patterns share saved last_idx
Problem:    Saving/restoring search patterns share saved last_idx.
Solution:   Use a separate saved last_idx for saving search patterns for
            functions and incremental search.
ed8bc78d23
2020-09-13 08:25:19 -04:00
870f88f387 vim-patch:8.1.0584: with search CTRL-L does not pick up composing characters
Problem:    With search CTRL-L does not pick up composing characters.
Solution:   Check for composing characters. (Christian Brabandt, closes vim/vim#3682)
            [code change was accidentally included in 8.1.0579]
5f5e203c92
2020-09-13 08:25:19 -04:00
d5eff30c72 vim-patch:8.1.0555: crash when last search pat is set but not last substitute pat
Problem:    Crash when last search pat is set but not last substitute pat.
Solution:   Do not mix up last search pattern and last subtitute pattern.
            (closes vim/vim#3647)
2fb8f684d8
2020-09-13 08:25:19 -04:00
c7ef802206 Merge pull request #12841 from bfredl/buf_do
nvim_buf_call to call function in the context of another buffer
2020-09-13 12:04:38 +02:00
ead2fcf4ee api: add nvim_buf_call to call function with curbuf changed to buffer 2020-09-13 09:11:38 +02:00
542022aae4 Merge pull request #12851 from bfredl/luahl
luahl: still WIP but better
2020-09-13 08:29:49 +02:00
2c15f695a8 luahl: temporary workaround for virt_text ownership ambiguity 2020-09-13 07:46:39 +02:00
4042975df4 luahl: global the luahl 2020-09-13 07:46:39 +02:00
05c68922d3 Fix typo in treesitter docs: parser directory is parser not parsers 2020-09-13 07:46:39 +02:00
e4b5efa51e fix: use luahl in treesitter 2020-09-13 07:46:39 +02:00
18a3a89822 luahl 2020-09-13 07:46:39 +02:00
4d3ef578e9 Merge pull request #12883 from janlazo/vim-8.2.1640
vim-patch:8.1.{1296,1297,1298},8.2.{1640,1645,1646,1648,1649,1654,1655,1661}
2020-09-12 15:04:56 -04:00
46f973edf0 vim-patch:8.1.0431: the qf_jump() function is too long
Problem:    The qf_jump() function is too long.
Solution:   Refactor to split it into several functions. (Yegappan Lakshmanan)
6dae96ef7a
2020-09-13 03:48:22 +09:00
397be5d380 UI: fix cursor not displayed after hiding and un-hiding #12811
- TUI: Fix a case where the cursor was not displayed after hiding the
  cursor and then setting it to be displayed again.
- Change to reset everything before setting guicursor.

fixes #12800
close #12811

Steps to reproduce:

    nvim -u NORC
    :set termguicolors
    :hi nCursor guifg=red guibg=red
    :hi iCursor guifg=green guibg=green
    :hi cCursor guifg=blue guibg=blue
    :set guicursor=n:block-nCursor,i:hor25-iCursor,c:ver25-cCursor
    :set guicursor-=c:ver25-cCursor

Actual behaviour: Cursor is a blue vertical.
Expected behaviour: Cursor should be the default color block.
2020-09-12 11:42:42 -07:00
34e4d2f25e lua/check_cores(): check uname instead of TRAVIS_OS_NAME 2020-09-12 11:12:04 -07:00
1e10342382 docs: Add hint for :help vim.lsp.buf for new users (#12886)
* docs: Add hint for :help vim.lsp.buf for new users

* fix: Use help linker for vim.lsp.buf

* docs: Extend full api list language. Move gd to bottom. Add note about limited support
2020-09-12 13:01:14 -04:00
01ae5e7c38 lsp: fix lsp.buf.formatting_sync() null response (#12752)
Co-authored-by: tim apple <tim@tims-MacBook-Pro.local>
2020-09-12 18:39:52 +02:00
f3b5531ae8 lsp: Fix parameter markdown rendering for signature help (#12832) 2020-09-12 18:33:31 +02:00
97c03227c8 docs: Use nvim-lspconfig plugin in lsp docs (#12885)
* docs: Use nvim-lspconfig plugin in lsp docs
2020-09-12 17:52:30 +02:00
b23907e7ce Merge pull request #12721 from aufarg/vim-8.1.0265
[RDY] vim-patch:8.1.{265,271,273,274,275,277,278,279,280,281,282,284,286,291,295,296,320,321,339,351,392,399,552}
2020-09-12 10:51:59 -04:00
459f8ad808 docs: Align help docs to match using tab (#12891) 2020-09-12 16:48:16 +02:00
20b745b45b vim-patch:8.1.1298: invalid argument test fails without X clipboard
Problem:    Invalid argument test fails without X clipboard.
Solution:   Test -display only with the +xterm_clipboard feature.
5416b75031

N/A patches for version.c:

vim-patch:8.2.1640: Amiga: missing header for getgrgid()

Problem:    Amiga: missing header for getgrgid().
Solution:   Add the grp.h header. (Ola Söder, closes vim/vim#6906)
f842cd9e28

vim-patch:8.2.1645: GTK3: icons become broken images when resized

Problem:    GTK3: icons become broken images when resized.
Solution:   Use gtk_image_new_from_icon_name(). (closes vim/vim#6916)
            Fix compiler warnings.
81a4cf469a

vim-patch:8.2.1646: Amiga: Unnecessary #include

Problem:    Amiga: Unnecessary #include.
Solution:   Remove the #include. (Ola Söder, closes vim/vim#6908)
33e3346322

vim-patch:8.2.1648: Amiga: no common build file for Amiga (-like) systems

Problem:    Amiga: no common build file for Amiga (-like) systems.
Solution:   Turn Make_morph.mak into Make_ami.mak. (Ola Söder, closes vim/vim#6805)
a62372be1f

vim-patch:8.2.1649: GTK3: using old file chooser

Problem:    GTK3: using old file chooser.
Solution:   Use native file chooser on GTK 3.20 and above. (Yogeshwar
            Velingker, closes vim/vim#6909)
3e4cc9671c

vim-patch:8.2.1654: when job writes to hidden buffer current window is wrong

Problem:    When job writes to hidden buffer current window has display
            errors.  (Johnny McArthur)
Solution:   Use aucmd_prepbuf() instead of switch_to_win_for_buf().
            (closes vim/vim#6925)
ad9ec5e799

vim-patch:8.2.1655: cannot build with Strawberry Perl 5.32.0

Problem:    Cannot build with Strawberry Perl 5.32.0.
Solution:   Use Perl_sv_2pvbyte_flags. (closes vim/vim#6921)
895a7a472d

vim-patch:8.2.1661: cannot connect to 127.0.0.1 for host with only IPv6 addresses

Problem:    Cannot connect to 127.0.0.1 for host with only IPv6 addresses.
Solution:   pass AI_V4MAPPED flag to getaddrinfo. (Filipe Brandenburger,
            closes vim/vim#6931)
c6a67c92bc
2020-09-11 18:34:25 -04:00
2ab6ec9e48 vim-patch:8.1.1297: invalid argument test fails without GTK
Problem:    Invalid argument test fails without GTK.
Solution:   Test -display and --display separately.
240f7abab0
2020-09-11 18:23:47 -04:00
978dd99f45 vim-patch:8.1.1296: crash when using invalid command line argument
Problem:    Crash when using invalid command line argument.
Solution:   Check for options not being initialized.
27821260c0
2020-09-11 18:23:46 -04:00
997147e4bb Merge pull request #12889 from vigoux/bytetrack-open-line
Fix invalid events with `o` `<CR>` and `autoindent`
2020-09-11 19:30:46 +02:00
a8f71676a1 fix(bufupdates): avoid sending empty updates 2020-09-11 14:48:10 +02:00
f0e258cf85 fix(bytetrack): send correct events when opening lines
a bit of test cleanup

ärrår

feeel

SPLIT

fix: sned correct updates on <CR>
2020-09-11 14:38:58 +02:00
466ff35dfd vim-patch:8.1.0552: saved last search pattern may not be restored
Problem:    Saved last search pattern may not be restored.
Solution:   Call restore_last_search_pattern().  Add a check for balancing
            saving and restoring the last search pattern.
01a060da74
2020-09-11 10:37:52 +08:00
f7d2e37e36 vim-patch:8.1.0399: 'hlsearch' highlight remains in other window
Problem:    'hlsearch' highlight remains in other window after cancelling
            command.
Solution:   Redraw all windows. Also remove unnecessary delays. (closes vim/vim#3437)
65985ac998
2020-09-11 10:37:52 +08:00
112092fa15 vim-patch:8.1.0392: error while typing :/foo/s// with 'incsearch' enabled
Problem:    Error while typing :/foo/s// with 'incsearch' enabled.
Solution:   Do not give search errors when highlighting matches.
50eb16c3b2
2020-09-11 10:37:52 +08:00
b0042cafc0 vim-patch:8.1.0356: using :s with 'incsearch' prevents CTRL-R CTRL-W
Problem:    Using :s with 'incsearch' prevents CTRL-R CTRL-W. (Boris Staletic)
Solution:   When past the pattern put cursor back in the start position.
            (closes vim/vim#3413)
99f043a57d
2020-09-11 10:37:52 +08:00
e2dc2a6bd7 vim-patch:8.1.0351: 'incsearch' for :/foo/s//<Esc> changes last search pattern
Problem:    'incsearch' for :/foo/s//<Esc> changes last search pattern.
Solution:   Save the last search pattern earlier.
198cb66d65
2020-09-11 10:37:52 +08:00
b59c293c25 vim-patch:8.1.0339: wrong highlight when 'incsearch' set and cancelling :s
Problem:    Wrong highlight when 'incsearch' set and cancelling :s.
Solution:   Reset search line range. (Hirohito Higashi, Masamichi Abe)
f13daa46da
2020-09-11 10:37:52 +08:00
f2743cfb65 vim-patch:8.1.0321: 'incsearch' regression: /\v highlights everything
Problem:    'incsearch' regression: /\v highlights everything.
Solution:   Put back the empty_pattern() check.
4edfe2d2a2
2020-09-11 10:37:52 +08:00
4770a2bac5 vim-patch:8.1.0320: too much 'incsearch' highlight for pat matching everything
Problem:    Too much 'incsearch' highlight for pattern matching everything.
Solution:   Add the skiplen to the command and remove the line range.
            (Christian Brabandt)  Check for empty pattern earlier.
8b0d5ce881
2020-09-11 10:37:52 +08:00
5f5d08a88e vim-patch:8.1.0296: command parsing for 'incsearch' is a bit ugly
Problem:    Command parsing for 'incsearch' is a bit ugly.
Solution:   Return when there is no pattern.  Put common checks together.
111bbd61e9
2020-09-11 10:37:52 +08:00
77bb48e740 vim-patch:8.1.0295: no 'incsearch' highlighting for :vimgrep and similar
Problem:    No 'incsearch' highlighting for :vimgrep and similar commands.
Solution:   Parse the :vimgrep command and similar ones to locate the search
            pattern. (Hirohito Higashi, closes vim/vim#3344)
264cf5cfaf
2020-09-11 10:33:20 +08:00
ab7e101540 vim-patch:8.1.0291: 'incsearch' highlighting not used for :sort
Problem:    'incsearch' highlighting not used for :sort.
Solution:   Handle pattern in :sort command.
81f56536b1
2020-09-11 10:33:20 +08:00
c0102c140c vim-patch:8.1.0286: 'incsearch' does not apply to :smagic and :snomagic
Problem:    'incsearch' does not apply to :smagic and :snomagic.
Solution:   Add support. (Hirohito Higashi)
167ae42685
2020-09-11 10:33:20 +08:00
68f6abef16 vim-patch:8.1.0284: 'cursorline' highlighting wrong with 'incsearch'
Problem:    'cursorline' highlighting wrong with 'incsearch'.
Solution:   Move the cursor back if the match is outside the range.
2f6a346a4c
2020-09-11 10:33:20 +08:00
b24dabf266 vim-patch:8.1.0282: 'incsearch' does not work with command modifiers
Problem:    'incsearch' does not work with command modifiers.
Solution:   Skip command modifiers.
33c4dbb74b
2020-09-11 10:33:20 +08:00
ba59ee9a15 ex_docmd: merge parse_state_T with exarg_T 2020-09-11 10:33:20 +08:00
9a6fd99a4b vim-patch:8.1.0281: parsing command modifiers is not separated
Problem:    Parsing command modifiers is not separated.
Solution:   Move command modifier parsing to a separate function.
effed9315c
2020-09-11 10:31:41 +08:00
841ec4316c vim-patch:8.1.0280: 'incsearch' highlighting does not work for ":g!/"
Problem:    'incsearch' highlighting does not work for ":g!/".
Solution:   Skip the exclamation mark. (Hirohito Higashi)
def7b1dc61
2020-09-11 10:31:41 +08:00
8ae47ddf63 vim-patch:8.1.0279: 'incsearch' highlighting does not skip white space
Problem:    'incsearch' highlighting does not skip white space.
Solution:   Skip white space after the command. (issue vim/vim#3321)
2b926fcb3c
2020-09-11 10:31:41 +08:00
83f3218b28 vim-patch:8.1.0278: 'incsearch' highlighting does not accept reverse range
Problem:    'incsearch' highlighting does not accept reverse range.
Solution:   Swap the range when needed. (issue vim/vim#3321)
60d0871000
2020-09-11 10:31:41 +08:00
50da4d4f45 vim-patch:8.1.0277: 'incsearch' highlighting wrong in a few cases
Problem:    'incsearch' highlighting wrong in a few cases.
Solution:   Fix using last search pattern.  Restore highlighting when changing
            command. (issue vim/vim#3321)
c7f08b7ee1
2020-09-11 10:31:41 +08:00
dd08f6367b vim-patch:8.1.0275: 'incsearch' with :s doesn't start at cursor line
Problem:    'incsearch' with :s doesn't start at cursor line.
Solution:   Set cursor before parsing address. (closes vim/vim#3318)
            Also accept a match at the start of the first line.
976b847f43
2020-09-11 10:31:41 +08:00
9e834a89df vim-patch:8.1.0274: 'incsearch' triggers on ":source"
Problem:    'incsearch' triggers on ":source".
Solution:   Check for the whole command name.
21f990e1c2
2020-09-11 10:31:41 +08:00
5eb7133021 vim-patch:8.1.0273: invalid memory access when using 'incsearch'
Problem:    Invalid memory access when using 'incsearch'.
Solution:   Reset "patlen" when using previous search pattern.
ef73a28401
2020-09-11 10:31:41 +08:00
e8a8b9ed08 vim-patch:8.1.0271: 'incsearch' doesn't work for :s, :g or :v
Problem:    'incsearch' doesn't work for :s, :g or :v.
Solution:   Also use 'incsearch' for other commands that use a pattern.
b0acacd767
2020-09-11 10:31:41 +08:00
8ac4748577 vim-patch:8.1.0265: the getcmdline() function is way too big
Problem:    The getcmdline() function is way too big.
Solution:   Factor out the incremental search highlighting.
0ee81cb638
2020-09-11 10:29:12 +08:00
7ba28b1aed Merge pull request #12881 from bfredl/unexecute
lua: cleanup naming conventions of executor functions
2020-09-10 19:58:09 +02:00
5f3ddb195e lua: cleanup naming conventions of executor functions 2020-09-10 10:02:41 +02:00
5581ac88c6 Merge pull request #12568 from nvim-treesitter/bytetrack
Bytetrack
2020-09-10 08:50:42 +02:00
ef5e7b862d memline: do not attempt to cache line2byte()
This is irrelevant to neovim usecases anyway.
2020-09-10 06:50:04 +02:00
f239134fee tests: disable hl glitch test for now, will be fixed in luahl (next PR) 2020-09-10 06:50:04 +02:00
0f41caa265 snap: Fix snapcraft builds #12879
* Use upstream git repo as snap source.
* Fix typo in snapcraft.yaml
  Use latest_tag instead of branch because branch is undefined.
2020-09-09 20:41:03 -07:00
cf0e1bc1fe wip trying to fix the highlighter 2020-09-09 21:22:21 +02:00
82fb6a8818 fix lints 2020-09-09 21:22:21 +02:00
9437327d5e treesitter: use new on_bytes interface
This will significantly reduce the parsing work
needed e.g. when rehighlighting after every keypress
in insert mode.

Also add safety check for tree-sitter trying to read
past the end of a line. This can happen after we sent
an incorrect buffer update.
2020-09-09 21:22:21 +02:00
bc86f76c0a api/buffer: add "on_bytes" callback to nvim_buf_attach
This implements byte-resolution updates of buffer changes.
Note: there is no promise that the buffer state is valid inside
the callback!
2020-09-09 21:22:21 +02:00
81fa107f59 memline: cache byte offset of current line
When editing a line in insert mode, this value will be
used for every keypress.
2020-09-09 21:22:21 +02:00
333bfd5a29 extmark: use resonable names in extmark_splice 2020-09-09 21:22:21 +02:00
f42aa95fbc extmark: separate extmark_splice_cols for column-only change
as the byte logic will be the same for all of these
2020-09-09 21:22:21 +02:00
a621c45ba0 Merge pull request #12840 from vigoux/ts-hl-fixes
treesitter: fix some highlight issues
2020-09-09 19:02:16 +02:00
1ff064126d treesitter: revert wrong optimization in highlights 2020-09-09 16:00:19 +02:00
59712f6dbe win: avoid duplicate separators in $PATH #12869
Seems like redundant env var separators (";" on Windows) in $PATH can
cause weird behavior. From #7377:

> After some time, system(['win32yank', '-o']) and system('win32yank -o')
> start returning different results: specifically first returns an
> empty string.
>
> 1. $PATH weirdly contains double semicolon followed by path to the
>    “installation directory” (unpacked directory from archive).
> 2. If I run `let $PATH=substitute($PATH, ';;', ';', 'g')` the problem is fixed.

close #7377
ref 224f99b85d
2020-09-08 20:47:22 -07:00
df6b49b4ee vim-patch:8.2.1635: no digraph for 0x2022 BULLET #12876
Problem:    No digraph for 0x2022 BULLET.
Solution:   Use "oo". (Hans Ginzel, closes vim/vim#6904)
57ad94c5a9
2020-09-08 20:45:27 -07:00
aa45579206 win/env: fix stdpath()/XDG_* initialization, parsing #12829
- Windows environment variables are semicolon-separated, but some logic
  was assuming colon (:). This broke initialization and parsing of
  XDG_CONFIG_DIRS, XDG_DATA_DIRS, 'runtimepath', stdpath(), etc.
- test/defaults_spec: enable tests on Windows

ref #12793
2020-09-07 22:40:12 -07:00
6abbc157af Merge #12862 snap: multiarch, support luajit where possible 2020-09-07 21:43:13 -07:00
a90cd6e36a Merge #12868 vim-patch:8.2.{1625,1630,1633} 2020-09-07 17:03:19 -07:00
951ef21de5 vim-patch:8.2.1633: some error messages are internal but do not use iemsg()
Problem:    Some error messages are internal but do not use iemsg().
Solution:   Use iemsg(). (Dominique Pellé, closes vim/vim#6894)
e83cca2911

N/A patches for version.c:

vim-patch:8.2.1625: compiler warning for use of fptr_T

Problem:    Compiler warning for use of fptr_T.
Solution:   Make the type less strict.
30d6413782

vim-patch:8.2.1630: terminal test fails

Problem:    Terminal test fails.
Solution:   Correct argument to term_start().  Correct error number.
c98cdb3bc9
2020-09-07 18:42:15 -04:00
d8e6a0396a docs: update (#12860) 2020-09-06 19:55:49 -04:00
c1d395a6d6 UI: forward 'mousefocus' option #12863
close #12849
ref eb4aab7173
2020-09-06 11:40:07 -07:00
d6b280799f Merge pull request #12802 from jamessan/travis-ubuntu-bump 2020-09-06 12:52:37 -04:00
83a7b1b5db test/helpers: Run $SYMBOLIZER to decode sanitizer logs, if it is set 2020-09-06 12:09:36 -04:00
c3e6b6119c Merge pull request #12858 from kyazdani42/fix/no-ts-hl-without-query-value
treesitter: check hl group exists before passing it in nvim_get_hl_id_by_name
2020-09-06 17:18:47 +02:00
eae4b2a088 snap: migrate releases to snapcraft.io buils
Architectures supported by Travis due not match 1 to 1 to the
architectures supported by snapcraft.io and launchpad. To support as
many architectures as possible, deploys to the snap store should be done
via a simulated Github webhook. An additional secret will need to be
added to Travis-ci
2020-09-06 15:00:04 +00:00
1da67c1869 snap: drop snapcraft push release 2020-09-06 14:33:06 +00:00
7e0c4e5329 apply bfredl suggestion 2020-09-06 15:32:24 +02:00
a0b18464ab Merge pull request #11649 from vhakulinen/fix-blank-sections-with-multigrid
invalidate grid on allocation when in ext_multigrid
2020-09-06 13:23:20 +02:00
01b4601376 Merge pull request #12826 from vigoux/ts-lua-match
treesitter: use lua-match? instead of match?
2020-09-06 13:19:12 +02:00
280ee90f24 version.c: update [ci skip] (#12763)
vim-patch:8.1.0113: compiler warning for unused variable
vim-patch:8.1.0294: MS-Windows: sometimes uses short directory name
vim-patch:8.1.0297: MS-Windows: tests fail, Vim crashes
vim-patch:8.1.0338: MS-Windows: VTP doesn't work properly with Powershell
vim-patch:8.1.0718: a couple compiler warnings
vim-patch:8.1.0912: MS-Windows: warning for signed/unsigned
vim-patch:8.1.1130: MS-Windows: warning for unused variable
vim-patch:8.1.1219: not checking for NULL return from alloc()
vim-patch:8.1.1487: older msgfmt cannot generate proper .desktop file
vim-patch:8.1.1528: popup_any_visible() is unused
vim-patch:8.1.2252: compiler warning for int size
vim-patch:8.1.2323: Old MSVC version no longer tested.
vim-patch:8.1.2424: MS-Windows: console buffer is resized unnecessarily

vim-patch:8.2.0541: Travis CI does not give compiler warnings
vim-patch:8.2.0545: unused arguments ignored in non-standard way
vim-patch:8.2.0550: some changes in the libvterm upstream code
vim-patch:8.2.0553: error for unused argument
vim-patch:8.2.0608: warning from clang when building message test
vim-patch:8.2.0781: compiler warning for not using value in Lua
vim-patch:8.2.0838: MS-Windows: compiler warning for uninitialized variables
vim-patch:8.2.0891: clang warns for invalid conversion
vim-patch:8.2.1234: Lua build problem with old compiler
vim-patch:8.2.1487: Travis: installing snd-dummy is not always useful
vim-patch:8.2.1495: "make clean" may delete too many files
vim-patch:8.2.1545: ch_logfile() is unclear about closing when forking
vim-patch:8.2.1546: build rule for Vim.app is unused
vim-patch:8.2.1559: s390x tests work again
vim-patch:8.2.1567: no example to use ubsan with clang
vim-patch:8.2.1579: reports from asan are not optimal
vim-patch:8.2.1583: MS-Windows: cannot easily measure code coverage
vim-patch:8.2.1589: term_start() options for size are overruled by 'termwinsize'
vim-patch:8.2.1594: pull requests on github do not notify a maintainer
vim-patch:8.2.1595: cannot easily see what Vim sends to the terminal
vim-patch:8.2.1596: using win_screenpos('.') in tests works but is wrong
vim-patch:8.2.1598: starting a hidden terminal resizes the current window
vim-patch:8.2.1605: default maintainer on github is wrong
2020-09-06 12:51:32 +02:00
9c929e7d23 lint: just bit twiddlin' 2020-09-06 11:25:23 +02:00
b397f31ede tests: update query.list_predicates() test 2020-09-06 10:33:13 +02:00
e54c6b077c treesitter: update docs on predicates 2020-09-06 10:31:47 +02:00
dc579c420b treesitter: Use excplicit names in tests 2020-09-06 10:30:40 +02:00
20c1526552 treesitter: simplify match_preds 2020-09-06 10:30:39 +02:00
2d6437f5fb treesitter: use lua-match? instead of match? 2020-09-06 10:29:47 +02:00
9be302e9a6 Invalidate grid on allction when in ext_multigrid
When in ext_multigrid mode, after a window gets resized neovim wont
currently send all the needed events fill the window's blank space and
thus' UIs will have invalid grid state.
2020-09-06 10:12:30 +02:00
8efebda2c6 snap: Ensure version reflects Github release ver 2020-09-06 05:42:47 +00:00
a7d48cb960 snap: Match snap release to github releases 2020-09-06 05:41:19 +00:00
92eab3baef snap: adjust make command depending on architecture
i386, amd64, armhf platforms should be build with luajit all others with
lua.
2020-09-06 05:36:21 +00:00
b5cbd448bf Revert back to core18 for i386 support 2020-09-06 05:30:00 +00:00
e57ea5f2a9 doc: fix invalid help tags #12745 2020-09-05 22:10:56 -07:00
bedab7e87b provider: align all foo#Detect() functions #12839
Problem: ruby#Detect() and node#Detect() don't return a [prog, err] pair
which means callers must special-case them.

Solution: align their return signatures with the perl/pythonx providers.
2020-09-05 15:02:46 -07:00
fb55cb2d91 fix(highlight): compare rows vs columns in range highlight check (#12852) 2020-09-05 17:22:54 -04:00
858c056133 Support for :perl, :perlfile, :perldo and perleval() (#12809)
* support for :perl, :perlfile, :perldo and perleval()

* document that the perl provider doesn't currently work on Windows

* document that the perl legacy interface is now also supported

* added perleval() documentation

* import legacy perl interface tests

* only perl 5.22+ is supported

* healtcheck: use g:perl_host_prog if its set instead

using just 'perl' isn't correct as it may not be the version requested.
ditto for 'cpanm', rather go through 'App::cpanminus' to find the latest
perl version
2020-09-05 13:55:06 -07:00
8b5c6a1b73 Merge pull request #12838 from bfredl/screenshot
nvim__screenshot
2020-09-05 22:54:25 +02:00
981f3f17a0 treesitter: check hl group exists before passing it in nvim_get_hl_id_by_name 2020-09-05 21:43:40 +02:00
2cea6ab012 vim-patch:8.2.1586: :resize command not fully tested (#12853)
Problem:    :resize command not fully tested.
Solution:   Add a couple of tests. (Dominique Pellé, closes vim/vim#6857)
fe6dce8739
2020-09-05 12:31:45 -07:00
8705fbf77c healtcheck: use g:perl_host_prog if its set instead
using just 'perl' isn't correct as it may not be the version requested.
ditto for 'cpanm', rather go through 'App::cpanminus' to find the latest
perl version
2020-09-05 13:09:15 +01:00
a1508c9f6d nvim__screenshot 2020-09-05 13:33:21 +02:00
7b1b271f43 Merge pull request #12788 from bfredl/nulloffset-1
robustness: avoid adding offset to NULL pointer
2020-09-05 13:32:58 +02:00
b33e375b2b robustness: avoid adding offset to NULL pointer
UBSAN with clang 10.0 is checking for adding offsets to a `NULL` pointer
which is not allowed. This is not yet checked in the version of clang
used in CI (7.0.0). I will work on cases of this so that tests passes
locally for me.

This could be tested in CI by either upgrading the clang of the
ASAN/UBSAN to 10.0, or add yet another CI target which builds with
clang 10.0.
2020-09-04 23:29:51 +02:00
7593c8012b treesitter: update runtime 2020-09-04 20:59:00 +02:00
3853276d9c Merge pull request #12850 from bfredl/oopsie
API: be less breaking in the decorations
2020-09-04 20:48:13 +02:00
866308c3de API: be less breaking in the christmas tree decorations 2020-09-04 19:11:26 +02:00
33bf6f9ada ci: Try to recover from sanitizer issues
When running in CI, we want to find as many problems as possible
instead.  Let the code try to keep running from recoverable issues so we
report all the sanitize issues we can.
2020-09-04 11:09:25 -04:00
1e14dacd08 Merge pull request #12847 from nvim-treesitter/ts-list-predicates
treesitter: allow to list supported predicates
2020-09-04 17:01:49 +02:00
74ad66404f suggest_trie_walk: Remove invalid FALLTHROUGH annotation 2020-09-04 10:59:16 -04:00
2516386c6b travis: Install clang-11 for ASAN/UBSAN job
[skip appveyor]
2020-09-04 10:59:16 -04:00
16e69eae70 travis: Relax pyenv versions to 2.7:3.8
We don't care about the specifics of the patch version, so just set the
major:minor.

[skip appveyor]
2020-09-04 10:59:15 -04:00
f7434bab73 travis: Install powershell via "snaps" addon
[skip appveyor]
2020-09-04 10:59:15 -04:00
89ed96fab9 travis: Bump Linux dist to bionic
[skip appveyor]
2020-09-04 10:59:08 -04:00
ef5a09d4fc Merge pull request #12816 from vigoux/decorations
New Decorations API (not finalized, but we gonna build on this)
2020-09-04 16:39:48 +02:00
dd465bbccc Merge pull request #12848 from jamessan/vim-8.2.1552 2020-09-04 10:16:57 -04:00
3fd6e3b923 treesitter: allow to list supported predicates 2020-09-04 15:24:23 +02:00
b163a89925 vim-patch.sh: Fix PR subject with multiple patches 2020-09-04 08:46:46 -04:00
5707982bd3 lint 2020-09-04 08:27:33 -04:00
1190192216 vim-patch:8.2.1560: using NULL pointers in some code
Problem:    Using NULL pointers in some code. (James McCoy)
Solution:   Avoid adding to a NULL pointer.  Use byte as unsigned.
9c2b06637b

The changes to eval.c (skip_expr_concatenate) and vim9compile.c aren't
included since they're specific to vim9script support.
2020-09-04 08:25:33 -04:00
ae8f108732 vim-patch:8.2.1553: crash in edit test
Problem:    Crash in edit test.
Solution:   Avoid using invalid pointer.
2c93c685e3
2020-09-04 08:25:25 -04:00
0c851e5226 vim-patch:8.2.1552: warnings from asan with clang-11
Problem:    Warnings from asan with clang-11. (James McCoy)
Solution:   Avoid using a NULL pointer. (issue vim/vim#6811)
64f37d3090
2020-09-03 23:00:24 -04:00
1832d18083 treesitter: update to use buf_set_extmark 2020-09-03 15:40:31 +02:00
49f5b57587 decor: sketch new decorations API
return decorations back

lol no nvim_buf_get_virtual_text

share decorations that are hl only to avoid alloc avalanche
2020-09-03 15:40:24 +02:00
98dea93ba0 only perl 5.22+ is supported 2020-09-03 09:57:59 +01:00
d802658ebb import legacy perl interface tests 2020-09-03 09:57:59 +01:00
7725fd9880 added perleval() documentation 2020-09-03 09:57:59 +01:00
8c6e96bb50 document that the perl legacy interface is now also supported 2020-09-03 09:57:59 +01:00
d3302573ba extmark: move id to dict in nvim_buf_set_extmark 2020-09-03 10:23:52 +02:00
54ce1010e8 extmark: refiy "Decoration" abstraction
one very important thought
2020-09-03 10:23:52 +02:00
3acfefb63e Merge #12827 'vim-patch:8.2.{1554,1561,1564,1565,1566}' 2020-09-02 22:31:31 -07:00
5fcdb63025 vim-patch:8.2.1564: a few remaining errors from ubsan
Problem:    A few remaining errors from ubsan.
Solution:   Avoid the warnings. (Dominique Pellé, closes vim/vim#6837)
4ad739fc05
2020-09-02 22:44:21 -04:00
b9430fe28e vim-patch:8.2.1566: not all Bazel files are recognized
Problem:    Not all Bazel files are recognized.
Solution:   Add *.bazel and *.BUILD. (closes vim/vim#6836)
4488f5a545
2020-09-02 21:59:36 -04:00
4bcca0baa9 vim-patch:8.2.1565: spellfile test sometimes fails
Problem:    Spellfile test sometimes fails.
Solution:   Check running into the end of the file.
e90d63ea90
2020-09-02 09:10:50 -04:00
cc64f2cc1d vim-patch:8.2.1561: using NULL pointers in fold code
Problem:    Using NULL pointers in fold code.
Solution:   Avoid using a NULL pointer. (Dominique Pellé, closes vim/vim#6831,
            closes vim/vim#6831)
81fcb67fb3
2020-09-02 09:10:50 -04:00
22e9aadc88 vim-patch:8.2.1554: crash in normal test
Problem:    Crash in normal test.
Solution:   Skip adjusting marks if there are no folds.
07e87e9eb5
2020-09-02 08:57:43 -04:00
948e625e1e Merge #12468 'lsp: logging' 2020-09-01 20:50:08 -07:00
e86b15b25c lsp/make_position_param(): handle empty buffer #12825
Fix  #12623

problem: nvim_buf_get_lines(0) returns empty during startup, where no buffers are loaded yet.
solution: return empty object

Happens during startup, where buffer may not be loaded yet, because...
`source_startup_scripts()` is done before `edit_buffers()`:
9bb552875d/src/nvim/main.c (L362)
9bb552875d/src/nvim/main.c (L480)
2020-09-01 20:45:47 -07:00
a166c2aadb eval_call_provider(): free unused return value #12819
Caller can pass discard=true to free the unwanted return value.
2020-09-01 20:22:42 -07:00
4bcf54478a Merge pull request #12814 from theHamsta/escape-queries
treesitter: avoid escaping complete query strings
2020-09-01 12:50:21 +02:00
04ab26b885 Merge pull request #12736 from vigoux/ts-iter-children
treesitter: allow to iterate over node children
2020-09-01 10:52:55 +02:00
c14a9f6fcc g📋 allow command given as a list #12775
fixes #12768
2020-09-01 00:27:38 -07:00
18217b987f treesitter: add node:field() to get field children 2020-09-01 08:57:55 +02:00
a50cf35bda build/FindLua.cmake: allow Lua 5.4 #12820
Lua 5.4 is out, and will be shipped with Fedora 33.
2020-08-31 22:06:59 -07:00
b058c671d2 treesitter: avoid escaping complete query strings
Escape "\\" only for `vim-match?` not for `match?`
Fixes #12595
2020-08-31 17:24:38 +02:00
2bbbb34ce7 Merge pull request #12804 from janlazo/vim-8.1.1725
[RDY]vim-patch:8.1.{1694,1725,1776,1804,1806,1831,2041,2198,2206},8.2.{1033,1315,1548}
2020-08-31 08:25:16 -04:00
e123fd0a5d treesitter: allow to iterate over node children 2020-08-31 13:42:30 +02:00
24b5f69a49 fix(win): ignore closing wins in win_findbuf #12798
This caused segfaults when calling win_findbuf in an `on_detach`
callback, when the callback was triggered when closing the last window
containing the buffer.
2020-08-31 00:53:10 -07:00
c2662210b5 docs, remove 'guifontset' #11708
- remove redundant autocmd list
  This "grouped" list is useless, it only gets in the way when searching
  for event names.
- intro.txt: cleanup
- starting.txt: update, revisit
- doc: `:help bisect`
- mbyte.txt: update aliases 1656367b90. closes #11960
- options: remove 'guifontset'. Why:
  - It is complicated and is used by almost no one.
  - It is unlikely to be implemented by Nvim GUIs (complicated to parse,
    specific to Xorg...).
2020-08-31 00:51:35 -07:00
3229ba0cde lsp: Fix bad sortText comparison (#12485)
The spec indicates we have to fallback to comparing by label
if sortText is falsy.

Closes #12431
2020-08-30 22:29:47 -07:00
62ba227155 vim-patch:8.2.1548: cannot move position of "%%" in message translations
Problem:    Cannot move position of "%%" in message translations. (Emir Sarı)
Solution:   Improve the check script.
0b8cf278ec
2020-08-30 21:19:23 -04:00
52a2a1b3d2 vim-patch:8.1.1694: the RUN_VIM variable is longer than needed
Problem:    The RUN_VIM variable is longer than needed.
Solution:   Shorten RUN_VIM. (Daniel Hahler, closes vim/vim#4643)
41a8260445
2020-08-30 21:12:26 -04:00
697a6ca2e4 vim-patch:8.1.2041: no test for diff mode with syntax highlighting
Problem:    No test for diff mode with syntax highlighting.
Solution:   Add a test case.
248fdb3332
2020-08-30 21:12:26 -04:00
aa60cb1083 vim-patch:8.1.1831: confusing skipped message
Problem:    Confusing skipped message.
Solution:   Drop "run" from "run start the GUI".
2514315fc2

Cherry-pick 'CheckCanRunGui' user command from patch 8.1.1826.
2020-08-30 21:12:26 -04:00
2bae98a5ea vim-patch:8.1.2206: no test for fixed issue vim/vim#3893
Problem:    No test for fixed issue vim/vim#3893.
Solution:   Add a test. (Christian Brabandt, vim/vim#3893)
28686682e7
2020-08-30 21:12:26 -04:00
d4df5fc90e vim-patch:8.1.1806: test for display updating doesn't check without statusline
Problem:    Test for display updating doesn't check without statusline.
Solution:   Add screenshots without a status line.
7cc535175a
2020-08-30 21:12:26 -04:00
f48847c578 vim-patch:8.1.1804: no test for display updating without a scroll region
Problem:    No test for display updating without a scroll region.
Solution:   Add a test.
3c8ee62974
2020-08-30 21:12:26 -04:00
1fbfd6ba09 vim-patch:8.1.1776: text added with a job isn't displayed
Problem:    Text added with a job to another buffer isn't displayed.
Solution:   Update topline after adding a line. (closes vim/vim#4745)
4641a122f2
2020-08-30 21:12:26 -04:00
a45dc02a14 vim-patch:8.1.2198: crash when using :center in autocommand
Problem:    Crash when using :center in autocommand.
Solution:   Bail out early for an empty line. (Dominique pelle, closes vim/vim#5095)
396b7c78c0

Cherry-pick 'src/testdir/check.vim' changes from patch 8.1.1544.
2020-08-30 21:12:25 -04:00
40fca0cea8 vim-patch:8.2.1315: MS-Windows: test log contains escape sequences
Problem:    MS-Windows: test log contains escape sequences.
Solution:   Do not use t_md and t_me but ANSI escape sequences. (Ken Takata,
            closes vim/vim#6559)
45df2a01a7
2020-08-30 21:12:25 -04:00
61218d3c77 vim-patch:8.2.1033: not easy to read the test time in the test output
Problem:    Not easy to read the test time in the test output.
Solution:   Align the times.  Make slow tests bold.
8d9437968b
2020-08-30 21:12:25 -04:00
269a271a10 vim-patch:8.1.1725: MS-Windows: E325 message may use incorrect date format
Problem:    MS-Windows: E325 message may use incorrect date format.
Solution:   Convert strftime() result to 'encoding'.  Also make the message
            translatable. (Ken Takata, closes vim/vim#4685, closes vim/vim#4681)
663bbc09ba
2020-08-30 21:12:25 -04:00
b3f5083b8d Merge #12815 'snap: update, fix build issues' 2020-08-30 14:03:33 -07:00
65b2fce787 snap: don't run snapcraft under sudo
Snapcraft 4.0 complains about running LXD builds under sudo.  So instead
add the CI user to the "lxd" group and use sg to switch to that
membership.

Resolves: #12712
2020-08-30 17:13:41 +00:00
dd33725802 document that the perl provider doesn't currently work on Windows 2020-08-30 17:19:05 +01:00
9bef25314e support for :perl, :perlfile, :perldo and perleval() 2020-08-30 17:19:05 +01:00
9c65017c3b Snapcraft: Use lua instead of luajit for arm64 2020-08-30 16:12:56 +00:00
8735105af8 Snapcraft: Build with Debug Info 2020-08-30 16:12:56 +00:00
7c4267e42c Add missing dependencies for Launchpad builds 2020-08-30 16:12:56 +00:00
fea608269a Bump to core20 2020-08-30 16:12:56 +00:00
c6648fe882 l10n: Update Ukrainian translation (#12785) 2020-08-30 00:06:32 -07:00
fbbc8cb8b1 Merge #12794 'tui: Fixing problems with GNU Screen' 2020-08-29 22:19:15 -07:00
46e74142ab Merge pull request #12797 from clason/libvterm-0.1.4
third-party: upgrade libvterm to v0.1.4
2020-08-28 00:48:26 -04:00
7de276b877 bump libvterm to 0.1.4 2020-08-27 20:01:14 +02:00
994e40914b Revert "tui: improve support for GNU Screen (#12098)"
This reverts commit f3ffe0b325.
Sending a control sequence to the host terminal, wrapped in DCS, causes
problems because it changes the state of the host terminal outside the
screen's control. This change will therefore be reverted.
2020-08-27 00:52:49 +09:00
8628dfe365 Revert "tui: Fix italics when $TERM is screen in tmux #12199"
This reverts commit 9d0222ee3e.
2020-08-27 00:52:17 +09:00
91109ffda2 Merge pull request #12510 from jamessan/clang-implicit-fallthrough 2020-08-26 07:13:27 -04:00
3b1db74963 lsp: add key name to the output log value
Unless we look at the code every time, we will not know what the value is, so add the key name.
2020-08-26 12:06:07 +09:00
154cbe61c4 lsp: remove output log at rpc.notify
Since "rpc.send.payload" outputs the log with almost the same contents, delete the output here.
2020-08-26 12:06:07 +09:00
43202964f3 Merge pull request #12708 from runiq/lsp-doc
Add docs for some methods in vim.lsp
2020-08-25 09:52:22 -04:00
8a333afec5 Merge pull request #12786 from janlazo/vim-8.1.1516
vim-patch:8.1.{1516,1677,2051,2089,2275,2364},8.2.{423,1517}
2020-08-24 20:59:40 -04:00
1f84ea061d spell_load_file: Add missing "goto endFAIL" if spellfile is not readable 2020-08-23 21:18:34 -04:00
75813af542 Disable -Wimplicit-fallthrough for tree_sitter/ 2020-08-23 21:18:34 -04:00
37fa8d3f44 Disable -Wimplicit-fallthrough for funcs.generated.h
This is code generated by gperf, so there's nothing we can do about it.
The code does have /*FALLTHROUGH*/ comments but clang doesn't recognize
them.
2020-08-23 20:59:39 -04:00
b46b373065 vim-patch:8.1.2275: using "seesion" looks like a mistake
Problem:    Using "seesion" looks like a mistake.
Solution:   Use an underscore to make the function sort first.
1e15e61188
2020-08-23 18:45:05 -04:00
107e50b25e vim-patch:8.2.1517: cannot easily get the character under the cursor
Problem:    Cannot easily get the character under the cursor.
Solution:   Add the {chars} argument to strpart().
6c53fca023
2020-08-23 18:32:39 -04:00
bf8d96a30d vim-patch:8.2.0423: in some environments a few tests are expected to fail
Problem:    In some environments a few tests are expected to fail.
Solution:   Add $TEST_MAY_FAIL to list tests that should not cause make to
            fail.
ce436de5a9
2020-08-23 15:08:45 -04:00
b59dadde4e vim-patch:8.1.2364: termwinscroll test is flaky on FreeBSD
Problem:    Termwinscroll test is flaky on FreeBSD.
Solution:   Add to list of flaky tests.  Rename function.
e219f73ed5
2020-08-23 14:30:11 -04:00
d1e7156f26 vim-patch:8.1.2089: do not get a hint that $TEST_FILTER was active
Problem:    Do not get a hint that $TEST_FILTER was active.
Solution:   Mention $TEST_FILTER if no functions were executed.
7b666c7883
2020-08-23 14:26:20 -04:00
9961e9bcb7 vim-patch:8.1.2051: double-click test is a bit flaky
Problem:    Double-click test is a bit flaky.
Solution:   Correct entry in list of flaky tests.
705918f9f7
2020-08-23 14:25:02 -04:00
b4a5745e84 vim-patch:8.1.1677: tests get stuck when running into an existing swapfile
Problem:    Tests get stuck when running into an existing swapfile.
Solution:   Set v:swapchoice to "q" and report an error. (Daniel Hahler,
            closes vim/vim#4644)
b073da8929
2020-08-23 13:35:26 -04:00
3fac3cad75 vim-patch:8.1.1516: time reported for a test measured wrong
Problem:    Time reported for a test measured wrong.
Solution:   Move the computation to the end of RunTheTest(). (Ozaki Kiichi,
            closes vim/vim#4520)
640d4f0c97
2020-08-23 13:22:14 -04:00
9d9edebceb gen_vimdoc: Allow to keep intermediary output 2020-08-23 13:48:27 +02:00
b5782c3b81 Add FIXMEs 2020-08-23 13:48:27 +02:00
ac05343a10 Add docs for most vim.lsp methods
Most of the lsp.log will be addressed in a separate PR.
2020-08-23 13:48:25 +02:00
8c49e3d509 Merge pull request #12770 from janlazo/vim-8.1.1115
vim-patch:8.1.{1115,2267},8.2.{607,814,1472,1474,1476,1511}
2020-08-22 18:34:52 -04:00
246c510b60 vim-patch:8.2.1511: putting a string in Visual block mode ignores multi-byte
Problem:    Putting a string in Visual block mode ignores multi-byte
            characters.
Solution:   Adjust the column for Visual block mode. (closes vim/vim#6767)
cd94277f72
2020-08-22 17:07:21 -04:00
091fc72a92 vim-patch:8.2.0814: clang warning for implicit conversion
Problem:    Clang warning for implicit conversion.
Solution:   Add type cast. (Dominique Pelle, closes vim/vim#6124)
3718427ba3
2020-08-21 21:39:57 -04:00
1d9b146ce3 vim-patch:8.2.0607: gcc warns for using uninitialized variable
Problem:    Gcc warns for using uninitialized variable. (John Marriott)
Solution:   Set name_end also for environment variables.
2bb76accc6
2020-08-19 21:38:42 -04:00
8d6c1edc6e vim-patch:8.1.2267: compiler warning for uninitialized variable
Problem:    Compiler warning for uninitialized variable. (Tony Mechelynck)
Solution:   Rearrange the code.
3b991527e8
2020-08-18 23:34:13 -04:00
45615cedd1 vim-patch:8.2.1472: ":argdel" does not work like ":.argdel" as documented
Problem:    ":argdel" does not work like ":.argdel" as documented. (Alexey
            Demin)
Solution:   Make ":argdel" work like ":.argdel". (closes vim/vim#6727)
            Also fix giving the error "0 more files to edit".
7b22117c4e
2020-08-17 23:34:39 -04:00
27a6728848 vim-patch:8.2.1476: filetype test fails on MS-Windows
Problem:    Filetype test fails on MS-Windows.
Solution:   Remove "^" from pattern.
aa9675a61d
2020-08-17 18:30:34 -04:00
97d3bd0bc6 vim-patch:8.2.1474: /usr/lib/udef/rules.d not recognized as udevrules
Problem:    /usr/lib/udef/rules.d not recognized as udevrules.
Solution:   Adjust match pattern. (Haochen Tong, closes 36722)
624b6eaf20
2020-08-17 18:30:10 -04:00
e99d1a7fbb vim-patch:8.1.1115: cannot build with older C compiler
Problem:    Cannot build with older C compiler.
Solution:   Move variable declaration to start of block.
8f4aeb5572
2020-08-17 02:18:55 -04:00
161cdba1e3 vim-patch:8.2.1471: :const only locks the variable, not the value (#12765)
Problem:    :const only locks the variable, not the value.
Solution:   Lock the value as ":lockvar 1 var" would do. (closes vim/vim#6719)
241572794f
2020-08-16 17:13:52 -07:00
83f5bf435d runtime/tex.vim: patch to 2547aa930b59 #12504
vim/vim@2547aa930b
2020-08-16 15:23:28 -07:00
c219d3eec4 defaults: sessionoptions+=unix,slash #12760
Since 1c3ca4f18f, 2c1d12d0be, #7836, the "unix" and "slash" behavior
of 'sessionoptions'/'viewoptions' is always enabled, and the flags are
just ignored. There is no reason for that behavior to be configurable.

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2020-08-15 19:19:06 -07:00
37aa9c9c94 Merge pull request #12713 from janlazo/vim-8.2.1347
vim-patch:8.1.{573,1674,2097,2098,2341},8.2.{1347,1360,1361,1364,1369,1377,1379,1386,1409,1410,1438,1441,1458}
2020-08-15 17:45:18 +02:00
75aeb815b4 version.c: update [ci skip] (#12662)
vim-patch:8.0.1454: when in silent mode too much output is buffered

vim-patch:8.1.0464: MS-Windows: job_info() has cmd without backslashes
vim-patch:8.1.0581: double free without the text properties feature
vim-patch:8.1.1392: build failure in tiny version
vim-patch:8.1.1541: check for ASAN is not reliable
vim-patch:8.1.1640: the CursorHold autocommand takes down a balloon
vim-patch:8.1.1808: build failure for tiny version

vim-patch:8.2.0062: memory test is flaky on FreeBSD
vim-patch:8.2.0524: Win32: searching for file matches is slow
vim-patch:8.2.0525: Win32: typo in assignment and misplaced paren
vim-patch:8.2.0569: build failure with tiny version
vim-patch:8.2.0774: t_TI and t_TE are output when using 'visualbell'
vim-patch:8.2.1225: linker errors when building with dynamic Python 3.9
vim-patch:8.2.1226: MS-Windows: windows positioning wrong depending on taskbar
vim-patch:8.2.1228: scrollbars not flush against the window edges when maximised
vim-patch:8.2.1231: MS-Windows: GUI code can be cleaned up
vim-patch:8.2.1232: MS-Windows GUI: Snap cancelled by split command
vim-patch:8.2.1240: GUI tests sometimes fail because of translations
vim-patch:8.2.1245: build failure in tiny version
vim-patch:8.2.1248: Netbeans test is flaky in the GUI
vim-patch:8.2.1264: terminal getwinpos() test is a bit flaky
vim-patch:8.2.1266: Makefile preference were accidentally included
vim-patch:8.2.1273: MS-Windows: terminal test may leave file behind
vim-patch:8.2.1277: tests on Travis do not run with EXITFREE
vim-patch:8.2.1279: some tests on Travis have EXITFREE duplicated
vim-patch:8.2.1298: compiler warning for unused argument in small version
vim-patch:8.2.1309: build failure with tiny version
vim-patch:8.2.1310: configure with Xcode 12 fails to check for tgetent
vim-patch:8.2.1312: MS-Windows: terminal test may fail if dir.exe exists
vim-patch:8.2.1317: MS-Windows tests on AppVeyor are slow
vim-patch:8.2.1318: no status badge for Github CI
vim-patch:8.2.1319: status badge for Github CI has wrong link
vim-patch:8.2.1321: GitHub CI also runs on tag push
vim-patch:8.2.1327: Mac: configure can't find Tcl libraries
vim-patch:8.2.1330: Github workflow takes longer than needed
vim-patch:8.2.1334: Github workflow timeout needs tuning
vim-patch:8.2.1335: CTRL-C in the GUI doesn't interrupt
vim-patch:8.2.1336: build failure on non-Unix systems
vim-patch:8.2.1346: small build fails
vim-patch:8.2.1348: build failure without the eval feature
vim-patch:8.2.1353: crash when drawing double-wide character in terminal window
vim-patch:8.2.1381: MS-Windows: crash with Python 3.5 when stdin is redirected
vim-patch:8.2.1385: no testing on ARM
vim-patch:8.2.1389: file missing from the distribution
vim-patch:8.2.1402: s390x tests always fail
vim-patch:8.2.1422: the Mac GUI implementation is outdated
vim-patch:8.2.1424: Mac build fails
vim-patch:8.2.1436: function implementing :substitute has unexpected name
vim-patch:8.2.1442: outdated references to the Mac Carbon GUI
vim-patch:8.2.1448: test 77a for VMS depends on small.vim which does not exist
vim-patch:8.2.1449: some test makefiles delete files that are not generated
vim-patch:8.2.1456: MS-Windows: test files are not deleted
2020-08-15 17:35:14 +02:00
056d99b0f6 tui: fix pvs/v728 2020-08-15 10:57:18 -04:00
9f591e6f23 shada: fix pvs/v1004 2020-08-15 10:57:17 -04:00
aab71dbd03 userfunc: fix pvs/v547
xcalloc() never returns NULL.
2020-08-15 10:57:17 -04:00
273ad7d66f fixup! mksession: always unix slashes "/" for filepaths 2020-08-15 10:57:17 -04:00
acf4197290 ex_docmd: replace #define with enum
enum value can be inferred from previous member.
Vim was doing this manually via relative #define.

It's not needed but it is confusing for me to update an array index
after the array value and to configure the array index
such that it is dependent on other array indices.
One missing #define and everything below breaks.
2020-08-15 10:57:17 -04:00
6ac51792b9 fixup! vim-patch:68e6560b84f1 2020-08-15 10:57:17 -04:00
afc6753f64 vim-patch:8.2.1458: .gawk files not recognized
Problem:    .gawk files not recognized.
Solution:   Recognize .gawk files. (Doug Kearns)
9a5c553f79
2020-08-15 10:57:16 -04:00
4a0dbe866f vim-patch:8.2.1441: running tests in tiny version gives error for summarize.vim
Problem:    Running tests in tiny version gives error for summarize.vim.
Solution:   Set 'cpoptions' to allow for line continuation.  Restore
            redirecting test output to /dev/null.
c771908681
2020-08-14 18:20:30 -04:00
f81167dc6f vim-patch:8.2.1438: missing tests for interrupting script execution from debugger
Problem:    Missing tests for interrupting script execution from debugger.
Solution:   Add tests. (Yegappan Lakshmanan, closes vim/vim#6697)
7ac616cb0a
2020-08-14 18:20:30 -04:00
ab85f774a6 vim-patch:8.2.1410: adding compiler plugin requires test change
Problem:    Adding compiler plugin requires test change.
Solution:   Include compiler plugin and adjust test.
7f7a888869
2020-08-14 18:20:30 -04:00
5e95e0da44 vim-patch:8.2.1409: nmpmrc and php.ini filetypes not recognized
Problem:    Nmpmrc and php.ini filetypes not recognized.
Solution:   Add filetype detection. (Doug Kearns)
1e91eafc2e
2020-08-14 18:20:30 -04:00
4eb89e7f9b vim-patch:8.1.2098: mksession test fails on MS-Windows
Problem:    mksession test fails on MS-Windows.
Solution:   Skip testing with backslashes on MS-Windows.
37ac4a531c
2020-08-14 18:20:29 -04:00
0361909462 vim-patch:8.1.2097: :mksession is not sufficiently tested
Problem:    :mksession is not sufficiently tested.
Solution:   Add more test cases. (Yegappan Lakshmanan, closes vim/vim#4992)
66f0e6c6e2
2020-08-14 18:20:29 -04:00
af58bee2f4 vim-patch:8.2.1386: backslash not removed afer space with space in 'isfname'
Problem:    Backslash not removed afer space in option with space in
            'isfname'.
Solution:   Do remove backslash before space, also when it is in 'isfname'.
            (Yasuhiro Matsumoto, closes vim/vim#6651)
994b89d28d
2020-08-14 18:20:29 -04:00
bc2c75cbd7 vim-patch:8.2.1379: curly braces expression ending in " }" does not work
Problem:    Curly braces expression ending in " }" does not work.
Solution:   Skip over white space when checking for "}". (closes vim/vim#6634)
ae95a3946b
2020-08-14 18:20:29 -04:00
afa5b04d00 vim-patch:8.2.1377: triggering the ATTENTION prompt causes typeahead mess up
Problem:    Triggering the ATTENTION prompt causes typeahead to be messed up.
Solution:   Increment tb_change_cnt. (closes vim/vim#6541)
b8d732e93e
2020-08-14 18:20:29 -04:00
9b361e9ea1 vim-patch:8.2.1369: MS-Windows: autocommand test sometimes fails
Problem:    MS-Windows: autocommand test sometimes fails.
Solution:   Do not rely on the cat command.
14ddd226da
2020-08-14 18:20:28 -04:00
4887c3dc1c vim-patch:8.2.1364: invalid memory access when searching for raw string
Problem:    Invalid memory access when searching for raw string.
Solution:   Check for delimiter match before following quote. (closes vim/vim#6578)
282f9c64e5
2020-08-14 18:20:28 -04:00
037f532076 vim-patch:8.2.1361: error for white space after expression in assignment
Problem:    Error for white space after expression in assignment.
Solution:   Skip over white space. (closes vim/vim#6617)
6a25026262
2020-08-14 18:20:28 -04:00
9abfb85264 vim-patch:8.2.1360: stray error for white space after expression
Problem:    Stray error for white space after expression.
Solution:   Ignore trailing white space. (closes vim/vim#6608)
f96e9dec63
2020-08-14 18:20:28 -04:00
7a047d8dc2 vim-patch:8.2.1347: cannot easily get the script ID
Problem:    Cannot easily get the script ID.
Solution:   Support expand('<SID>').
909443028b
2020-08-14 18:20:28 -04:00
0680b5218e vim-patch:8.1.2341: not so easy to interrupt a script programatically
Problem:    Not so easy to interrupt a script programatically.
Solution:   Add the interrupt() function. (Yasuhiro Matsumoto, closes vim/vim#2834)
67a2deb9cb
2020-08-14 18:20:28 -04:00
6d68b2801b vim-patch:8.1.1674: script to check a colorscheme can be improved
Problem:    Script to check a colorscheme can be improved.
Solution:   Match the whole group name. Don't warn for what is usually omitted.
4e63f9425e
2020-08-14 18:20:27 -04:00
903cd73af1 vim-patch:8.1.0573: cannot redefine user command without ! in same script
Problem:    Cannot redefine user command without ! in same script
Solution:   Allow redefining user command without ! in same script, like with
            functions.
55d4691308
2020-08-14 18:20:27 -04:00
3ccdbc570d lua: add vim.register_keystroke_callback (#12536)
* feat: Add vim.register_keystroke_callback

* fixup: Forgot to remove mention of old option

* fixup: Answer jamessan comments

* fixup: Answer norcalli comments

* fixup: portability

* Update runtime/doc/lua.txt

Co-authored-by: Ashkan Kiani <ashkan.k.kiani@gmail.com>
2020-08-14 10:03:17 -04:00
aa48c1c724 Merge pull request #12739 from vigoux/ts-refactor-predicates
treesitter: refactor
2020-08-14 08:33:50 -04:00
6a8dcfab4b treesitter: allow to force predicate addition 2020-08-13 20:40:40 +02:00
5900c99b7c treesitter: update docs on predicates 2020-08-13 20:30:15 +02:00
9564803d1a treesitter: add predicate negation 2020-08-13 20:30:15 +02:00
d7b12e58df treesitter: add and test vim-match? predicate 2020-08-13 20:30:15 +02:00
58e37d7df8 treesitter: add contains? predicate 2020-08-13 20:30:15 +02:00
18c0e77528 treesitter(docs): update and refresh docs 2020-08-13 20:30:15 +02:00
613068071e treesitter: refactor and use lua regexes 2020-08-13 20:30:15 +02:00
7fe7255822 Stop bailing out of msgpack_parse if we see a response 2020-08-11 13:21:40 -04:00
94b7ff730a Merge pull request #12731 from jamessan/libcallnr
libcall: Use "int" for number argument
2020-08-10 23:23:54 -04:00
272389da32 Merge pull request #12632 from tjdevries/tjdevries/packadd_lua
[RFC] lua: Force update of rtp more often
2020-08-10 19:30:58 -04:00
e797d0658c fix: runtimepath always updates lua package.path 2020-08-10 16:48:35 -04:00
602e7505e2 Merge pull request #12621 from Shougo/vim-8.1.1564
[RDY] vim-patch:8.1.1564, 1570, 1623, 1712 : sign column takes up space
2020-08-09 16:19:11 +02:00
1869f86e35 Remove unused function (#12719) 2020-08-08 23:49:44 +02:00
7f49594813 man.vim: Add - to 'iskeyword' (#12598)
Pressing K on manpages with - in their name will now work.

I noticed this the manpages of https://github.com/cli/cli
2020-08-08 12:48:33 -04:00
840c12c107 Merge remote-tracking branch 'upstream/master' into libcallnr 2020-08-08 08:57:35 -04:00
e813ec79c2 libcall: Use "int" for number argument
The libcall family of functions need to use "int" for both input and
output.  The output side was fixed in 9c42232 but I forgot about the
input side.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch libcallnr
# Your branch is up to date with 'upstream/master'.
#
# Changes to be committed:
#	modified:   src/nvim/eval/funcs.c
#	modified:   src/nvim/os/dl.c
#
2020-08-08 08:53:35 -04:00
f26df8bb66 Merge pull request #12701 from erw7/fix-sattr-t-overflow
ui: fix problem with sattr_T overflow
2020-08-03 22:57:13 +09:00
4ed5204bc9 Merge pull request #12665 from janlazo/vim-8.2.1254
vim-patch:8.0.1774,8.1.{192,194,255,264,1202,2172,2340},8.2.{62,71,72,1004,1254,1259,1265,1267,1292,1295}
2020-08-02 20:19:48 +02:00
ea515f8ca1 vim-patch:8.1.0264: backup tests fail when CWD is in /tmp
Problem:    Backup tests fail when CWD is in /tmp.
Solution:   Make 'backupskip' empty. (Christian Brabandt, closes vim/vim#3301)
efe03738f6
2020-08-02 12:00:03 -04:00
ae92177063 vim-patch:8.1.0255: backup test fails when using shadow directory
Problem:    Backup test fails when using shadow directory.
Solution:   Remove check for "src".
f8f88f89e1
2020-08-02 12:00:03 -04:00
0d713fc8ba options: fix 'isident' for Windows
Default value on Windows does not match the documented value.
2020-08-02 12:00:02 -04:00
1123a979d0 vim-patch:8.1.0862: no verbose version of character classes
Problem:    No verbose version of character classes.
Solution:   Add [:ident:], [:keyword:] and [:fname:]. (Ozaki Kiichi,
            closes vim/vim#1373)
221cd9f4dd
2020-08-02 12:00:02 -04:00
0393eec3ea tests/terminal/tui: wait 1ms to avoid data race in FreeBSD 2020-08-02 12:00:02 -04:00
513d117947 vim-patch:8.2.1295: tests 44 and 99 are old style
Problem:    Tests 44 and 99 are old style.
Solution:   Convert to new style tests. (Yegappan Lakshmanan, closes vim/vim#6536)
7d40b8a532
2020-08-02 12:00:02 -04:00
45b91711e4 vim-patch:8.2.1292: AIDL filetype not recognized
Problem:    AIDL filetype not recognized.
Solution:   Add filetype detection. (Dominique Pellé, closes vim/vim#6533)
2afc3b4f77
2020-08-02 12:00:02 -04:00
6f3a18197b vim-patch:8.1.2340: quickfix test fails under valgrind and asan
Problem:    Quickfix test fails under valgrind and asan.
Solution:   Make sure long line does not overflow IObuff. (Dominique Pelle,
            closes vim/vim#5263)  Put back fix for large terminals. (Yegappan
            Lakshmanan, closes vim/vim#5264)
a106e6cde6
2020-08-02 12:00:02 -04:00
886969e1f8 vim-patch:8.1.1202: always get regexp debugging logs when building with -DDEBUG
Problem:    Always get regexp debugging logs when building with -DDEBUG.
Solution:   By default do not create regexp debugging logs. (Ken Takata)
c2d09c9f2c
2020-08-02 12:00:01 -04:00
ca698250fc vim-patch:8.1.0194: possibly use of NULL pointer
Problem:    Possibly use of NULL pointer. (Coverity)
Solution:   Reset the re_in_use flag earlier.
414998023f
2020-08-02 12:00:01 -04:00
1ab1de7845 vim-patch:8.1.0192: executing regexp recursively fails with a crash
Problem:    Executing regexp recursively fails with a crash.
Solution:   Move global variables into "rex".
0270f38e1a
2020-08-02 12:00:01 -04:00
f3964c170e vim-patch:8.2.1267: MS-Windows: tests may fail due to $PROMPT value
Problem:    MS-Windows: tests may fail due to $PROMPT value.
Solution:   Set $PROMPT for testing. (Taro Muraoka, closes vim/vim#6510)
2690b5aed8
2020-08-02 12:00:01 -04:00
2d34ddb3c3 vim-patch:8.2.1265: crash with EXITFREE when split() fails
Problem:    Crash with EXITFREE when split() fails.
Solution:   Restore 'cpoptions'.
7d5e744162
2020-08-02 12:00:01 -04:00
9443d39941 vim-patch:8.2.1259: empty group in 'tabline' may cause using an invalid pointer
Problem:    Empty group in 'tabline' may cause using an invalid pointer.
Solution:   Set the group start position. (closes vim/vim#6505)
f56c95fdad
2020-08-02 12:00:00 -04:00
ed41ac08cf vim-patch:8.2.1004: line numbers below filler lines not always updated
Problem:    Line numbers below filler lines not always updated.
Solution:   Don't break out of the win_line() loop too early. (Christian
            Brabandt, closes vim/vim#6294, closes vim/vim#6138)
511feec6f0
2020-08-02 12:00:00 -04:00
1e6bf6f17a vim-patch:8.2.0072: memory test still fails on Cirrus CI
Problem:    Memory test still fails on Cirrus CI.
Solution:   Allow for a tiny bit more tolerance in the upper limit.
bb062c1588

Check memory usage after  Neovim sourced the Vimscript files.
https://github.com/neovim/neovim/pull/12679

N/A patches for version.c:

vim-patch:8.2.0062: memory test is flaky on FreeBSD

Problem:    Memory test is flaky on FreeBSD.
Solution:   Add a short sleep before getting the first size.
e7538ae997

vim-patch:8.2.0071: memory test often fails on Cirrus CI

Problem:    Memory test often fails on Cirrus CI.
Solution:   Allow for more tolerance in the upper limit.  Remove sleep.
1832d12aea
2020-08-02 12:00:00 -04:00
c207886bdf vim-patch:8.1.2172: spell highlight is wrong at start of the line
Problem:    Spell highlight is wrong at start of the line.
Solution:   Fix setting the "v" variable. (closes vim/vim#5078)
7751d1d1a3

Skip spell tests in OpenBSD.

Nvim or screen likely crashed.
Revist once issue #12104 is fixed.
Skip the test for the following reasons:
- unknown regression caused by https://github.com/neovim/neovim/issues/12104
- cannot revert failing test from ed0d135247
2020-08-02 12:00:00 -04:00
521d571992 vim-patch:8.0.1774: reading very long lines can be slow
Problem:    Reading very long lines can be slow.
Solution:   Read up to 1 Mbyte at a time to avoid a lot of copying.  Add a
            check for going over the column limit.
13d3b05ed2
2020-08-02 12:00:00 -04:00
55ff49b1a7 vim-patch:8.2.1254: MS-Windows: regexp test may fail if 'iskeyword' set wrongly
Problem:    MS-Windows: regexp test may fail if 'iskeyword' set wrongly.
Solution:   Override the 'iskeyword' value. (Taro Muraoka, closes vim/vim#6502)
470adb827f
2020-08-02 11:59:59 -04:00
480515e442 Merge pull request #12700 from jamessan/fileinfo-garbage 2020-08-02 11:27:12 -04:00
872ecf65d1 ui: fix problem with sattr_T overflow
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
2020-08-02 22:33:18 +09:00
228d7d9482 Merge remote-tracking branch 'upstream/master' into fileinfo-garbage 2020-07-31 17:59:48 -04:00
3e3002b90c fs: Ensure FileInfo struct is initialized
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'
2020-07-31 17:59:33 -04:00
1153ac9036 Merge pull request #12699 from jamessan/getn 2020-07-31 10:27:57 -04:00
a4fe8bdc97 shada: fix failed assertion on exit (#12692)
If set the number of history saves is 0, assertions fail when inserting an entry on exit.
Dont insert an entry when the number of saves is 0 fixes the issue.

fixes #11497
2020-07-31 16:08:34 +02:00
55a885c179 lua: Use #var instead of deprecated table.getn(var) 2020-07-31 01:33:42 -04:00
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
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
f1bd2c1dd9 ui: fix problem with the popupmenu when rightleft is set
fixes #12032
2020-07-31 02:11:50 +09:00
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
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
5f5bd576e5 Merge pull request #12687 from erw7/fix-terminal-overflow
terminal: fix terminal attribute overflow
2020-07-29 04:36:17 +09:00
b6b270b28f terminal: fix terminal attribute overflow
fixes #11548
2020-07-29 02:16:50 +09:00
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
44cbf288ec script: simplify python version check (#12672) 2020-07-24 22:42:25 +02:00
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
6c6cee644d ci: fix build failure in Travis [skip appveyor] (#12678) 2020-07-24 22:37:47 +02:00
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
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
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
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
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
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
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
b059fb5c67 Merge pull request #12654 from cbarrete/nomodifiable-hover
LSP: make the hover window nomodifiable
2020-07-21 19:50:33 +02:00
be057197d3 buffer_updates: prefer using ml_add_deleted_len_buf 2020-07-21 19:18:04 +02:00
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
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
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
9464399c8c Fix documentation
The list parameter is an an [in,out] rather than just an [in].
2020-07-20 20:21:49 +02:00
fd6361278b Make the window nomodifiable when it's created 2020-07-20 20:16:46 +02:00
8bb2c3087a LSP: make the hover window nomodifiable 2020-07-20 20:16:46 +02:00
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
950ca6abcd eval: improve ex_execute (#12445) 2020-07-20 11:01:14 +02:00
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
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
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
33837745bb Fix / improve report messages (#12396) 2020-07-19 22:37:50 +02:00
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
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
5a69eb99b7 tui.c: augment_terminfo: remove unused colorterm argument (#12602)
It is unused since 8898793ad.
2020-07-19 18:45:26 +02:00
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
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
8e350c1c69 startup: fix stall issue with -D options (#12652)
fixes #12647.
2020-07-19 17:44:22 +02:00
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
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
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
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
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
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
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
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
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
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
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
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
9f7f42ea0a Prevent flatten from taking a null list 2020-07-15 20:32:20 +02:00
fd57d69970 vim-patch:8.2.0937: asan failure in the flatten() test
Problem:    Asan failure in the flatten() test.
Solution:   Free the flattened list.
dcf59c37d0
2020-07-15 20:27:20 +02:00
6420615e3f vim-patch:8.2.0935: flattening a list with existing code is slow
Problem:    Flattening a list with existing code is slow.
Solution:   Add flatten(). (Mopp, closes vim/vim#3676)
077a1e670a
2020-07-15 20:27:20 +02:00
a02a267f8a Reuse inccommand preview window (fix #11529) (#12612)
* Reuse inccommand preview window

Currently, show_sub (inside ex_substitute) creates a new split on each
run for its existing buffer, and ex_substitute calls close_windows for
it. This functionality seems to relay in delayed operations on window
structures where the close event on the newest window is "cancelled" by
win_grid_alloc. But for multigrid, there is optimization in place in
win_grid_alloc which causes any (unnecessary?) allocations to be
skipped, and thus inccommand preview window is not preserved but closed
immediately. Alternative fix would be to remove said optimization, but
the whole "lets create a new split each time and trash the earlier
window" seems too wasteful.

Fix #11529

* Update failing test

The failing test sets inccommand=split and does `:%s/.`, but isn't
expecting to get any contents for the preview window, other than the
windows status line. Update the test to include the preview window
contents too.
2020-07-15 08:46:47 -04:00
1ca67a73c0 Merge pull request #12507 from tjdevries/tjdevries/viml_lua_callbacks
[RFC] Allow passing lua functions and closures into vim functions.
2020-07-11 17:40:31 -04:00
6360cf7ce8 lua: Add ability to pass tables with __call
vim-patch:8.2.1054: not so easy to pass a lua function to Vim
vim-patch:8.2.1084: Lua: registering function has useless code

I think I have also opened up the possibility for people to use these
callbacks elsewhere, since I've added a new struct that we should be
able to use.

Also, this should allow us to determine what the state of a list is in
Lua or a dictionary in Lua, since we now can track the luaref as we go.
2020-07-10 20:23:12 -04:00
971a191c4d lua: Add ability to pass lua functions directly to vimL 2020-07-10 16:17:33 -04:00
a695da7d3f Merge pull request #12590 from nvim-treesitter/ts-fix-highlight
[RDY] Treesitter: fix highlight, attempt 2
2020-07-10 12:58:44 -04:00
341e139992 treesitter: add parser on_lines callbacks 2020-07-10 17:16:24 +02:00
0f7eaa3555 treesitter: cache the capture hl relation 2020-07-10 17:16:24 +02:00
d19132ffd1 treesitter: update test to show overlapping works 2020-07-10 17:16:24 +02:00
c5119dbad6 treesitter: use change calbacks on redraw 2020-07-10 17:16:23 +02:00
529251d5e4 treesitter: call bufload before parsing (#12603) 2020-07-10 09:33:27 -04:00
b39edb5b60 doc: Add information about lua function calls (#12574) 2020-07-08 10:42:34 -04:00
91572ddad1 doc: mention that defer_fn applies schedule_wrap (#12601) 2020-07-07 10:55:40 +02:00
e49fc4ba1f Merge pull request #12538 from janlazo/vim-8.2.1055
vim-patch:8.1.{93,1372},8.2.{1055,1060,1089,1095,1104}
2020-07-06 23:31:24 +02:00
4ab7bbf3ea lua: add options to highlight.on_yank (#12549)
NOTE: Configuration options have  changed for highlight.on_yank.

Check help for |:help highlight.on_yank()|
2020-07-05 21:30:12 -04:00
f9579d473e lsp: add optional vertical padding, maximal size to floats (#12444)
* add vertical padding to floats

* add max_width, max_height option to float methods

* lint

* lintlint

* guard against nil wrap_at
2020-07-05 21:09:52 -04:00
10c563577c vim-patch:8.1.0093: non-MS-Windows: Cannot interrupt gdb when program is running
Problem:    non-MS-Windows: Cannot interrupt gdb when program is running.
Solution:   Only use debugbreak() on MS-Windows.
2ed890f1f8
2020-07-04 12:10:04 -04:00
37bc089fb9 vim-patch:8.2.1104: Coverity warnts for possible NULL pointer use
Problem:    Coverity warnts for possible NULL pointer use.
Solution:   Check "pbyts" is not NULL.
11b6600c88
2020-07-04 10:05:35 -04:00
9f73715daa vim-patch:8.2.1089: Coverity warns for pointer computation
Problem:    Coverity warns for pointer computation.
Solution:   Avoid computing a pointer to invalid memory.
927b7dd0fe
2020-07-04 10:05:35 -04:00
e84c075ad9 vim-patch:8.2.1095: may use pointer after freeing it
Problem:    May use pointer after freeing it when text properties are used.
Solution:   Update redo buffer before calling ml_replace().
6b949615ed
2020-07-04 10:05:34 -04:00
f01bb307fd vim-patch:8.2.1060: not all elinks files are recognized
Problem:    Not all elinks files are recognized.
Solution:   Just check for "elinks.conf". (Guido Cella, closes vim/vim#6337)
5f36d5fbb8
2020-07-04 10:05:34 -04:00
610c4d2b83 'clang/Logic error': use enums to avoid undefined array subscript 2020-07-04 10:05:34 -04:00
edaff441de vim-patch:8.1.1372: when evaluating 'statusline' the current window is unknown
Problem:    When evaluating 'statusline' the current window is unknown.
            (Daniel Hahler)
Solution:   Set "g:actual_curwin" for %{} items.  Set "g:statusline_winid"
            when evaluationg %!. (closes vim/vim#4406, closes vim/vim#3299)
1c6fd1e100
2020-07-04 10:05:34 -04:00
43a2e5fe4b vim-patch:8.2.1055: no filetype set for pacman config files
Problem:    No filetype set for pacman config files.
Solution:   Recognize pacman.conf and *.hook. (Guido Cella, closes vim/vim#6335)
73b4465ba7
2020-07-04 10:05:34 -04:00
bd5f0e9695 Merge pull request #12531 from BK1603/autoread-tui
Autoread now works in TUI too. The checktimestamp test is run at most once every 2 seconds not to poll too much and also because it doesn't make sense on some filesystems. A solution based on filesystem notifications should arrive soon.
2020-07-04 15:27:32 +02:00
bab77d122f removed test file 2020-07-04 18:18:41 +05:30
f137307dce version.c: update [ci skip] (#12581)
vim-patch:8.2.1107: 'imactivatefunc' and 'imstatusfunc' are not used in the GUI
vim-patch:8.2.1115: iminsert test fails when compiled with VIMDLL
vim-patch:8.2.1119: configure fails with Xcode 12 beta
2020-07-03 22:29:46 +02:00
435344034d removed whitespace 2020-07-03 14:14:08 +05:30
8a819d44d2 removed retry 2020-07-03 00:55:14 +05:30
ae183990ee clarified the reason for wait 2020-07-02 23:56:55 +05:30
a2370a5df0 replaced sleep with a changed mtime for the test file 2020-07-02 23:56:12 +05:30
4da0530b00 removed unnecessary feed calls 2020-07-02 23:54:54 +05:30
7b529e7912 doc: fix scripts and regenerate (#12506)
* Fix some small doc issues

* doc: fixup

* doc: fixup

* Fix lint and rebase

* Remove bad advice

* Ugh, stupid mpack files...

* Don't let people include these for now until they specifically want to

* Prevent duplicate tag
2020-07-02 07:09:17 -04:00
2844cd54da docs: Describe how to escape keycodes with nvim_feedkeys (#12484)
Closes #12297
2020-07-01 21:57:03 -04:00
3bcc27e16a Added test 2020-07-02 04:40:42 +05:30
8bee2ff19d Update file on focus gained 2020-07-02 04:40:42 +05:30
22828f59bb Added healt check for tmux focus events 2020-07-02 04:40:35 +05:30
267bc57d21 version.c: update [ci skip] (#12524)
vim-patch:8.0.1543: with 'termguicolors' Normal color doesn't work correctly

vim-patch:8.1.0089: error when ending the terminal debugger
vim-patch:8.1.0557: Termdebug: gdb may use X.Y for breakpoint number
vim-patch:8.1.0575: Termdebug: clearing multi-breakpoint does not work
vim-patch:8.1.0621: terminal debugger does not handle unexpected debugger exit
vim-patch:8.1.1637: after running tests and clean the XfakeHOME directory remains
vim-patch:8.1.2105: MS-Windows: system() may crash
vim-patch:8.1.2116: no check for out of memory
vim-patch:8.1.2149: crash when running out of memory very early
vim-patch 8.1.2242: creating docs tags uses user preferences

vim-patch:8.2.0599: Netbeans interface insufficiently tested
vim-patch:8.2.0673: cannot build Haiku in shadow directory
vim-patch:8.2.0676: pattern in list of distributed files does not match
vim-patch:8.2.0680: PTYGROUP and PTYMODE are unused
vim-patch:8.2.0689: when using getaddrinfo() the error message is unclear
vim-patch:8.2.0702: running channel tests may leave running process behind
vim-patch:8.2.0709: MS-Windows: compiler warning for int vs size_t
vim-patch:8.2.0720: occasional exit when encountering an X error
vim-patch:8.2.0727: MS-Windows: new gcc compiler does not support scanf format
vim-patch:8.2.0740: minor message mistakes
vim-patch:8.2.0741: Python tests fail because of changed message
vim-patch:8.2.0744: the name vim is not capatilized in a message
vim-patch:8.2.0750: netbeans test is a bit flaky
vim-patch:8.2.0756: MS-Windows: still a compiler warning
vim-patch:8.2.0762: buffer is not considered modified after setting crypt key
vim-patch:8.2.0763: GUI test fails without the terminal feature
vim-patch:8.2.0765: In the GUI can't use all the modifiers.
vim-patch:8.2.0767: modifyOtherKeys active when using a shell command in autocmd
vim-patch:8.2.0770: cannot map CTRL-B when using the GUI
vim-patch:8.2.0773: switching to raw mode every time ":" is used
vim-patch:8.2.0776: libvterm code lags behind the upstream version
vim-patch:8.2.0777: terminal test fails
vim-patch:8.2.0778: libvterm code lags behind the upstream version
vim-patch:8.2.0779: tmode_T not used everywhere
vim-patch:8.2.0780: libvterm code lags behind the upstream version
vim-patch:8.2.0783: libvterm code lags behind the upstream version
vim-patch:8.2.0784: libvterm code lags behind the upstream version
vim-patch:8.2.0785: libvterm code lags behind the upstream version
vim-patch:8.2.0786: channel test is flaky on FreeBSD
vim-patch:8.2.0787: libvterm code lags behind the upstream version
vim-patch:8.2.0788: memory leak in libvterm
vim-patch:8.2.0792: build failure with small features
vim-patch:8.2.0794: libvterm code lags behind the upstream version
vim-patch:8.2.0795: libvterm code lags behind the upstream version
vim-patch:8.2.0796: MS-Windows: compiler can't handle C99 construct in libvterm
vim-patch:8.2.0797: MS-Windows: compiler still can't handle C99 construct
vim-patch:8.2.0798: libvterm code lags behind the upstream version
vim-patch:8.2.0799: build fails if snprintf is not available
vim-patch:8.2.0800: errors from failing test are unclear
vim-patch:8.2.0801: terminal test fails on Mac
vim-patch:8.2.0802: libvterm code lags behind the upstream version
vim-patch:8.2.0803: libvterm code lags behind the upstream version
vim-patch:8.2.0804: libvterm code lags behind the upstream version
vim-patch:8.2.0805: terminal key codes test fails on some systems
vim-patch:8.2.0808: not enough testing for the terminal window
vim-patch:8.2.0811: terminal keycode test is flaky
vim-patch:8.2.0813: libvterm code is slightly different from upstream
vim-patch:8.2.0816: terminal test fails when compiled with Athena
vim-patch:8.2.0828: Travis: regexp patttern doesn't work everywhere
vim-patch:8.2.0830: Motif: can't map "!"
vim-patch:8.2.0831: compiler warnings for integer sizes
vim-patch:8.2.0833: mapping doesn't work in the GUI
vim-patch:8.2.0835: Motif: mapping still doesn't work
vim-patch:8.2.0837: compiler warning for value set but not used
vim-patch:8.2.0842: MS-Windows: channel tests fail
vim-patch:8.2.0846: build failure with small features
vim-patch:8.2.0849: BeOS code is not maintained and probably unused
vim-patch:8.2.0852: cannot map CTRL-S on some systems
vim-patch:8.2.0854: xxd cannot show offset as a decimal number
vim-patch:8.2.0857: GTK cell height can be a pixel too much
vim-patch:8.2.0870: MS-Windows: Control keys don't work in the GUI
vim-patch:8.2.0872: XIM code is mixed with multi-byte code
vim-patch:8.2.0885: "make shadow" does not link new lua test dir
vim-patch:8.2.0889: using old style comments
vim-patch:8.2.0903: comparing WINVER does not work correctly
vim-patch:8.2.0910: Vim is not reproducibly buildable
vim-patch:8.2.0914: MS-Windows: cannot specify a "modified by" text
vim-patch:8.2.0931: some remarks about BeOS remain
vim-patch:8.2.0939: checking for term escape sequences is long and confusing
vim-patch:8.2.0940: build failure with tiny features
vim-patch:8.2.0941: detecting terminal properties is unstructured
vim-patch:8.2.0944: xxd test leaves file behind
vim-patch:8.2.0962: terminal test sometimes hangs on Travis
vim-patch:8.2.0971: build with tiny features fails
vim-patch:8.2.0978: leaking memory in termcodes test
vim-patch:8.2.0979: a couple of screendump tests fail
vim-patch:8.2.0989: crash after resizing a terminal window
vim-patch:8.2.1010: build failure in libvterm with debug enabled
vim-patch:8.2.1013: channel tests can be a bit flaky
vim-patch:8.2.1017: Appveyor output doesn't show MinGW console features
vim-patch:8.2.1027: GUI: multi-byte characters do not work in a terminal
vim-patch:8.2.1030: reducing size of a terminal window may cause a crash
vim-patch:8.2.1031: build failure with Perl5.32

vim-patch:8.2.1057: cannot build with dynamic Lua
vim-patch:8.2.1072: missing libvterm test

vim-patch:8.2.1093: Python: double free when adding item to dict fails
vim-patch:8.2.1094: dead code in libvterm
2020-06-30 22:11:47 +02:00
554b21261e lsp: Use nvim_buf_get_lines in locations_to_items and add more tests (#12357)
* LSP: Add tests & use nvim_buf_get_lines in locations_to_items

This is to add support for cases where the server returns a URI in the
locations that does not have a file scheme but needs to be loaded via a
BufReadCmd event.

* LSP: Don't iterate through all lines in locations_to_items

* fixup! LSP: Don't iterate through all lines in locations_to_items

* fixup! fixup! LSP: Don't iterate through all lines in locations_to_items

* fixup! fixup! fixup! LSP: Don't iterate through all lines in locations_to_items
2020-06-30 11:48:04 -04:00
1920ba4b55 Merge pull request #12491 from vigoux/treesitter-set-ranges
[RDY] Treesitter set ranges
2020-06-30 00:02:46 +02:00
69816f5e13 treesitter: use single nodes in set_ranges
fixup! treesitter: fix lint
2020-06-29 23:32:49 +02:00
66af35fc85 treesitter: separate tests into smaller pieces 2020-06-29 22:21:06 +02:00
35cc8b6e83 treesitter: fix lint 2020-06-29 22:21:06 +02:00
b652f74ca3 treesitter: use nodes to mark ranges 2020-06-29 22:21:06 +02:00
558893b1b9 treesitter: add some documentation for parsers 2020-06-29 22:21:06 +02:00
75a1239eb5 treesitter: fix some clint errors
Also fixes some mismatches on the name of the function
2020-06-29 22:21:06 +02:00
ac18403d6e treesitter: test newly added set_included_ranges 2020-06-29 22:21:06 +02:00
333f3f19db treesitter: add set_included_ranges to the parser
This is the first step towards language injection using treesitter.
2020-06-29 22:21:06 +02:00
fd545d46fa Merge pull request #12567 from teto/wordcount_doc_fix
doc: fix wordcount description

Closes #12566
2020-06-29 13:33:03 -04:00
d5bbaf92c1 doc: fix wordcount description
was fixed in vim patch c572da5f67aa5cdbbc127fc6f1d0a42e38468325
and forgot in corresponding vim patch 8c3377ee76.
2020-06-29 20:08:20 +02:00
48ac77a14c LSP: Set current name as default rename text (#12553)
Since we don't know what the server considers to be a symbol, `cword` is
the best bet in most cases.

Co-authored-by: Cédric Barreteau <>
2020-06-27 20:10:19 +02:00
7efb302d26 Merge pull request #12252 from dlukes/formatting-sync 2020-06-27 11:27:51 +09:00
225f0bcd98 Merge pull request #12133 from bradking/syntax-fold 2020-06-24 13:09:30 -04:00
352831229f vim-patch:8.2.1044: not all systemd file types are recognized (#12527)
Problem:    Not all systemd file types are recognized.
Solution:   Match several more files. (Guido Cella, closes vim/vim#6319)
ef6d86c173
2020-06-24 10:18:06 +02:00
357c16515c vim-patch:8.2.0865 syntax: Add command to control how foldlevel is computed
Problem:    Syntax foldlevel is taken from the start of the line.
Solution:   Add ":syn foldlevel" to be able to use the minimal foldlevel in the line.
e35a52aee7

With `foldmethod=syntax` the foldlevel of a line is computed based
on syntax items on the line.  Previously we always used the level
of the syntax item containing the start of the line.  This works
well in cases such as:

    if (...) {
      ...
    }
    else if (...) {
      ...
    }
    else {
      ...
    }

which folds like this:

    +---  3 lines: if (...) {---------------------------
    +---  3 lines: else if (...) {----------------------
    +---  3 lines: else {-------------------------------

However, the code:

    if (...) {
      ...
    } else if (...) {
      ...
    } else {
      ...
    }

folds like this:

    +---  7 lines: if (...) {---------------------------

We can make the latter case fold like this:

    +---  2 lines: if (...) {---------------------------
    +---  2 lines: } else if (...) {--------------------
    +---  3 lines: } else {-----------------------------

by choosing on each line the lowest fold level that is followed
by a higher fold level.

Add a syntax command

    :syntax foldlevel [start | minimum]

to choose between these two methods of computing the foldlevel of
a line.
2020-06-23 19:07:33 -04:00
30b02a1bee vim-patch:8.2.1041: test summary is missing executed count (#12519)
Problem:    Test summary is missing executed count.
Solution:   Adjust pattern used for counting.
7eaafe65ee
2020-06-23 17:55:56 +02:00
2f6d1d3c88 lsp: when apply text edits, set buflisted on buffers (#12489)
The client creates buffers on the fly to be able to apply text edits on
files that weren't previously open, which is great, but it uses the
bufadd() function, which creates unlisted buffers and can lead to a
weird experience in the text editor. Setting the buffer to buflisted
fixes this.

Closes #12488.

Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
2020-06-23 17:50:37 +02:00
ee3605aed4 syntax: Factor out duplicate E390 strings 2020-06-23 09:20:17 -04:00
ae5651942e syntax: factor out helper to compute the syntax-based foldlevel 2020-06-23 09:20:17 -04:00
36d71e775a treesitter: simplify puhstree call process 2020-06-23 09:11:41 +02:00
721f69c4af terminal: preserve mode when using <Cmd>wincmd in terminal mode (#12254) 2020-06-22 23:22:58 +02:00
1619410a05 main.c: fix hang issue with recoverymode (#12496)
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.
2020-06-22 23:04:34 +02:00
8f30753aa1 Merge pull request #12455 from janlazo/vim-8.0.1554
[RDY]vim-patch:8.0.1554,8.1.1977,8.2.{927,930,932,938,954,963,964,966,980,983,998,999}
2020-06-22 22:40:33 +02:00
21453e8f09 eval: fix assertion failure in garbage collection (#12436)
* eval: fix assertion failure in garbage collection

fixes #12387, #12430

Lists with CopyID+1 linked only from previous_funccal may be removed in
the garbage collection. Therefore, the terms of the assertions are not
correct. This can be confirmed by the following (The l:x with CopyID+1 of
the first function call needs to be removed by garbage collection):

func! s:f()
  let l:x = [1]
  let g:x = l:
endfunc

for _ in range(2)
  call s:f()
endfor
call garbagecollect()
" press any key

* test: add test for #12387, #12430
2020-06-22 10:17:20 -04:00
ebee9ebe2b lsp: Add sync variant of LSP formatting
Also, factor out a `vim.lsp.util.get_effective_tabstop()` helper and add
tests for it.
2020-06-22 09:48:41 +02:00
4496628c18 version.c: update [ci skip] (#12391) 2020-06-21 21:32:56 +02:00
5f0a1b04c1 neovim-qt: bump to version 0.2.16 (#12508) 2020-06-19 13:47:55 +02:00
b198225361 vim-patch:8.2.0999: moving to next sentence gets stuck on quote
Problem:    Moving to next sentence gets stuck on quote.
Solution:   When moving to the next sentence doesn't result in moving, advance
            a character and try again. (closes vim/vim#6291)
2f03e5a0a9
2020-06-18 20:35:06 -04:00
749429693d vim-patch:8.2.0998: not all tag code is tested
Problem:    Not all tag code is tested.
Solution:   Add a few more test cases. (Yegappan Lakshmanan, closes vim/vim#6284)
3d9207ad2f
2020-06-18 18:01:44 -04:00
b4e4c2ad95 vim-patch:8.2.0983: SConstruct file type not recognized
Problem:    SConstruct file type not recognized.
Solution:   Use python for SConstruct files. (Roland Hieber)
ad72350360
2020-06-18 18:01:44 -04:00
954aed886e vim-patch:8.2.0980: raku file extension not recognized
Problem:    Raku file extension not recognized. (Steven Penny)
Solution:   Recognize .raku and .rakumod. (closes vim/vim#6255)
a65d8b5bb9
2020-06-18 18:01:44 -04:00
e681a317fe vim-patch:8.2.0964: TextYankPost does not provide info about Visual selection
Problem:    TextYankPost does not provide info about Visual selection.
Solution:   Add the 'visual' key in v:event. (closes vim/vim#6249)
37d1673ce0
2020-06-18 18:01:43 -04:00
833a5d16a2 vim-patch:8.2.0963: number increment/decrement does not work with 'virtualedit'
Problem:    Number increment/decrement does not work with 'virtualedit'.
Solution:   Handle coladd changing. (Christian Brabandt, closes vim/vim#6240,
            closes vim/vim#923)
6c6be9e88d
2020-06-18 18:01:43 -04:00
3c9ec83395 vim-patch:8.2.0966: 'shortmess' flag "n" not used in two places
Problem:    'shortmess' flag "n" not used in two places.
Solution:   Make use of the "n" flag consistent. (Nick Jensen, closes vim/vim#6245,
            closes vim/vim#6244)
722e505d1a
2020-06-18 18:01:43 -04:00
abadb687fb vim-patch:8.2.0954: not all desktop files are recognized
Problem:    Not all desktop files are recognized.
Solution:   Add the *.directory pattern. (Eisuke Kawashima, closes vim/vim#3317)
f1f0ff9557
2020-06-18 18:01:43 -04:00
44535d39e9 vim-patch:8.1.1977: terminal debugger plugin may hang
Problem:    Terminal debugger plugin may hang.
Solution:   Wait longer when still reading symbols.
19c8fe1925
2020-06-18 18:01:43 -04:00
33985a3a15 vim-patch:8.2.0938: NFA regexp uses tolower ()to compare ignore-case
Problem:    NFA regexp uses tolower() to compare ignore-case. (Thayne McCombs)
Solution:   Use utf_fold() when possible. (ref. neovim vim/vim#12456)
59de417b90
2020-06-18 18:01:42 -04:00
b7cae2bca3 option: fix pvs/v547 2020-06-18 18:01:42 -04:00
e34a7bca68 eval: fix pvs/v547 2020-06-18 18:01:42 -04:00
ee4265285d vim-patch:8.2.0932: missspelling spelllang
Problem:    Missspelling spelllang.
Solution:   Add an "l". (Dominique Pelle)
f154f3ab2c
2020-06-18 18:01:42 -04:00
9d565c5ba3 vim-patch:8.2.0930: script filetype detection trips over env -S argument
Problem:    Script filetype detection trips over env -S argument.
Solution:   Remove "-S" and "--ignore-environment". (closes vim/vim#5013)
            Add tests.
b5e18f29fa
2020-06-18 18:01:42 -04:00
150168b881 vim-patch:8.2.0927: some sshconfig and ssdhconfig files are not recognized
Problem:    Some sshconfig and ssdhconfig files are not recognized.
Solution:   Add filetype patterns.
da84ac2a6f
2020-06-18 18:01:41 -04:00
a5bde56b37 vim-patch:8.0.1554: custom plugins loaded with --clean
Problem:    Custom plugins loaded with --clean.
Solution:   Do not include the home directory in 'runtimepath'.
0726870326
2020-06-18 18:01:41 -04:00
70d4b31b83 lsp: Add new highlight groups used in show_line_diagnostics (#12473)
* lsp: support custom hl groups in show_line_diagnostics

Closes #12472.

* runtime: add docs for the new lsp highlight groups

Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
2020-06-18 08:04:49 -04:00
25aa2969f2 Merge pull request #12497 from leun4m/patch/tex-runtime
Apply several upstream changes to text-runtime
2020-06-18 07:31:24 -04:00
8498c40fcf tex.vim: patch runtime/indent to 388a5d4f20b4
vim/vim@388a5d4f20
2020-06-17 12:52:39 +02:00
ad42ac4618 tex.vim: patch runtime to 65e0d77a66b7
vim/vim@65e0d77a66
2020-06-16 19:57:41 +02:00
db756fca52 tex.vim: patch runtime to 388a5d4f20b4
vim/vim@388a5d4f20
2020-06-16 19:56:14 +02:00
78f37f6a35 tex.vim: patch runtime to 1d9215b9aaa1
vim/vim@1d9215b9aa
2020-06-16 19:53:35 +02:00
e628a05b51 Merge pull request #12342 from h-michael/fix-doc 2020-06-15 18:08:34 +09:00
52cd8bf507 doc: fix vim.api.nvim_buf_attach callback arguments 2020-06-15 12:30:13 +09:00
6613ab6bca Merge pull request #12469 from h-michael/request
lsp: even if contents before change is 0 byte, request to server
2020-06-15 11:11:42 +09:00
8daefe2f04 Fix highlight group names in LSP documentation (#12427)
LspDiagnosticInformation -> LspDiagnosticsInformation
LspDiagnosticInformationSign -> LspDiagnosticsInformationSign
LspDiagnosticHint -> LspDiagnosticsHint
LspDiagnosticHintSign -> LspDiagnosticsHintSign
2020-06-14 15:25:39 -04:00
44fe8828f0 lsp: Fix text edits with the same start position (#12434)
According to the LSP spec[1], multiple edits can have the same starting
position, and if that is the case, they should be applied in the order
as they come in the array.

The implementation uses a reverse sort to not interfere with non applied
edits, but failed to take into account the spec.

[1] https://microsoft.github.io/language-server-protocol/specifications/specification-3-14/#textedit
2020-06-14 15:23:16 -04:00
e8ccd0f234 man.vim: Remove unnecessary code
Not sure why this was added in 94f4469638

It doesn't seem to do anything and I can't reproduce the linked issue
with this patch so I think it's all working now.

cc @justinmk
2020-06-13 02:55:40 -04:00
adc3425a37 man.vim: Fix tagfunc to respect b:man_default_sects
Also, kudos to @zsugabubus for fixing a related issue in #12417

This also prevents any sorting of the paths from man. We need to
respect the order we get from it otherwise you end up loading

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man/man1/ls.1

on MacOS instead of /usr/share/man/man1/ls.1
2020-06-13 02:55:40 -04:00
4aaffc5f33 man.vim: Refactor verify_exists to unset $MANSECT as needed
Also cleaned it up a little and made it faster.

Closes #9159 and #9271

Also changes man#extract_sect_and_name_ref to only return a single
section at a time. This fixes a bug in its usage in man#goto_tag
where get_paths would be called with multiple sections and it does
not support that.

I noticed that our tagfunc doesn't obey b:man_default_sects and
I'll fix that next.
2020-06-12 23:44:31 -04:00
a0a84fc9e0 lsp: Add BufLeave to close_preview_autocmd function call (#12477)
else popup window remains open when switching buffer.
2020-06-12 20:38:33 +02:00
6d1404faf0 test: Fix ignored LSP tests (#12470)
* Fix ignored LSP tests

* Restructure _make_floating_popup_size tests

Co-authored-by: Christian Clason <christian.clason@uni-due.de>

Co-authored-by: Christian Clason <christian.clason@uni-due.de>
2020-06-11 20:34:34 -04:00
b751d16cad lsp: Fix #12449 textDocumentSync.save can be boolean. Access textDocumentSync.save.includeText only if table. (#12450) 2020-06-11 15:47:03 -04:00
e39ec50d73 lsp: even if contents before change is 0 byte, request to server
fix: https://github.com/neovim/neovim/issues/12414
2020-06-11 13:09:05 +09:00
e78658348d Merge pull request #12467 from h-michael/issue-template
issue template: fix label syntax for lsp bug report
2020-06-11 09:42:35 +09:00
d7f2318ada issue template: fix label syntax for lsp bug report 2020-06-11 08:18:12 +09:00
bb946fb475 Merge pull request #12461 from h-michael/issue-template 2020-06-11 08:08:32 +09:00
9aba7f122c add GitHub issue template for lsp 2020-06-11 06:12:37 +09:00
dcd6cf5f34 Merge pull request #11819 from erw7/fix-dot-net-stdin
[RDY] win: make UV_OVERLAPPED_PIPE optional
2020-06-10 13:24:45 -04:00
d17e38e482 Add overlapped option to jobstart
When UV_OVERLAPPED_PIPE was used for the pipe passed to the child process, a
problem occurred with the standard input of the .Net Framework application
(#11809). Therefore, add the overlapped option to jobstart() and change it so
that it is set only when necessary
2020-06-10 22:21:14 +09:00
f1cbd39f7b vim-patch:8.2.0920: writing viminfo fails with a circular reference
Problem:    Writing viminfo fails with a circular reference.
Solution:   Use copyID to detect the cycle. (closes vim/vim#6217)
5b157fe2ed
2020-06-09 23:54:07 +09:00
d8c5d122f1 Merge pull request #12376 from erw7/fix-stack-overflow-on-input-enqueue
input: fix stack overflow
2020-06-08 16:52:56 +02:00
9fc3949841 shada: fix write E5004 error on exit
Fix the problem of failing to write shada when the global variable contains
Funcref or Partial.
2020-06-08 23:15:10 +09:00
980b12edba Merge pull request #12192 from Billy4195/vim-8.2.0629
[RFC] vim-patch:8.2.0629
2020-06-07 18:00:43 +02:00
22f6da9514 vim-patch:8.2.0629: setting a boolean option to v:false does not work
Problem:    Setting a boolean option to v:false does not work.
Solution:   Do not use the string representation of the value. (Christian
            Brabandt, closes vim/vim#5974)
65d032c779
2020-06-06 23:25:07 +08:00
1805fb469a vim-patch:8.2.0111: VAR_SPECIAL is also used for booleans
Problem:    VAR_SPECIAL is also used for booleans.
Solution:   Add VAR_BOOL for better type checking.
9b4a15d5db
2020-06-06 23:24:58 +08:00
dbc8ec9446 Merge pull request #12321 from vigoux/treesitter-runtime
treesitter: update runtime
2020-06-06 15:37:51 +02:00
39f802bef4 Merge pull request #12416 from teto/openbsd_fix
ci: bump openbsd image
2020-06-06 02:06:40 +02:00
33dafc4f0f Merge pull request #12413 from janlazo/vim-8.2.0089
[RDY]vim-patch:8.0.1564,8.1.{917,1895,2018,2335},8.2.{89,491,873,892,905}
2020-06-06 02:05:49 +02:00
fca471d8e2 Merge pull request #12411 from kuuote/fix-remote-plugin-command
runtime: fix remote plugin command fails at some case
2020-06-06 01:39:12 +02:00
d14298a1f0 test: remove flaky unhelpful test
vim.wait( sthg)
2020-06-06 01:11:12 +02:00
c4888b2bde ci: bump openbsd image 6.5 -> 6.7
seems like 6.5 is not supported anymore.
2020-06-06 01:11:12 +02:00
9538a7895c vim-patch:8.2.0905: test coverage could be better
Problem:    Test coverage could be better.
Solution:   Add a couple of tests. (Dominique Pelle, closes vim/vim#6202)
e0c3c3d6cb
2020-06-04 21:21:10 -04:00
0fa2aefb61 vim-patch:8.2.0892: ubsan warns for undefined behavior
Problem:    Ubsan warns for undefined behavior.
Solution:   Use unsigned instead of signed variable. (Dominique Pelle,
            closes vim/vim#6193)
c5acc0f7fe
2020-06-04 20:52:53 -04:00
ed85d68123 vim-patch:8.1.2335: error message for function arguments may use NULL pointer
Problem:    Error message for function arguments may use NULL pointer.
            (Coverity)
Solution:   Use the original function name.
2118a30295
2020-06-04 20:52:53 -04:00
909af2f3f1 vim-patch:8.2.0491: cannot recognize a <script> mapping using maparg()
Problem:    Cannot recognize a <script> mapping using maparg().
Solution:   Add the "script" key. (closes vim/vim#5873)
2da0f0c445
2020-06-04 20:52:53 -04:00
f85bf6ec37 vim-patch:8.2.0873: a .jl file can be sawfish (lisp) or Julia
Problem:    A .jl file can be sawfish (lisp) or Julia.
Solution:   Do not recognize *.jl as lisp, since it might be Julia.
            (closes vim/vim#6178)
2891459b81
2020-06-04 20:52:52 -04:00
44531928b3 vim-patch:8.1.2018: using freed memory when out of memory and displaying message
Problem:    Using freed memory when out of memory and displaying message.
Solution:   Make a copy of the message first.
e5fbd73930
2020-06-04 20:52:52 -04:00
310a56d0a0 vim-patch:8.1.1895: using NULL pointer when out of memory
Problem:    Using NULL pointer when out of memory.
Solution:   Bail out or skip the code using the pointer. (Zu-Ming Jiang,
            closes vim/vim#4805, closes vim/vim#4843, closes vim/vim#4939, closes vim/vim#4844)
6f10c70b59
2020-06-04 20:52:52 -04:00
64a2884d4c vim-patch:8.0.1564: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate the +autocmd feature. Takes away 450 #ifdefs and
            increases code size of tiny Vim by only 40 Kbyte.
f2bd8ef2b4
2020-06-04 20:52:52 -04:00
2298350884 vim-patch:8.1.0917: double free when running out of memory
Problem:    Double free when running out of memory.
Solution:   Remove one free. (Ken Takata, closes vim/vim#3955)
445e71c5ee
2020-06-04 20:52:52 -04:00
f5c1314cb0 vim-patch:8.2.0089: crash when running out of memory in :setfiletype completion
Problem:    Crash when running out of memory in :setfiletype completion.
Solution:   Do not allocate memory. (Dominique Pelle, closes vim/vim#5438)
f0f8055102
2020-06-04 20:52:52 -04:00
dd4018947c lsp: do not process diagnostics for unloaded buffers (#12440) 2020-06-04 19:37:38 -04:00
b7f3f11049 lsp: compute height of floating preview correctly for wrapped lines (#12380)
* take wrapping into account when computing float height

* factor out size calculation

* add test

* accept and pass through opts.wrap_at in floating_preview

* make padding configurable

* slightly refactor fancy_floating_markdown to make use of make_position

* padding using string.format

* move trim and pad to separate function

* nit

Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>

* remove mention of backward compat

* make lint happy

Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>
2020-06-04 14:23:03 -04:00
6f4f38cd54 lsp: Add check for declaration and typeDefinition support in vim lsp server before making request (#12421)
* Add check for typeDefinition support in vim lsp server

* Check for typeDefinitionProvider in server

* Check for declarationProvider in server

* Add check for client support

* Fix typo
2020-06-04 08:52:44 -04:00
ac5a3f2c56 lua: fix behavior when split empty string (#12429)
* lua: fix behavior when split empty string

* test: lsp.util.apply_text_edits with an empty edit
2020-06-04 08:48:48 -04:00
b807de36d4 build: match WSL2 kernel name (#12425) 2020-06-04 14:07:09 +02:00
96568d5b07 Merge pull request #12343 from ndreas/fix/lsp-multibyte-indexing
Fix LSP multibyte indexing
2020-06-04 12:16:42 +09:00
6b949211a0 treesitter: update runtime
Update to 81d533d2d1b580fdb507accabc91ceddffb5b6f0.
2020-06-03 21:33:34 +02:00
6a93077475 treesitter: fix tests 2020-06-03 19:58:02 +02:00
8a1276005a Add v:event.visual during TextYankPost (#12382)
* propagate visual selection to textyankpost event

* adapt tests

* add docs

* also adapt oldtest
2020-06-03 10:51:25 -04:00
60c581b35d lua: fix infinite loop for vim.split on empty string (#12420) 2020-06-02 19:31:43 -04:00
662688817b treesitter: enhance script and add README
The script now updates a `treesitter_commit_sha.txt` file to keep track
of which commit/branch/tag we're at.
2020-06-02 23:13:42 +02:00
f5fbe8e3b5 treesitter: add update script and update runtime
Update treesitter runtime to : 9a82dcc666d06617cbab3061467075019fae0b0d
2020-06-02 23:13:42 +02:00
8349192503 treesitter: update runtime
Since tree-sitter PR 615, predicates are not parsed the same.
"Old" way of writing predicates is still supported.
2020-06-02 21:19:07 +02:00
91e41c8576 lua: add vim.highlight.range (#12401) 2020-05-31 14:56:00 -04:00
ed815c61fd vim-patch.sh: fix bash version-check message #12398 2020-05-31 10:27:05 -07:00
89123017b8 test: rewrite to multiple arguments 2020-06-01 00:10:17 +09:00
7124c0e5ac runtime: fix remote plugin command fails at some case
fixes #12410
2020-05-31 20:21:58 +09:00
4b87248285 vim-patch:8.2.0843: filetype elm not detected (#12403)
Problem:    Filetype elm not detected.
Solution:   Recognize *.elm files. (closes vim/vim#6157)
0016fd2e29
2020-05-30 18:06:23 -04:00
b8e2cd4f60 Merge pull request #12348 from tjdevries/luawait
[RFC] lua: Add vim.wait()
2020-05-30 12:56:02 -04:00
be662fe5c7 lua: vim.wait implementation 2020-05-30 12:01:32 -04:00
504d6878da lua: vim.wait initial outline 2020-05-30 12:01:32 -04:00
7d8dc4c331 provider: Fix ruby checkhealth error for Windows (#12400)
Plaform: Windows 10

run `cmd /c gem list -ra ^^neovim$`

*** REMOTE GEMS ***

minitest-neovim (0.1.0)
neovim (0.7.1, 0.7.0, 0.6.2, 0.6.1, 0.6.0, 0.5.1, 0.5.0, 0.4.0, 0.3.3, 0.3.2, 0.3.1, 0.3.0, 0.2.5, 0.2.4, 0.2.3, 0.2.2, 0.2.1, 0.2.0, 0.1.0, 0.0.6, 0.0.5, 0.0.4, 0.0.3, 0.0.2, 0.0.1)

run `cmd /c gem list -ra "^^neovim$"`

*** REMOTE GEMS ***
neovim (0.7.1, 0.7.0, 0.6.2, 0.6.1, 0.6.0, 0.5.1, 0.5.0, 0.4.0, 0.3.3, 0.3.2, 0.3.1, 0.3.0, 0.2.5, 0.2.4, 0.2.3, 0.2.2, 0.2.1, 0.2.0, 0.1.0, 0.0.6, 0.0.5, 0.0.4, 0.0.3, 0.0.2, 0.0.1)
2020-05-30 14:29:24 +02:00
977c0f292f API: nvim_create_buf: unset 'modeline' in scratch-buffer #12379
Although 'nomodeline' is not strictly part of the definition of
a "scratch-buffer" it is obviously the right default.
2020-05-29 09:45:32 -07:00
5a9226c800 lua: simple snippet support in the completion items (#12118)
Old behavior is: foo(${placeholder: bar, ...)

with lots of random garbage you'd never want inserted.

New behavior is: foo(bar, baz) 

(which maybe is good, maybe is bad [depends on user], but definitely better than it was).

-----

* Implement rudimentary snippet parsing

Add support for parsing and discarding snippet tokens from the completion items.

Fixes #11982

* Enable snippet support

* Functional tests for snippet parsing

Add simplified real-world snippet text examples to the completion items
test

* Add a test for nested snippet tokens

* Remove TODO comment

* Return the unmodified item if the format is plain text

* Add a plain text completion item
2020-05-28 08:31:56 -04:00
2ca8f02a64 lsp: add preview_location util function (#12368)
* add preview_location

* add doc stub

* doc style; return bufnr&winnr of preview

* doc: function may return nil

Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>

* doc: fixup

Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>
2020-05-26 09:07:10 -04:00
15b762761a lsp: make the command error message more detailed (#11633)
* lsp.lua: make the error message more detailed

* test: add lsp._cmd_part test
2020-05-26 08:55:45 -04:00
618e9a7692 Merge pull request #11803 from erw7/virtual-terminal-input
[RDY] win/TUI: Use virtual terminal input if available
2020-05-26 11:03:50 +02:00
e01fc33515 [squash] fix comment [skip ci] 2020-05-26 17:23:04 +09:00
bb2be0de38 deps: update libuv
https://github.com/neovim/neovim/pull/11808
https://github.com/neovim/libuv/pull/12

v1.34.2
  * darwin: stop calling SetApplicationIsDaemon() (Ben Noordhuis)
  * osx,fsevent: fix race during uv_loop_close (Jameson Nash)
  * unix: handle uv__open_cloexec return value correctly (Anna Henningsen)
v1.34.1
  * unix: fix -Wstrict-aliasing compiler warning (Ben Noordhuis)
  * unix: cache address of dlsym("mkostemp") (Ben Noordhuis)
  * win,tty: avoid regressions in utf-8 handling (Jameson Nash)
  * win: remove bad assert in uv_loop_close (Jameson Nash)
  * tty,unix: avoid affecting controlling TTY (Jameson Nash)
v1.34.0
  * unix: refactor uv__fs_copyfile() logic (cjihrig)
  * fs: handle non-functional statx system call (Milad Farazmand)
  * unix,win: add uv_sleep() (cjihrig)
  * fs: add uv_fs_mkstemp (Saúl Ibarra Corretgé)
v1.33.0
  * win: fix reading hidden env vars (Anna Henningsen)
  * unix,win: add uv_random() (Ben Noordhuis)
  * win, tty: fix problem of receiving unexpected SIGWINCH (erw7)
  * fs: use statvfs in uv__fs_statfs() for Haiku (Calvin Hill)
  * fsevents: stop using fsevents to watch files (Jameson Nash)
  * win,tty: add uv_tty_{get,set}_vterm_state (erw7)
  * unix: update uv_fs_copyfile() fallback logic (Stefan Bender)
  * win: cast setsockopt struct to const char* (Shelley Vohr)
  * unix: fix {Net,Open}BSD build
2020-05-26 14:16:09 +09:00
57a4f8905b win/TUI: enable mouse on ConEmu and vtpcon without vti 2020-05-26 14:16:06 +09:00
29f1e1995d win: use virtual terminal input (VTI) if available #11803
fixes #9514
fixes #11773
2020-05-26 14:13:26 +09:00
8c588246a5 Merge pull request #10905 from erw7/vim-8.1.0475
vim-patch:8.1.{475,800,868,1007,1027,1031,1033,1037,1058,1435,1484,1485}
2020-05-25 14:01:36 +02:00
a532fb2cf4 eval: fix problem with free_unref_funccal not being called 2020-05-25 18:52:30 +09:00
c3dab08c8f vim-patch:8.1.1485: double free when garbage_collect() is used in autocommand
Problem:    Double free when garbage_collect() is used in autocommand.
Solution:   Have garbage collection also set the copyID in funccal_stack.
c07f67ad0e
2020-05-25 18:52:30 +09:00
0cab85df4d vim-patch:8.1.1484: some tests are slow
Problem:    Some tests are slow.
Solution:   Add timing to the test messages.  Fix double free when quitting in
            VimLeavePre autocmd.
75ee544f99
2020-05-25 18:52:29 +09:00
e6e6affc0e nvim_input: add test 2020-05-25 14:59:27 +09:00
237c9da666 input: fix stack overflow
fixes #12287, #11788
2020-05-25 14:59:27 +09:00
b996205969 Merge pull request #12367 from h-michael/lsp-log 2020-05-25 11:56:42 +09:00
37ee95504e vim-patch:8.0.1668: terminal debugger: can't re-open source code window (#12329)
Problem:    Terminal debugger: can't re-open source code window.
Solution:   Add the :Source command.  Also create the window if needed when
            gdb stops at a source line.
c4b533e1e9
2020-05-24 20:46:41 +02:00
e89462d985 vim-patch:8.1.2233: cannot get the Vim command line arguments (#12117)
Problem:    Cannot get the Vim command line arguments.
Solution:   Add v:argv. (Dmitri Vereshchagin, closes vim/vim#1322)
69bf634858
2020-05-24 20:45:25 +02:00
97bcab8f5e Merge pull request #12327 from janlazo/vim-8.2.0766
vim-patch:8.1.2228,8.2.{36,37,766,810}
2020-05-23 14:33:33 +02:00
e0e5ada2bf lsp: change log name to "lsp.log" from "vim-lsp.log"
It's confusing because vim-lsp already has the same name as the plugin name that predates this built-in lsp.
Also, since "vim.fn.stdpath" is used, adding the prefix "nvim-" is redundant, so just "lsp.log" will suffice.
2020-05-23 15:02:38 +09:00
ef8f965c64 doc: Add optional d for :lcd and :tcd (#12359)
The `:lcd -` command, and `:tcd -` which returns to a previous directory, can be done with `:lc -` and `:tc -` respectively. 

Basically, the d is optional, so I updated the documentation to indicate this in the traditional format.
2020-05-22 21:35:40 -04:00
0666b23d65 vim-patch:8.2.0810: error when appending "tagfile" to 'wildoptions'
Problem:    Error when appending "tagfile" to 'wildoptions'.
Solution:   use flags P_ONECOMMA and P_NODUP. (Dmitri Vereshchagin,
            closes vim/vim#6105)
2e61e2d083
2020-05-22 20:04:10 -04:00
9a8efec8fb vim-patch:8.2.0037: missing renamed message
Problem:    Missing renamed message.
Solution:   Now really add the error number.
1500a42c42
2020-05-21 16:56:55 -04:00
30ec3a067b vim-patch:8.2.0036: not enough test coverage for match functions
Problem:    Not enough test coverage for match functions.
Solution:   Add a few more test cases.  (Dominique Pelle, closes vim/vim#5394)
            Add error number.
49d68bf5e4
2020-05-21 16:56:55 -04:00
9cdea8148c vim-patch:8.1.2228: screenpos() returns wrong values when 'number' is set
Problem:    screenpos() returns wrong values when 'number' is set. (Ben
            Jackson)
Solution:   Compare the column with the window width. (closes vim/vim#5133)
38ba4dce4a
2020-05-21 16:56:55 -04:00
63966a9ec2 vim-patch:8.2.0766: display error when using 'number' and 'breakindent'
Problem:    Display error when using 'number' and 'breakindent'.
Solution:   Adjust extra spaces in the first row. (Ken Takata, closes vim/vim#6089,
            closes vim/vim#5986)
e882f7a73c
2020-05-21 16:56:54 -04:00
04a0486c66 Change uri_to_fname to not convert non-file URIs (#12351)
* Change uri_to_fname to not convert non-file URIs

A URI with a scheme other than file doesn't have a local file path.

* fixup! Change uri_to_fname to not convert non-file URIs

* fixup! fixup! Change uri_to_fname to not convert non-file URIs
2020-05-22 01:17:21 +09:00
044eb56ed2 LSP: Don't swallow bufnr argument from callbacks (#12350)
The callbacks for `textDocument/documentSymbol` and `workspace/symbol`
never received the `bufnr` argument because the logic that adds error
validation and logging swallowed the argument.
2020-05-20 21:18:35 -04:00
c6dc397801 fixed hang issue with --headless and -r option specified (#12209)
* 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 a02dc40e3b.

* Revert "fixed functional ex_cmds tests"

This reverts commit 3bdb8da20a.

* fixed conditional again

* added test for fixed hang issue with --headless (#11386)
2020-05-20 10:32:02 -04:00
7116105d66 provider: Add python3.9 to autoload/provider/pythonx.vim (#12344)
3.9's scheduled for beta release today.
https://www.python.org/dev/peps/pep-0596/
2020-05-20 13:57:46 +02:00
67eb3bfbc3 Add tests for jump_to_location 2020-05-19 08:51:10 +02:00
0aca34e0a9 Use get_line_byte_from_position in jump_to_location 2020-05-19 08:50:31 +02:00
131063e08f Refactor fetching the line byte
Takes the entire LSP position instead of line/col
2020-05-19 08:49:13 +02:00
74fed7d50f Merge pull request #12338 from h-michael/fix-flaky 2020-05-19 10:18:05 +09:00
5126546ed7 lsp: fix get diagnositcs 2020-05-19 10:06:30 +09:00
eabf1803cd test: fix flaky vim.defer_fn test 2020-05-19 00:02:14 +09:00
f2894bffb0 lua: Add highlight.on_yank (#12279)
* add lua function to highlight yanked region

* extract namespace, better naming, default values

* add default for event argument

* free timer

* factor out mark to position calculation

* d'oh

* make sure timer stops before callback (cf. luv example)

* factor out timer, more documentation

* fixup

* validate function argument for schedule

* fix block selection past eol

* correct handling of multibyte characters

* move arguments around, some cleanup

* move utility functions to vim.lua

* use anonymous namespaces, avoid local api

* rename function

* add test for schedule_fn

* fix indent

* turn hl-yank into proper (hightlight) module

* factor out position-to-region function

mark extraction now part of highlight.on_yank

* rename schedule_fn to defer_fn

* add test for vim.region

* todo: handle double-width characters

* remove debug printout

* do not shadow arguments

* defer also callable table

* whitespace change

* move highlight to vim/highlight.lua

* add documentation

* add @return documentation

* test: add check before vim.defer fires

* doc: fixup
2020-05-18 09:49:50 -04:00
a6be7a9180 doc: Vim internal variables & options in lua (#12302)
* doc: Add info about vim dicts in lua

* doc: preamble and info

* doc: remove weird spacing

* fixup
2020-05-17 23:29:34 -04:00
a91ce497b4 lsp: Fix timezone format of LSP log (ISO 8601) (#12332) 2020-05-17 20:12:22 -04:00
4fbbe1c957 lsp: Handle end lines in apply_text_edits (#12314)
If the LSP sends an end line that is larger than what nvim considers to be the
last line, you get an Index out of bounds error when fetching the line from
nvim, a change that was introduced in #12223. This change removes the strict
indexing and checks the return value from nvim_buf_get_lines.
2020-05-17 13:47:14 -04:00
ae5bd0454e lua: add tbl_deep_extend (#11969) 2020-05-17 13:24:34 -04:00
090d3c2813 matchdelete: fix porting (#12328)
really use win and not curwin
2020-05-17 13:55:10 +02:00
d7d69fed18 vim-patch:8.1.1084: cannot delete a match from another window (#12325)
Problem:    Cannot delete a match from another window. (Paul Jolly)
Solution:   Add window ID argument to matchdelete(), clearmatches(),
            getmatches() and setmatches(). (Andy Massimino, closes vim/vim#4178)
aff749145e
2020-05-16 15:25:51 +02:00
f3d0a1741e Merge pull request #12324 from alindeman/nil-code-actions 2020-05-16 11:58:54 +09:00
986bed2329 Check for nil before checking for empty table
At least the `gopls` language server seems to return nil/null if no code
actions are available. Currently this results in an error:

> Error executing vim.schedule lua callback: shared.lua:199: Expected table, got nil
2020-05-15 21:34:28 -04:00
f559e5249e LSP: Add textDocument/codeAction support (#11607)
* Add textDocument/codeAction

* Add callback for workspace/executeCommand
* Escape newlines in codeAction titles
* Return empty list in get_line_diagnostics if no buffer diagnostics
* Add stub documentation
* Validate context parameter in code_action
* Add support for edit in CodeAction responses
* Group diagnostics by line in vim.lsp.util.get_line_diagnostics()
* Advertise code action literal support
2020-05-16 01:18:59 +02:00
c37d9fa3da Merge pull request #11764 from blueyed/vim-patch-usage 2020-05-15 10:45:10 -04:00
e2a33a6622 Merge pull request #12259 from janlazo/vim-8.1.1186 2020-05-15 10:36:32 -04:00
da6f38ab3c LSP: Add workspace.applyEdit client capabilities (#12313)
applyEdit is supported by the built-in client.
2020-05-14 18:56:33 +02:00
02155f5c10 lsp: fix bug when documentEdit version=null for unattached buffer (#12272) 2020-05-13 23:14:52 -04:00
076b0949d0 vim-patch:8.2.0736: some files not recognized as pamenv
Problem:    Some files not recognized as pamenv.
Solution:   Add pam_inv.conf. (closes vim/vim#6065)
aacc6afdb8
2020-05-11 23:57:29 -04:00
adcabb73bc vim-patch:8.2.0309: window-local values have confusing name
Problem:    Window-local values have confusing name.
Solution:   Rename w_p_bri* to w_briopt_*.
b81f56fb57
2020-05-11 22:30:24 -04:00
801c8e06d6 vim-patch:8.2.0308: 'showbreak' does not work for a very long line
Problem:    'showbreak' does not work for a very long line. (John Little)
Solution:   Check whether 'briopt' contains "sbr". (Ken Takata, closes vim/vim#5523,
            closes vim/vim#5684)
1aa76b8fd0
2020-05-11 22:30:24 -04:00
393dc2b0f5 vim-patch:8.2.0713: the pam_environment file is not recognized
Problem:    The pam_environment file is not recognized.
Solution:   Add a filetype pattern for pamenv. (closes vim/vim#6051)
6115481053
2020-05-11 22:30:24 -04:00
03cc818fdc vim-patch:8.2.0705: indent tests don't run on CI for FreeBSD
Problem:    Indent tests don't run on CI for FreeBSD.
Solution:   Set modeline. (Ozaki Kiichi, closes vim/vim#6048)
3657686a0e
2020-05-11 22:30:24 -04:00
ae01a5e9f8 vim-patch:8.1.1186: readdir() allocates list twice
Problem:    readdir() allocates list twice.
Solution:   Remove second allocation.  Also check for zero length.
334ad41504
2020-05-11 22:30:23 -04:00
55b62a937c LSP: Make applyEdit return a response (#12270)
According to the specification workspace/applyEdit needs to respond with
a `ApplyWorkspaceEditResponse`

See https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_applyEdit

This is a subset of https://github.com/neovim/neovim/pull/11607
2020-05-11 16:56:35 +02:00
9816173fb3 Merge #12275 from erw7/profile-fix-use-after-free
viml/profile: fix missing fixes when merging vim-patch:8.1.0130

Fix #12255

### Steps to reproduce using `nvim -u NORC`

```
nvim -u NORC
:function Test()
:endfunction
:profile start log1
:profile func Test
:call Test()
:profile stop
:profile start log2
:profile func Test
:call Test()
:profile stop
```

### Actual behaviour

#### log1
```
FUNCTION Test()
Called 1 times
...
```

#### log2
```
FUNCTION Test()
Called 2 times
...
```

### Expected behaviour

#### log1
```
FUNCTION Test()
Called 1 times
...
```

#### log2
```
FUNCTION Test()
Called 1 times
...
```
2020-05-09 17:22:08 -04:00
7872877ce5 test: add more profile tests
- Add a test to make sure that 'profile dump' does not reset the profile.
- Add a test to make sure that 'profile stop' does reset the profile.
2020-05-10 03:16:30 +09:00
949783fdfa viml/profile: fix issue where profile is not reset on stop 2020-05-09 11:21:52 +09:00
861aade680 viml/profile: fix use after free
fixes #12255.
2020-05-09 11:21:52 +09:00
2f818eb9ee runtime/tutor: fix broken inline spans #12282
* runtime/syntax/tutor: fix broken inline spans

Also, conceal the ends of code blocks.

Re: #11401 and #12273

* fixup
2020-05-08 09:48:25 -07:00
281e44f7bb lsp: Make apply_text_edits non-ASCII safe (#12223)
* Make apply_text_edits non-ASCII safe

Use `vim.str_byteindex` to correct starting and ending positions for text edits if the line contains non-ASCII characters.

Fixes #12221

* text_edit may be applied to other buffers

* make sure the buffer is loaded

* add comments

* add test for non-ASCII edits
2020-05-08 10:04:41 -04:00
9a67b030d9 lsp: Handle unknown CompletionItemKind and SymbolKind (#12257)
* lsp: handle kinds not specified in protocol

fix: #12200
If the client set "symbolKind.valueSet",
the client must handle it properly even if it receives a value outside the specification.

* test: add lsp.util.{get_completion_item_kind_name, get_symbol_kind_name} test case

* lsp: make lsp.util.{get_completion_item_kind_name, get_symbol_kind_name} private
2020-05-07 16:23:25 -04:00
1407899c32 lua: Add buffer, window and tab accessors (#12268)
* Add buffer, window and tab accessors

* Fix deletion and add tests
2020-05-07 15:22:24 -04:00
7432b3ca4c lsp: set buflisted when jumping to location (#12253) 2020-05-07 09:30:42 -04:00
7ac46b5d37 vim-patch:8.1.1435: memory usage test is a bit too flaky
Problem:    Memory usage test is a bit too flaky.
Solution:   Adjust the tolerances a bit. (Christian Brabandt)
5d508dd39e
2020-05-07 16:48:08 +09:00
a32bac0c04 vim-patch:8.1.1058: memory usage test may still fail on some systems
Problem:    Memory usage test may still fail on some systems.
Solution:   Use 98% of the lower limit. (Christian Brabandt)
3a731ee0c2
2020-05-07 16:48:08 +09:00
6b3399338f vim-patch:8.1.1037: memory usage test may still fail on some systems
Problem:    Memory usage test may still fail on some systems.
Solution:   Increase tolerance from 3% to 20%.
6b6f7aae4a
2020-05-07 16:48:08 +09:00
7acdc9da1d vim-patch:8.1.1033: memory usage test may still fail on some systems
Problem:    Memory usage test may still fail on some systems. (Elimar
            Riesebieter)
Solution:   Increase tolerance from 1% to 3%.
ba64ba0935
2020-05-07 16:48:08 +09:00
6175d974c2 vim-patch:8.1.1031: memory usage test may still fail
Problem:    Memory usage test may still fail.
Solution:   Drop the unused min value. (Christian Brabandt)
f7e47af776
2020-05-07 16:48:08 +09:00
9ad2ba1c5c vim-patch:8.1.1027: memory usage test sometimes fails
Problem:    Memory usage test sometimes fails.
Solution:   Use 80% of before.last as the lower limit. (Christian Brabandt)
08cda65ddf
2020-05-07 16:48:08 +09:00
1212390254 vim-patch:8.1.1007: using closure may consume a lot of memory
Problem:    Using closure may consume a lot of memory.
Solution:   unreference items that are no longer needed. Add a test. (Ozaki
            Kiichi, closes vim/vim#3961)
209b8e3e3b
2020-05-07 16:47:41 +09:00
17f067f4b4 vim-patch:8.1.0475: memory not freed on exit when quit in autocmd
Problem:    Memory not freed on exit when quit in autocmd.
Solution:   Remember funccal stack when executing autocmd.
27e80c885b
2020-05-07 16:00:46 +09:00
f04a9a2c9a Merge #12203 from janlazo/vim-8.2.0648
vim-patch:8.1.{800,868,1581},8.2.{648,649,663,678,681,688,691,692}
2020-05-05 23:38:15 -04:00
d2766b06c8 vim-patch:8.1.1120: cannot easily get directory entry matches #12222
Problem:    Cannot easily get directory entry matches.
Solution:   Add the readdir() function. (Yasuhiro Matsumoto, closes vim/vim#2439)
543c9b1921

closes #12212
2020-05-05 08:15:45 -07:00
48c2198297 paste: support replace mode (#11945)
* paste: support replace mode
* Clean up

Co-authored-by: Jesse Bakker <git@jessebakker.com>
2020-05-05 13:18:41 +02:00
a467f3f665 tag: fix problem when tagfunc return value is v:null (#12251)
fixes #12250.
2020-05-05 10:33:48 +02:00
fdd328d568 Merge #12230 'fix :terminal flicker with scrolloff' 2020-05-05 00:32:23 -04:00
7b764bb43d terminal: disable 'scrolloff' (fixes flicker)
Besides the special-case in get_scrolloff_value(), it makes sense for
'scrolloff' and 'sidescrolloff' to reflect the correct values (for
plugins, scripts, …).

ref 53d607af9c53accfd634435908fb79061f1212b9
ref #11915
ref #12230
2020-05-04 21:21:33 -07:00
edd5b233d8 terminal: always return zero from get_scrolloff_value() #12230
Fixes flicker

fix #11072
fix #11915
2020-05-04 21:21:33 -07:00
f605eeec65 lsp: fix tagstack for location jump #12248 2020-05-04 20:12:35 -07:00
2c40a38b39 LSP: Avoid URI-to-fname conversion for non-file URIs #12243
Fixes https://github.com/neovim/neovim/issues/12210
2020-05-04 20:06:40 -07:00
ebee77e73c checkhealth/ruby: fix off-by-one error #12245
Co-authored-by: BodongLiKolmostar <bodong.li@kolmostar.com>
2020-05-04 19:58:45 -07:00
d46c4003cf funcs: Fix a memory leak in f_expand (#12227)
:echo expand('%', v:false, v:true)

==423== 28 bytes in 1 blocks are definitely lost in loss record 124 of 420
==423==    at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==423==    by 0x2AD09C: try_malloc (memory.c:71)
==423==    by 0x2AD0B8: xmalloc (memory.c:105)
==423==    by 0x2AE05D: xmallocz (memory.c:182)
==423==    by 0x1F7CF4: vim_strnsave (strings.c:68)
==423==    by 0x318813: eval_vars (ex_docmd.c:8885)
==423==    by 0x34F5FC: f_expand (funcs.c:2058)
==423==    by 0x36D023: call_func (eval.c:6419)
==423==    by 0x370C28: get_func_tv.lto_priv.707 (eval.c:6150)
==423==    by 0x372748: eval7 (eval.c:4326)
==423==    by 0x37291A: eval6 (eval.c:4036)
==423==    by 0x372BF6: eval5 (eval.c:3884)
2020-05-04 10:50:54 +02:00
496b668ad1 Merge pull request #12237 from h-michael/vim-nil
lsp: text_document.version may be vim.NIL not nil
2020-05-04 09:53:00 +02:00
67634da714 lsp: add a lsp.util.apply_text_edits test(pending)
We don't handle non-ASCII characters well in UTF-16.
So I add a non-ASCII characters test case.
2020-05-04 09:05:16 +09:00
0107a194fa lsp: fix apply_text_document_edit test
lsp.util.buf_versions must be set in advance.
Use helper.insert to create an anonymous buffer,
so create a named buffer for testing without using insert.
2020-05-04 08:10:27 +09:00
ed4df85f6b vim-patch:8.2.0692: startup test fails on MS-Windows
Problem:    Startup test fails on MS-Windows.
Solution:   Allow for any path.
4515bcdec8
2020-05-03 13:44:13 -04:00
cd16e036d1 vim-patch:8.2.0691: startup test fails
Problem:    Startup test fails.
Solution:   Adjust expected output from -V2 argument.
7779ee30d9
2020-05-03 13:43:08 -04:00
88f4650114 vim-patch:8.2.0688: output clobbered if setting 'verbose' to see shell commands
Problem:    Output clobbered if setting 'verbose' to see shell commands.
Solution:   Only output "Searching for" when 'verbose' is 11 or higher.
647a530b33
2020-05-03 13:40:25 -04:00
5a0744e446 vim-patch:8.2.0681: pattern for 'hlsearch' highlighting may leak
Problem:    Pattern for 'hlsearch' highlighting may leak. (Dominique Pelle)
Solution:   Call end_search_hl() to make sure the previous pattern is freed.
            (closes vim/vim#6028)
0b6849e9e3
2020-05-03 13:16:38 -04:00
bc29283f20 vim-patch:8.2.0678: rare crash for popup menu
Problem:    Rare crash for popup menu.
Solution:   Check for NULL pointer. (Nobuhiro Takasaki, closes vim/vim#6027)
d58a662f44
2020-05-03 13:16:38 -04:00
560ce25359 vim-patch:8.2.0663: not all systemd temp files are recognized
Problem:    Not all systemd temp files are recognized.
Solution:   Add two more patterns. (Jamie Macdonald, closes vim/vim#6003)
512fe833c3
2020-05-03 13:16:38 -04:00
a89d64b687 vim-patch:8.1.0868: crash if triggering garbage collector after a function call
Problem:    Crash if triggering garbage collector after a function call.
            (Michael Henry)
Solution:   Don't call the garbage collector right away, do it later.
            (closes vim/vim#3894)
889da2f243
2020-05-03 13:16:38 -04:00
66369cd9d0 vim-patch:8.1.0800: may use a lot of memory when a function refers itself
Problem:    May use a lot of memory when a function creates a cyclic
            reference.
Solution:   After saving a funccal many times, invoke the garbage collector.
            (closes vim/vim#3835)
4456ab527a
2020-05-03 13:16:37 -04:00
5058b07122 vim-patch:8.1.1581: shared functions for testing are disorganised
Problem:    Shared functions for testing are disorganised.
Solution:   Group finctions in script files. (Ozaki Kiichi, closes vim/vim#4573)
7a39dd7f00
2020-05-03 13:16:37 -04:00
cf9887c838 vim-patch:8.2.0649: undo problem whn an InsertLeave autocommand resets undo
Problem:    Undo problem whn an InsertLeave autocommand resets undo. (Kutsan
            Kaplan)
Solution:   Do not create a new undo block when leaving Insert mode.
db93495d27
2020-05-03 13:16:37 -04:00
a576bf6196 vim-patch:8.2.0648: semicolon search does not work in first line
Problem:    Semicolon search does not work in first line.
Solution:   Allow the cursor to be in line zero. (Christian Brabandt,
            closes vim/vim#5996)
0e71704b77
2020-05-03 13:16:37 -04:00
501ef95298 lsp: fixup workspace symbol capabilities (#12233)
use workspace.symbol instead of workspaceSymbol to mimic the lsp spec.
2020-05-03 18:01:04 +02:00
d13c1642ae Merge pull request #12228 from h-michael/fix-docsyms-to-items
lsp: fix lsp.util.symbols_to_items with DocumentSymbol has children
2020-05-02 18:42:10 +02:00
5951ed5d74 Merge pull request #12229 from Billy4195/vim-8.1.0814
[RFC] vim-patch:8.1.{814,816}
2020-05-02 18:29:50 +02:00
ea347b18d8 lsp: add workspace/symbol (#12224)
* lsp: add workspace/symbol
* refactor symbol callback
* set hierarchical symbol support to true
* add documentation and default mapping

Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>
2020-05-02 17:56:05 +02:00
2f42e4d0c8 LSP: Support LocationLink (#12231)
* support LocationLink in callbacks
* announce linkSupport in client capabilities
2020-05-02 15:21:07 +02:00
a0a433dffc vim-patch:8.1.0816: test for 'runtimepath' in session fails on MS-Windows
Problem:    Test for 'runtimepath' in session fails on MS-Windows.
Solution:   Skip the test for now.
681b6bc86c
2020-05-02 17:43:25 +08:00
2f27d37517 vim-patch:8.1.0814: :mksession cannot handle a very long 'runtimepath'
Problem:    :mksession cannot handle a very long 'runtimepath'. (Timothy
            Madden)
Solution:   Expand each part separately, instead of the whole option at once.
            (Christian Brabandt, closes vim/vim#3466)
ed18f2c03a
2020-05-02 17:36:48 +08:00
3eae7d52c5 lsp: add lsp.util.symbols_to_items test 2020-05-02 15:16:43 +09:00
d0af0f5c9e lsp: fix lsp.util.symbols_to_items
fix: https://github.com/neovim/neovim/pull/11931#issuecomment-622422581

There was an error in the process of flattening the hierarchical structure.
So when DocumentSymbol has children, our client can't handle it correctly.
2020-05-02 15:16:35 +09:00
6dc8398944 [LSP] check for vim.NIL and add apply_text_document_edit tests 2020-05-01 17:40:03 +02:00
a6071ac04d version.c: update [ci skip] #12196
vim-patch:8.2.0621: after running tests asan files may remain
vim-patch:8.2.0622: Haiku: GUI does not compile
vim-patch:8.2.0630: "make tags" does not cover Haiku GUI file
vim-patch:8.2.0631: Haiku file formatted with wrong tabstop
vim-patch:8.2.0632: crash when using Haiku
vim-patch:8.2.0636: :messages does not show the maintainer when $LANG is unset
vim-patch:8.2.0642: Vim9: using invalid index
vim-patch:8.2.0643: terminal uses brown instead of dark yellow
vim-patch:8.2.0645: MS-Windows terminal: CTRL-C does not get to child job
vim-patch:8.2.0651: old style benchmark test still in list of distributed files
vim-patch:8.2.0654: building with Python fails
vim-patch:8.2.0664: included undesired changes in Makefile
vim-patch:8.2.0667: cannot install Haiku version from source
vim-patch:8.2.0671: Haiku: compiler warnings
2020-05-01 08:08:27 -07:00
250e4e699f build: Inherit -n and -jN flags if Ninja #12219 2020-05-01 07:36:56 -07:00
fe4383216b doc/UI: mode_info_set: mention colors should be swapped #12211
When attr_id is 0, the cursor's colors should be swapped, otherwise the
cursor might be invisible.

Closes #12198
2020-05-01 07:34:28 -07:00
e5022c61ed treesitter: unknown predicates always match #12173 2020-04-30 22:43:30 -07:00
42b441738d Merge pull request #12204 from archseer/lsp-user-data
lsp/completion: Expose completion_item under completed_items.user_data + vim-patch:8.2.0084
2020-04-30 15:25:15 +02:00
f9055c585f LSP: enable using different highlighting rules for LSP signs (#12176)
This commit creates 4 new highlight groups:
- LspDiagnosticsErrorSign
- LspDiagnosticsWarningSign
- LspDiagnosticsInformationSign
- LspDiagnosticsHintSign

These highlight groups are linked to their corresponding LspDiagnostics
highlight groups by default.

This lets users choose a different color for their sign columns and
virtualtext diagnostics.
2020-04-29 16:53:13 +02:00
e4a1be779b lsp/completion: Expose completion_item under completed_items.user_data.
By passing through completion_item it's now possible for snippet plugins
to add LSP snippet support.
2020-04-29 13:26:56 +09:00
c477b19bdc vim-patch:8.2.0084: complete item "user_data" can only be a string
Problem:    Complete item "user_data" can only be a string.
Solution:   Accept any type of variable. (closes vim/vim#5412)
0892832bb6
2020-04-29 11:15:49 +09:00
e9cc383614 LSP: support tagstack #12096 2020-04-28 07:47:22 -07:00
4e6531ddbd lsp: use vim.tbl_isempty to check sign (#12190)
ref: #12164
fix #12201
sign_getdefined() returns a list, {} if the sign is not defined.
2020-04-28 07:41:39 -07:00
9d0222ee3e tui: Fix italics when $TERM is screen in tmux #12199
Tmux uses smso to display italics when the default-terminal is screen,
screen-*. That's not the display the user wants, so change it to do the
same display as before f3ffe0b32.
fixes #12193.
2020-04-28 07:14:28 -07:00
c7d3630e21 Merge pull request #11943 from yatli/master
[RDY] API/UI: Allow UI to set PUM position and size, and pass the position to CompleteChanged
2020-04-27 21:12:12 +02:00
e34684b2ad api/ui: simplify popup menu position get/set logic; fix test 2020-04-28 01:54:16 +08:00
d372c804aa api/ui: allow set bounds row and col to be less than 0; ui_pum_get_pos: return first extui bounds information instead of reducing 2020-04-28 01:52:01 +08:00
ed6230434b gen_api_dispatch.lua: allow msgpack int for Float args; test: add ui_pum_set_bounds and tv_dict_add_float tests 2020-04-28 01:53:43 +08:00
6da16ac931 external pum: use floating point geometry; typval: add tv_dict_add_float 2020-04-28 01:53:05 +08:00
9c85caa390 ui_pum_get_pos: return internal pum position if external pum pos not found 2020-04-28 01:52:01 +08:00
630ec6cfb8 API/UI: Allow UI to set PUM position and size, and pass the position to CompleteChanged 2020-04-28 01:52:02 +08:00
d90a92bcd3 Merge pull request #12018 from janlazo/vim-8.0.1123
[RFC]vim-patch:8.0.{1123,1125,1138,1139,1142,1292,1334,1375},8.1.1264
2020-04-27 13:53:41 +02:00
fc98f2d581 Merge #11851 'eval.c: factor out eval/userfunc.c'
vim-patch:7.4.2058
2020-04-27 01:45:30 -04:00
34ad1ea366 Merge #12155 ':ls filter by terminal, lastused' 2020-04-26 23:57:37 -04:00
6b050a145d Merge #11851 'eval.c: factor out eval/userfunc.c'
vim-patch:7.4.2058
2020-04-26 20:01:58 -07:00
fcd9ce3901 vim-patch:8.0.1375: window size wrong after maximizing with WinBar
Problem:    Window size wrong after maximizing with WinBar. (Lifepillar)
Solution:   Fix height computations. Redraw window when it is zero height but
            has a WinBar. (closes vim/vim#2356)
415a6939a4
2020-04-26 21:28:48 -04:00
94e7f30dbb vim-patch:8.1.1264: crash when closing window from WinBar click
Problem:    Crash when closing window from WinBar click. (Ben Jackson)
Solution:   Check that window pointer is still valid. (closes vim/vim#4337)
d2fad67e3e
2020-04-26 19:20:20 -04:00
5b3ec39df3 vim-patch:8.0.1139: using window toolbar changes state
Problem:    Using window toolbar changes state.
Solution:   Always execute window toolbar actions in Normal mode.
a21a6a9ade
2020-04-26 19:17:17 -04:00
86d0f67c29 vim-patch:8.0.1334: splitting a window with a WinBar damages window layout
Problem:    Splitting a window with a WinBar damages window layout.
            (Lifepillar)
Solution:   Take the winbar into account when computing the new window
            position.  Add WINBAR_HEIGHT().
3167c3e701
2020-04-26 19:17:16 -04:00
05f58a2858 vim-patch:8.0.1292: quick clicks in the WinBar start Visual mode
Problem:    Quick clicks in the WinBar start Visual mode.
Solution:   Use a double click in the WinBar like a normal click.
d327b0c68f
2020-04-26 19:17:16 -04:00
355dffdd76 vim-patch:8.0.1138: click in window toolbar starts Visual mode
Problem:    Click in window toolbar starts Visual mode.
Solution:   Add the MOUSE_WINBAR flag.
eb163d73b1
2020-04-26 19:17:16 -04:00
7d028f0765 vim-patch:8.0.1142: window toolbar menu gets a tear-off item
Problem:    Window toolbar menu gets a tear-off item.
Solution:   Recognize the window toolbar.
378daf87d3
2020-04-26 19:17:16 -04:00
9758f5e508 vim-patch:8.0.1125: wrong window height when splitting window with window toolbar
Problem:    Wrong window height when splitting window with window toolbar.
Solution:   Add or subtract the window toolbar height.
d326ad6e93
2020-04-26 19:17:16 -04:00
64b61d49c2 vim-patch:8.0.1123: cannot define a toolbar for a window
Problem:    Cannot define a toolbar for a window.
Solution:   Add a window-local toolbar.
1b9645de3c

"WinBar" code in "screen.c" was not ported.

Fix https://github.com/neovim/neovim/issues/11513#issuecomment-562012827
2020-04-26 19:17:16 -04:00
5f41717838 LSP: don't redefine LspDiagnostics signs #12164
fix #12162
2020-04-26 15:36:40 -07:00
50ff37308a LSP: Fix show_line_diagnostics #12186
Messed this up in ef0398fe88
2020-04-26 14:56:30 -07:00
05a07ff7af lint: use docstring style #12187 2020-04-26 09:52:39 -07:00
663b83814d LSP: Add a check for null version in VersionedTextDocumentIdentifier (#12185)
According to the spec there is the possibility that when a
VersionedTextDocumentIdentifier is used in a TextEdit the value may be
null. Currently we don't check for this and always assume that it's set.
So currently if a TextEdit comes in for a rename for example with the
version null, it fails as we are comparing the bufnumber with nil.

https://microsoft.github.io/language-server-protocol/specification#versionedTextDocumentIdentifier
2020-04-26 16:51:41 +02:00
f3ffe0b325 tui: improve support for GNU Screen (#12098)
Wrapping it in DCS allows the following features to work with GNU
Screen.

- Changing the cursor style.
- bracketed paste.
- focus reporting.
2020-04-26 15:15:47 +02:00
3de9452abf Merge #12177 'folds: decrease reliance on globals' 2020-04-26 02:52:39 -04:00
68511924d0 LSP: remove obsolete "peek definition" code #12178
The method with the name 'textDocument/peekDefinition' is not part of
the official language server protocol specification. Therefore no
language server can/will support this. Thereby all related code and
documentation as been removed.
2020-04-25 21:47:48 -07:00
c5217c67df TUI: block signals on suspend #12180
fix #8075
2020-04-25 18:22:40 -07:00
2238b2a88f Merge #12181 from janlazo/vim-8.2.0635
vim-patch:8.2.{635,638}
2020-04-25 20:41:08 -04:00
1b42e95ece ci/travis: Enable ipv6 #12182
ref: a39c8b7ce3
ref: bfe13ccc58

Also:
- Remove unused macos_rvm_dance() function. (It was there for reference,
  but we have since resolved (or gave up) on Travis + macOS + ruby.
2020-04-25 17:20:37 -07:00
229a836d9b vim-patch:8.2.0638: MS-Windows: messages test fails
Problem:    MS-Windows: messages test fails.
Solution:   Clear environment variables.
47a1a8baf9
2020-04-25 16:05:18 -04:00
2bf4e824d4 vim-patch:8.2.0635: when using 256 colors DarkYellow does not show expected color
Problem:    When using 256 colors DarkYellow does not show expected color.
Solution:   Use color 3 instead of 130. (Romain Lafourcade, closes vim/vim#5985)
e93c968f52
2020-04-25 15:56:26 -04:00
ef0398fe88 LSP: Expose diagnostics grouped by bufnr (#11932)
Expose `vim.lsp.buf.diagnostics_by_buf`

This makes it easier to customize the diagnostics behavior. For example
to defer the update they can override the
`textDocument/publishDiagnostics` callback to only call
`buf_diagnostics_save_positions` and then defer the other actions to a
autocmd event.
2020-04-25 15:46:58 +02:00
78d58eaf61 lsp: remove buffer version on buffer_detach (#12029)
When we save the buffer, the buffer is detached and attached again.
So the client also needs to remove the buffer version once.
2020-04-25 14:58:35 +02:00
c9f4cac3c9 version.c: update [ci skip] (#12084) 2020-04-24 23:33:15 +02:00
4d8b66e497 helpers: fix FIXED_TEMP_ARRAY
...was using wrong macro argument.
2020-04-24 20:33:14 +02:00
6da348f220 lint: fix linting issues 2020-04-24 20:33:11 +02:00
7d2879694e extmark: introduce extmark_splice_cols
to ease up notations.
2020-04-24 20:32:20 +02:00
d20142a31f folds: decrease reliance on global 'curwin'
TODO in a future commit:
- remains 2 instances of changed_lines that dont take into account
buffer
2020-04-24 20:28:44 +02:00
deb4566cab lsp: callback for references now opens qf (#12171)
In contrast to other callbacks for LSP requests like
`textDocument/documentSymbols`, does the one for references not open the
quickfix window after the quickfix list was filled. This left the user
in a situation he don't know what or if something had happen.

Related to: neovim/neovim#12170
2020-04-23 13:36:19 +02:00
6c9a5743a0 treesitter: check for integer overflow (#12135)
Sometimes treesitter calls for an invalid column within a line, checking
that the column is actually valid and forcing the value avoids an
integer overflow and an infinite sequence of invalid reads.

Fixes #12131
2020-04-22 18:54:56 +02:00
fdedaa7226 Merge pull request #12081 from xylix/bash-version-check 2020-04-21 22:35:31 -04:00
978a6bcaf2 vim-patch:8.1.2225: the "last used" info of a buffer is under used
Problem:    The "last used" info of a buffer is under used.
Solution:   Add "lastused" to getbufinfo(). List buffers sorted by last-used
            field. (Andi Massimino, closes vim/vim#4722)
52410575be
2020-04-21 21:40:22 +01:00
6854680579 terminal: Fix mouse coordinates issue (#12158)
Offsets of window were not taken into account when sending mouse
coordinates to the terminal. Therefore, when nu or rnu is set, the mouse
coordinates sent to the terminal were not correct. Change it to send the
correct coordinates by subtract window offset from col.
2020-04-21 15:44:39 +02:00
633322a020 lsp: do not assert even if the code does not exist in ErrorCodes (#11981)
There is ErrorCodes in the LSP specification, but in ResponseError.code
it is not used and the actual type is number.
Some language servers response original error cods and this is valid spec.
So we shouldn't assert even if the code does not exist in ErrorCodes.

ref: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#responseMessage
2020-04-21 15:42:48 +02:00
0c637898f9 lsp: textDocument/definition can return Location or Location[] (#12014)
* https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_definition

Co-authored-by: Khangal Jargalsaikhan <khangal.j@irbis.sg>
2020-04-21 15:16:58 +02:00
2a5d766581 doc: fix vim.lsp.stop_all_clients doc (#12055) 2020-04-21 14:51:51 +02:00
e58a03a68e Merge pull request #12108 from mcepl/luv-1.18.0-compat 2020-04-21 08:00:42 -04:00
e8dd2c986c Test on actual libuv version number, not on existence of symbol.
uv_stream_get_write_queue_size isn't a define, it's a
function. It seems like this would always be shadowing the
actual function name.
2020-04-21 11:03:13 +02:00
770a0ac2df Make neovim building even with libuv 1.18.0
(found for example on openSUSE/Leap 15.*)
2020-04-21 10:14:07 +02:00
9678fe4cfb Merge pull request #11989 from Weypare/textEdit
LSP/completion: add textEdit support
2020-04-20 21:31:19 +02:00
49045b173e test: add docs for get_completion_word test 2020-04-20 20:20:14 +03:00
a0d2bfeeb5 test: add get_completion_word test for text_doc...
...ument_completion_list_to_complete_items
2020-04-20 18:35:54 +03:00
8745247cba tui: Don't call uv_write without output (#12146)
Fixes #11653, #11990. Check for cursor visibility to toggle uv_write call.
2020-04-20 14:50:44 +02:00
e6cfc1b158 LSP/completion: Add completion text helper function 2020-04-20 14:09:13 +03:00
adec9fb444 lsp: export convert_signature_help_to_markdown_lines (#11950)
This function is also useful for users to create their own `textDocument/signatureHelp` callback function.
2020-04-19 23:40:54 +02:00
9d59f066cb vim-patch:8.0.1651: cannot filter :ls output for terminal buffers
Problem:    Cannot filter :ls output for terminal buffers.
Solution:   Add flags for terminal buffers. (Marcin Szamotulski, closes vim/vim#2751)
0751f51a5b
2020-04-19 20:18:41 +01:00
ec2d45a851 vim-patch:7.4.1988
Problem:    When updating viminfo with file marks there is no time order.
Solution:   Remember the time when a buffer was last used, store marks for
            the most recently used buffers.
ab9c89b68d

As this is a viminfo fix, most of this is irrelevant - the patch has
just been brought across for the creation and updating of buffer's
`b_last_used` properties.
2020-04-19 20:18:41 +01:00
ca02db1f9f Merge pull request #12047 from erw7/fix-resolve-on-windows
Change resolve() to resolve symbolic links on Windows
Neovim worked the same way as vim for shortcuts, but didn't handle symbolic links and junction cases. This PR implements the same behavior for symbolic links and junctions as for vim.
2020-04-19 14:11:01 +02:00
bf0f745861 lua: allow deepcopy of functions (#12136) 2020-04-19 01:04:37 +02:00
c5466ba6ef lsp: replace the event that closes the signature help preview window from InsertCharPre to CursolMovedI (#11954)
In the case of InsertCharPre, it is inconvenient because the signature help is displayed
when backspaced in insert mode, so change it to CursolMovedI.
2020-04-18 19:04:47 +02:00
7d4451c657 LSP: fix breakage when severity isn't specified (#12027)
Before this commit, the LSP client would throw errors when messages
without severity would be sent by the server. We make severity default
to `Error` as a kludge before proper heuristics to discover the severity
of a message are found.
2020-04-18 18:21:08 +02:00
9ac5bc4b0b Merge pull request #12141 from vigoux/treesitter_fix
[RFC] Update treesitter runtime
Get rid of our utf8proc dependency

Note that we unconditionnally escape treesitter queries, might need to be revisited.
2020-04-18 16:05:16 +02:00
e10f9151dc treesitter: remove utf8proc dependency 2020-04-18 09:21:03 +02:00
1fb44ba835 treesitter: escape backslashes in queries
Treesitter changed their decoders and apparently thus causing this
change.

This decoder change happened on
ee9a3c0ebb218990cf391ed987be7f2448c54a73.
2020-04-18 09:20:13 +02:00
727040c953 treesitter: update vendor code
Update treesitter vendor code to commit
35f82ce301951315e08de3b7e44a18c9170b28b8
2020-04-18 09:19:21 +02:00
e5da4fd557 Merge pull request #12145 from janlazo/vim-8.2.0584
vim-patch:8.2.{584,589}
2020-04-18 04:09:32 +02:00
b3d669b40b vim-patch:8.2.0589: .bsd file type not recognized
Problem:    .bsd file type not recognized.
Solution:   Recognize .bsd as BSDL. (Daniel Kho, closes vim/vim#5945)
0fc1288aef
2020-04-17 21:14:26 -04:00
6f7141dd76 vim-patch:8.2.0584: viminfo file uses obsolete function file_readable()
Problem:    Viminfo file uses obsolete function file_readable().
Solution:   Use filereadable(). (closes vim/vim#5934)
c5f33db888
2020-04-17 19:04:23 -04:00
fb4c7a53cf folds: decrease reliance on global "curwin" (#12132)
Pass the window in which to create/delete folds instead of using the
global "curwin" (current window).
Preliminary work for a fold API.

TODO: I kept changed_lines prototype unchanged. This should be updated
when a fold API sees the light.
2020-04-16 21:29:04 +02:00
a5818204b1 doc:Fix incorrect nvim config paths in documentation (#12134)
Updates  remaining  ~/.vim with ~/.config/nvim
2020-04-16 20:49:05 +02:00
51b4fc4778 lsp: provide a default for missing reference kind (#12127)
Fix #12122

>Error executing vim.schedule lua callback: /usr/local/share/nvim/runtime/lua/vim/lsp/util.lua:560: Expected lua string

Some lsp server(e.g. https://github.com/bash-lsp/bash-language-server) not have kind in reference, reference["kind"] is nil
2020-04-16 18:30:03 +02:00
e8269a3ab5 win,runtime: Fix problem when win32yank was a symbolic link in WSL [skip ci] (#12124)
On some versions of Windows, WSL is unable to execute symbolic links to
Windows executables (microsoft/WSL#3999). As a workaround for that problem
this changes to use resolve() on WSL if win32yank was a symbolic link.

fixes #12113.
2020-04-15 14:54:23 +02:00
e11e93d139 Merge pull request #12005 from erw7/fix-screen-vsplit
Closes #11998
2020-04-15 08:06:59 -04:00
979b7c0a73 Merge pull request #12121 from janlazo/vim-8.2.0575 2020-04-15 07:56:42 -04:00
5f7384bf42 vim-patch:8.2.0575: :digraph! not tested
Problem:    :digraph! not tested.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#5925)
e3242346cf
2020-04-13 20:04:51 -04:00
05fd647770 Suppress Microsoft copyright banner. (#12114) 2020-04-14 00:42:50 +02:00
bf58c00071 Use libnvim as OUTPUT_NAME for libnvim (#12119)
libnvim's OUTPUT_NAME was nvim, which caused the cmake Ninja generator
to generate two build rules for the library, which produced a warning
about incorrect builds.
2020-04-14 00:41:45 +02:00
b3a66faf66 TUI: support setting cursor color in tmux (#12100) 2020-04-14 00:07:30 +02:00
93b2cb7a38 Merge pull request #11997 from janlazo/vim-8.1.2389
[RDY]vim-patch:8.1.{1745,2147,2280,2282,},8.2.{41,134,365,366,381,387,389,397,398,406,415,457,464,473,474,507,544,549}
2020-04-13 22:49:00 +02:00
cf223e7d78 vim-patch:8.2.0549: user systemd files not recognized
Problem:    User systemd files not recognized.
Solution:   Add filetype patterns. (Kevin Locke, closes vim/vim#5914)
3b922f1138
2020-04-13 12:00:34 -04:00
bdf629775b vim-patch:8.2.0544: memory leak in search test
Problem:    Memory leak in search test.
Solution:   Free msgbuf. (Dominique Pelle, closes vim/vim#5912)
880e4d9117
2020-04-13 12:00:34 -04:00
5726272559 vim-patch:8.2.0507: getbufvar() may get the wrong dictionary
Problem:    Getbufvar() may get the wrong dictionary. (David le Blanc)
Solution:   Check for empty name. (closes vim/vim#5878)
5259275347
2020-04-13 12:00:34 -04:00
366e75b6be vim-patch:8.2.0473: variables declared in an outer scope
Problem:    Variables declared in an outer scope.
Solution:   Decleare variables only in the scope where they are used.
8601545338
2020-04-13 12:00:33 -04:00
d74a28d716 vim-patch:8.2.0134: some map functionality not covered by tests
Problem:    Some map functionality not covered by tests.
Solution:   Add tests. (Yegappan Lakshmanan, closes vim/vim#5504)
8ba6bb7c94
2020-04-13 12:00:33 -04:00
87334c00e0 vim-patch:8.2.0474: cannot use :write when using a plugin with BufWriteCmd
Problem:    Cannot use :write when using a plugin with BufWriteCmd.
Solution:   Reset BF_NOTEDITED after BufWriteCmd. (closes vim/vim#5807)
0fff44152d
2020-04-13 12:00:33 -04:00
b8ddca6554 vim-patch:8.2.0464: typos and other small problems
Problem:    Typos and other small problems.
Solution:   Fix the typos.  Add missing file to distribution.
2d9d409ad4
2020-04-13 12:00:33 -04:00
bc84cf2585 vim-patch:8.2.0457: Test_quotestar() often fails when run under valgrind
Problem:    Test_quotestar() often fails when run under valgrind.
Solution:   Wait longer for the GUI to start.
26bde6e2eb
2020-04-13 12:00:32 -04:00
22eb3c9e49 vim-patch:8.1.1745: compiler warning for unused argument
Problem:    Compiler warning for unused argument.
Solution:   Add UNUSED.  Change comments to new style.
1f164b1968
2020-04-13 12:00:32 -04:00
dfb8dc8b45 vim-patch:8.2.0415: bsdl filetype is not detected
Problem:    Bsdl filetype is not detected.
Solution:   Add an entry in the filetype list. (Daniel Kho, closes vim/vim#5810)
40d235e730
2020-04-13 12:00:32 -04:00
5fe88337f0 vim-patch:8.2.0406: FileReadCmd event not well tested
Problem:    FileReadCmd event not well tested.
Solution:   Add a test.
e32848780c
2020-04-13 12:00:32 -04:00
16a4581349 vim-patch:8.1.2282: crash when passing many arguments through a partial
Problem:    Crash when passing many arguments through a partial. (Andy
            Massimino)
Solution:   Check the number of arguments. (closes vim/vim#5186)
4c054e9fb2
2020-04-13 12:00:32 -04:00
dbb386e1b2 vim-patch:8.1.2280: crash when passing partial to substitute()
Problem:    Crash when passing partial to substitute().
Solution:   Take extra arguments into account. (closes vim/vim#5186)
b0745b221d
2020-04-13 12:00:31 -04:00
60a7184185 vim-patch:8.2.0398: profile test fails when two functions take same time
Problem:    Profile test fails when two functions take same time.
Solution:   Add a short sleep in once function. (closes vim/vim#5797)
a21df1db3c
2020-04-13 12:00:31 -04:00
a15750321b vim-patch:8.2.0397: delayed screen update when using undo from Insert mode
Problem:    Delayed screen update when using undo from Insert mode.
Solution:   Update w_topline and cursor shape before sleeping. (closes vim/vim#5790)
5715b3147b
2020-04-13 12:00:31 -04:00
5be72756f8 vim-patch:8.2.0041: leaking memory when selecting spell suggestion
Problem:    Leaking memory when selecting spell suggestion.
Solution:   Free previous value at the right time.
6c52f82371
2020-04-13 12:00:31 -04:00
d2abd1be80 vim-patch:8.1.2147: crash when allocating memory fails
Problem:    Crash when allocating memory fails. (Zu-Ming Jiang)
Solution:   Check that 'spellcapcheck' is not NULL. (closes vim/vim#5048)
53efb18530
2020-04-13 12:00:31 -04:00
36326436f7 pvs/v502: use explicit ternary in for-loop 2020-04-13 12:00:30 -04:00
63fc0e1d1c vim-patch:8.2.0389: delayed redraw when shifting text from Insert mode
Problem:    Delayed redraw when shifting text from Insert mode.
Solution:   Use msg_attr_keep() instead of msg(). (closes vim/vim#5782)
e4fc746d13
2020-04-13 12:00:30 -04:00
351a1cff70 vim-patch:8.2.0387: error for possible NULL argument to qsort()
Problem:    Error for possible NULL argument to qsort().
Solution:   Don't call qsort() when there is nothing to sort. (Dominique
            Pelle, closes vim/vim#5780)
bb65a5690c
2020-04-13 12:00:30 -04:00
35e798c3a7 pvs/v595: check if extmark not NULL 2020-04-13 12:00:30 -04:00
69d019f3bd pvs/v560: remove redundant line check 2020-04-13 12:00:30 -04:00
7ef2677ca6 vim-patch:8.2.0381: using freed memory with :lvimgrep and autocommand
Problem:    Using freed memory with :lvimgrep and autocommand. (extracted from
            POC by Dominique Pelle)
Solution:   Avoid deleting a dummy buffer used in a window. (closes vim/vim#5777)
2573af3519
2020-04-13 12:00:30 -04:00
e892dde369 vim-patch:8.2.0365: tag kind can't be a multi-byte character
Problem:    Tag kind can't be a multi-byte character. (Marcin Szamotulski)
Solution:   Recognize multi-byte character. (closes vim/vim#5724)
283e5f4e69
2020-04-13 12:00:29 -04:00
65b0bd6577 vim-patch:8.2.0366: hardcopy command not tested enough
Problem:    Hardcopy command not tested enough.
Solution:   Add tests for printing. (Dominique Pelle, closes vim/vim#5748)
2e09634a78
2020-04-13 12:00:29 -04:00
13b4a6fd4f Merge pull request #12073 from janlazo/vim-8.2.0027
vim-patch:8.1.{2366,2378,2387,2387},8.2.{27,560}
2020-04-13 11:06:23 -04:00
a122f6c6d4 vim-patch:8.2.0560: compiler warning in tiny build
Problem:    Compiler warning in tiny build.
Solution:   Move declaration inside #ifdef. (Dominique Pelle, closes vim/vim#5915)
2196bce56f
2020-04-12 16:04:51 -04:00
0f18c718cd vim-patch:8.2.0027: still some /* */ comments
Problem:    Still some /* */ comments.
Solution:   Convert to // comments.
aa2f0ee639
2020-04-12 15:57:54 -04:00
b3e249db7c vim-patch:8.1.2387: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
2ab2e8608f
2020-04-12 15:57:54 -04:00
73dc9e943c vim-patch:8.1.2378: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
5d18efecfd
2020-04-12 15:56:40 -04:00
2ec6fec20b vim-patch:8.1.2366: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
9bf703d46a
2020-04-12 15:56:39 -04:00
81db53edec vim-patch:8.1.2389: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
707d226ac5
2020-04-12 15:56:39 -04:00
46fdad255e Merge pull request #12033 from janlazo/vim-8.1.1313
[RFC]vim-patch:8.1.{1313,1567,1568}
2020-04-12 20:37:57 +02:00
1f56f9a4b3 netrw.vim: gx should ignore terminal buffers #12091
netrw thinks it's a remote file due the name of a terminal buffer (term://),
but a terminal buffer isn't a file.

Fixes https://github.com/neovim/neovim/issues/4612#issuecomment-600321171
2020-04-08 08:57:32 -07:00
f47e574c87 Apply suggestions from code review
Improve error message for unsupported bash version, use double square bracket operator

Co-Authored-By: Daniel Hahler <github@thequod.de>
2020-04-07 10:43:17 +03:00
d26a66a2b3 Check for bash version in vim-patch.sh 2020-04-06 09:59:25 +03:00
30a6e374d4 version.c: update [ci skip] #11995
vim-patch:8.0.1388: char not overwritten with ambiguous width char

vim-patch:8.1.1316: duplicated localtime() call
vim-patch:8.1.2134: modifier keys are not always recognized
vim-patch:8.1.2135: with modifyOtherKeys Alt-a does not work properly

vim-patch:8.2.0373: type of term_sendkeys() is unknown
vim-patch:8.2.0376: nasty callback test fails on some systems
vim-patch:8.2.0377: no CI test for a big-endian system
vim-patch:8.2.0383: wrong feature check causes test not to be run
vim-patch:8.2.0384: Travis CI has warnings
vim-patch:8.2.0390: terminal postponed scrollback test is flaky
vim-patch:8.2.0391: CI test coverage dropped
vim-patch:8.2.0394: Coverity complains about using NULL pointer
vim-patch:8.2.0395: build fails with FEAT_EVAL but without FEAT_MENU
vim-patch:8.2.0405: MSVC: build fails with some combination of features
vim-patch:8.2.0410: channel test fails too often on slow Mac
vim-patch:8.2.0411: Mac: breakcheck is using a value from the stone ages
vim-patch:8.2.0412: MS-Windows: cannot use vimtutor from the start menu
vim-patch:8.2.0417: Travis CI config can be improved
vim-patch:8.2.0428: buffer name may leak
vim-patch:8.2.0431: some compilers don't support using \e for Esc
vim-patch:8.2.0434: MS-Windows with VTP: Normal color not working
vim-patch:8.2.0435: channel contents might be freed twice
vim-patch:8.2.0437: MS-Windows installer contains old stuff
vim-patch:8.2.0438: terminal noblock test is very flaky on BSD
vim-patch:8.2.0440: terminal noblock test is still very flaky on BSD
vim-patch:8.2.0441: terminal noblock test is still failing on BSD
vim-patch:8.2.0442: channel contents might be used after being freed
vim-patch:8.2.0445: png and xpm files not in MS-Windows zip file
vim-patch:8.2.0447: terminal scroll tests fails on some systems
vim-patch:8.2.0451: Win32: double-width character displayed incorrectly
vim-patch:8.2.0452: channel_parse_messages() fails when called recursively
vim-patch:8.2.0455: cannot set the highlight group for a specific terminal
vim-patch:8.2.0460: build failure because of wrong feature name
vim-patch:8.2.0463: typos and other small problems
vim-patch:8.2.0466: not parsing messages recursively breaks the govim plugin
vim-patch:8.2.0468: GUI: pixel dust with some fonts and characters
vim-patch:8.2.0472: terminal highlight name is set twice, leaking memory
vim-patch:8.2.0475: channel out_cb test still fails sometimes on Mac
vim-patch:8.2.0476: terminal nasty callback test fails sometimes
vim-patch:8.2.0479: unloading shared libraries on exit has no purpose
vim-patch:8.2.0481: Travis is still using trusty
vim-patch:8.2.0490: Win32: VTP doesn't respect 'restorescreen'
vim-patch:8.2.0497: too verbose output from the asan build in Travis
vim-patch:8.2.0505: term_getty() not sufficiently tested

WinBar requires `W_WINROW` macro but it is removed in 7f21665673. Thus, the following patch is N/A:
vim-patch:8.0.1129: window toolbar missing a part of the patch

https://github.com/neovim/neovim/issues/11513 makes the following patches for WinBar N/A:
vim-patch:8.0.1520: cursor in wrong line when using a WinBar in Terminal window
vim-patch:8.1.1263: mouse clicks in WinBar not tested
vim-patch:8.1.1266: winbar test doesn't test enough
vim-patch:8.1.1272: click on WinBar of other window not tested
vim-patch:8.1.1456: WinBar not redrawn after scrolling one line

Most `Test_termcodes.vim` tests require removed options like `ttymouse`.
The following patches do not have relevant source code changes:
vim-patch:8.1.1137: xterm mouse wheel escape sequence is not tested
vim-patch:8.1.1142: no test for dragging the window separators with the mouse
vim-patch:8.1.1155: termcodes tests can be improved
vim-patch:8.1.1160: termcodes test would fail in a very big terminal
vim-patch:8.1.1165: no test for mouse clicks in the terminal tabpage line
vim-patch:8.1.1167: no test for closing tab by click in tabline
vim-patch:8.1.1175: no test for dragging a tab and double click for new tab
vim-patch:8.1.1176: test for dragging a tab is flaky
vim-patch:8.1.1178: when mouse click tests fails value of 'ttytype' is unknown
vim-patch:8.1.1179: no test for mouse clicks in the fold column
vim-patch:8.1.1181: tests for mouse clicks are a bit flaky
vim-patch:8.1.1216: mouse middle click is not tested
vim-patch:8.1.1223: middle mouse click test fails without a clipboard
vim-patch:8.1.1244: no tests for CTRL-mouse-click
vim-patch:8.1.1247: urxvt mouse codes are not tested
vim-patch:8.1.1248: no test for dec mouse
vim-patch:8.1.1250: no test for netterm mouse
vim-patch:8.1.1469: no test for checking the cursor style response
vim-patch:8.1.1471: 'background' not correctly set for 2-digit rgb termresponse
vim-patch:8.1.1472: add_termcap_entry() is not tested
vim-patch:8.1.1474: 'ttybuiltin' is not tested
vim-patch:8.1.2106: no tests for dragging the mouse beyond the window
vim-patch:8.1.2118: termcodes test fails when $TERM is "dumb"
vim-patch:8.1.2137: parsing the termresponse is not tested
vim-patch:8.1.2150: no test for 'ttymouse' set from xterm version response
vim-patch:8.1.2169: terminal flags are never reset
vim-patch:8.1.2174: screen not recognized as supporting "sgr" mouse codes
vim-patch:8.1.2306: double and triple clicks are not tested
2020-04-04 06:55:08 -07:00
496faf2271 Merge pull request #12074 from jamessan/vim-patch-review
vim-patch.sh: Fix creation of commit list for PR review
2020-04-04 06:39:56 -04:00
b687a6c2b2 Change to canonicalize only when reparse point in included 2020-04-02 21:13:18 +09:00
f61331e184 Change resolve() to resolve symbolic links on Windows 2020-04-02 21:13:18 +09:00
6ca7ebb346 Merge pull request #11748 from bfredl/viewport
win_viewport event for buffer range and buffer cursor pos
2020-04-01 20:52:04 +02:00
1fe0b329fe api/ui: win_viewport event for visible range and cursor position in window 2020-04-01 19:43:55 +02:00
dc7f59e04b vim-patch.sh: Fix creation of commit list for PR review
[ci skip]
2020-03-31 22:40:33 -04:00
4139678f97 vim.uri: fix uri_to_fname (#12059)
fix: #12056
If the colon of the drive letter of windows is URI encoded,
it doesn't match the expected pattern, so decode it first.
2020-03-30 14:30:24 +02:00
53fdd76181 vim-patch:8.1.1568: strftime() test fails on MS-Windows
Problem:    Strftime() test fails on MS-Windows.
Solution:   Skip the check for using the $TZ environment variable.
87652a7e3b
2020-03-29 14:17:57 -04:00
10c5434f9c vim-patch:8.1.1567: localtime_r() does not respond to $TZ changes
Problem:    Localtime_r() does not respond to $TZ changes.
Solution:   If $TZ changes then call tzset(). (Tom Ryder)
db51730df1
2020-03-29 13:17:03 -04:00
573671b1fb vim-patch:8.1.1313: warnings for using localtime() and ctime()
Problem:    Warnings for using localtime() and ctime().
Solution:   Use localtime_r() if available.  Avoid using ctime().
63d2555c9c
2020-03-29 09:41:17 -04:00
e700a88bb6 Merge pull request #11746 from Billy4195/add_wildmenu_key
[RFC] Wildmenu support C-E and C-Y as popupmenu
2020-03-28 14:25:54 +01:00
4d53bdccc6 doc: Fix wildmenu doc inconsistencies and typos
Fix typos, capitalization to match block, and remove the angle brackets
on the CTRL keys to match other documentation.
2020-03-28 14:07:59 +08:00
a8f7841924 Merge pull request #12043 from bfredl/pumrl
popupmenu: don't use 'rightleft' option in cmdline mode
2020-03-23 21:14:36 +01:00
4dabbc19d4 popupmenu: don't use 'rightleft' option in cmdline mode
Cmdline is always drawn from the left to right, so using rightleft
popupmenu is not useful here
2020-03-23 19:14:33 +01:00
9847306b95 Merge pull request #12030 from erw7/fix-tui-access-global-var
TUI: do not use nvim_get_option in tui thread
2020-03-22 19:43:21 +01:00
61d4b81d21 Merge pull request #12026 from jamessan/s390x-travis
Add big-endian, s390x job for Travis
2020-03-22 13:35:51 -04:00
9333f86ab7 TUI: do not use "nvim_get_option" in tui thread
Since "nvim_get_option" is executed on the tui thread as a C function
instead of msgpack-rpc, it accesses global variables that may change on the
main thread.
2020-03-21 18:06:59 +09:00
ca828eaed6 Install gettext for msgfmt/msgmerge
[skip appveyor]
2020-03-18 23:52:36 -04:00
be7cefdc4f Set FUNCTIONALTEST=functionaltest-lua for s390x
LuaJIT doesn't support s390x yet.

[skip appveyor]
2020-03-18 23:52:29 -04:00
cca301d939 Install pynvim with --user to avoid permission issues
[skip appveyor]
2020-03-18 23:52:22 -04:00
0ab7cfa78b Add big-endian, s390x job to Travis
This will help catch issues like #11388.

[skip appveyor]
2020-03-18 22:03:51 -04:00
87d892afa0 vim-patch:8.1.0864 Make 'scrolloff' and 'sidescrolloff' options window local (#11854)
Problem: cannot have a local value for 'scrolloff' and 'sidescrolloff'

Author: Bram Moolenar

375e339007
2020-03-17 20:05:34 +01:00
5a5c2f0290 Merge pull request #11927 from Jesse-Bakker/lsp-buf-version
LSP: Use buffer version instead of changedtick for edits
2020-03-16 21:57:51 +01:00
c2d288e293 Fix screen terminal family issues 2020-03-12 18:36:17 +09:00
8b64a77144 Fix splitting issue on gnu screen
gnu screen does not have smglr, but it inherits smglr from xterm and
splitting will cause drawing problems. So disable smglr.
2020-03-12 15:16:25 +09:00
2b00d1d09c Merge #11977 from janlazo/vim-8.1.1279
vim-patch:8.1.1279,8.2.{360,361}
2020-03-08 13:36:52 -07:00
b00650cfe9 vim-patch:8.2.0361: internal error when using "0" for a callback
Problem:    Internal error when using "0" for a callback.
Solution:   Give a normal error. (closes vim/vim#5743)
14e57909e6
2020-03-07 23:37:27 -05:00
1ad414f6ee version.c: update
vim-patch:8.0.1287: temp file used for viminfo may have wrong permissions
vim-patch:8.0.1345: race condition between stat() and open() for viminfo
vim-patch:8.0.1355: cursor keys don't work in MS-Windows console
vim-patch:8.0.1358: undercurl is not used in the terminal
vim-patch:8.0.1371: Shift-Insert doesn't always work in MS-Windows console
vim-patch:8.0.1422: no fallback to underline when undercurl is not set
vim-patch:8.2.0362: MS-Windows: channel test fails if grep is not available
2020-03-07 23:14:52 -05:00
716bebad48 vim-patch:8.2.0360: yaml files are only recognized by the file extension
Problem:    Yaml files are only recognized by the file extension.
Solution:   Check for a line starting with "%YAML". (Jason Franklin)
8eab731328
2020-03-07 23:14:43 -05:00
63d8f08b0b vim-patch:8.1.1279: cannot set 'spellang' to "sr@latin"
Problem:    Cannot set 'spellang' to "sr@latin". (Bojan Stipic)
Solution:   Allow using '@' in 'spellang'. (closes vim/vim#4342)
9a061cb78c
2020-03-07 23:14:42 -05:00
45b8dc0c3d Revert "ci/Appveyor: install diffutils via scoop"
This reverts commit 4faf30de3e.
2020-03-07 23:14:42 -05:00
ccb038dc6a LSP/completion: add textEdit support
According to lsp specification, value of insertText should be ignored if
textEdit is provided.
2020-03-06 19:40:46 +02:00
f8f41d088b diff.c: fix sprintf call
fix #11975
2020-03-03 00:26:21 -08:00
fbc4c4fd36 lsp: make showMessage and logMessage callbacks different (#11942)
According to the LSP specification, showMessage is what is displayed and logMessage is what is stored.
Since these are different things, I devide the callback into those that match.
2020-03-02 14:27:30 +01:00
d22fd58629 Merge pull request #11716 from teto/folds_auto_backup
[RFC] foldcolumn autowidth
2020-03-02 13:56:27 +01:00
6f261d2394 updating doc 2020-03-02 12:59:35 +01:00
e35ff7371f lua: add vim.tbl_len() #11889 2020-03-01 23:38:43 -08:00
e2e99b9f81 version.c: update [ci skip] #11721
vim-patch:8.0.1354: Shift-Insert doesn't always work in MS-Windows console
vim-patch:8.0.1783: cannot use 256 colors in a MS-Windows console

vim-patch:8.1.0028: prompt buffer test fails on MS-Windows
vim-patch:8.1.0030: stoping Vim running in a terminal may not work
vim-patch:8.1.0349: crash when wiping buffer in a callback
vim-patch:8.1.0350: Vim may block on ch_sendraw()
vim-patch:8.1.0442: GUI: cursor not drawn after ":redraw | sleep"
vim-patch:8.1.0446: options test fails in the GUI
vim-patch:8.1.0447: GUI scrollbar test fails with Athena and Motif
vim-patch:8.1.0522: :terminal does not show trailing empty lines
vim-patch:8.1.0649: setjmp() variables defined globally are used in one file
vim-patch:8.1.0788: cannot build with tiny features
vim-patch:8.1.0882: checking for FEAT_MBYTE which doesn't exist anymore
vim-patch:8.1.0967: stray dependency in test Makefile
vim-patch:8.1.0997: using GUI colors in vim.exe when 'termguicolors' is off
vim-patch:8.1.1042: the paste test doesn't work properly in the Windows console
vim-patch:8.1.1127: getwinpos() doesn't work in terminal on MS-Windows console
vim-patch:8.1.1164: gettitle test is failing when server name differs
vim-patch:8.1.1166: gettitle test can still fail when another Vim is running
vim-patch:8.1.1185: mapping for CTRL-X is inconsistent
vim-patch:8.1.1903: cannot build without the +eval feature
vim-patch:8.1.2238: error in docs tags goes unnoticed
vim-patch:8.1.2353: build failure on FreeBSD
vim-patch:8.1.2393: using old C style comments
vim-patch:8.1.2397: should not define __USE_XOPEN

vim-patch:8.2.0122: readme files still mention MS-DOS
vim-patch:8.2.0125: :mode no longer works for any system
vim-patch:8.2.0129: MS-Windows installer doesn't use Turkish translations
vim-patch:8.2.0138: memory leak when starting a job fails
vim-patch:8.2.0139: MS-Windows: default for IME is inconsistent
vim-patch:8.2.0140: CI does not test building doc tags
vim-patch:8.2.0143: Coverity warning for possible use of NULL pointer
vim-patch:8.2.0145: using #error for compilation errors should be OK now
vim-patch:8.2.0153: warning shows when listing version info
vim-patch:8.2.0157: Vim9 script files not in list of distributed files
vim-patch:8.2.0176: generating os headers does not work for Swedish
vim-patch:8.2.0181: problems parsing :term arguments
vim-patch:8.2.0192: build failure without +terminal feature
vim-patch:8.2.0193: still build failure without +terminal feature
vim-patch:8.2.0213: configure does not recognize gcc 10.0 and later
vim-patch:8.2.0217: terminal test fails on Mac
vim-patch:8.2.0219: terminal test still fails on Mac
vim-patch:8.2.0220: terminal test did pass on Mac
vim-patch:8.2.0228: configure does not recognize gcc version on BSD
vim-patch:8.2.0230: terminal popup test is flaky
vim-patch:8.2.0231: silent system command may clear the screen
vim-patch:8.2.0236: MS-Windows unintall doesn't delete vimtutur.bat
vim-patch:8.2.0237: crash when setting 'wincolor' on finished terminal window
vim-patch:8.2.0244: compiler warning in Lua interface
vim-patch:8.2.0245: MSVC: error message if the auto directory already exists
vim-patch:8.2.0246: MSVC: deprecation warnings with Ruby
vim-patch:8.2.0247: misleading comment in NSIS installer script
vim-patch:8.2.0249: MS-Windows: various warnings
vim-patch:8.2.0255: VMS: missing files in build
vim-patch:8.2.0259: terminal in popup test sometimes fails
vim-patch:8.2.0266: terminal in popup test sometimes fails on Mac
vim-patch:8.2.0273: MS-Windows uninstall may delete wrong batch file
vim-patch:8.2.0278: channel test is flaky on Mac
vim-patch:8.2.0297: compiler warnings for the Ruby interface
vim-patch:8.2.0304: terminal test if failing on some systems
vim-patch:8.2.0314: short name not set for terminal buffer
vim-patch:8.2.0317: MSVC: _CRT_SECURE_NO_DEPRECATE not defined on DEBUG build
vim-patch:8.2.0330: build error with popup window but without terminal
vim-patch:8.2.0333: terminal in popup test is flaky
vim-patch:8.2.0337: build fails on a few systems
vim-patch:8.2.0338: build failure without the channel feature
vim-patch:8.2.0345: compiler warning when building without the float feature

8.2.{212,243,250} are connected. 8.2.0250 makes 8.2.0212 N/A.
vim-patch:8.2.0212: missing search/substitute pattern hardly tested
2020-03-01 23:36:37 -08:00
0110735547 Merge #11929 from janlazo/vim-8.1.1510
vim-patch:8.0.1587,8.1.{253,881,883,885,896,939,1107,1108,1466,1489,1510,1552,1642,1793},8.2.{108,133,135}
2020-03-01 23:23:50 -08:00
f1923d4b92 vim-patch:8.1.1793: mixed comment style in globals
Problem:    Mixed comment style in globals.
Solution:   Use // comments where appropriate.
1ccaa35abf
2020-03-01 20:02:10 -05:00
ad0587133f vim-patch:8.1.1108: test for 'visualbell' doesn't work
Problem:    Test for 'visualbell' doesn't work.
Solution:   Make 'belloff' empty.
7a66627cf4
2020-03-01 20:02:10 -05:00
e6c9db6ede vim-patch:8.1.1107: no test for 'visualbell'
Problem:    No test for 'visualbell'.
Solution:   Add a test.
b4e6a2d075
2020-03-01 20:02:10 -05:00
4ccbc8d56e vim-patch:8.2.0108: when sign text is changed a manual redraw is needed
Problem:    When sign text is changed a manual redraw is needed. (Pontus
            Lietzler)
Solution:   Redraw automatically. (closes vim/vim#5455)
bf0acff012
2020-03-01 20:02:10 -05:00
c40bb2de7a vim-patch:8.1.0939: no completion for sign group names
Problem:    No completion for sign group names.
Solution:   Add completion for sign group names and buffer names. (Yegappan
            Lakshmanan, closes vim/vim#3980)
3678f65d43
2020-03-01 20:02:10 -05:00
b376bb49b5 vim-patch:8.1.1552: cursor position is wrong after sign column changes
Problem:    Cursor position is wrong after sign column appears or disappears.
            (Yegappan Lakshmanan)
Solution:   Call changed_line_abv_curs() instead of changed_cline_bef_curs().
f85e40afc2
2020-03-01 20:02:10 -05:00
c6481f70c2 vim-patch:8.1.1489: sign order wrong when priority was changed
Problem:    Sign order wrong when priority was changed.
Solution:   Reorder signs when priority is changed. (Yegappan Lakshmanan,
            closes vim/vim#4502)
64416127fc
2020-03-01 20:02:09 -05:00
1caa85b677 vim-patch:8.1.1466: not updating priority on existing sign
Problem:    Not updating priority on existing sign.
Solution:   Set the sign priority.  Add a test. (Yegappan Lakshmanan)
58a7f87c86
2020-03-01 20:02:09 -05:00
ca3dba482c vim-patch:8.1.0896: tests for restricted mode no run for MS-Windows GUI
Problem:    Tests for restricted mode no run for MS-Windows GUI.
Solution:   Make tests also work in MS-Windows GUI.
5a6698169d
2020-03-01 20:02:09 -05:00
2a818f8901 vim-patch:8.1.0885: test for restricted hangs on MS-Windows GUI
Problem:    Test for restricted hangs on MS-Windows GUI.
Solution:   Skip the test.
18c5632cab
2020-03-01 20:02:09 -05:00
d846f47cc8 vim-patch:8.1.0881: can execute shell commands in rvim through interfaces
Problem:    Can execute shell commands in rvim through interfaces.
Solution:   Disable using interfaces in restricted mode. Allow for writing
            file with writefile(), histadd() and a few others.
8c62a08faf
2020-03-01 20:02:09 -05:00
3618fe9e8c vim-patch:8.1.0883: missing some changes for Ex commands
Problem:    Missing some changes for Ex commands.
Solution:   Add mising changes in header file.
54d6fe5e60
2020-03-01 20:02:08 -05:00
ab38df2fc5 vim-patch:8.1.1642: may use uninitialized variable
Problem:    May use uninitialized variable. (Patrick Palka)
Solution:   Initialize variables earlier. (closes vim/vim#4623)
ec572ad6a6
2020-03-01 20:02:08 -05:00
a78e8f6e1b vim-patch:8.1.0253: saving and restoring window title does not always work
Problem:    Saving and restoring window title does not always work.
Solution:   Use the stack push and pop commands. (Kouichi Iwamoto,
            closes vim/vim#3059)
40385dbcdf
2020-03-01 20:02:08 -05:00
4ffae76520 addressing reviews 2020-03-01 16:45:51 +01:00
fa6518b1da vim-patch:8.2.0135: bracketed paste can still cause invalid memory access
Problem:    Bracketed paste can still cause invalid memory access. (Dominique
            Pelle)
Solution:   Check for NULL pointer.
fe4bbac116
2020-03-01 04:01:32 -05:00
55e3f21110 vim-patch:8.2.0133: invalid memory access with search command
Problem:    Invalid memory access with search command.
Solution:   When :normal runs out of characters in bracketed paste mode break
            out of the loop.(closes vim/vim#5511)
98a336dd49
2020-03-01 04:01:32 -05:00
4de2957a99 vim-patch:8.0.1587: inserting from the clipboard doesn't work literally
Problem:    inserting from the clipboard doesn't work literally
Solution:   When pasting from the * or + register always assume literally.
3324d0a864
2020-03-01 04:01:32 -05:00
607240a8ba pvs/v1048: variable was assigned same value 2020-03-01 03:57:58 -05:00
0eb2f2be60 'clang/Logic error': zero-init MarkTreeIter vars 2020-03-01 03:57:58 -05:00
eba8a9ca1d vim-patch:8.1.1510: a plugin cannot easily expand a command like done internally
Problem:    A plugin cannot easily expand a command like done internally.
Solution:   Add the expandcmd() function. (Yegappan Lakshmanan, closes vim/vim#4514)
80dad48c50
2020-03-01 03:57:58 -05:00
5e0c435ca1 man.vim: Handle man errors when looking for man-paths
Fallback to simply globbing the tag we're given. This matches the
original behaviour of `man.vim`, prior to c6afad78d3.

fixes #11794
closes #11918
2020-02-29 23:44:43 -08:00
1b0a770340 Merge #11805 'vim-patch:8.1.0619' 2020-02-29 17:37:15 -08:00
6fcab7e758 Merge pull request #11931 from h-michael/symbol
[RDY] LSP support 'textDocument/documentSymbol’
2020-03-01 01:47:21 +01:00
16262472cd lsp: add 'textDocument/documentSymbol’ callback
Spec: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentSymbol
2020-03-01 09:10:02 +09:00
3c12ee333a vim-patch:8.1.0619: :echomsg and :echoerr do not handle List and Dict
Problem:    :echomsg and :echoerr do not handle List and Dict like :echo does.
            (Daniel Hahler)
Solution:   Be more tolerant about the expression result type.
461a7fcfce

Add lua functional tests for :echo,:echon,:echomsg,:echoerr
because nvim did not port "test_" functions from Vim
that modify internal state.

Testing :echoerr via try/catch is sufficient.
2020-02-29 17:40:00 -05:00
cyy
1656367b90 win/l10n: add zh-* locale aliases #11963 2020-02-29 14:11:57 -08:00
78f1eccc86 deps: Fix luv-static build issues #11961
- Fix an issue where CMAKE_BUILD_TYPE was not reflected during
  construction.
- Remove the switch that uses the static library(-MTd, -MT) because it was
  specified in the CMakeLists.txt of luv when building on MSVC.

related: https://github.com/luvit/luv/pull/461
2020-02-29 13:47:56 -08:00
1a2be57da3 foldcolumn: allow auto:X
Similar to signcolumn, allow foldcolumn to adapt itself to the number of
folds.

Regression:
vim supports a maximum fdc of 12, this limits it to 9.
2020-02-29 20:27:22 +01:00
f157fdef7e lsp: add bufnr to callback function arguments
DocumentSymbol type doesn't have location field.
So when we'll add 'textDocument/documentSymbol’ handler, we can't decide which file have we jump to.
2020-02-28 09:03:17 +09:00
49cd750d6a Merge pull request #11910 from mfussenegger/references-ctx
LSP/references: Add context to locations returned by server
2020-02-27 15:59:48 +01:00
1fe01b36de Use buffer version instead of changedtick for edits 2020-02-27 14:53:11 +01:00
38201650cd LSP: Remove diagnostic message handling in locations_to_items
`locations_to_items` is for turning `Location[]` into items, not for
`Diagnostic[]`
2020-02-27 12:50:12 +01:00
220a2b05c6 LSP/references: Add context to locations returned by server
This changes the `textDocument/references' callback to annotate the
locations returned by the server with the content present at the
locations range.

The quickfix list then looks as follows:

    cr8/insert_fake_data.py|17 col 32| from .misc import parse_table, parse_version
    cr8/insert_fake_data.py|43 col 15| version = parse_version(r['rows'][0][0])
    cr8/java_magic.py|8 col 22| from cr8.misc import parse_version
    cr8/java_magic.py|30 col 19| version = parse_version(fst)
    cr8/java_magic.py|33 col 16| return parse_version(version_str)

Instead of:

    cr8/insert_fake_data.py|17 col 32|
    cr8/insert_fake_data.py|43 col 15|
    cr8/java_magic.py|8 col 22|
    cr8/java_magic.py|30 col 19|
    cr8/java_magic.py|33 col 16|
2020-02-27 12:49:49 +01:00
52124f286c Merge pull request #11880 from bfredl/tree-sitter-regex
add regex support in treesitter queries
2020-02-27 12:28:47 +01:00
83add102cf Add signs for Lsp diagnostics (#11668)
* Add signs for Lsp diagnostics
* defer sign definition until init.vim is loaded
2020-02-27 12:12:53 +01:00
cb8b9428ca LSP/hover: Do not throw away contents if first line is empty (#11939)
haskell-ide-engine sends `hover` payloads as follows:

    {
      contents = {
        kind = "markdown",
        value = "\n```haskell\nfoo :: Either String (Integer, Text)\n```\n`foo` *local*"
      },
      range = {
        end = {
          character = 5,
          line = 57
        },
        start = {
          character = 2,
          line = 57
        }
      }
    }

`value` starts with `\n`. The logic in `convert_input_to_markdown_lines`
threw away the whole information.
2020-02-27 00:00:06 +01:00
ad745f9da2 add support to show diagnostics count in statusline (#11641)
* add support to show diagnostics count in statusline
* documentation
2020-02-26 20:22:14 +01:00
ca8699378c LSP: implement documentHighlight (#11638)
* implement documentHighlight
* fix bug
* document highlight groups
* use uppercase for help section title
* documentation
2020-02-26 20:10:16 +01:00
78ec95ce7d Merge pull request #11946 from bfredl/ts-sync
treesitter: update vendored tree-sitter runtime
2020-02-26 19:39:56 +01:00
9c00fea585 lua: add regex support, and @match support in treesitter queries 2020-02-26 19:39:02 +01:00
08af82b9cb treesitter: redraw on changed query 2020-02-26 19:39:02 +01:00
3ce9b05653 treesitter: update vendored tree-sitter runtime
tree-sitter/tree-sitter commit 6cb8d24de2d99c4c50c9a0fd1e719ca5b3abc87f

Included files are:
lib/include/tree-sitter/*.h
lib/src/*.[ch]
lib/src/unicode/*
LICENSE
2020-02-25 22:20:23 +01:00
96059d72e5 TUI: reset background color before scroll #11909
fixes #11893
2020-02-23 17:59:37 -08:00
c036e24f39 Merge pull request #11890 from cryptomilk/master-gcc10-fno-common
Fix issues revealed by gcc10 setting -fno-common by default
2020-02-23 16:03:24 +01:00
7591fafd76 Merge pull request #11934 from h-michael/restore
clang/scan-build: restore required code
2020-02-23 11:02:21 +01:00
0504f2f88d cmake: Check for -fno-common and use it if available 2020-02-23 09:49:33 +01:00
823b2104c3 nvim: Correctly setup global channels
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
2020-02-23 09:49:33 +01:00
517bf15603 nvim:msgpack: Correctly set up global ch_before_blocking_events
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
2020-02-23 09:49:33 +01:00
986db1adb4 nvim: Fix enum declaration of RemapValues
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
2020-02-23 09:49:33 +01:00
b87b4a6147 nvim:viml: Fix enum declaration of ExprParserFlags
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
2020-02-23 09:49:33 +01:00
ebcde1de42 nvim:eval: Fix enum declaration for ListLenSpecials
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
2020-02-23 09:49:33 +01:00
599a12e316 clang/scan-build: restore required code
ref: https://github.com/neovim/neovim/pull/11900#discussion_r381860165
2020-02-23 10:14:05 +09:00
38cda18626 CI/travis: workaround broken homebrew
6.70s$ rvm $brew_ruby do brew bundle --verbose --global
    /usr/local/bin/brew tap homebrew/bundle
    ==> Tapping homebrew/bundle
    Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle'...
    Tapped (102 files, 251.1KB).
    Error: Unknown command: bundle

https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/10
https://twitter.com/AJenbo/status/1175976531480457216
2020-02-22 14:15:08 -08:00
93c6eb4a66 PVS/V618: fix printf-style args #11888
We intentionally do not translate API errors. 
ref: https://github.com/neovim/neovim/issues/6150
2020-02-22 12:59:39 -08:00
ff1730373c lsp/completion: show duplicates in completion popup #11920
Allow duplicates so that in languages with overloaded functions it will
show all signatures.

E.g. instead of having a single (last one wins)

    add(int index, String element)

It shows all signatures:

    add(String e) : boolean
    add(int index, String element) : void
2020-02-21 00:34:07 -08:00
82936c3b9a doc: LOG_CALLSTACK: mention "-no-pie" [ci skip]
close #11898
2020-02-21 00:08:26 -08:00
c8ea09248b Merge #11914 'vim-patch:8.1.{1122,1868}' 2020-02-20 23:50:44 -08:00
7ed4837298 vim-patch:8.1.1122: char2nr() does not handle composing characters
Problem:    char2nr() does not handle composing characters.
Solution:   Add str2list() and list2str(). (Ozaki Kiichi, closes vim/vim#4190)
9d40128afd

'utf8' optional param is noop unlike Vim.
2020-02-20 23:39:17 -05:00
13b6f7a806 vim-patch:8.1.1868: multi-byte chars in 'listchars' fail with 'linebreak' set
Problem:    Multibyte characters in 'listchars' don't work correctly if
            'linebreak' is also enabled. (Martin Tournoij)
Solution:   Make it work correctly. (Christian Brabandt, closes vim/vim#4822,
            closes vim/vim#4812)
69cbbecf54
2020-02-20 22:07:18 -05:00
9897ad3606 quickfix.c: Fix vimgrep regression #11907
Fix ex_vimgrep to properly ignore filetype when running vimgrep.
This restores vimgrep to behaviour before function refactoring.

fix #9842
fix #11856
2020-02-19 22:53:58 -08:00
ab12a22941 Merge pull request #11908 from bfredl/qf_msg-fixup
test: always use "set more" with :digraph test
2020-02-19 19:33:29 +01:00
a380526c0f test: always use "set more" with :digraph test
otherwise we risk the same issue as with ex_cmds/digraphs_spec.lua
2020-02-19 13:08:12 +01:00
e8f160c82f Merge #11895 'lsp: fix textDocument/completion handling' 2020-02-18 23:38:52 -08:00
521b79c0f8 clang/scan-build: fix dead stores #11900 2020-02-18 20:54:19 -08:00
ce15977d70 Merge #11887 'loop_close: close all handles' 2020-02-18 20:34:07 -08:00
f3d4ddd0f8 lsp: make functions private and use filter function 2020-02-19 07:39:56 +09:00
c1bfc8093f lsp: respect the sort order if there is sortText 2020-02-19 07:27:35 +09:00
4ac376740c lsp: fix textDocument/completion handling
fix: #11826
Some lanuguage servers return complementary candidates whose prefixes do not match are also returned.
So we exclude completion candidates whose prefix does not match.
ex) Microsoft python-language-server, rust-analyzer
2020-02-19 07:27:29 +09:00
dd5d00aaa9 doc: C-Y and C-E in wildmenu completion
Add description of C-Y and C-E in wildmenu completion
2020-02-18 17:10:29 +08:00
e2ed8053bf lua: move test helper function, map and filter, to vim.shared module 2020-02-18 17:43:10 +09:00
ceac76daa5 loop_close: close all handles
- 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
2020-02-17 23:50:59 -08:00
6d48d0bd15 loop_close: call uv_stop(), fix bug
- Call uv_stop().
- Restore `uv_loop_close` condition (braindead cosmetic change from
  a2efc9cf8b 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
   a2efc9cf8b)?
A: The while-loop (hopefully) achieves the same purpose while avoiding
   a hang.
2020-02-17 22:41:13 -08:00
a2efc9cf8b loop_close: timout after 2 seconds #11821
never UV_RUN_DEFAULT
ref #11820
ref #7376
2020-02-16 23:54:24 -08:00
b353a5c05f test: always dump logs on failure #11886
Whenever `eq()`, `ok()`, etc. fails, include log tail in the failure
message. This helps to correlate log messages with a particular test
failure.
2020-02-16 23:30:24 -08:00
03f245c0b8 Merge #11873 from janlazo/vim-8.1.0786
vim-patch:8.0.1660,8.1.{43,786,1201,2129,2131,2187,2223,2259},8.2.{241,267}
2020-02-16 23:18:24 -08:00
0c5d2ffebe Merge #11837 'LSP: fixes, improve test visibility' 2020-02-16 23:02:23 -08:00
6e13b9d261 test/LSP: assert contents of log file 2020-02-16 22:09:28 -08:00
a446fbc8fa lsp/rpc.lua: fix env application function
Env vars must be merged with the current env.
2020-02-16 22:09:28 -08:00
4cf48dc329 test/LSP: dump logs on error
This will help debug CI flakey failures.

TODO: helpers.assert_log()  -- Explicitly check contents of the logfile.
2020-02-16 19:04:40 -08:00
1eb0f5371a LSP: fix validate_client_config
- `cmd_env` is a table not a function.
- tests: Set $NVIM_LOG_FILE for fake LSP server.
2020-02-16 17:53:33 -08:00
c15bd6cd27 test/LSP: use less-generic exit code
- os.exit(1) is too generic, since code 1 may be caused by Nvim exiting
  for some other reason.  Change it to os.exit(101).
- style: de-architect json_encode/json_decode calls.

Failure seen in travis macOS job:
https://travis-ci.org/neovim/neovim/jobs/647849133

    [  FAILED  ] test/functional/plugin/lsp_spec.lua@ 266 SP basic_init test should not send didOpen if the buffer closes before init
    test/functional/plugin/lsp_spec.lua:297: exit code
    Expected objects to be the same.
    Passed in:
    (number) 1
    Expected:
    (number) 0
    stack traceback:
      test/functional/plugin/lsp_spec.lua:297: in function 'on_exit'
      test/functional/plugin/lsp_spec.lua💯 in function 'test_rpc_server'
      test/functional/plugin/lsp_spec.lua:272: in function <test/functional/plugin/lsp_spec.lua:266>
2020-02-16 17:52:48 -08:00
b04165859d test: style 2020-02-16 17:24:21 -08:00
322b2731ed deps: lua-client 0.2.2-1 2020-02-16 17:24:21 -08:00
1ce4b3c9a7 vim-patch:8.2.0267: no check for a following cmd when calling a function fails
Problem:    No check for a following command when calling a function fails.
Solution:   Also check for a following command when inside a try block.
            (closes vim/vim#5642)
e51bb17dd0
2020-02-16 18:04:44 -05:00
acc5fd9fac vim-patch:8.1.0043: ++bad argument of :edit does not work properly
Problem:    ++bad argument of :edit does not work properly.
Solution:   Return FAIL from get_bad_opt() only when there is no valid
            argument. (Dominique Pelle, Christian Brabandt, closes vim/vim#2966,
            closes vim/vim#2947)
7580849df9
2020-02-16 09:38:15 -05:00
18d86283b0 vim-patch:8.0.1660: the terminal API "drop" command doesn't support options
Problem:    The terminal API "drop" command doesn't support options.
Solution:   Implement the options.
333b80acf3
2020-02-16 09:38:14 -05:00
7955c05acc vim-patch:8.1.1201: output of :command is hard to read
Problem:    Output of :command is hard to read.
Solution:   Make some columns wider, some narrower.  Truncate the command when
            listing all.
725310d89e
2020-02-16 07:49:44 -05:00
986eafce47 vim-patch:8.1.2187: error for bad regexp even though regexp is not used
Problem:    Error for bad regexp even though regexp is not used when writing
            a file. (Arseny Nasokin)
Solution:   Ignore regexp errors. (closes vim/vim#5059)
b40c2576d4
2020-02-16 07:49:44 -05:00
5e38516a46 vim-patch:8.2.0241: crash when setting 'buftype' to "quickfix"
Problem:    Crash when setting 'buftype' to "quickfix".
Solution:   Check that error list is not NULL. (closes vim/vim#5613)
99234f29aa
2020-02-16 07:49:44 -05:00
bde4f47eb2 vim-patch:8.1.2223: cannot see what buffer an ml_get error is for
Problem:    Cannot see what buffer an ml_get error is for.
Solution:   Add the buffer number and name in the message
cb86893114
2020-02-16 07:49:44 -05:00
0f5bb9faf1 vim-patch:8.1.0786: ml_get error when updating the status line
Problem:    ml_get error when updating the status line and a terminal had its
            scrollback cleared.  (Chris Patuzzo)
Solution:   Check the cursor position when drawing the status line.
            (closes vim/vim#3830)
10772307c4
2020-02-16 07:49:43 -05:00
4907bc2626 vim-patch:8.1.2259: running tests may leave XfakeHOME behind
Problem:    Running tests may leave XfakeHOME behind.
Solution:   Source summarize.vim without using setup.vim. (closes vim/vim#5177)
            Also fix that on MS-Windows the test log isn't echoed.
7d2320414f
2020-02-16 07:49:43 -05:00
e52c22d63c vim-patch:8.1.2131: MSVC tests fail
Problem:    MSVC tests fail.
Solution:   Replace backslashes with slashes.
c25e702dee
2020-02-16 07:49:43 -05:00
e5aeb2e193 vim-patch:8.1.2129: using hard coded executable path in test
Problem:    Using hard coded executable path in test.
Solution:   Use v:progpath. Use $VIMRUNTIME instead of "runtime". (James
            McCoy, closes vim/vim#5025)
1ac41a5c13
2020-02-16 07:49:43 -05:00
a1d6c2f5c9 checkhealth: allow 'sudo install' of 'Neovim::Ext' #11874
cpanm cannot look for Perl modules from root directories
without sudo so it creates '~/perl5/' and look for Perl modules in there.
Whether this directory existed before running cpanm or not,
cpanm returns a warning to advice the user to setup local::lib
in order to use modules in '~/perl5/' and exits with error code 0.
Each line in the warning always starts with '!'.

Display this warning to the user.
Continue parsing the version number if the warning can be ignored
because lines that are not prefixed with '!' are valid output.

Fix #11858
2020-02-15 16:02:52 -08:00
dc0e534a91 Merge pull request #11864 from h-michael/deepcopy
lua: vim.deepcopy() and vim.tbl_extend() should preserve vim.empty_dict()
2020-02-15 18:10:48 +01:00
bb331a9b31 mouse.c: can click on multibyte foldopen/foldclose (#11863)
would previously only work with ascii fillchars.

Added a test.
2020-02-14 16:42:00 +01:00
61c98a1cf2 Merge pull request #11870 from QnJ1c2kNCg/master
clang analyzer: Dead assignment `ns_id` in nvim_buf_add_highlight
2020-02-14 16:00:49 +01:00
cdb729b746 lua: add vim.tbl_extend and vim.deepcopy test 2020-02-14 22:36:21 +09:00
c230c7d1a6 lua: if second argument is vim.empty_dict(), vim.tbl_extend uses empty_dict() instead of {} 2020-02-14 19:35:46 +09:00
146598efcc build: Fix MSVC build failure on CI #11865
clean-shared-libraries does nothing useful in MSVC build. Nevertheless,
it deletes ${DEPS_INSTALL_DIR}/lib/nvim/parser/c.dll and causes build
failure in CI.
2020-02-14 00:45:41 -08:00
1b200d9936 checkhealth: ignore cpamn "!" output #11869
cpanm outputs a warning that suggest to use 'sudo' or use local::lib.
cpanm exits with 0 so nvim thinks that the command worked.

cpanm output that starts with "!"  is likely an error.

Close #11858
2020-02-14 00:43:28 -08:00
a26943e9b3 clang bug: Dead assignment ns_id
Remove a dead assignment of the `ns_id` variable in the
`src/nvim/api/buffer.c` file.

Refer: https://neovim.io/doc/reports/clang/report-f279da.html#EndPath
2020-02-13 23:09:42 -08:00
d9657b3ae2 doc/lsp: start_client config cmd must be a list (#11866)
doc/lsp: start_client config cmd must be a list

After the merge of https://github.com/neovim/neovim/pull/11847 cmd can
no longer be a string but must be a list.
2020-02-13 20:38:47 +01:00
0eadbd4ac2 mark userfunc as legacy 2020-02-13 14:11:57 +01:00
5e815edece rename: user_funcs -> userfunc
Lets stick with vim for now
2020-02-13 14:11:55 +01:00
d50c1123d5 fix: includes 2020-02-13 14:11:53 +01:00
e367e80e11 fix: moved macros 2020-02-13 14:11:52 +01:00
c7ef0e8d2d fix: moved some static inline function 2020-02-13 14:11:50 +01:00
3c413f1523 fix: vvlua_partial 2020-02-13 14:11:48 +01:00
1e0a9b2690 fix: made eval_lavars_used global 2020-02-13 14:11:47 +01:00
9d7ce03ef1 fix: include static function declarations 2020-02-13 14:11:45 +01:00
3477512f81 fix: header updates 2020-02-13 14:11:44 +01:00
937da5dd7e Removed redundant define 2020-02-13 14:11:42 +01:00
423fcbee4a fix: factor out make_partial 2020-02-13 14:11:40 +01:00
b683957763 fix: prof functions 2020-02-13 14:11:39 +01:00
04f7e1f56d fix: var_set_global 2020-02-13 14:11:37 +01:00
bae1738bce fix: find_var_ht_dict 2020-02-13 14:11:35 +01:00
e50b545676 fix: factor out new functions
free_unref_funccal
get_funccal_local_var
get_funccal_args_var
get_current_funccal_dict
set_ref_in_previous_funccal
set_ref_in_call_stack
set_ref_in_func_args

note:
In vim semantic for garbage_collect was changed
(the result of free_unref_funccal is ignored, bug or intentional?)

For nvim I did leave previous behavior thus

did_free = did_free || free_unref_funccal(copyID, testing);
instead of just
free_unref_funccal(copyID, testing);
2020-02-13 14:11:34 +01:00
c769b15fe4 fix: func_init 2020-02-13 14:11:32 +01:00
700d7a037c unstatic some functions 2020-02-13 14:11:29 +01:00
3b0475927c moved more stuff 2020-02-13 14:11:27 +01:00
dc5debadc2 created header file 2020-02-13 14:11:25 +01:00
9b140fafe3 moved functions to user_funcs.c (no code changes) 2020-02-13 14:11:21 +01:00
417fc6ccf7 lua: vim.deepcopy uses empty_dict() instead of {} for empty_dict()
fix: https://github.com/neovim/nvim-lsp/issues/94
2020-02-13 11:55:43 +09:00
a73d8ace0b Merge pull request #11859 from h-michael/empty-dict
check json_encode behavior for vim.empty_dict()
2020-02-12 21:16:42 +01:00
032ede0203 test: add json_encode test for vim.empty_dict() 2020-02-12 21:08:12 +09:00
68de6b17b8 Merge #10433 from erw7/vim-8.1.0027
vim-patch:8.1.{27,32,36,69,70,71,91,92}
2020-02-12 00:24:50 -08:00
d54b5997b7 Fix issue where callbacks are garbage collected
Import necessary part of vim-patch:8.1.1575.
75a1a9415b
2020-02-12 16:03:54 +09:00
3557757a3c vim-patch:8.1.0092: prompt buffer test fails
Problem:    Prompt buffer test fails.
Solution:   Set 'nomodified' before closing the window. (Ozaki Kiichi,
            closes vim/vim#3051
71ef1ba5e9
2020-02-12 16:03:54 +09:00
aec3d7915c vim-patch:8.1.0091: MS-Windows: Cannot interrupt gdb when program is running
Problem:    MS-Windows: Cannot interrupt gdb when program is running.
Solution:   Add debugbreak() and use it in the terminal debugger.
            Respect 'modified' in a prompt buffer.
4551c0a9fc
2020-02-12 16:03:45 +09:00
b015c4741c vim-patch:8.1.0071: terminal debugger only works with the terminal feature
Problem:    Terminal debugger only works with the terminal feature.
Solution:   Make it also work with a prompt buffer.  Makes it possible to use
            on MS-Windows. Various other improvements. (closes vim/vim#3012)
b3307b5e7e
2020-02-12 15:30:17 +09:00
f320db3450 vim-patch:8.1.0070: missing part of the changes for prompt_setinterrupt()
Problem:    Missing part of the changes for prompt_setinterrupt().
Solution:   Add the missing changes.
222cd20e26
2020-02-12 15:30:17 +09:00
fe395ae210 vim-patch:8.1.0069: cannot handle pressing CTRL-C in a prompt buffer
Problem:    Cannot handle pressing CTRL-C in a prompt buffer.
Solution:   Add prompt_setinterrupt().
0e5979a6d4
2020-02-12 15:30:06 +09:00
783aecd501 vim-patch:8.1.0036: not restoring Insert mode if leaving prompt buffer with mouse
Problem:    Not restoring Insert mode if leaving a prompt buffer by using a
            mouse click.
Solution:   Set b_prompt_insert appropriately. Also correct cursor position
            when moving cursor to last line.
891e1fd894
2020-02-12 15:16:32 +09:00
3ca0343fb9 vim-patch:8.1.0032: BS in prompt buffer starts new line
Problem:    BS in prompt buffer starts new line.
Solution:   Do not allows BS over the prompt.  Make term_sendkeys() handle
            special keys. Add a test.
6b810d92a9
2020-02-12 15:16:32 +09:00
4813ad48cd vim-patch:8.1.0027: difficult to make a plugin that feeds a line to a job
Problem:    Difficult to make a plugin that feeds a line to a job.
Solution:   Add the nitial code for the "prompt" buftype.
f273245f64
2020-02-12 15:16:32 +09:00
58ec72f9fd LSP: rename validate_command to _cmd_parts #11847
and now only accepts a list of strings (instead of string or list).
2020-02-11 21:48:25 -08:00
5d5b068d5b LSP: Refine formatting tabSize #11834
Use the logic explained in the softtabstop help section for defining
the tabSize parameter in formatting requests. This means that:

 - if softtabstop is 0, tabstop is used
 - if softtabstop < 0, shiftwidth is used
 - if softtabstop > 0, softtabstop is used

When inserting spaces instead of tabs, softtabstop is used in vim.
Therefor it would be more logical to use it when formatting instead
of the current tabstop.
2020-02-10 22:53:14 -08:00
2572c5d093 Merge pull request #11845 from rht/master
doc/manpage: Remove the extra nvim subdirectory
2020-02-11 02:45:36 +01:00
e14fae81e9 Merge pull request #11848 from fwalch/build-tree-sitter-out-of-source
Build tree-sitter-c out-of-source
2020-02-10 23:32:47 +01:00
3f217741ec Build tree-sitter out-of-source
Avoids having CMakeCache.txt etc in https://github.com/neovim/deps, where it can cause trouble for Ubuntu PPA builds such as:

> CMake Error: The source "/<<BUILDDIR>>/neovim-0.5.0+ubuntu1+git202002090924-1f479ff-00e710e/.deps/build/src/treesitter-c/CMakeLists.txt" does not match the source "/home/travis/build/neovim/bot-ci/build/deps-src/build/src/treesitter-c/CMakeLists.txt" used to generate cache.  Re-run cmake with a different source directory.
2020-02-10 21:52:33 +01:00
a723d60549 Merge pull request #11842 from bfredl/decotest
treesitter: use internal "decorations" buffer
2020-02-10 18:09:50 +01:00
7d7adf7acc treesitter: cleanup some luahl stuff 2020-02-10 13:10:15 +01:00
95fd28f4a1 treesitter: use internal "decorations" buffer 2020-02-10 13:10:15 +01:00
rht
29d66288ef doc/manpage: Remove the extra nvim subdirectory 2020-02-10 07:10:06 -05:00
6c5bbf07d9 eval.c: factor out eval/funcs.c #11828
close #11828
ref #5081
cf. vim patch 7.4.2063
2020-02-10 00:36:26 -08:00
rht
d34f042ed5 doc/manpage: reference $VIM instead of /usr/local/share #11840 [ci skip] 2020-02-09 16:43:06 -08:00
174f7a2980 lsp: Support text edit on inactive buffer (#11843)
Using `vim.lsp.buf.rename()` can result in receiving a TextEdit that
affects a file for which there is no active or loaded buffer.

In that case `api.nvim_buf_get_lines(...)` returned an empty result,
leading to an error.

Closes https://github.com/neovim/neovim/issues/11790
2020-02-10 09:05:42 +09:00
31614d3eb0 Merge pull request #11841 from bfredl/libdir
build: always create build/lib/nvim so the install command doesn't fail
2020-02-09 19:02:01 +01:00
ba3778f83b build: always create build/lib/nvim so the install command doesn't fail 2020-02-09 14:21:58 +01:00
1ece24a329 Merge pull request #11836 from bfredl/vim-dbe5d361feb6
vim-patch:8.2.0235: draw error when an empty group is removed from 'statusline'
2020-02-09 10:45:32 +01:00
70c212e480 vim-patch:8.2.0235: draw error when an empty group is removed from 'statusline'
Problem:    Draw error when an empty group is removed from 'statusline'.
Solution:   Do not use highlighting from a removed group.
dbe5d361fe
2020-02-09 09:42:26 +01:00
dd8b29cfe2 LSP: set InitializeParams.rootPath value #11838
InitializeParams.rootPath is deprecated now. But some language servers still use it.
2020-02-08 22:51:02 -08:00
1f479fffbf Merge pull request #11830 from teto/treesitter_fix
build: allow to use non-bundled C parser
2020-02-07 21:55:43 +01:00
712298e1d3 build: allow to skip treesitter C parser install
if USE_BUNDLED_TS_PARSERS is set to off, don't try to install the
parser.
Distribs can install treesitter parsers directly into $CMAKE_LIBRARY_PATH/nvim
(and users anywhere in rtp).

Also fix the URL.
2020-02-07 20:42:27 +01:00
120a4c8e25 Merge pull request #11757 from bfredl/treesitter_runtime
treesitter: add standard search path for parsers + bundle c parser properly
2020-02-07 10:41:02 +01:00
017b25101a Merge #11827 'deps/MSVC: gettext 0.20.1'
fix #8164
close #11771
2020-02-07 00:54:59 -08:00
ef2e6522c5 tests: bail out on libdir just like $VIMRUNTIME, it cannot be calculated 2020-02-07 09:32:25 +01:00
00c57c98df treesitter: add standard &rtp/parser/ search path for parsers 2020-02-07 09:22:55 +01:00
64807303df build: include tree-sitter-c parser in bundled build 2020-02-07 09:22:55 +01:00
c5b812c9ea env: try find library dir (like /usr[/local]/lib/nvim) and add it to &rtp 2020-02-07 09:22:55 +01:00
7ce9a5c7da api: add nvim_get_runtime_file for finding runtime files 2020-02-07 09:22:55 +01:00
882f4a6f8e deps/msvc: gettext 0.20.1 2020-02-06 14:08:06 -06:00
405f49a9b1 doc: Fix {spell,mlang}.txt files text encoding #11814
These had broken encodings, set it to UTF-8. All remianing Neovim
non-ASCII documentation files are UTF-8 encoded. And so are their Vim
original versions.
2020-02-05 01:07:01 -08:00
09016d979b deps: gettext 0.20.1
fix https://github.com/neovim/neovim/pull/8163

The `gettext-Fix-compilation-on-a-system-without-alloca.patch`
patch is included in gettext 0.20.1, so we can remove that file and
the associated PATCH_COMMAND in `BuildGettext.cmake`.

changes (abbreviated) since 0.19.8.1:

    2019-05-12  Bruno Haible  <bruno@clisp.org>
            intl: Fix wrong libtool versioning information.
            Reported by Ken Takata <ktakata65536@gmail.com>
            in <https://savannah.gnu.org/bugs/?56305>.
    2019-05-11  Bruno Haible  <bruno@clisp.org>
            intl: Remove obsolete code.
            Update after gnulib changed.
            * autogen.sh: Don't copy intl.m4.
            intl.m4, intmax.m4, printf-posix.m4, uintmax_t.m4, visibility.m4.
            Update to newest gnulib.
    2019-05-09  Bruno Haible  <bruno@clisp.org>
            Update release steps.
    2019-05-08  Bruno Haible  <bruno@clisp.org>
            examples: Use infrastructure from gettext version 0.20.
            version 0.20.
            Update translations (from the TP).
            Prepare for 0.20 release.
            * libtextstyle/version.sh: Update RELEASE_DATE.
    2019-05-07  Bruno Haible  <bruno@clisp.org>
            libtextstyle: examples: Enable --color=html, for debuggability.
            Reported by Akim Demaille.
            * libtextstyle/examples/color-hello/hello.c (main): Handle color_html case.
            * libtextstyle/examples/color-filter/filter.c (main): Likewise.
    2019-05-05  Bruno Haible  <bruno@clisp.org>
            examples: hello-c++-widgets: Update build infrastructure.
            Gnulib changed on 2018-11-11: asm-underscore.m4 is no longer needed for havelib.
            asm-underscore.m4.
            asm-underscore.m4.
    2019-05-05  Bruno Haible  <bruno@clisp.org>
            (check_PROGRAMS): Add intl-version-prg.
            (intl_version_prg_SOURCES, intl_version_prg_LDADD): New variables.
    2019-05-05  Bruno Haible  <bruno@clisp.org>
            msginit: Avoid error messages when run on mingw.
            Reported by Michele Locati <michele@locati.it>.
            language_team_address): Don't even attempt to run the shell script.
    2019-05-05  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Document debugging tricks.
            Reported by Akim Demaille <akim@lrde.epita.fr>.
            * libtextstyle/doc/libtextstyle.texi (Debugging style files): New subsection.
            (Debugging the styling code): New section.
    2019-05-01  Bruno Haible  <bruno@clisp.org>
            msginit: Fix invocation of helper programs on Windows.
            Reported by Michele Locati <michele@locati.it>
            in <https://lists.gnu.org/archive/html/bug-gettext/2019-04/msg00058.html>.
            * autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add configmake.
            (main): Add BINDIR to the PATH.
    2019-05-01  Bruno Haible  <bruno@clisp.org>
            msginit: Improvements for Cygwin and Android.
            * autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add sh-filename.
            language_team_address): Use BOURNE_SHELL instead of hardcoding /bin/sh.
    2019-04-29  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Document one more terminal emulator.
            * libtextstyle/doc/libtextstyle.texi (Terminal emulators): Mention QTerminal.
    2019-04-28  Bruno Haible  <bruno@clisp.org>
            "cldr-plurals.exe", not "cldr-plurals".
    2019-04-28  Bruno Haible  <bruno@clisp.org>
            In the POT files, talk about the "GNU gettext package".
            Reported by Benno Schulenberg <coordinator@translationproject.org>.
    2019-04-28  Bruno Haible  <bruno@clisp.org>
            XGETTEXT_OPTIONS and the XGETTEXT_EXTRA_OPTIONS after all other options.
            Likewise.
            ($(DOMAIN).pot-update): Likewise.
    2019-04-28  Bruno Haible  <bruno@clisp.org>
            The xterm description on these platforms includes support for italics.
            Reported by Nelson H. F. Beebe.
            New file.
            expected result.
    2019-04-28  Bruno Haible  <bruno@clisp.org>
            libxml: Avoid gcc warnings.
            Avoids "warning: too many arguments for format".
            * gnulib-local/lib/libxml/xmlerror.in.h (__xmlSimpleError): Remove
            LIBXML_ATTR_FORMAT annotation, because this function may be called with a
            NULL msg.
    2019-04-28  Bruno Haible  <bruno@clisp.org>
            libxml: Avoid build failure due to "implicit declaration of function".
            * gnulib-local/lib/libxml/libxml.h: Include xmlstring.h only after config.h is
            included.
            libxml: Update included libxml2 to version 2.9.9.
            * gnulib-local/lib/libxml/*: Update from libxml2 2.9.9.
            Update to newest gnulib.
    2019-04-28  Bruno Haible  <bruno@clisp.org>
            Reported by Nelson H. F. Beebe.
            allow an expected result in UTF-8 encoding.
    2019-04-28  Bruno Haible  <bruno@clisp.org>
            Reported by Nelson H. F. Beebe.
    2019-04-28  Bruno Haible  <bruno@clisp.org>
            Reported by Nelson H. F. Beebe.
    2019-04-28  Bruno Haible  <bruno@clisp.org>
            The master copy lives in gnulib now.
    2019-04-28  Bruno Haible  <bruno@clisp.org>
    2019-04-28  Bruno Haible  <bruno@clisp.org>
            Reported by Nelson H. F. Beebe.
            "automake -a -c".
    2019-04-28  Bruno Haible  <bruno@clisp.org>
            Reported by Nelson H. F. Beebe.
    2019-04-28  Bruno Haible  <bruno@clisp.org>
            Update after gnulib changed.
            Update to newest gnulib.
    2019-04-27  Bruno Haible  <bruno@clisp.org>
            intl: Use the lookup optimization also on platforms without per-thread locales.
            This bug was introduced on 2007-01-27.
    2019-04-27  Bruno Haible  <bruno@clisp.org>
            po-mode: Fix warning.
            libgettextpo: Don't rely on the undocumented variable libgettextpo_program_name.
            * gnulib-local/lib/xerror.c: If IN_LIBGETTEXTPO is defined, include
            getprogname.h instead of progname.h and define program_name as a macro.
            * gnulib-local/lib/error-progname.c: Likewise.
            * autogen.sh (GNULIB_MODULES_LIBGETTEXTPO): Remove progname.
            Pass --avoid=progname to gnulib-tool invocation for libgettextpo.
            libgettextpo: Fix crash when iconv() does not support the PO file's encoding.
            defined, don't use program_name.
            libgettextpo: Fix gcc warnings.
            evaluate the classname argument.
            Fix a gcc warning.
            USEJAVA is 0.
            Fix a gcc warning on mingw.
            set.
            (get_user_fullname): Don't call get_user_pwd if HAVE_PWD_H is not set.
            Fix gcc warnings on mingw and IRIX 6.5.
            supports %zu.
            Fix gcc warnings on mingw.
            Fix a gcc warning (regression from 2017-05-04).
            search-path.c: Improve code style.
            (foreach_elements): Fix comment.
            (get_search_path): Improve comments. Perform each getenv() only once. Reduce
            scope of variables. Fix gcc warning.
            libxml: Fix width of fprintf argument on native Windows.
            * gnulib-local/lib/libxml/timsort.h (TIM_SORT_RESIZE): Cast fprintf argument to
            'unsigned long'.
            intl: Fix a gcc warning.
            data as BYTE array, not char array.
    2019-04-26  Bruno Haible  <bruno@clisp.org>
            Reported by Michele Locati <michele@locati.it>
            in <https://lists.gnu.org/archive/html/bug-gettext/2019-04/msg00052.html>.
            symbol.
    2019-04-26  Bruno Haible  <bruno@clisp.org>
            Document the OUTPUT_CHARSET environment variable.
            Reported by Václav Slavík <vaclav@slavik.io>
            via Michele Locati <michele@locati.it>.
    2019-04-14  Bruno Haible  <bruno@clisp.org>
            Update translations (from the TP).
            Prepare for 0.20 release.
            (GETTEXT_MACRO_VERSION): Bump to 0.20.
            output.
            * libtextstyle/version.sh: Use version number 0.20 here as well.
            autopoint: Reject AM_GNU_GETTEXT without 'external' for versions >= 0.20.
            specified with a gettext version >= 0.20.
            --with-included-gettext. Don't use libtoolize.
            * check-copyright-headers (func_check_file): Succeed for the archive.dir.tar
            file.
            Update to newest gnulib.
    2019-04-13  Bruno Haible  <bruno@clisp.org>
            assume that fprintf supports %zu.
            * autogen.sh: Copy x-to-1.in from gnulib.
            libtextstyle/lib.
            (textstyle.h): New rule.
            (BUILT_SOURCES, MOSTLYCLEANFILES): Add textstyle.h and textstyle/*.h.
            * autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add openmp-init. Remove openmp.
            Update to newest gnulib.
    2019-04-12  Bruno Haible  <bruno@clisp.org>
            msgfmt: Fix another buffer overrun.
            Reported and patch by Joshua Root <jmr@macports.org>
            at <https://savannah.gnu.org/bugs/?56126>.
            trailing NUL byte as well.
    2019-04-11  Bruno Haible  <bruno@clisp.org>
            * autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add localtime, unsetenv.
            gl_array_list_implementation, styled_ostream_typeinfo.
            color_test_mode, style_file_name.
            modules.
            * libtextstyle/autogen.sh: Pass a --macro-prefix option to gnulib-tool.
            * libtextstyle/configure.ac: Update accordingly.
            libtextstyle: Fix build failure on mingw (regression from 2019-03-17).
            isatty.c defines the symbol 'libtextstyle_isatty', not 'isatty'.
    2019-04-11  Bruno Haible  <bruno@clisp.org>
            For some reason, Automake puts a definition of CXXLD in
    2019-04-10  Bruno Haible  <bruno@clisp.org>
            msgfmt: Fix a buffer overrun.
            Reported by Tobi Schäfer at <https://trac.macports.org/ticket/58323>,
            via Ryan Schmidt <@ryandesign.com> at <https://savannah.gnu.org/bugs/?56112>.
            Patch proposed by Joshua Root.
            trailing NUL byte as well.
    2019-04-09  Bruno Haible  <bruno@clisp.org>
            of HAVE_USELOCALE.
            msgmerge: Fix crash on 32-bit AIX 7.2.
            (main): Invoke openmp_init().
            Update to newest gnulib.
    2019-04-08  Bruno Haible  <bruno@clisp.org>
            Make sure that libintl.h declares the *wprintf overrides on Windows.
            Update to newest gnulib.
    2019-04-08  Bruno Haible  <bruno@clisp.org>
            autopoint: Don't risk failing because of user or system git configurations.
            Reported by Jamie Kirkpatrick <jkp@kirkconsulting.co.uk>
            in <https://savannah.gnu.org/support/?107689>.
            does not read the user's git configuration nor the system's git configuration.
    2019-04-08  Bruno Haible  <bruno@clisp.org>
            xgettext: Recognize ECMAScript-262 6th edition template literals.
            Reported by Philip Chimento <philip.chimento@gmail.com>
            in <https://savannah.gnu.org/bugs/index.php?50920>.
            (enum token_type_ty): Add token_type_template, token_type_ltemplate,
            token_type_mtemplate, token_type_rtemplate.
            (free_token): Treat token_type_template like token_type_string.
            (phase7_getuc): Add support for backquote quote_char.
            (brace_depth, template_literal_depth): New variables.
            (phase5_get): Parse template literals.
            (x_javascript_lex): Treat token_type_template like token_type_string. Handle the
            combination of symbol followed by template.
            (extract_balanced): Treat token_type_template like token_type_string, and
            token_type_ltemplate, token_type_mtemplate, token_type_rtemplate like
            token_type_other.
            (extract_javascript): Initialize brace_depth, template_literal_depth.
            syntax for strings.
    2019-04-08  Bruno Haible  <bruno@clisp.org>
            xgettext: Make JavaScript parser more robust.
            inside_embedded_js_in_xml.
    2019-04-07  Bruno Haible  <bruno@clisp.org>
            * check-copyright-headers: New file.
            (distcheck-hook): Run check-copyright-headers and fail if it fails.
    2019-04-07  Bruno Haible  <bruno@clisp.org>
            Reported by <ineiev@gnu.org> in <https://savannah.gnu.org/bugs/?54809>.
    2019-04-07  Bruno Haible  <bruno@clisp.org>
            * build-aux/texi2html: Moved to here from libtextstyle/build-aux/texi2html.
            * libtextstyle/autogen.sh: Copy texi2html.
            (EXTRA_DIST): Remove texi2html.
            (EXTRA_DIST): Remove texi2html.
            (distcheck-hook): Update.
    2019-04-07  Bruno Haible  <bruno@clisp.org>
            Reported by <ineiev@gnu.org> in <https://savannah.gnu.org/bugs/?54809>.
            libunistring/build-aux/texi2html and then in libtextstyle/build-aux/texi2html.
            processing.
            -no-sec-nav -no-menu -toc-links.
            (gettext_toc.html): Likewise. Pull out generated files out of subdirectory.
    2019-04-07  Bruno Haible  <bruno@clisp.org>
            libasprintf: Use a version of texi2html which is under a good license.
            Reported by <ineiev@gnu.org> in <https://savannah.gnu.org/bugs/?54809>.
            changes made in libunistring/build-aux/texi2html and then in
            libtextstyle/build-aux/texi2html.
            gettext-tools/doc/fdl.texi.
            gnulib/doc/gpl-2.0.texi.
            gnulib/doc/lgpl-2.1.texi.
            Top node during texi2html processing.
            (Licenses): New appendix.
            (MAKEINFOFLAGS): Use it.
            (autosprintf_TEXINFOS): New variable.
            (autosprintf_all.html): Depend on it. Use texi2html options -no-sec-nav -no-menu
            -toc-links.
    2019-04-07  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Tweak style of HTML documentation.
            * libtextstyle/build-aux/texi2html (BIG_RULE): Set to empty.
    2019-04-07  Bruno Haible  <bruno@clisp.org>
            Add copyright notices in several files.
            Reported by <ineiev@gnu.org> in <https://savannah.gnu.org/bugs/?54809>.
            by Gora Mohanty <gora_mohanty@yahoo.co.in> through private email on 2004-11-13.
            file is meant to be copied and renamed to 'Makevars'.
            notice.
    2019-04-04  Bruno Haible  <bruno@clisp.org>
            Reduce ABOUT-NLS to just a hyperlink.
            The common way to distribute information, nowadays, is through the web,
            not by including files in tarballs of packages.  Also, the current
            contents of ABOUT-NLS is outdated.
            Reported by Samuel Thibault in <https://savannah.gnu.org/bugs/?54809>.
            documentation.
            (all-local, ABOUT-NLS): Remove rules.
            instead of the ABOUT-NLS file.
            ABOUT-NLS file.
    2019-04-04  Bruno Haible  <bruno@clisp.org>
            'Translation Intro'. Turn into a section. Mark section as historical.
            matrix.texi.
    2019-04-04  Bruno Haible  <bruno@clisp.org>
            Add copyright notices in several files.
            Reported by <ineiev@gnu.org> in <https://savannah.gnu.org/bugs/?54809>.
            * windows/windres-options: Likewise.
            in Rules-quot.
    2019-04-03  Bruno Haible  <bruno@clisp.org>
            Mention the support for Java 11.
            This support was added in gnulib on 2018-09-26.
    2019-04-03  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Clean up old TODO item.
    2019-04-02  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Distribute two more files.
            gnulib-local/lib/libxml/xmlversion.in.h.diff, gnulib-local/modules/libxml.diff.
            * libtextstyle/gnulib-local/*: Many files moved to here from gnulib-local/*.
            * libtextstyle/gnulib-local/modules/libglib: Apply diff.
            * libtextstyle/gnulib-local/modules/libglib.diff: Remove file.
            * libtextstyle/gnulib-local/modules/libcroco: Apply diff.
            * libtextstyle/gnulib-local/modules/libcroco.diff: Remove file.
            * libtextstyle/gnulib-local/modules/term-styled-ostream: Apply diff.
            * libtextstyle/gnulib-local/modules/term-styled-ostream.diff: Remove file.
            * libtextstyle/gnulib-local/modules/html-styled-ostream: Apply diff.
            * libtextstyle/gnulib-local/modules/html-styled-ostream.diff: Remove file.
            * libtextstyle/gnulib-local/modules/noop-styled-ostream: Apply diff.
            * libtextstyle/gnulib-local/modules/noop-styled-ostream.diff: Remove file.
            * libtextstyle/woe32dll/c++term-styled-ostream.cc: Remove file.
            * libtextstyle/woe32dll/c++html-styled-ostream.cc: Remove file.
            * libtextstyle/woe32dll/c++noop-styled-ostream.cc: Remove file.
            libtextstyle/gnulib-local/. Add build-aux/moopp.
            libgettextpo: Avoid closing a FILE stream when it will still be used.
            ostream_free if we're using the dummy <textstyle.h>.
            libgettextpo: Use a dummy replacement for libtextstyle.
            * gnulib-local/modules/libtextstyle-dummy: New file, based on gnulib's
            modules/libtextstyle-optional.
            * autogen.sh (GNULIB_MODULES_LIBGETTEXTPO): Add libtextstyle-dummy. Remove
            file-ostream, ostream.
            Link the msg* and xgettext programs against libtextstyle.
            * libtextstyle/autogen.sh: Don't generate lib/color.h and lib/color.c.
            * libtextstyle/lib/color.h: Moved to here from gettext-tools/src/color.h.
            * libtextstyle/lib/color.c: Moved to here from gettext-tools/src/color.c.
            * autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Remove fd-ostream, file-ostream,
            html-styled-ostream, ostream, styled-ostream, term-styled-ostream. Add libxml.
            customization.
            (AM_CPPFLAGS): Add -I directives to the libtextstyle/lib directory.
            (libgettextsrc_la_SOURCES): Remove color.c.
            (libgettextsrc_la_LDFLAGS): Link with libtextstyle.la.
            and *-ostream.h.
            (msgdomain_list_print): Use styled_ostream_create and
            noop_styled_ostream_create.
            (is_stylable): Remove function.
            (begin_css_class, end_css_class): Update. Mark as inline.
            ostream.h.
            libtextstyle: Generalize fd-styled-ostream to noop-styled-ostream.
            * gnulib-local/lib/noop-styled-ostream.oo.h: New file, based on
            gnulib-local/lib/fd-styled-ostream.oo.h.
            * gnulib-local/lib/noop-styled-ostream.oo.c: New file, based on
            gnulib-local/lib/fd-styled-ostream.oo.c.
            * gnulib-local/modules/noop-styled-ostream: New file, based on
            gnulib-local/modules/fd-styled-ostream.
            and modules/fd-styled-ostream. Add lib/noop-styled-ostream.oo.[hc] and
            modules/noop-styled-ostream.
            * libtextstyle/woe32dll/c++noop-styled-ostream.cc: New file, based on
            libtextstyle/woe32dll/c++fd-styled-ostream.cc.
            * libtextstyle/gnulib-local/modules/noop-styled-ostream.diff: New file, based
            on libtextstyle/gnulib-local/modules/fd-styled-ostream.diff.
            * gnulib-local/lib/fd-styled-ostream.oo.h: Remove file.
            * gnulib-local/lib/fd-styled-ostream.oo.c: Remove file.
            * gnulib-local/modules/fd-styled-ostream: Remove file.
            * libtextstyle/woe32dll/c++fd-styled-ostream.cc: Remove file.
            * libtextstyle/gnulib-local/modules/fd-styled-ostream.diff: Remove file.
            * libtextstyle/autogen.sh (GNULIB_MODULES): Add noop-styled-ostream. Remove
            fd-styled-ostream.
            * libtextstyle/lib/misc.c: Include noop-styled-ostream.h, fd-ostream.h.
            (styled_ostream_create): Call fd_ostream_create and noop_styled_ostream_create
            instead of fd_styled_ostream_create.
            * libtextstyle/lib/textstyle.h (noop_styled_ostream_t): New type.
            (noop_styled_ostream_*): New declarations.
            * libtextstyle/doc/libtextstyle.texi (The noop_styled_ostream class): New
            subsection.
            * autogen.sh: Recurse into libtextstyle directory.
            * configure.ac: Likewise.
            * DEPENDENCIES: Mention that libiconv and ncurses are also used by libtextstyle.
            * PACKAGING: Recommend to ship libtextstyle as a third binary package.
            * gitsub.sh: New file, from gnulib.
            * autogen.sh: Remove all git operations and the --no-git option. Look at the
            GNULIB_SRCDIR environment variable. Ignore the GNULIB_TOOL environment variable.
            * HACKING: Explain when to use gitsub.sh.
            libtextstyle: Bump version number.
    2019-04-01  Daiki Ueno  <ueno@gnu.org>
            desktop: Fix whitespace handling around '='
            While the spec only allows spaces before and after '=',
            xgettext/msgfmt previously accepted all whitespaces including '\n'.
            That was causing unwanted concatenation of desktop lines.
            Reported by Bastien Nocera in:
            https://lists.gnu.org/archive/html/bug-gettext/2019-03/msg00017.html
            space characters before and after '='.
    2019-04-01  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Bump version number.
    2019-03-31  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Add support for true-color terminals.
            * gnulib-local/lib/term-ostream.oo.c (colormodel_t): Add cm_xtermrgb.
            (rgb_to_color_xtermrgb): New function.
            (attributes_t): Extend the color fields to 25 bits.
            (struct term_ostream): New fields active_attr_color, active_attr_bgcolor.
            (out_color_change, out_bgcolor_change, term_ostream::rgb_to_color): Handle
            cm_xtermrgb.
            (out_attr_change): Set also active_attr_color, active_attr_bgcolor.
            (async_set_attributes_from_default): Fetch also active_attr_color,
            active_attr_bgcolor.
            (term_ostream_create): Accept all $TERM values that end in -direct.
            * libtextstyle/doc/libtextstyle.texi (Terminal emulators): Document the
            prerequisites for true-color support.
            maint: Make code more "git diff"-friendly.
            non-whitespace character.
            libtextstyle: Improve documentation regarding the TERM value.
            * libtextstyle/doc/libtextstyle.texi (The TERM variable): Many more details.
            (Terminal emulators, Consoles): New subsections.
            libtextstyle: Support for terminal types with 256 colors.
            * gnulib-local/lib/term-ostream.oo.c (term_ostream_create): Accept all $TERM
            values that end in -16color or -256 color (such as Eterm-256color,
            mlterm-256color, or putty-256color).
    2019-03-30  Takesi Ayanokoji  <ayanokoji.takesi@gmail.com>
            po-mode: Enable highlighting of #, lines.
    2019-03-30  Bruno Haible  <bruno@clisp.org>
            po-mode: Remove support for Emacs versions < 22.
            Emacs 22 is the oldest version still in use, see
            <https://repology.org/project/emacs/versions>.
            (po-rehighlight): Remove function.
            (po-check-all-pending-edits, po-check-for-pending-edit): Update.
    2019-03-30  Bruno Haible  <bruno@clisp.org>
            po-mode: Remove support for XEmacs.
            Update after gnulib changed.
    2019-03-27  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Add support for Windows consoles.
            * gnulib-local/lib/term-ostream.oo.c: Include <windows.h>, msvc-nothrow.h,
            <io.h>.
            (struct term_ostream): Add fields handle, is_windows_console,
            default_console_attributes, current_console_attributes.
            (out_color_change, out_bgcolor_change, out_underline_change, out_attr_change,
            restore, async_restore, async_set_attributes_from_default, term_ostream::flush):
            Add separate code path for Windows consoles.
            and initialize the new fields.
            * gnulib-local/modules/term-ostream (Depends-on): Add msvc-nothrow.
            libtextstyle: Make the SIGCONT handler work more reliably.
            * gnulib-local/lib/term-ostream.oo.c (out_attr_change): Modify active_attr
            before emitting the escape sequences, not afterwards.
            libtextstyle: Mention fixes.
            'term-style-control'.
            libtextstyle: Small fix for last commit.
            * gnulib-local/lib/term-ostream.oo.c (struct term_ostream): Mark fd volatile.
            Update to newest gnulib.
    2019-03-27  Bruno Haible  <bruno@clisp.org>
            its: Simplify code.
            Suggested by Daiki Ueno.
    2019-03-26  Bruno Haible  <bruno@clisp.org>
            boundary. Get rid of initial trim() call.
            at the end of the last paragraph.
            * autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add memchr.
            * autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add strchrnul.
    2019-03-24  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Use gnulib module 'term-style-control'.
            * gnulib-local/lib/term-ostream.oo.h: Include term-style-control.h.
            (ttyctl_t): Remove type.
            * gnulib-local/lib/term-ostream.oo.c (DEBUG_SIGNALS): Remove macro.
            Don't include <signal.h>, <stdio.h>, <sys/stat.h>, fatal-signal.h,
            sig-handler.h, same-inode.h.
            (SIZEOF): Remove macro.
            (nonintr_tcgetattr, nonintr_tcsetattr): Remove functions.
            (log_message, sprintf_integer, simple_errno_string, simple_signal_string,
            log_signal_handler_called): Remove functions.
            (struct term_ostream): Remove fields tty_control, same_as_stderr,
            non_default_active. Add control_data field instead.
            (get_control_data): New function.
            (BLOCK_SIGNALS_DURING_NON_DEFAULT_STYLE_OUTPUT): Remove macro.
            (term_fd): Remove variable.
            (pgrp_status_t): Remove type.
            (pgrp_status): Remove variable.
            (update_pgrp_status): Remove function.
            (out_filename): Remove variable.
            (out_error): Use out_stream instead of out_filename.
            (restore, tcsetattr_failed): Remove functions.
            (orig_lflag_set, orig_lflag): Remove variables.
            (clobber_local_mode, restore_local_mode): Remove functions.
            (job_control_signals): Remove variable.
            (num_job_control_signals): Remove macro.
            (relevant_signal_set, relevant_signal_set_initialized): Remove variables.
            (init_relevant_signal_set, block_relevant_signals, unblock_relevant_signals,
            is_ignored, show_signal_marker, fatal_or_stopping_signal_handler,
            fatal_signal_handler, stopping_signal_handler, continuing_signal_handler,
            ensure_continuing_signal_handler, ensure_other_signal_handlers): Remove
            functions.
            (out_attr_change): Set out_stream and out_fd.
            (activate_non_default_attr, deactivate_non_default_attr): Remove functions.
            (restore, async_restore, async_set_attributes_from_default): New functions.
            (controller): New variable.
            (activate_default_attr, output_buffer): Update.
            (term_ostream::free): Invoke deactivate_term_style_controller.
            (term_ostream_create): Invoke activate_term_style_controller.
            * gnulib-local/modules/term-ostream (Depends-on): Add term-style-control. Remove
            fatal-signal, sigaction, sigprocmask, same-inode.
            moopp: Allow forward references to the <class>_representation type.
            * gnulib-local/build-aux/moopp (func_version): Bump copyright year.
            (func_emit_source_c): Move the <class>_representation type alias to the top
            of the file.
    2019-03-20  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Fix a memory access from a signal handler.
            * gnulib-local/lib/term-ostream.oo.c (struct term_ostream): Mark active_attr
            field as volatile.
            libtextstyle: Bump version number.
            Use _GL_ASYNC_SAFE from gnulib.
            (sigfpe_handler): Mark as _GL_ASYNC_SAFE.
            * gnulib-local/lib/term-ostream.oo.c (ASYNC_SAFE): Remove macro.
            Use _GL_ASYNC_SAFE instead.
            Update to newest gnulib.
            Update .gitignore after 2019-03-12 change.
    2019-03-17  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Bump version number.
            libtextstyle: Bump version number.
            libtextstyle: Implement reliable tty control.
            * gnulib-local/lib/term-ostream.oo.c (DEBUG_SIGNALS): New macro.
            Include <stdio.h>, <sys/stat.h>.
            (NOFLSH): Define fallback value.
            Include sig-handler.h, same-inode.h.
            (ASYNC_SAFE): New macro.
            (color_bgr): Mark as ASYNC_SAFE.
            (nonintr_tcgetattr, nonintr_tcsetattr): New functions.
            (log_message, sprintf_integer, simple_errno_string, simple_signal_string,
            log_signal_handler_called): New functions.
            (struct term_ostream): Add fields restore_colors, restore_weight,
            restore_posture, restore_underline, tty_control, same_as_stderr.
            (BLOCK_SIGNALS_DURING_NON_DEFAULT_STYLE_OUTPUT): New macro.
            (term_fd): New variable.
            (pgrp_status_t): New type.
            (pgrp_status): New variable.
            (update_pgrp_status): New function.
            (out_stream): New variable.
            (restore_colors, restore_weight, restore_posture, restore_underline): Remove
            variables.
            (out_color_change, out_bgcolor_change, out_weight_change, out_posture_change,
            out_underline_change): New functions, extracted from out_attr_change.
            (out_attr_change): Call these functions.
            (restore): Use out_stream.
            (tcsetattr_failed): New function.
            (orig_lflag_set, orig_lflag): New variables.
            (clobber_local_mode, restore_local_mode): New functions.
            (job_control_signals): Renamed from stopping_signals. Add SIGCONT.
            (num_job_control_signals): Renamed from num_stopping_signals.
            (relevant_signal_set): Replaces stopping_signal_set.
            (relevant_signal_set_initialized): New variable.
            (init_relevant_signal_set): Replaces init_stopping_signal_set.
            (block_relevant_signals): Replaces block_stopping_signals.
            (unblock_relevant_signals): Replaces unblock_stopping_signals.
            (is_ignored): New function.
            (show_signal_marker): New function.
            (fatal_or_stopping_signal_handler, fatal_signal_handler,
            stopping_signal_handler, continuing_signal_handler,
            ensure_continuing_signal_handler, ensure_other_signal_handlers): New functions.
            (activate_non_default_attr, deactivate_non_default_attr): Rewritten.
            (term_ostream::free): Unset term_fd and call update_pgrp_status.
            (term_ostream_create): Initialize the fields restore_colors, restore_weight,
            restore_posture, restore_underline, tty_control, same_as_stderr. Call
            init_relevant_signal_set. Set term_fd and call ensure_continuing_signal_handler
            and update_pgrp_status.
            * gnulib-local/m4/term-ostream.m4 (gl_TERM_OSTREAM): Check for tcgetattr.
            * gnulib-local/modules/term-ostream (Depends-on): Add sigaction, same-inode.
            libtextstyle: Fix build failure on Cygwin (regression from 2019-03-15).
            from $(srcdir)/libtextstyle.sym.
            (libtextstyle.sym): New rule.
            (MOSTLYCLEANFILES, MAINTAINERCLEANFILES, EXTRA_DIST): Update accordingly.
            (config.h): Depend on libtextstyle.sym in the build directory.
            (libtextstyle_la_LDFLAGS: Use libtextstyle.sym in the build directory.
            libtextstyle: Clean up leftovers from 2019-03-13 commit.
    2019-03-16  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Complete styled_ostream_flush_to_current_style declaration.
            * libtextstyle/lib/textstyle.h (term_styled_ostream_flush_to_current_style,
            html_styled_ostream_flush_to_current_style): New declarations.
            libtextstyle: Protect better against EINTR.
            * gnulib-local/lib/fd-ostream.oo.c (nonintr_tcdrain): New function.
            (fd_ostream::flush): Use it instead of tcdrain.
            * gnulib-local/lib/file-ostream.oo.c: Include <errno.h>.
            (nonintr_tcdrain): New function.
            (file_ostream::flush): Use it instead of tcdrain.
            * gnulib-local/lib/term-ostream.oo.c (nonintr_tcdrain): New function.
            (term_ostream::flush): Use it instead of tcdrain.
    2019-03-15  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Reexport isatty() override from gnulib.
            This is necessary for programs that are compiled for native Windows and
            run in a Cygwin console.
            * libtextstyle/autogen.sh (GNULIB_MODULES): Add 'isatty'.
            * libtextstyle/configure.ac: Set GNULIB_ISATTY to 0.
            * libtextstyle/lib/textstyle.h (libtextstyle_isatty): New declaration.
            (isatty): Redirect to libtextstyle_isatty.
    2019-03-14  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Use less code from libxml.
            * libtextstyle/gnulib-local/lib/libxml/xmlversion.in.h.diff: New file.
            * gnulib-local/lib/libxml/save.h (xmlEncodeAttributeEntities): Declare also when
            LIBXML_OUTPUT_ENABLED is 0.
            libtextstyle: Fix "make clean" failure in VPATH builds.
            (DISTCLEANDIRS_NOT_IN_SRCDIR): Add 'textstyle'.
            libtextstyle: Make sure we get new versions also of mdate-sh.
            * libtextstyle/autogen.sh: Erase more files in build-aux.
    2019-03-14  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Remove unused code for exporting variables from Windows DLLs.
            Here we use the third approach listed in gettext-tools/woe32dll/export.h, not
            the fourth approach.
            * libtextstyle/configure.ac (false): Remove conditional.
    2019-03-14  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Add metainformation for Windows.
            libtextstyle: Add metainformation for Windows.
            * libtextstyle/lib/libtextstyle.rc: New file.
            (WOE32_LIBADD): New variable.
            (libtextstyle.res.lo): New rule.
            (libtextstyle_la_LIBADD, libtextstyle_la_DEPENDENCIES): Augment.
    2019-03-13  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Don't use a C++ compiler.
            * libtextstyle/gnulib-local/modules/fd-styled-ostream.diff: New file.
            * libtextstyle/gnulib-local/modules/html-styled-ostream.diff: New file.
            * libtextstyle/gnulib-local/modules/term-styled-ostream.diff: New file.
            always.
            * libtextstyle/configure.ac: Remove LT_LANG([C++]), AC_PROG_CXX, and related
            invocations.
            libasprintf: Add metainformation for Windows.
            (WOE32_LIBADD): New variable.
            (libasprintf.res.lo): New rule.
            (libasprintf_la_LIBADD, libasprintf_la_DEPENDENCIES): New variables.
            * windows/gettext.rc: Likewise.
            libtextstyle: Bump version number.
    2019-03-12  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Bump version number.
            libtextstyle: New function styled_ostream_flush_to_current_style.
            * gnulib-local/lib/styled-ostream.oo.h (struct styled_ostream): Add method
            flush_to_current_style.
            * gnulib-local/lib/fd-styled-ostream.oo.c
            (fd_styled_ostream::flush_to_current_style): New method.
            * gnulib-local/lib/term-styled-ostream.oo.c
            (term_styled_ostream::flush_to_current_style): New method.
            * gnulib-local/lib/html-styled-ostream.oo.c
            (html_styled_ostream::flush_to_current_style): New method.
            * libtextstyle/lib/textstyle.h (styled_ostream_flush_to_current_style): New
            declaration.
            * libtextstyle/doc/libtextstyle.texi (The styled_ostream class): Document
            styled_ostream_flush_to_current_style.
            libtextstyle: New function html_ostream_flush_to_current_style.
            * gnulib-local/lib/html-ostream.oo.h (struct html_ostream): Add method
            flush_to_current_style.
            * gnulib-local/lib/html-ostream.oo.c (html_ostream::flush_to_current_style): New
            method.
            * libtextstyle/lib/textstyle.h (html_ostream_flush_to_current_style): New
            declaration.
            * libtextstyle/doc/libtextstyle.texi (The html_ostream class): Document
            html_ostream_flush_to_current_style.
            libtextstyle: New function term_ostream_flush_to_current_style.
            * gnulib-local/lib/term-ostream.oo.h (struct term_ostream): Add method
            flush_to_current_style.
            * gnulib-local/lib/term-ostream.oo.c (struct term_ostream): Add fields
            default_attr, active_attr, non_default_active.
            (out_attr_change): Remove second argument. Update active_attr.
            (activate_non_default_attr, deactivate_non_default_attr, activate_default_attr):
            New functions, extracted from output_buffer.
            (output_buffer): Use them. Add a second argument.
            (term_ostream::write_mem, term_ostream::flush): Update output_buffer calls.
            (term_ostream::free): Add an assertion.
            (term_ostream::flush_to_current_style): New method.
            (term_ostream_create): Initialize the fields default_attr, active_attr,
            non_default_active.
            * libtextstyle/lib/textstyle.h (term_ostream_flush_to_current_style): New
            declaration.
            * libtextstyle/doc/libtextstyle.texi (The term_ostream class): Document
            term_ostream_flush_to_current_style.
    2019-03-12  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Add a second argument to the 'flush' operations.
            * gnulib-local/lib/ostream.oo.h (ostream_flush_scope_t): New type.
            (ostream::flush): Add scope parameter.
            * gnulib-local/lib/file-ostream.oo.c: Include <unistd.h>, <termios.h>.
            (file_ostream::flush): Add a scope parameter.
            * gnulib-local/modules/file-ostream (Depends-on): Add 'fsync'.
            (configure.ac): Check for tcdrain.
            * gnulib-local/lib/fd-ostream.oo.c: Include <unistd.h>, <termios.h>.
            (fd_ostream::flush): Add a scope parameter.
            (fd_ostream::free): Update flush call.
            * gnulib-local/modules/fd-ostream (Depends-on): Add 'fsync'.
            (configure.ac): Check for tcdrain.
            * gnulib-local/lib/term-ostream.oo.c: Include <unistd.h>, <termios.h>.
            (term_ostream::flush): Add scope parameter.
            (term_ostream::free): Update flush call.
            * gnulib-local/m4/term-ostream.m4 (gl_TERM_OSTREAM): Check for tcdrain.
            * gnulib-local/modules/term-ostream (Depends-on): Add 'fsync'.
            * gnulib-local/lib/memory-ostream.oo.c (memory_ostream::flush): Add scope
            parameter.
            * gnulib-local/lib/iconv-ostream.oo.c (iconv_ostream::flush): Add scope
            parameter.
            * gnulib-local/lib/html-ostream.oo.c (html_ostream::flush): Add scope parameter.
            Emit closing </span> tags.
            * gnulib-local/lib/fd-styled-ostream.oo.c (fd_styled_ostream::flush): Add scope
            parameter.
            * gnulib-local/lib/term-styled-ostream.oo.c (term_styled_ostream::flush): Add
            scope parameter.
            * gnulib-local/lib/html-styled-ostream.oo.c (html_styled_ostream::flush): Add
            scope parameter.
            * libtextstyle/lib/textstyle.h (ostream_flush_scope_t): New type.
            (ostream_flush, styled_ostream_flush, file_ostream_flush, fd_ostream_flush,
            term_ostream_flush, memory_ostream_flush, iconv_ostream_flush,
            html_ostream_flush, term_styled_ostream_flush, html_styled_ostream_flush): Add
            scope parameter.
            * libtextstyle/doc/libtextstyle.texi (The ostream class): Add scope parameter to
            flush method.
    2019-03-11  Bruno Haible  <bruno@clisp.org>
            libtextstyle/examples/color-hello/hello.c.
            libtextstyle/examples/color-hello/hello-default.css.
            contains an encoding.
    2019-03-10  Bruno Haible  <bruno@clisp.org>
    2019-03-04  Bruno Haible  <bruno@clisp.org>
            (libgettextlib_la_LDFLAGS): Augment for relocatable installation.
            relocatable installation.
            variable.
            (libgettextpo_la_LDFLAGS): Augment for relocatable installation.
            Update after gnulib changed.
            Update to newest gnulib.
    2019-02-24  Bruno Haible  <bruno@clisp.org>
            libintl: Fix installation with BSD 'make'.
            directory first.
    2019-02-16  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Improve the way the library is built.
            needed for building on older versions of AIX and useful to verify no undefined
            symbols are used by mistake. Add '-export-symbols', to reduce the loading time
            of the shared library.
    2019-02-15  Daiki Ueno  <ueno@gnu.org>
            its: Avoid uninitialized variable
            Fixes commit 89e7d2663bd27b8cdd300f26095f49d2c7519030.
    2019-02-15  Bruno Haible  <bruno@clisp.org>
            @INTL_MACOSX_LIBS@ here.
            libtextstyle: Don't use an external libglib.
            * gnulib-local/m4/libglib.m4 (gl_LIBGLIB): Accept an optional FORCE-INCLUDED
            argument.
            * libtextstyle/gnulib-local/modules/libglib.diff: New file.
            libtextstyle: Don't use an external libxml.
            * gnulib-local/m4/libxml.m4 (gl_LIBXML): Accept an optional FORCE-INCLUDED
            argument.
            * libtextstyle/gnulib-local/modules/libxml.diff: New file.
            libtextstyle: Don't use an external libcroco.
            * gnulib-local/m4/libcroco.m4 (gl_LIBCROCO): Accept an optional FORCE-INCLUDED
            argument.
            * libtextstyle/gnulib-local/modules/libcroco.diff: New file.
            * libtextstyle/autogen.sh: Pass another --local-dir option to gnulib-tool.
            libtextstyle: Fix build error on Cygwin and mingw.
            libtextstyle: Really fix hyperlinks to table of contents in HTML doc.
            libtextstyle: Document when and how to turn off styling.
            * libtextstyle/doc/libtextstyle.texi (Basic use): Document when and how to turn
            off styling.
            * gnulib-local/lib/term-styled-ostream.oo.c (term_styled_ostream_create): Handle
            a NULL css_filename explicitly.
    2019-02-15  Daiki Ueno  <ueno@gnu.org>
            its: Add new preserveSpaceRule "paragraph"
            This implements a new text extraction rule preserving paragraph
            boundaries, as mentioned in:
            https://gitlab.gnome.org/GNOME/glib/issues/1350
            (its_merge_context_merge_node): Likewise.
            (normalize_whitespace): Handle "paragraph" rule.
    2019-02-15  Daiki Ueno  <ueno@gnu.org>
            its: Make whitespace normalization logic simpler
            pointers for normalizing whitespaces, instead of memmove.
            Suggested by Bruno Haible.
    2019-02-14  Bruno Haible  <bruno@clisp.org>
            libtextstyle: In the examples, actually respect the --color option.
            Reported by Akim Demaille <akim.demaille@gmail.com>.
            * libtextstyle/examples/color-filter/filter.c (main): Set style_file_name to
            NULL when styling should be disabled.
            * libtextstyle/examples/color-hello/hello.c (main): Likewise.
    2019-02-14  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Assume that the texinfo sources are in the source dir.
            libtextstyle_toc.html): Lookup libunistring.texi in $(srcdir).
    2019-02-14  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Fix hyperlinks to table of contents in HTML doc.
            Reported by Akim Demaille <akim.demaille@gmail.com>.
            libtextstyle.html with references to libtextstyle_toc.html.
    2019-02-14  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Document the link options more precisely.
            * libtextstyle/doc/libtextstyle.texi (Link options): Document the link
            dependencies.
            libtextstyle: Fix build failure on mingw.
            * gnulib-local/modules/html-styled-ostream (Depends-on): Add 'close'.
            libtextstyle: Add support for VPATH builds with OpenBSD 'make'.
            prefix the target file names with '$(srcdir)/'.
    2019-02-13  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Put the .sym file in the source directory.
            directory.
            (config.h): Update rule.
    2019-02-12  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Fix configuration of the example programs.
            Reported by Akim Demaille <akim.demaille@gmail.com>.
    2019-02-12  Bruno Haible  <bruno@clisp.org>
            libtextstyle: Bump version number.
            * libtextstyle/version.sh (VERSION): Set to 0.6.
    2019-02-10  Bruno Haible  <bruno@clisp.org>
            libtextstyle: New project.
            * libtextstyle/AUTHORS: New file, extracted from gettext/AUTHORS.
            * libtextstyle/COPYING: New file, copied from gettext/COPYING.
            * libtextstyle/DEPENDENCIES: New file, based on gettext/DEPENDENCIES.
            * libtextstyle/HACKING: New file, based on gettext/HACKING.
            * libtextstyle/INSTALL: New file, copied from gettext/INSTALL.
            * libtextstyle/autogen.sh: New file, based on libunistring/autogen.sh.
            * libtextstyle/configure.ac: New file, based on libunistring/configure.ac.
            * libtextstyle/build-aux/texi2html: New file, copied from
            libunistring/build-aux/texi2html.
            * libtextstyle/doc/fdl.texi: New file, copied from gnulib/doc/fdl.texi.
            * libtextstyle/doc/gpl.texi: New file, copied from gnulib/doc/gpl-3.0.texi.
            * libtextstyle/doc/libtextstyle.texi: New file, partially based on
            gettext/gettext-tools/doc/gettext.texi.
            * libtextstyle/examples/color-filter/INSTALL: New file, based on
            gettext/gettext-tools/examples/hello-c/INSTALL.
            * libtextstyle/examples/color-filter/autoclean.sh: New file, based on
            gettext/gettext-tools/examples/hello-c/autoclean.sh.
            * libtextstyle/examples/color-filter/autogen.sh: New file, based on
            gettext/gettext-tools/examples/hello-c/autogen.sh.
            * libtextstyle/examples/color-filter/configure.ac: New file.
            * libtextstyle/examples/color-filter/filter.c: New file.
            * libtextstyle/examples/color-filter/filter-default.css: New file.
            * libtextstyle/examples/color-hello/INSTALL: New file, based on
            gettext/gettext-tools/examples/hello-c/INSTALL.
            * libtextstyle/examples/color-hello/autoclean.sh: New file, based on
            gettext/gettext-tools/examples/hello-c/autoclean.sh.
            * libtextstyle/examples/color-hello/autogen.sh: New file, based on
            gettext/gettext-tools/examples/hello-c/autogen.sh.
            * libtextstyle/examples/color-hello/configure.ac: New file.
            * libtextstyle/examples/color-hello/hello.c: New file.
            * libtextstyle/examples/color-hello/hello-default.css: New file.
            * libtextstyle/examples/color-hello/names.c: New file.
            * libtextstyle/lib/misc.h: New file.
            * libtextstyle/lib/misc.c: New file.
            * libtextstyle/lib/notinline.h: New file, based on
            libunistring/lib/unistring-notinline.h.
            * libtextstyle/lib/stdbool.mini.h: New file, based on
            libunistring/lib/stdbool.mini.h.
            * libtextstyle/lib/textstyle.h: New file, based on
            gnulib-local/lib/*ostream.oo.h.
            * libtextstyle/lib/textstyle/version.in.h: New file, based on
            libunistring/lib/unistring/version.in.h.
            * libtextstyle/lib/textstyle/woe32dll.in.h: New file, based on
            libunistring/lib/unistring/woe32dll.in.h.
            * libtextstyle/lib/version.c: New file, based on libunistring/lib/version.c.
            * libtextstyle/m4/init-package-version.m4: New file, copied from
            libunistring/m4/init-package-version.m4.
            * libtextstyle/version.sh: New file, based on libunistring/version.sh.
            * libtextstyle/woe32dll/c++fd-styled-ostream.cc: New file.
            * libtextstyle/woe32dll/c++html-styled-ostream.cc: New file.
            * libtextstyle/woe32dll/c++term-styled-ostream.cc: New file.
            * gnulib-local/lib/glib/gstring.c (g_string_append_c): In libtextstyle, honor a
            macro definition.
            * gnulib-local/lib/libxml/elfgcchack.h: In libtextstyle, make this entire file a
            no-op.
            * gnulib-local/lib/libxml/globals.in.h (docbDefaultSAXHandler,
            htmlDefaultSAXHandler, oldXMLWDcompatibility, xmlBufferAllocScheme,
            xmlDefaultBufferSize, xmlDefaultSAXHandler, xmlDefaultSAXLocator,
            xmlDoValidityCheckingDefaultValue, xmlFree, xmlGenericError, xmlStructuredError,
            xmlGenericErrorContext, xmlStructuredErrorContext, xmlGetWarningsDefaultValue,
            xmlIndentTreeOutput, xmlTreeIndentString, xmlKeepBlanksDefaultValue,
            xmlLineNumbersDefaultValue, xmlLoadExtDtdDefaultValue, xmlMalloc,
            xmlMallocAtomic, xmlMemStrdup, xmlParserDebugEntities, xmlParserVersion,
            xmlPedanticParserDefaultValue, xmlRealloc, xmlSaveNoEmptyTags,
            xmlSubstituteEntitiesDefaultValue, xmlRegisterNodeDefaultValue,
            xmlDeregisterNodeDefaultValue, xmlLastError,
            xmlParserInputBufferCreateFilenameValue, xmlOutputBufferCreateFilenameValue): In
            libtextstyle, honor a macro definition.
            * gnulib-local/lib/libxml/globals.c (xmlFree, xmlMalloc, xmlMallocAtomic,
            xmlMemStrdup, xmlRealloc, docbDefaultSAXHandler, htmlDefaultSAXHandler,
            oldXMLWDcompatibility, xmlBufferAllocScheme, xmlDefaultBufferSize,
            xmlDefaultSAXHandler, xmlDefaultSAXLocator, xmlDoValidityCheckingDefaultValue,
            xmlGenericError, xmlStructuredError, xmlGenericErrorContext,
            xmlStructuredErrorContext, xmlGetWarningsDefaultValue, xmlIndentTreeOutput,
            xmlTreeIndentString, xmlKeepBlanksDefaultValue, xmlLineNumbersDefaultValue,
            xmlLoadExtDtdDefaultValue, xmlParserDebugEntities, xmlParserVersion,
            xmlPedanticParserDefaultValue, xmlSaveNoEmptyTags,
            xmlSubstituteEntitiesDefaultValue, xmlRegisterNodeDefaultValue,
            xmlDeregisterNodeDefaultValue, xmlLastError,
            xmlParserInputBufferCreateFilenameValue, xmlOutputBufferCreateFilenameValue):
            Likewise.
            * gnulib-local/lib/libxml/xmlmemory.c (xmlMalloc): Likewise.
            gnulib-local: New module 'fd-styled-ostream'.
            * gnulib-local/lib/fd-styled-ostream.oo.h: New file.
            * gnulib-local/lib/fd-styled-ostream.oo.c: New file.
            * gnulib-local/modules/fd-styled-ostream: New file.
            term-ostream: Remove the need for an exit handler.
            * gnulib-local/lib/term-ostream.oo.c (output_buffer): Delay the error() call
            until the default state has been restored.
            term-ostream: Prepare for robustness through signal handling.
            * gnulib-local/lib/term-ostream.oo.h (ttyctl_t): New type.
            (term_ostream_create): Add tty_control argument.
            * gnulib-local/lib/term-ostream.oo.c (term_ostream_create): Likewise.
            * gnulib-local/lib/term-styled-ostream.oo.h: Include term-ostream.h.
            (term_styled_ostream_create): Add tty_control argument.
            * gnulib-local/lib/term-styled-ostream.oo.c (term_styled_ostream_create):
            Likewise.
            libasprintf: Tweak documentation formatting.
            way.
    2019-02-09  Bruno Haible  <bruno@clisp.org>
            Update copyright years.
            Remove automatically generated files from version control.
            html-styled-ostream: Fix memory leak.
            * gnulib-local/lib/html-styled-ostream.oo.c (html_styled_ostream::free): Free
            the stream.
            html-ostream: Fix memory leak.
            * gnulib-local/lib/html-ostream.oo.c: Include minmax.h.
            (verify_invariants, shrink_class_stack): New functions.
            (emit_pending_spans): Use them.
            (html_ostream::write_mem): Shrink class stack during newline processing.
            (html_ostream::free, html_ostream::begin_span): Verify invariants.
            (html_ostream::end_span): Likewise. Shrink class stack.
            * gnulib-local/modules/html-ostream (Depends-on): Add 'minmax'.
    2019-02-08  Bruno Haible  <bruno@clisp.org>
            examples: Fix build failure when building from git (regression from 2018-10-23).
            color: Make color.c package-neutral.
            (style_file_lookup): Add stylesdir_after_install argument.
            (style_file_prepare): Add arguments.
            (GETTEXTSTYLESDIR): New macro.
            (msgdomain_list_print): Update style_file_prepare calls.
            term-ostream: Accommodate a shell that is not in /bin/sh.
            accordingly.
            libglib: Fix list of files to clean.
            * gnulib-local/modules/libglib (MOSTLYCLEANFILES): Add glib.h-t, glibconfig.h-t.
            * autogen.sh: Make it clear that 'touch config.h.in' is tied to autoheader.
    2019-02-05  Bruno Haible  <bruno@clisp.org>
            Remove left-over empty directories in 'make distclean'.
    2019-02-04  Bruno Haible  <bruno@clisp.org>
            Fix copyright years.
    2019-01-25  Bruno Haible  <bruno@clisp.org>
            Reported by Nathaniel M. Beaver <nathanielmbeaver@gmail.com>
            in <https://savannah.gnu.org/bugs/?55573>.
            --style options are applicable to many programs.
    2019-01-21  Bruno Haible  <bruno@clisp.org>
            msginit: Update for current shape of Translation Project.
            Reported by Karl Ove Hufthammer <karl@huftis.org>
            in <https://lists.gnu.org/archive/html/bug-gettext/2019-01/msg00014.html>.
            structure of teams page.
    2019-01-06  Bruno Haible  <bruno@clisp.org>
            Make cldr-plurals program more robust.
            (main): Arrange to invoke close_stdout at program exit.
            Assume setlocale function.
            Likewise.
            exists.
            Update after gnulib changed.
            Update to newest gnulib.
    2018-12-17  Bruno Haible  <bruno@clisp.org>
            Fix compilation error on HP-UX with gcc.
            * gnulib-local/lib/libxml/trionan.c: Include <float.h>.
    2018-12-16  Bruno Haible  <bruno@clisp.org>
            Add comment regarding HP-UX cc in C99 mode.
            * gnulib-local/lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Update
            comment.
    2018-11-25  Bruno Haible  <bruno@clisp.org>
            intl: Really uninstall the intl/ subdir sources.
            Fix compilation error (regression from today).
            * autogen.sh (GNULIB_MODULES_RUNTIME_FOR_SRC): Add 'unistd'.
            PACKAGE_IS_GETTEXT_TOOLS, PRELOADABLE_LIBINTL): New conditionals.
            (distclean): Simplify accordingly.
            * autogen.sh: Copy wchar_t.m4 and wint_t.m4 for libasprintf.
            (OBJECTS): Use plural.lo always.
            ($(srcdir)/plural.c): New rule.
            (.y.c, pluralx.c, pluralx.lo): Remove rules.
            (mostlyclean): Delete the temporary file of the plural.c rule.
            (maintainer-clean): Delete plural.c.
            Automake .y.c rule.
            (po-gram-gen.h, cldr-plural.h): Remove separate target.
            (po-gram-gen2.h): Generate in the source directory.
            maint: Add write-up of how to do code coverage.
    2018-11-25  Bruno Haible  <bruno@clisp.org>
            libasprintf: On mingw, really use our vasprintf function, not mingw_vasprintf.
            mingw now has a definition of 'vasprintf' in <stdio.h> that redirects to
            mingw_vasprintf, which does not support argument reordering (i.e.
            HAVE_POSIX_PRINTF is not defined). Make sure to avoid this function and use
            the one defined in our lib-asprintf.c instead.
            redirecting to libasprintf_asprintf.
            (vasprintf): Define as macro redirecting to libasprintf_vasprintf.
            and libasprintf_vasprintf.
    2018-11-25  Bruno Haible  <bruno@clisp.org>
            msginit: On native Windows, produce same PO header as on Unix.
            envsubst: On native Windows, produce output suitable for the shell.
            * autogen.sh (GNULIB_MODULES_RUNTIME_FOR_SRC): Add 'binary-io'.
            binary mode.
            output.
            convention in the output.
            (GETTEXTDATADIR): On mingw, use native Windows syntax.
            wabs_top_srcdir instead of abs_top_srcdir.
            of gl_locale_name_environ to XPG syntax.
            Update to newest gnulib.
    2018-11-25  Bruno Haible  <bruno@clisp.org>
            This creates a bootstrapping issue, but it can be mitigated:
            If a user wants to build GNU gettext on a platform which does not have the
            GNU gettext programs installed, they first need to build and install a tarball
            of GNU gettext; then only they can build GNU gettext from the git repository.
    2018-11-25  Bruno Haible  <bruno@clisp.org>
            Amend 'Stop installing the intl/ subdir sources.' commit from 2018-11-11.
            $prefix/share/gettext/intl directory.
            Fix compilation error on mingw (regression from 2018-11-04).
            literalstring_parser initializer.
    2018-11-21  Pavel Raiskup  <praiskup@redhat.com>
            msgfmt: fix C&P issue
            Use 'end' for buffer size computation, instead of NULL 'ellipsis'.
            format-kde-kuit: really use fallback markup
            methods when FORMAT_KDE_KUIT_USE_FALLBACK_MARKUP is defined.  Also
            free buffer if there's no support for XML.
    2018-11-18  Bruno Haible  <bruno@clisp.org>
            msgmerge must produce output that is stable under msgcat.
            Reported by Ludovic Courtès <ludo@gnu.org>
            in <https://savannah.gnu.org/bugs/?51027>.
            and '*-format' flags.
    2018-11-18  Bruno Haible  <bruno@clisp.org>
            gettextize: Give more advice.
            AM_GNU_GETTEXT_INTL_SUBDIR invocations.
            Simplify Autoconf macros.
            argument. Use libtool always. Remove variables that existed only for backward
            compatibility.
            * autogen.sh: Ignore gettext.m4 and intl.m4 from gnulib.
            (libintl.a, libgnuintl.a): Remove rule.
            (.o): Remove suffix rule.
            (install-exec, installdirs, uninstall, distclean, dist, distdir): PACKAGE cannot
            be anything else than gettext-runtime and gettext-tools any more.
    2018-11-17  Bruno Haible  <bruno@clisp.org>
            Make 'make distcheck' work in a VPATH build.
            source dir, not in the build dir.
            build dir, not in the source dir.
            (SMALLPOFILES_FOR_lang): Prefix file names with $(srcdir).
            (hello-*/po/*.po): Likewise. Execute mmsmallpo.sh in $(srcdir).
    2018-11-11  Bruno Haible  <bruno@clisp.org>
            gettextize: Install also host-cpu-c-abi.m4 (needed since 2018-03-24).
            * PACKAGING: Mention host-cpu-c-abi.m4.
            Update to newest gnulib.
            Update packaging instructions.
            * PACKAGING: Update file list.
            gettextize: Require automake >= 1.9.
            automake >= 1.9 is not found. Stop installing intldir.m4, intl.m4 and its
            dependencies.
            to have automake >= 1.9.
            extern-inline.m4, fcntl-o.m4, glibc2.m4, glibc21.m4, intdiv0.m4, intl.m4,
            intl-thread-locale.m4, intldir.m4, intmax.m4, inttypes_h.m4, inttypes-pri.m4,
            lcmessage.m4, lock.m4, longlong.m4, printf-posix.m4, size_max.m4, stdint_h.m4,
            threadlib.m4, uintmax_t.m4, visibility.m4, wchar_t.m4, wint_t.m4, xsize.m4.
            * PACKAGING: Remove the *.m4 files that are no longer installed.
            Stop installing the intl/ subdir sources.
            (DISTFILES.obsolete): Remove variable.
            (install-data): Don't install nor remove anything.
            (installdirs): Don't create $(gettextsrcdir).
            archive.
            * PACKAGING: Remove mention of $prefix/share/gettext/intl/ directory.
            gettextize: Remove --intl option.
            Signal an error if the --intl option is specified.
            Simplify main code accordingly.
            directory.
            (configure.ac): Suggest to use AM_GNU_GETTEXT([external]) always. Remove mention
            of intl/ directory.
            (config.guess): Suggest them always.
            (aclocal): Shrink the list of .m4 files.
            (acconfig): Remove subsection.
            (config.h.in): Remove mention of intl/ directory.
            (AM_GNU_GETTEXT): First argument must be 'external'. Remove third argument.
            (AM_GNU_GETTEXT_INTL_SUBDIR): Remove subsection.
            (Language Implementors): Remove mention of intl/ directory. Mention that
            Solaris 11 gettext works like GNU gettext.
            (Maintainers for other Languages): Remove mention of intl/ directory.
    2018-11-09  Bruno Haible  <bruno@clisp.org>
    2018-11-08  Bruno Haible  <bruno@clisp.org>
    2018-11-05  Bruno Haible  <bruno@clisp.org>
            xgettext: C: Treat invalid escape sequences like GCC does.
            produce c, not a backslash.
            xgettext: Simplify calling convention of arglist_parser_remember.
            'msgid_comment_is_utf8' field.
            (arglist_parser_remember): Add comment_is_utf8 argument.
            arglist_parser_clone): Update.
            (arglist_parser_remember): Add comment_is_utf8 argument.
            (arglist_parser_done): Pass comment_is_utf8 value down to remember_a_message.
            xgettext_current_source_encoding around arglist_parser_remember calls.
            xgettext: Delay calls to from_current_source_encoding, part 2.
            (struct partial_call): Change type of fields msgctxt, msgid, msgid_plural to
            'mixed_string_ty *'.
            (arglist_parser_remember, arglist_parser_remember_msgctxt): Take a
            'mixed_string_ty *' argument instead of a 'char *' argument.
            accordingly.
            (arglist_parser_remember, arglist_parser_remember_msgctxt): Take a
            'mixed_string_ty *' argument.
            (arglist_parser_done): Convert the mixed_string to UTF-8 encoded 'char *' here.
            This is where from_current_source_encoding gets invoked now: immediately before
            invoking remember_a_message, that is, only when we really need to know the
            --from-source encoding.
            arglist_parser_remember. Don't set xgettext_current_source_encoding around
            arglist_parser_done calls.
            (read_object): Convert the string to a mixed_string_ty before passing it to
            arglist_parser_remember.
            (extract_parenthesized): Convert the string to a mixed_string_ty before passing
            it to arglist_parser_remember.
            (extract_balanced): Convert the string to a mixed_string_ty before passing it to
            arglist_parser_remember.
            (extract_balanced): Convert the string to a mixed_string_ty before passing it to
            arglist_parser_remember.
            (read_command): Convert the string to a mixed_string_ty before passing it to
            arglist_parser_remember.
            (read_command): Convert the string to a mixed_string_ty before passing it to
            arglist_parser_remember.
            mixed_string_ty before passing it to arglist_parser_remember. Don't set
            xgettext_current_source_encoding around arglist_parser_done calls.
            xgettext: Simplify calling convention of remember_a_message.
            remember_a_message_plural): Add is_utf8, comment_is_utf8 arguments.
            remember_a_message_plural): Likewise.
            extract_balanced): Likewise.
            xgettext: Delay calls to from_current_source_encoding, part 1.
            * xg-mixed-string.h (enum segment_type, struct mixed_string_segment,
            struct mixed_string, mixed_string_ty): New types.
            (mixed_string_alloc_simple, mixed_string_alloc_utf8, mixed_string_clone,
            mixed_string_contents, mixed_string_free, mixed_string_contents_free1,
            mixed_string_concat, mixed_string_concat_free1): New declarations.
            (struct mixed_string_buffer): Change internal representation to use segments.
            (mixed_string_buffer_result): Change return type to 'mixed_string_ty *'.
            * xg-mixed-string.c: Include flexmember.h, msgl-ascii.h, po-charset.h.
            (segment_alloc, segment_clone, mixed_string_alloc_simple,
            mixed_string_alloc_utf8, mixed_string_clone, mixed_string_contents,
            mixed_string_free, mixed_string_contents_free1, mixed_string_concat,
            mixed_string_concat_free1): New functions.
            (mixed_string_buffer_init, mixed_string_buffer_is_empty): Change to match new
            internal representation.
            (mixed_string_buffer_grow_curr_buffer): New function.
            (mixed_string_buffer_grow_utf8_buffer): Remove function.
            (mixed_string_buffer_append_to_utf8_buffer): Update accordingly.
            (mixed_string_buffer_flush_curr_buffer): Remove function.
            (mixed_string_buffer_add_segment, mixed_string_buffer_flush_curr): New
            functions.
            (mixed_string_buffer_append_char, mixed_string_buffer_append_unicode,
            mixed_string_buffer_destroy, mixed_string_buffer_result): Change to match new
            internal representation.
            * x-c.c (struct token_ty): New field 'mixed_string'.
            (free_token): Update accordingly.
            (phase5_get, phase6_get, phase8a_get): For tokens of type
            token_type_string_literal, use a mixed_string.
            (phase8_get): Use mixed_string_concat_free1.
            (struct xgettext_token_ty): New field 'mixed_string'.
            (x_c_lex, extract_parenthesized): For tokens of type
            xgettext_token_type_string_literal, use a mixed_string.
            * x-csharp.c (comment_line_end): Update.
            (struct token_ty): New field 'mixed_string'.
            (free_token): Update accordingly.
            (phase6_get): For tokens of type token_type_string_literal, use a mixed_string.
            (phase7_get): Use mixed_string_concat_free1.
            (extract_parenthesized): For tokens of type token_type_string_literal, use a
            mixed_string.
            * x-java.c (comment_line_end): Update.
            (struct token_ty): New field 'mixed_string'.
            (free_token): Update accordingly.
            (phase5_get): For tokens of type token_type_string_literal, use a mixed_string.
            (phase6_get): Use mixed_string_concat_free1.
            (extract_parenthesized): For tokens of type token_type_string_literal, use a
            mixed_string.
            * x-javascript.c (comment_line_end): Update.
            (struct token_ty): New field 'mixed_string'.
            (free_token): Update accordingly.
            (phase5_get): For tokens of type token_type_string, use a mixed_string.
            (x_javascript_lex): Use mixed_string_concat_free1.
            (extract_balanced): For tokens of type token_type_string, use a mixed_string.
            * x-python.c (comment_line_end): Update.
            (struct token_ty): New field 'mixed_string'.
            (free_token): Update accordingly.
            (phase5_get): For tokens of type token_type_string, use a mixed_string.
            (x_python_lex): Use mixed_string_concat_free1.
            (extract_balanced): For tokens of type token_type_string, use a mixed_string.
            * x-rst.c (extract_rsj): Update.
            * x-vala.c (struct token_ty): New field 'mixed_string'.
            (free_token): Update accordingly.
            (phase3_get): For tokens of type token_type_string_literal, use a mixed_string.
            For tokens of type token_type_string_template, fix a memory leak.
            (x_vala_lex): Use mixed_string_concat_free1.
            (extract_balanced): For tokens of type token_type_string_literal, use a
            mixed_string.
            xgettext: JavaScript: Make more use of mixed_string_buffer.
            (init_unicode_string_buffer, unicode_string_buffer_append_unicode_grow,
            unicode_string_buffer_append_unicode, unicode_string_buffer_result,
            free_unicode_string_buffer): Remove functions.
            (comment_buffer, comment_start, comment_at_start, comment_add,
            comment_line_end): Use mixed_string_buffer API.
            xgettext: Python: Make more use of mixed_string_buffer.
            (init_unicode_string_buffer, unicode_string_buffer_append_unicode_grow,
            unicode_string_buffer_append_unicode, unicode_string_buffer_result,
            free_unicode_string_buffer): Remove functions.
            (comment_buffer, comment_start, comment_at_start, comment_add,
            comment_line_end): Use mixed_string_buffer API.
            xgettext: Change the C# extractor to make use of mixed_string_buffer.
            (init_string_buffer, string_buffer_append_unicode_grow,
            string_buffer_append_unicode, string_buffer_result, free_string_buffer): Remove
            functions.
            (comment_buffer, comment_start, comment_at_start, comment_add,
            comment_line_end): Use mixed_string_buffer API.
            (phase6_get): Likewise.
            xgettext: Optimize away a memory allocation.
            stack, not on the heap.
            mixed_string_buffer statically, not on the heap.
            mixed_string_buffer_done): Remove declarations.
            mixed_string_buffer_done): Remove functions.
            xgettext: Change the Java extractor to make use of mixed_string_buffer.
            (mixed_string_buffer_init, mixed_string_buffer_is_empty,
            mixed_string_buffer_destroy, mixed_string_buffer_result): New declarations.
            (mixed_string_buffer_init): New function.
            (mixed_string_buffer_alloc): Invoke it.
            (mixed_string_buffer_is_empty): New function, based on comment_at_start in
            x-java.c.
            (mixed_string_buffer_append_lone_surrogate): New function, based on
            string_buffer_append_lone_surrogate in x-java.c.
            (mixed_string_buffer_flush_utf16_surr, mixed_string_buffer_append_unicode): Use
            it.
            (mixed_string_buffer_destroy, mixed_string_buffer_result): New functions.
            (mixed_string_buffer_done): Invoke mixed_string_buffer_result.
            (struct string_buffer): Remove type.
            (init_string_buffer, string_buffer_append_byte,
            string_buffer_append_unicode_grow, string_buffer_append_unicode,
            string_buffer_append_lone_surrogate, string_buffer_flush_utf16_surr,
            string_buffer_flush_curr_buffer): Remove functions.
            (mixed_string_buffer_append): Renamed from string_buffer_append. Use
            mixed_string_buffer.
            (string_buffer_result, free_string_buffer): Remove functions.
            (comment_buffer, comment_start, comment_at_start, comment_add,
            comment_line_end): Use mixed_string_buffer API.
            (accumulate_escaped, phase5_get): Likewise.
            xgettext: Share some more code among extractors.
            (xgettext_SOURCES): Add xg-pos.c.
            (real_file_name, logical_file_name, line_number): Remove variables.
            xgettext: Split source code into smaller files.
            gettext-tools/src/xgettext.h.
            gettext-tools/src/xgettext.c.
            and xg-*.h.
            (add_all_comments, comment_tag, msgstr_prefix, msgstr_suffix,
            default_syntax_check, current_formatstring_parser1,
            current_formatstring_parser2, current_formatstring_parser3): New declarations.
            (xgettext_comment, xgettext_comment_reset, savable_comment_to_xgettext_comment,
            recognize_qt_formatstrings): New declarations.
            (substring_match): Remove obsolete declaration.
            Include <iconv.h>, rc-str-list.h, xg-encoding.h, xg-arglist-context.h,
            xg-message.h. Don't include xsize.h, po-xerror.h, unistr.h.
            (add_all_comments, comment_tag, msgstr_prefix, msgstr_suffix,
            default_syntax_check): Make global.
            (split_keywordspec, insert_keyword_callshape): Moved to xg-arglist-callshape.c.
            (null_context, passthrough_context, inherited_context,
            null_context_list_iterator, passthrough_context_circular_list,
            passthrough_context_list_iterator, flag_context_list_iterator,
            flag_context_list_iterator_advance, flag_context_list_table_lookup): Move to
            xg-arglist-context.c.
            (flag_context_list_table_insert): Move bulk of body to new function
            flag_context_list_table_add in xg-arglist-context.c.
            (xgettext_comment, xgettext_comment_reset, savable_comment_to_xgettext_comment):
            Make global.
            (current_formatstring_parser1, current_formatstring_parser2,
            current_formatstring_parser3): Make global.
            (non_ascii_error_message, from_current_source_encoding): Move to xg-encoding.c.
            (CONVERT_STRING, set_format_flags_from_context, warn_format_string,
            remember_a_message, remember_a_message_plural): Move to xg-message.c.
            (arglist_parser_alloc, arglist_parser_clone, arglist_parser_remember,
            arglist_parser_remember_msgctxt, arglist_parser_decidedp, arglist_parser_done):
            Move to xg-arglist-parser.c.
            (mixed_string_buffer_alloc, mixed_string_buffer_append_to_curr_buffer,
            mixed_string_buffer_grow_utf8_buffer, mixed_string_buffer_append_to_utf8_buffer,
            mixed_string_buffer_flush_utf16_surr, mixed_string_buffer_flush_curr_buffer,
            mixed_string_buffer_append_char, mixed_string_buffer_append_unicode,
            mixed_string_buffer_done): Move to xg-mixed-string.c.
            (recognize_qt_formatstrings): New function.
            (xgettext_SOURCES): Add the new .c files.
            xgettext: Fix crash when parsing invalid \Uxxxxxxxx escape sequence.
            xgettext: Add support for C++11 raw string literals.
            xgettext: Add support for C11 string literals.
            xgettext: Vala: Improve parsing of escape sequences.
            Do recognize \$.
    2018-11-05  Bruno Haible  <bruno@clisp.org>
            xgettext: Fix result for concatenation of strings with escape sequences.
            Reported by Morten Welinder <mwelinder@gmail.com>
            in <https://lists.gnu.org/archive/html/bug-gettext/2015-12/msg00017.html>
            and <https://savannah.gnu.org/bugs/?46756>.
            Revert commits from
            2014-05-07 xgettext: Provide a way to interpret string literals lazily
            2014-05-07 c: Interpret string literals lazily
            2014-05-09 vala: Interpret string literals lazily
            2014-12-02 c: Support C++11 string literals
            and subsequent fixes of these.
            declaration.
            (enum literalstring_escape_type, struct literalstring_parser): Remove types.
            (struct partial_call): Update.
            (arglist_parser_remember_literal): Remove declaration.
            'literalstring_parser' field.
            (savable_comment_convert_encoding): Remove function.
            (current_literalstring_parser): Remove variable.
            (extract_from_file, arglist_parser_alloc, arglist_parser_clone): Update.
            (arglist_parser_remember_literal): Remove function.
            (arglist_parser_remember_msgctxt): Simplify accordingly.
            literalstring_parser.
            (phase7_getc, phase7_ungetc): Reinstantiate functions.
            (phase5_get): Simplify. Use phase7_getc.
            literalstring_parser.
            (phase7_getc, phase7_ungetc): Reinstantiate functions.
            (phase3_get): Simplify. Use phase7_getc.
            (extract_balanced): Simplify.
    2018-11-05  Bruno Haible  <bruno@clisp.org>
            (EXTRA_DIST): Add xg-c-24.c, xg-vala-2.vala.
            expected result for backslash-NUL.
    2018-11-04  Bruno Haible  <bruno@clisp.org>
            Reported by Morten Welinder <mwelinder@gmail.com>
            in <https://lists.gnu.org/archive/html/bug-gettext/2015-12/msg00017.html>
            and <https://savannah.gnu.org/bugs/?46756>.
    2018-11-04  Bruno Haible  <bruno@clisp.org>
            xgettext: JavaScript: Fix a memory leak.
            token_type_keyword.
    2018-10-28  Bruno Haible  <bruno@clisp.org>
            Verify the exit code of the xgettext invocation.
    2018-10-25  Bruno Haible  <bruno@clisp.org>
            po, examples: Change .po -> .gmo rules to consider the newest changes to the POT file.
            Reported by Claude Paroz <claude@2xlibre.net>
            in <https://savannah.gnu.org/bugs/?50910>.
            first in $PATH.
            (MSGMERGE_FOR_MSGFMT_OPTION): New variable.
            (.po.gmo): Depend on the POT file. Use msgmerge on the fly, to take into
            account the most recent POT file changes.
            update-properties, update-classes targets.
            (MSGMERGE_FOR_MSGFMT_OPTION): New variable.
            ($(STRINGSFILES)): Depend on the POT file. Use msgmerge on the fly, to take
            into account the most recent POT file changes.
    2018-10-25  Bruno Haible  <bruno@clisp.org>
            msgmerge: New option --for-msgfmt.
            (long_options): Add option --for-msgfmt.
            (main): Handle option --for-msgfmt.
            (usage): Document option --for-msgfmt.
            (match_domain): When --for-msgfmt is given, omit untranslated and fuzzy messages
            from the result.
            (merge): When --for-msgfmt is given, don't add obsolete messages to the result.
            Add ability to write PO files without translator comment lines.
            (message_print_style_comment): New function.
            (message_print_comment): Output nothing if print_comment is false.
    2018-10-24  Bruno Haible  <bruno@clisp.org>
            Improve reliability of 'make dist'.
    2018-10-24  Bruno Haible  <bruno@clisp.org>
            po, examples: Put stamp-po in the source directory.
            Talk about "version control system", not CVS.
            stamp-po file does not exist in the build dir, except when using the older
    2018-10-24  Bruno Haible  <bruno@clisp.org>
            po: Make "make maintainer-clean" erase the .pot file.
            Rationale:
            <https://www.gnu.org/prep/standards/html_node/Standard-Targets.html>
            <https://www.gnu.org/software/automake/manual/html_node/Clean.html>
            the .pot file.
            func_check_maintainerclean_vpath): Verify the .pot file is removed after
            infrastructure.
    2018-10-24  Bruno Haible  <bruno@clisp.org>
            po, examples: Use case-insensitive search for "GNU <PACKAGE_NAME>".
            Reported by Akim Demaille <akim@lrde.epita.fr> in
            <https://lists.gnu.org/archive/html/bug-gettext/2018-10/msg00020.html>.
            case-insensitive search for "GNU <PACKAGE_NAME>".
            Likewise.
            ($(DOMAIN).pot-update): Likewise.
    2018-10-24  Bruno Haible  <bruno@clisp.org>
            (.SUFFIXES): Remove .mo.
            (.po.mo): Remove rule.
            (distclean): Don't remove *.mo files.
            (.po.mo): Remove rule.
            (DISTCLEANFILES): Remove *.mo.
            Remove .mo.
    2018-10-24  Bruno Haible  <bruno@clisp.org>
            Remove outdated DJGPP build infrastructure.
            Approved by Juan Manuel Guerrero <juan.guerrero@gmx.de>.
            * djgpp: Remove directory.
    2018-10-24  Bruno Haible  <bruno@clisp.org>
            examples: Add support for msgmerge --previous.
            option --previous when the msgmerge program supports it.
    2018-10-24  Bruno Haible  <bruno@clisp.org>
            examples: Support reading header comments from file.
            from today.
            Replace header entry with the content of $(DOMAIN).pot-header, if exists.
    2018-10-24  Bruno Haible  <bruno@clisp.org>
            examples: Make it possible to pass custom options to msginit.
            This mirrors the Makevars change from 2014-10-08.
    2018-10-24  Bruno Haible  <bruno@clisp.org>
            examples: Add an option to claim the package as GNU/non-GNU.
            Reported by David Shea at <https://savannah.gnu.org/bugs/?40520>.
            ($(DOMAIN).pot-update): Don't search for "GNU packagename" if $(PACKAGE_GNU) is
            set.
    2018-10-24  Bruno Haible  <bruno@clisp.org>
            examples: Upgrade to newest Makevars.
            PO_DEPENDS_ON_POT, DIST_DEPENDS_ON_UPDATE_PO): New variables.
            version 0.19.8.
            files.
            func_check_maintainerclean_vpath): Allow left-over .po~ files.
    2018-10-24  Bruno Haible  <bruno@clisp.org>
            examples: Avoid grepping through monster files.
            Reported by Jim Meyering <jim@meyering.net>.
            GNU find is available, avoid grepping through monster files.
    2018-10-24  Bruno Haible  <bruno@clisp.org>
            examples: Don't create unnecessary installation directories.
            Reported by Serge Pavlovsky <pal666@gmail.com>.
            installdirs-local-yes): Remove unnecessary MKDIR_P invocations.
    2018-10-24  Bruno Haible  <bruno@clisp.org>
            po: Make the insertion of the .pot-header file more robust.
            This improves on the 2015-09-01 patch.
            command fails.
    2018-10-24  Bruno Haible  <bruno@clisp.org>
            po: When doing msgmerge --version, use the correct msgmerge program.
            This reverts the patch from
            <https://lists.gnu.org/archive/html/bug-gettext/2015-06/msg00000.html>.
            Rationale:
            <https://lists.gnu.org/archive/html/bug-gettext/2018-10/msg00000.html>.
            not $(MSGMERGE).
    2018-10-24  Bruno Haible  <bruno@clisp.org>
            po: Make $(POFILES) target more robust.
            It was introduced on 2014-05-01.
            PO file does not yet exist. Fail if creation of the POT file fails.
    2018-10-23  Bruno Haible  <bruno@clisp.org>
            Update list of files to check with gnulib.
            intl: Improve support for per-thread locales on Solaris 11.4.
            Handle HAVE_SOLARIS114_LOCALES through Solaris specific code.
            localename-table.h.
            gettext-runtime/m4/intlsolaris.m4.
            (gt_INTL_THREAD_LOCALE_NAME): Renamed from gt_INTL_SOLARIS. Define
            HAVE_SOLARIS114_LOCALES instead of HAVE_NAMELESS_LOCALES.
            HAVE_NAMELESS_LOCALES.
            (gt_INTL_SUBDIR_CORE): Don't invoke gt_INTL_SOLARIS. Don't set
            HAVE_NAMELESS_LOCALES here.
            intlsolaris.m4.
            intlsolaris.m4.
            intlsolaris.m4.
            intlsolaris.m4.
            * PACKAGING: List intl-thread-locale.m4, not intlsolaris.m4.
            Update to newest gnulib.
            intl: Fix support for per-thread locales on Solaris 11.4.
            gettext-runtime/intl/localename-table.h.
            localename-table.h.
            (localename-table.h): New target.
            (localename.$lo, localename-table.$lo): Update dependencies.
            (mostlyclean): Remove localename-table.h.
    2018-10-23  Daiki Ueno  <ueno@gnu.org>
            xgettext: Fix compiler warning
            implicit argument.  Reported in:
            <https://savannah.gnu.org/bugs/?48404>.
    2018-10-23  Bruno Haible  <bruno@clisp.org>
            Update after gnulib changed.
            * configure.ac: Require Autoconf >= 2.63.
            Update from gnulib: Assume Autoconf >= 2.63.
            AC_USE_SYSTEM_EXTENSIONS exists.
            Autoconf < 2.61.
            Update from gnulib: Assume Automake >= 1.11.
            Eliminate uses of 'eval'.
            Update from gnulib: Make better use of Autoconf.
    2018-10-23  Bruno Haible  <bruno@clisp.org>
            intl: Add support for per-thread locales on Solaris 11.4.
            Relies on the recent changes to the 'localename' module in gnulib.
            overriding declarations.
            (SOURCES): Add localename-table.c.
            (OBJECTS): Add localename-table.$lo.
            (localename-table.lo): New target.
            (libgnuintl.h, libintl.h): Substitute also HAVE_NAMELESS_LOCALES.
            Instead, invoke gt_INTL_SOLARIS. Set HAVE_NAMELESS_LOCALES.
            gnulib.
            * PACKAGING: Add intlsolaris.m4 to the list of installed files.
    2018-10-23  Bruno Haible  <bruno@clisp.org>
            Update to newest gnulib.
            examples: Fix another build failure.
            hello.rsj.
    2018-10-21  Bruno Haible  <bruno@clisp.org>
            system's <libintl.h>.
            system's <libintl.h>.
            the system's <libintl.h> and setenv instead of xsetenv, and no fake setlocale.
            $LOCALE_FR and $LOCALE_FR_UTF8.
            and fa_IR.UTF-8.
            Update comments.
            Don't limit to fixed set of platforms.
            Don't limit to fixed set of platforms.
            Update PACKAGING documentation.
            * PACKAGING: Remove mention of charset.alias (dropped on 2018-05-19).
            Mention that libintl does not get installed on Solaris 11.
            not the gettext-runtime/src source dir, to PATH.
    2018-10-20  Bruno Haible  <bruno@clisp.org>
            Fix 'make dist' (recent regression).
            hello-pascal/hello.rst.
    2018-10-19  Bruno Haible  <bruno@clisp.org>
            examples: Modernize configure.ac.
            AM_INIT_AUTOMAKE syntax. Require automake >= 1.11.
            examples: Add a script for checking against mistakes.
            * Admin/release-steps: Mention check-examples.
            examples: hello-pascal: Fix 'make distcheck'.
            hello.rsj into $(srcdir) only if the new contents differs from the old contents.
            examples: hello-java*: Fix 'make distcheck'.
            the new .properties files in the build dir and move them to $(srcdir) only if
            the new contents differs from the old contents.
            (update-classes): Likewise, also for .class files.
    2018-10-18  Bruno Haible  <bruno@clisp.org>
            examples: hello-csharp*: Improve 'make maintainer-clean'.
            Don't list the $(RESOURCESDLLFILES) here.
            (maintainer-clean-local): Instead, remove them and their parent directories
            here.
            examples: hello-php: Fix runtime error.
            the return value of the printf function.
            examples: hello-tcl*: Fix runtime error.
            absolute file name without variable references.
            examples: hello-clisp: Fix runtime error with clisp versions >= 2.34.
            PROCESS-ID, not PROGRAM-ID.
            examples: Fix 'make dist' failures in VPATH builds.
            'stamp-po' after having done target 'update-po'.
            examples: hello-pascal: Fix 'make dist' failure in VPATH builds.
            in $(srcdir), not in the build dir.
            examples: hello-pascal: Fix 'make dist'.
            file.
            examples: hello-java*: Fix "make dist".
            and CLASSFILES to contain files in $(srcdir), not in $(top_srcdir).
            from the po/ directory.
            Add the .properties and the .class files.
            (EXTRA_DIST): Add the .properties files.
            (update-properties, update-classes): Generate the .properties and .class files
            in the po/ directory, not in the top-level directory.
            the po/ directory, not in the top-level directory.
            examples: Fix 'make dist'.
            that are brought in by 'autopoint'.
            examples: Fix 'make' failures in VPATH builds.
            MAINTAINERCLEANFILES): Remove variables.
            (hello.jar): Use two jar commands, to combine .class files from the build dir
            with .properties files from the source dir.
            update-classes): Reference the .pot file in the source dir, not in the build
            dir.
            (echo-catalogs): Include the fallback catalog.
            prefix.
            (hello$(EXEEXT)): Use -o option to specify where the object file and the
            executable file shall be created.
    2018-10-17  Bruno Haible  <bruno@clisp.org>
            examples: hello-csharp-forms: Fix 'make clean'.
            hello.net.exe.mdb.
            examples: hello-csharp: Fix 'make clean'.
            hello.net.exe.mdb.
            examples: hello-objc-gnustep: Fix 'make distclean'.
            Remove the *.lproj directories.
            Remove remove-potcdate.sed.
            examples: hello-pascal: Fix 'make maintainer-clean'.
            variable.
            examples: hello-java: Fix 'make' failure.
            examples: hello-pascal: Update.
            ppc386 is not found.
            (SUBDIRS): Proceed in current directory before recursing into po/.
            replaces hello.rst.
            examples: Correctly clean up left-over files.
            correctly.
    2018-10-15  Bruno Haible  <bruno@clisp.org>
            examples: Remove left-over files.
            examples: Clean up autoconf left-over.
            directory.
            examples: hello-c++-widgets: Update build infrastructure.
            files.
            examples: Fix "make dist" error.
            before, not after, 'aclocal'.
            examples: Update developer documentation.
            examples: Improve developer documentation.
            examples: Improve developer documentation.
            * HACKING: Mention dependency needed for examples.
            Fix list of dependencies.
            * DEPENDENCIES: Add libacl.
    2018-10-15  Bruno Haible  <bruno@clisp.org>
            gettextize: Don't redirect stderr.
            Reported by ShellCheck via Pavel Raiskup <praiskup@redhat.com>.
    2018-10-15  Bruno Haible  <bruno@clisp.org>
            autopoint: Don't redirect stderr.
            Reported by ShellCheck via Pavel Raiskup <praiskup@redhat.com>.
    2018-10-15  Bruno Haible  <bruno@clisp.org>
            Fix "make dist" error (regression from 2018-10-09).
            hello-csharp-forms/BUGS.
    2018-10-09  Bruno Haible  <bruno@clisp.org>
            C# support: Remove pnet choice.
            * DEPENDENCIES: Don't mention pnet.
            * PACKAGING: Likewise.
            Update to newest gnulib.
    2018-10-06  Bruno Haible  <bruno@clisp.org>
            Fix a build failure on mingw with -O0.
            Reported at <https://savannah.gnu.org/bugs/?36443>.
            Fix suggested by Evgeny Grin <k2k@narod.ru>
            in <https://savannah.gnu.org/bugs/?36443#comment4>.
            * gnulib-local/build-aux/moopp (func_emit_source_h): Wrap the function
            declarations in extern "C" {}.
    2018-10-05  Bruno Haible  <bruno@clisp.org>
            msgfmt: Remove outdated warning.
            (struct msgfmt_catalog_reader_ty): Remove field 'has_nonfuzzy_header_entry'.
            (msgfmt_constructor, msgfmt_frob_new_message): Update.
    2018-10-05  Bruno Haible  <bruno@clisp.org>
            Fix conflict between different uses of GETTEXTLIBDIR.
            Rationale: The programs installed in $(prefix)/lib/gettext/ are at different
            locations before installation: some are in the source tree, some are in the
            build tree.
            GETTEXTLIBDIR_SRCDIR, not GETTEXTLIBDIR.
            GETTEXTLIBDIR_BUILDDIR.
    2018-10-05  Bruno Haible  <bruno@clisp.org>
            Fix conflict between different uses of GETTEXTDATADIR.
            GETTEXTDATADIR.
            directory with just one POT file.
            cldr-plurals: Improve error handling.
            Don't assume that the error was an out-of-memory.
            Remove unnecessary trailing comma in struct initializers.
            initializer.
    2018-10-05  Bruno Haible  <bruno@clisp.org>
            Explain how to concatenate POT files.
            Reported by Hadi Farah in
            <https://lists.gnu.org/archive/html/bug-gettext/2018-09/msg00026.html>.
    2018-10-05  Bruno Haible  <bruno@clisp.org>
            Include gnulib module 'mkdir', needed for older mingw versions.
            Reported by Maarten Bosmans at <https://savannah.gnu.org/bugs/?33379>.
            * autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add 'mkdir'.
    2018-10-05  Bruno Haible  <bruno@clisp.org>
            Fix link error when building with --enable-shared on mingw.
            * autogen.sh (GNULIB_MODULES_LIBGETTEXTPO_OTHER): Add 'realloc-posix'.
            in argv[0].
            Update after gnulib changed.
            Update to newest gnulib.
    2018-09-19  Bruno Haible  <bruno@clisp.org>
            In this situation, argv[0] is absolute, even though the program was invoked
            as a file name without slashes (and thus found in $PATH).
    2018-09-18  Bruno Haible  <bruno@clisp.org>
            Fix link error when building with --disable-shared on 64-bit Cygwin.
            * gnulib-local/lib/execute.c.diff: Remove file.
            * gnulib-local/lib/spawn-pipe.c.diff: Remove file.
            Fix link error when building with --disable-shared on Cygwin and mingw.
            included libxml and building with --disable-shared.
            * gnulib-local/lib/libxml/libxml.h (LIBXML_STATIC): Define to 1, not empty.
    2018-09-17  Bruno Haible  <bruno@clisp.org>
            autogen.sh: Fix use of undefined function.
            * autogen.sh: Rewrite error message code.
    2018-09-17  Bruno Haible  <bruno@clisp.org>
            Fix link error on Cygwin.
            Patch partially by Michael Haubenwallner at
            c65c9e8ee0
            * gnulib-local/lib/libxml/xmlexports.in.h: Don't assume that _WIN32 is defined
            on Cygwin.
            (XMLPUBVAR): Define as 'extern', not as empty.
    2018-09-17  Bruno Haible  <bruno@clisp.org>
            Fix "Unescaped left brace in regex is deprecated here" warnings from Perl 5.26.
            Reported and patch by Jehan <jehan@girinstud.io> <jehan@zemarmot.net> at
            <https://savannah.gnu.org/bugs/?54088>.
    2018-09-17  Bruno Haible  <bruno@clisp.org>
            Update after gnulib changed.
            * gnulib-local/modules/fnmatch.diff: Update.
            (charset.alias): Remove target.
            (install-exec): Don't install charset.alias.
            (install-data): Don't chmod config.charset.
            (installdirs): Don't create $(libdir).
            (uninstall): Don't uninstall charset.alias.
            (mostlyclean): Don't remove charset.alias.
            ref-del.sin.
            Update to newest gnulib.
            not the gettext-runtime/src source dir, to PATH.
    2018-09-16  Bruno Haible  <bruno@clisp.org>
            libintl: Improve locale handling on macOS 10.12 or newer.
            logic also work in locales such as "zh-Hans-DE".
            (libintl_setlocale): Try harder to set a locale for categories LC_CTYPE and
            LC_MESSAGES.
    2018-09-16  Bruno Haible  <bruno@clisp.org>
            Don't assume that 'sed' supports alternation in regular expressions.
            See https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Limitations-of-Usual-Tools.html
    2018-09-16  Bruno Haible  <bruno@clisp.org>
            Update list of locale names with scripts on macOS.
            tables to match Mac OS X 10.13 and recent glibc.
            Fix link error in "make check" when building with --disable-shared on macOS.
            @INTL_MACOSX_LIBS@.
            Use newer macOS APIs when possible.
            CFLocaleCopyPreferredLanguages.
            CFLocaleCopyPreferredLanguages when it exists.
            Revisit macOS specific code.
            duplication. Fix comments about Mac OS X versions.
    2018-09-16  Bruno Haible  <bruno@clisp.org>
            libintl: Fix language preferences on macOS 10.12 or newer.
            Reported by Kristian Rietveld <kris@loopnest.org> at
            <https://savannah.gnu.org/bugs/?49560>.
            preferences elements of the form "ll-CC" in a reasonable way.
    2018-09-16  Bruno Haible  <bruno@clisp.org>
            setlocale: Improve support for locales not supported by libc.
            Reported by Dapeng Gao <peter@dpgao.cc> at
            <https://savannah.gnu.org/bugs/?54479>.
            (libintl_setlocale): Use a more error-tolerant strategy when the locale to be
            set is not supported by libc: Emit warnings instead of failing.
    2018-09-16  Bruno Haible  <bruno@clisp.org>
            Fix link error when linking with libintl.a on macOS.
            macOS.
            Reduce "make dist" time by 7 minutes.
            * configure.ac (AM_INIT_AUTOMAKE): Remove dist-xz and dist-lzip options.
            * Admin/release-steps: Mention how to create the tarballs with higher
            compression after "make dist".
    2018-09-15  Bruno Haible  <bruno@clisp.org>
            Add support for translation lookup with context in shell scripts.
            Reported by Markus Gothe <nietzsche@lysator.liu.se>
            in <https://savannah.gnu.org/bugs/?49899>.
            (main): Handle option -c/--context.
            (usage): Document option -c/--context. Split usage message.
            (main): Handle option -c/--context.
            (usage): Document option -c/--context. Split usage message.
            functions.
            field.
            (arglist_parser_remember_msgctxt): New declaration.
            Update accordingly.
            (arglist_parser_remember_msgctxt): New function.
            eval_npgettext.
            (init_flag_table_sh): Set flags for eval_pgettext, eval_npgettext.
            (substring_of_word): New function.
            (read_command): Recognize and handle -c/--context argument of 'gettext' and
            'ngettext'.
            Mention the new shell functions.
            (eval_pgettext Invocation, eval_npgettext Invocation): New subsubsections.
            eval_npgettext.
    2018-08-12  Bruno Haible  <bruno@clisp.org>
            gettext-runtime/intl/setlocale.c: Add fixes from gnulib.
            2018-08-11  Bruno Haible  <bruno@clisp.org>
                    setlocale: Trivial simplification.
                    * lib/setlocale.c (setlocale_unixlike): Remove redundant #if.
            2017-04-21  Bruno Haible  <bruno@clisp.org>
                    * setlocale.c (setlocale_unixlike): Accept "POSIX" as an alias for
                    "C".
            2016-03-22  Geert Janssens  <janssens-geert@telenet.be>
                    setlocale: add "sv" to Windows language table
                    * setlocale.c (language_table) [W32]: Add "sv".
                    Reported in <https://savannah.gnu.org/bugs/?44588>.
            2012-01-04  Bruno Haible  <bruno@clisp.org>
                    Talk about "native Windows API", not "Win32".
                    * setlocale.c: Update comments to mention native Windows.
    2018-07-25  Bruno Haible  <bruno@clisp.org>
            Upgrade to newer help2man.
            Reported by Bernhard M. Wiedemann in <https://savannah.gnu.org/bugs/?54367>.
              $source ||= "$program $version";
              replaced by
              $source ||= "$package $version";
    2018-07-25  Bruno Haible  <bruno@clisp.org>
            Make it possible to copy&paste strings from the HTML-formatted man pages.
            (gt_man2html): Use it.
            (gt_man2html): Use it.
    2018-07-03  Bruno Haible  <bruno@clisp.org>
            Enable the format_arg attribute also on clang on Mac OS X.
            Reported by Tom Tromey <tom@tromey.com>
            in <https://lists.gnu.org/archive/html/bug-gettext/2018-07/msg00000.html>.
            use attribute __format_arg__ if the compiler is based on clang >= 3.0.
    2018-07-03  Bruno Haible  <bruno@clisp.org>
            Make the format_arg attribute effective also in the case _INTL_REDIRECT_INLINE.
            Reported by Tom Tromey <tom@tromey.com>
            in <https://lists.gnu.org/archive/html/bug-gettext/2018-07/msg00000.html>.
            ngettext, dngettext, dcngettext): Add attribute __format_arg__ also to the
            'static inline' functions.
    2018-05-14  Bruno Haible  <bruno@clisp.org>
            Update .gitignore.
    2018-05-14  Bruno Haible  <bruno@clisp.org>
            xgettext: Improve support for specialized vector syntax in Scheme.
            Reported by Florent Angly <Florent.Angly@cslbehring.com>.
            uninitialized token. Support recent syntax for homogeneous vector types (SRFI-4)
            and byte vectors as well.
    2018-05-12  Bruno Haible  <bruno@clisp.org>
            libintl: Ensure the *printf function overrides are POSIX compatible.
            Reported by Eli Zaretskii <eliz@gnu.org>.
            (libintl_vfprintf, libintl_vsprintf, libintl_vsnprintf, libintl_vfwprintf,
            libintl_vswprintf): Use it.
    2018-05-05  Bruno Haible  <bruno@clisp.org>
            all: Replace more http and ftp URLs by https URLs.
            * autogen.sh: Use https: URLs.
            all: Use https: URLs in --version output.
            * gnulib-local/build-aux/moopp: Likewise.
            all: Replace http URLs by https URLs in copyright notices.
            Simplify code. Drop support for Borland C++ on Windows.
            'defined _WIN32 || defined __WIN32__' to just 'defined _WIN32'.
            * gnulib-local/lib/basename.c: Likewise.
            Update after gnulib changed.
            * gnulib-local/lib/execute.c.diff: Update.
            Update to newest gnulib.
    2018-03-24  Bruno Haible  <bruno@clisp.org>
            Add support for recent Java versions.
            Reported by Emmanuel Bourg <ebourg@apache.org>
            at <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892733>
            via Santiago Vila.
            source-version 1.5 and target-version 1.6 (such as Java 6 or newer, or
            GCJ 4.3 or newer).
            source-version 1.5 (such as Java 5 or newer, or GCJ 4.3 or newer).
    2018-03-24  Bruno Haible  <bruno@clisp.org>
            Comment.
            * .dir-locals.el: Add comment.
            Update after gnulib changed.
            * gnulib-local/lib/unistd.in.h.diff: Update.
            * gnulib-local/lib/regexec.c.diff: Remove file.
            Update to newest gnulib
    2018-03-15  Bruno Haible  <bruno@clisp.org>
            Reported by Amit Chaudhuri <amit.k.chaudhuri@gmail.com>.
            * HACKING: Required minimum Bison version is now 3.0, for cldr-plural.y.
    2018-01-27  Bruno Haible  <bruno@clisp.org>
            Rename some files.
            xgettext: Support '_' in number tokens in C++.
    2018-01-07  Bruno Haible  <bruno@clisp.org>
            xgettext: Support 'p'/'P' exponent markers in number tokens also in C.
            in C.
    2018-01-07  Bruno Haible  <bruno@clisp.org>
            It's a bug in gawk 4.2.0, reported at
            https://lists.gnu.org/archive/html/bug-gawk/2018-01/msg00026.html .
    2018-01-06  Bruno Haible  <bruno@clisp.org>
            Add support for new C++ preprocessing number tokens.
            Reported by Moritz Bunkus <moritz@bunkus.org>
            at <https://savannah.gnu.org/bugs/?50117>.
            preprocessing number tokens.
    2018-01-06  Bruno Haible  <bruno@clisp.org>
            Comment fix.
            (Internationalizable Data): Moved here from chapter "Programming Languages".
            xgettext: Add support for .properties files in UTF-8 encoding.
            * autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add read-file, unistr/u8-check.
            about its encoding, then start parsing it.
    2018-01-05  Bruno Haible  <bruno@clisp.org>
            Add support for .rsj files.
            (extract_rsj): New declaration.
    2018-01-05  Bruno Haible  <bruno@clisp.org>
            Fix failure of lang-javascript on Ubuntu 16.04.
            pkg-config almost never works. It is best to never use it.
            the installed gjs is appropriate.
    2018-01-04  Bruno Haible  <bruno@clisp.org>
            Use locales with the customary names.
            On glibc systems, nowadays, the German and French locales are named
            'de_DE.UTF-8' and 'fr_FR.UTF-8', respectively. This change avoids the need
            to install similar locales with different names.
    2018-01-04  Bruno Haible  <bruno@clisp.org>
            lua-gettext package.
            subsection 'Ubuntu packages' for each.
    2018-01-03  Bruno Haible  <bruno@clisp.org>
            Fix msgunfmt-3 failure (regression from 2017-09-24).
            Update dependencies list.
            * HACKING: Add Lzip (needed for "make dist" since 2014-12-24).
    2018-01-03  Bruno Haible  <bruno@clisp.org>
            Fix "make dist" of modified git checkouts.
            This fixes error messages such as
            tar: gettext-0.19.8.1.74-72e49-dirty/gettext-runtime/intl-csharp/doc/GNU_Gettext_GettextResourceManager.html: file name is too long (max 99); not dumped
            * configure.ac: Pass option 'tar-ustar' to AM_INIT_AUTOMAKE.
            (am__tar): Use 'tar' option --format=ustar.
    2018-01-02  Bruno Haible  <bruno@clisp.org>
            Clarify required bison version.
            Reported by Roger Mc Murtrie <rogermc@grapevine.com.au>
            at <https://savannah.gnu.org/bugs/?47484>.
            * HACKING: Mention minimum version of bison.
    2018-01-02  Bruno Haible  <bruno@clisp.org>
            Avoid build failures caused by parallel make.
            Reported by Andrew Stormont <andyjstormont@gmail.com>
            at <https://savannah.gnu.org/bugs/?48412>.
    2018-01-02  Bruno Haible  <bruno@clisp.org>
            Fix 'ar' invocation when cross-compiling and in 64-bit mode on AIX.
            Reported by Benedikt Morbach <bmorbach@redhat.com>
            at <https://savannah.gnu.org/bugs/?43037>.
            available. Otherwise, use AC_PROG_RANLIB and set AR and ARFLAGS.
            autoconf.
            (ARFLAGS): New variable.
            (libintl.a, libgnuintl.a): Use it.
    2018-01-02  Bruno Haible  <bruno@clisp.org>
            Don't use -lc explicitly when linking with libtool.
            libtool has logic that determines whether it should add -lc, and this logic
            works fine on all modern platforms.
            Reported by Michael Forney <mforney@mforney.org>
            at <https://savannah.gnu.org/bugs/?40192>.
            LTLIBC.
    2017-10-15  Bruno Haible  <bruno@clisp.org>
            Clarify copyright and license of some files.
            Reported by Joël Krähemann at <https://savannah.gnu.org/bugs/?52227>.
    2017-09-30  Bruno Haible  <bruno@clisp.org>
            Fix an out-of-bounds memory read.
            Reported by Jakub Wilk <jwilk@jwilk.net>.
            * gnulib-local/lib/term-ostream.oo.c (term_ostream_create): Pass the correct
            length to memcmp().
    2017-09-24  Daiki Ueno  <ueno@gnu.org>
    2017-09-24  Bruno Haible  <bruno@clisp.org>
            Verify that system dependent strings in .mo files are NUL terminated.
            Reported by Jakub Wilk <jwilk@jwilk.net> in
            <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=876498>.
            system-dependent strings has a last static segment that is not NUL terminated.
    2017-09-24  Bruno Haible  <bruno@clisp.org>
            libintl: Fix pointer use after free.
            deallocation outside libc as in libc (patch from 2013-09-06).
    2017-08-29  Bruno Haible  <bruno@clisp.org>
            AppData: Update documentation.
            Mention support for file extension .metainfo.xml.
    2017-08-29  Matthias Klumpp  <matthias@tenstral.net>
            Extend the AppData "language" to also support AppStream metainfo files.
            Fixes <https://savannah.gnu.org/bugs/?50414>,
            reported by Piotr Drąg <piotrdrag@gmail.com>.
            Recognize also suffix ".metainfo.xml".
    2017-08-29  Bruno Haible  <bruno@clisp.org>
            AppData: Simplify code.
            supported extensions are now defined in the *.loc files.
    2017-08-29  Matthias Klumpp  <matthias@tenstral.net>
            Translate <developer_name> elements in AppData files.
            Fixes <https://savannah.gnu.org/bugs/?50408>,
            reported by Piotr Drąg <piotrdrag@gmail.com>.
    2017-08-22  Bruno Haible  <bruno@clisp.org>
            <xlocale.h>.
    2017-08-22  Bruno Haible  <bruno@clisp.org>
            Avoid extraneous NUL bytes in .mo files.
            Reported by Jakub Wilk <jwilk@jwilk.net> via Santiago Vila <sanvila@unex.es>
            in <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=872869>.
            message_list_delete_header_field): Adjust msgstr_len when modifying msgstr.
    2017-07-15  Bruno Haible  <bruno@clisp.org>
            Get rid of autom4te.cache directories, as far as possible.
            * autogen.sh: Remove autom4te.cache directories after running autoconf,
            autoheader, automake.
    2017-07-15  Bruno Haible  <bruno@clisp.org>
            Fix bug: gettextize does not add intlmacosx.m4 file.
            Reported by Eli Zaretskii via Gavin Smith in
            <http://lists.gnu.org/archive/html/bug-texinfo/2017-07/msg00026.html>.
            when --intl option is not given.
    2017-06-15  Bruno Haible  <bruno@clisp.org>
            gettext.h: Update theoretical condition for use of variable size arrays.
            Reported by Paul Eggert.
            * gnulib-local/lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Extend
            comment to include the theoretical condition for availability of variable size
            arrays, if we could trust the value of __STDC_VERSION__.
    2017-05-22  Bruno Haible  <bruno@clisp.org>
            Fix hyperlink to CLHS.
    2017-05-19  Bruno Haible  <bruno@clisp.org>
            Fix memory leaks.
            Found by Coverity.
            before returning in out-of-memory case.
            (read_alias_file): Invoke relocate2 instead of relocate. Free the allocated
            memory.
    2017-05-19  Bruno Haible  <bruno@clisp.org>
            Fix missing unlock.
            Found by Coverity.
            free allocated memory before returning.
    2017-05-19  Bruno Haible  <bruno@clisp.org>
            Update gettext-runtime files from gnulib.
              * localcharset.c (relocate2): Define fallback.
              (get_charset_aliases): Invoke relocate2 instead of relocate. Free the
              allocated memory.
              * localcharset.c (WINDOWS_NATIVE): Don't define on Cygwin.
              * localcharset.c (locale_charset) [WINDOWS_NATIVE]: Don't use the
              return value from setlocale if it would lead to a buffer overrun.
              * localename.c [__CYGWIN__]: Include <langinfo.h>, since this is
              where NL_LOCALE_NAME is defined.
              * localename.c (WINDOWS_NATIVE): Don't define on Cygwin.
              * localename.c (gl_locale_name_thread_unsafe): Add clause for
              Cygwin.
              * localename.c (struct hash_node): Use FLEXIBLE_ARRAY_MEMBER.
              * lock.c: On glibc systems without
              PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP, use the fallback
              implementation of rwlocks.
              * lock.c [USE_POSIX_THREADS]
              (glthread_rwlock_init_for_glibc): New function.
              [USE_POSIX_THREADS] (glthread_rwlock_rdlock_multithreaded): Update
              comment.
              [USE_PTH_THREADS]: New implementation of rwlocks.
              [USE_WINDOWS_THREADS] (glthread_rwlock_rdlock_func): Prefer writers over
              readers.
              * lock.h (pthread_rwlockattr_setkind_np): Don't declare
              weak on non-glibc platforms.
              * lock.h: On glibc systems without
              PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP, use the fallback
              implementation of rwlocks.
              * lock.h [USE_POSIX_THREADS_WEAK]: Declare also
              pthread_rwlockattr_init, pthread_rwlockattr_setkind_np,
              pthread_rwlockattr_destroy weak.
              HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER. Use a different implementation
              of rwlock initialization on glibc systems without
              HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER. Use a different implementation
              of rwlocks altogether on non-glibc systems without
              HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER.
              [USE_PTH_THREADS]: Use a different implementation of rwlocks altogether.
              * relocatable.c (relocate2): New function.
              * relocatable.c (relocate): Assume pathname is non-NULL. Use
              ISSLASH macro consistently. Avoid dangerous string concatenation idiom.
              * relocatable.h (relocate2): New declaration/macro.
              * vasnprintf.c (FALLTHROUGH): New macro.
              Use it whenever one switch case falls through into the next.
              * vasnprintf.c (USE_MSVC__SNPRINTF): New macro.
              Everywhere, use !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF instead
              of !HAVE_SNPRINTF_RETVAL_C99.
              * vasnprintf.c (VASNPRINTF): Move comment down past two cpp
              directives, so that it takes effect once again.  This is clearly
              not a proper change, and I will revert it once this bug is fixed:
              https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817
              * vasnprintf.c (IF_LINT): Treat GCC_LINT like lint.
              * verify.h (verify) [!__GNUC__]:
              Use shorter albeit meaningless string to bypass silly compiler limits.
              * verify.h (assume): Treat GCC_LINT like lint.
            PTHREAD_IN_USE_DETECTION_HARD if configuring on Solaris 10 or newer.
            Reported by Peter Felecan at <https://savannah.gnu.org/bugs/?32087>.
              semaphores.
              (USE_NAMED_SEMAPHORE, USE_UNNAMED_SEMAPHORE): New macros.
              (atomic_int_semaphore): New macro.
              exist.
              (struct atomic_int, init_atomic_int, get_atomic_int_value,
              set_atomic_int_value) [USE_SEMAPHORE]: Define using a POSIX semaphore.
              Suggested by Torvald Riegel <triegel@redhat.com>.
    2017-05-18  Bruno Haible  <bruno@clisp.org>
            Update after gnulib changed.
            * gnulib-local/lib/fnmatch_loop.c.diff: Update.
            Update gnulib
    2017-05-16  Bruno Haible  <bruno@clisp.org>
            Update after gnulib changed.
            * gnulib-local/lib/getopt-core.h.diff: New file.
            * gnulib-local/lib/getopt.in.h.diff: Remove file.
            * gnulib-local/lib/unistd.in.h.diff: Update.
            * gnulib-local/modules/fnmatch.diff: Update.
            lib/getopt.in.h.diff.
            depend on 'hash' (because we use a different 'hash' module).
            * .gitignore: Update.
    2017-05-15  Bruno Haible  <bruno@clisp.org>
            Update gnulib
    2017-05-15  Bruno Haible  <bruno@clisp.org>
            Reported by Domingo Bernardo <domingopbernardo@gmail.com>.
            Bulgarian.
    2017-05-15  Bruno Haible  <bruno@clisp.org>
            Respect the configure option --localedir.
            Reported by Markus Gothe at https://savannah.gnu.org/bugs/index.php?49862 .
            The AC_SUBSTed variable @localedir@ is supported since Autoconf 2.60.
            by Markus Gothe <nietzsche@lysator.liu.se>.
    2017-05-04  Bruno Haible  <bruno@clisp.org>
            Remove the ability to compile the Java programs to native executables.
            This ability relied on GCJ, and GCJ was removed from GCC in version 7.1.
            * gnulib-local/modules/gcj: Remove file.
            * gnulib-local/m4/gcj.m4: Remove file.
            * gnulib-local/m4/java.m4 (gt_JAVA_CHOICE): Map value 'bytecode' to 'yes'.
            * autogen.sh (GNULIB_MODULES_TOOLS_OTHER): Remove 'gcj'.
            (GCJ, GCJFLAGS): Remove variables.
            (USEJAVA, USEJEXE): Assume BUILDJAVAEXE is false.
            (all-java-*, install-data-java-*, installdirs-java-*, uninstall-java-*): Remove
            targets that assume BUILDJAVAEXE = true. Rename remaining targets.
            (install-exec-java-*): Remove targets.
            * PACKAGING (Java support): Drop text about native executables.
            gcj.m4.
            AC_PROG_RANLIB. Remove option --enable-java-exe. Don't set BUILDJAVAEXE. Don't
            set USEJEXE.
            Remove variables.
            [USEJEXE]: Remove section.
    2017-04-22  Bruno Haible  <bruno@clisp.org>
            Avoid -Wundef warning in gettext.h.
    2017-04-19  Bruno Haible  <bruno@clisp.org>
            PO mode: Fix recognition of C and C++ modes.
            The variable 'mode-name' can contain a suffix, see
            https://www.gnu.org/software/emacs/manual/html_node/ccmode/Minor-Modes.html
            https://www.gnu.org/software/emacs/manual/html_node/emacs/Electric-C.html
            Therefore use 'major-mode' instead of 'mode-name'.
            not mode-name.
            (po-mode-version-string): Bump to 2.25.
            Reported at <https://savannah.gnu.org/bugs/index.php?50830>
            by Peter Hull <peterhull90@gmail.com>.
    2017-03-20  Bruno Haible  <bruno@clisp.org>
            Fix compilation error in <libintl.h> on Cygwin.
            Reported by Michael Haubenwallner at https://savannah.gnu.org/bugs/?50595 .
              locale_t type is not visible on Cygwin.
    2017-02-16  Bruno Haible  <bruno@clisp.org>
            Support for Automake targets install-{dvi,ps,pdf,html}.
            Reported by Eric Blake at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25690
            via Assaf Gordon.
            install-html): New empty targets.
    2017-01-10  Bruno Haible  <bruno@clisp.org>
            * DEPENDENCIES: Likewise. Point to OpenJDK instead of gcj. Point to Mono instead
            of pnet.
    2017-01-02  Bruno Haible  <bruno@clisp.org>
            (struct atomic_int): New type.
            (init_atomic_int, get_atomic_int_value, set_atomic_int_value): New
            functions.
            (lock_checker_done, rwlock_checker_done, reclock_checker_done): Define
            as 'struct atomic_int'.
            Reported by Eric Blake in
            https://www.redhat.com/archives/libvir-list/2012-March/msg00854.html
            and by Pádraig Brady in
            http://lists.gnu.org/archive/html/bug-gnulib/2016-12/msg00117.html.
    2016-12-15  John Darrington  <john@darrington.wattle.id.au>
            msgfmt: Remove POT-Creation-Date field from the header in the output.
            This helps reproducible builds.
            Reported at <https://savannah.gnu.org/bugs/?49654>.
            declaration.
            msgdomain_list_set_header_field.
            (message_list_delete_header_field): New function.
            (msgdomain_write_mo): Delete the POT-Creation-Date field.
            (msgdomain_write_java): Delete the POT-Creation-Date field.
            (msgdomain_write_csharp): Delete the POT-Creation-Date field.
            (msgdomain_write_csharp_resources): Delete the POT-Creation-Date field.
            (msgdomain_write_tcl): Delete the POT-Creation-Date field.
            (msgdomain_write_qt): Delete the POT-Creation-Date field.
            (msgdomain_write_desktop): Delete the POT-Creation-Date field.
            (msgdomain_write_xml): Delete the POT-Creation-Date field.
    2016-12-12  Bruno Haible  <bruno@clisp.org>
            Fix error handling in autogen.sh.
            * autogen.sh: Don't invoke automake if aclocal, autoconf, or autoheader failed.
    2016-12-11  Bruno Haible  <bruno@clisp.org>
            Simplify .gitignore.
            Remove files deleted by "make maintainer-clean" from version control.
            Merge all .gitignore files into a single .gitignore file.
            Update and organize the .gitignore files.
    2016-12-10  Bruno Haible  <bruno@clisp.org>
            Update to newest gnulib.
    2016-12-09  Bruno Haible  <bruno@clisp.org>
            Fix crash of xgettext with --its option.
            was initialized. Fixes bug introduced on 2016-05-16.
    2016-12-05  KO Myung-Hun  <komh78-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
            intl: Fix that /@unixroot prefix is not working on OS/2 kLIBC
            OS/2 kLIBC has a feature to rewrite some path components. For example,
            '/@unixroot' is replaced with a value of $UNIXROOT if it is.
            So prepending a drive letter to the path starting with '/' makes the
            path starting with '/@unixroot' to 'x:/@unixroot' which is unexpected.
            This will breaks the behavior of some programs depending on /@unixroot
            prefix.
            dirname if it is started with '/@unixroot'.
            if it is started with '/@unixroot'.
    2016-12-05  Bruno Haible  <bruno@clisp.org>
            Fix the last commit.
            * autogen.sh: Enable the code of the last commit. Force an update of
            build-aux/ylwrap.
    2016-12-04  Bruno Haible  <bruno@clisp.org>
            Always use the newest released copies of files brought in from Automake.
            * autogen.sh: Make sure to get new versions of files brought in by automake.
            the scope of a single xgettext invocation.
            when we want to check for an error message in English.
            Fix an error message when gettextize if run with option -n.
            location where it is installed, not in $srcdir.
            Tweak installation instructions for Windows.
    2016-11-25  Guido Flohr  <guido.flohr@cantanea.com>
            Perl supports pgettext() and similar functions
    2016-11-24  Guido Flohr  <guido.flohr@cantanea.com>
            xgettext-perl: detect question mark as operator
            After an explicit function call like "somefunc()" a question mark or
            slash cannot be regex delimiters.
    2016-11-23  Bruno Haible  <bruno@clisp.org>
            Update installation instructions for Windows.
            builds. Add instructions for the MS Visual C/C++ tool chain. Revamp instructions
            for Cygwin.
            Drop the nickname "woe32".
    2016-11-14  Daiki Ueno  <ueno@gnu.org>
            intl: Fix compilation on a system without alloca
            -> 'resolved_dirname'.  Reported by Egor Pugin in:
            http://lists.gnu.org/archive/html/bug-gettext/2016-09/msg00008.html
    2016-11-02  Daiki Ueno  <ueno@gnu.org>
            * autogen.sh: Require automake >= 1.13.
            * HACKING: Require automake >= 1.13, wget, and xz.
            Reported by Karl-P. Richter and Bruno Haible in:
            https://savannah.gnu.org/bugs/?49497
    2016-10-25  Bruno Haible  <bruno@clisp.org>
            Update iconv.m4 from Gnulib.
            Add comments about the implementation of 'autosprintf::operator='.
            comments. Rename parameter.
    2016-09-15  Daiki Ueno  <ueno@gnu.org>
            xgettext: Fix crash with *.po file input
            When xgettext was given two *.po files with the same msgid_plural, it
            crashed with double-free.  Problem reported by Davlet Panech in:
            http://lists.gnu.org/archive/html/bug-gettext/2016-09/msg00001.html
            calling do_callback_message, assuming that it takes ownership.
            msgid_plural after calling message_alloc.
    2016-08-27  Akinori MUSHA  <knu@idaemons.org>
            Add autoload magic comments
            Fix elisp package headers
    2016-08-09  Daiki Ueno  <ueno@gnu.org>
            gettextize: Don't add config.rpath to EXTRA_DIST
            The file is automatically included in the distribution by Automake,
            because of an AC_REQUIRE_AUX_FILE invocation.  Reported in:
            http://savannah.gnu.org/bugs/?48729
            added_extradist.
    2016-08-03  Daiki Ueno  <ueno@gnu.org>
            po-mode: Fix po-send-mail behaviour on Emacs 25
            region markers.
            Reported by Göran Uddeborg in:
            http://lists.gnu.org/archive/html/bug-gettext/2016-07/msg00027.html
    2016-07-12  Daiki Ueno  <ueno@gnu.org>
            Update after gnulib changed
            Update gnulib
    2016-07-12  Michele Locati  <michele@locati.it>
            Better description of GETTEXTCLDRDIR for msginit
            Let's explain better where the GETTEXTCLDRDIR should point to and where the
            CLDR data could be retrieved.
    2016-07-09  Stanislav Brabec  <sbrabec@suse.com>
            Add support for msgmerge --previous
            msgmerge --previous is a very useful feature that makes adjusting of
            translation much easier when small changes in the source code are done.
            msgmerge supports it for 10 years, but it is not used by most projects,
            Use msgmerge --previous as default on all systems with gettext >= 0.16.
    2016-06-28  Daiki Ueno  <ueno@gnu.org>
            gnulib-local: Fix the last change
            gnulib-local: Add more files to distribution
            Problem reported by Xen.
    2016-06-11  Daiki Ueno  <ueno@gnu.org>
            LTV_REVISION.
2020-02-04 12:20:52 -06:00
ead61e5a52 Merge #11807 'refactor: eliminate os_unix.c (almost)' 2020-02-02 23:13:27 -08:00
2af04e1997 lint 2020-02-02 22:14:40 -08:00
efa5af9043 refactor: rename mch_exit => os_exit
- No code changes
- Move it to main.c
2020-02-02 22:14:40 -08:00
d1d5f5103e refactor: move various things to os/shell.c
- No code changes
- Rename mch_expand_wildcards => os_expand_wildcards
2020-02-02 22:14:40 -08:00
983086f42e checkhealth: fix accidental change [ci skip] 2020-02-02 18:34:22 -08:00
4de6a648c0 Merge #11781 'checkhealth: $VIRTUAL_ENV validation' [ci skip] 2020-02-02 18:30:51 -08:00
c8abe931db checkhealth: avoid irrelevant virtualenv executables 2020-02-02 18:25:17 -08:00
3cd5a8d149 checkhealth: cleanup, brevity 2020-02-02 18:25:17 -08:00
370a33a85d checkhealth: bin directory is Scripts/ on Windows 2020-02-02 16:22:07 -08:00
1b20014972 checkhealth: print -> sys.stdout.write
Co-Authored-By: Peter Lithammer <peter.lithammer@gmail.com>
2020-02-02 16:21:55 -08:00
bf85cc0909 checkhealth: better $VIRTUAL_ENV validation #11781
fix #11753
close #11781

The virtualenv troubleshooting in the Python provider health checks is
supposed to help the user determine whether running Python from Neovim
(as in `system('python')` or `system(exepath('python'))`) will use the
correct executable when a virtualenv is active. Currently however, it
issues spurious warnings in legitimate setups, and conversely, fails to
warn about potentially problematic ones.

See https://github.com/neovim/neovim/issues/11753#issuecomment-578715584
for a more detailed analysis, but at a high level, this is due to two
things:

- the virtualenv check is part of the Python provider check defined in
`s:check_python`, which uses a roundabout and sometimes erroneous way of
determining the Python executable
- more generally, it shouldn't be part of the provider check at all,
because it's not really related to the Python *provider*, i.e. the
Python executable which can communicate with Neovim via `pynvim`, but to
the Python the user is editing source files for, which typically
shouldn't even have `pynvim` installed

This patch reimplements the virtualenv check and factors it out into its
own separate function, which is however still kept in
`health/provider.vim` alongside the rest of the Python troubleshooting,
since troubleshooting all Python-related stuff in one place is probably
a good idea in order to alleviate any potential confusion (e.g. users
who run only provider checks might be left wondering whether their
virtualenv Python was properly detected if the report only shows their
global Python as the provider used by Neovim).
2020-02-02 16:21:55 -08:00
3051342f96 Merge pull request #11801 from bfredl/incsubcrash
extmark: fix crash due to invalid column values in inccommand preview
2020-02-02 12:50:57 +01:00
459a362cc1 extmarks: fix crash due to invalid column values in inccommand preview
This used to use -1 and MAXCOL values. Make sure in range values are
used.
2020-02-02 10:50:48 +01:00
045e86474b Merge #11802 from janlazo/vim-8.2.0161
vim-patch:8.1.{140,1269},8.2.0161
2020-02-02 01:06:38 -08:00
5032bc8514 vim-patch:8.1.1269: MS-Windows GUI: multibyte chars with a 0x80 byte do not work
Problem:    MS-Windows GUI: multibyte chars with a 0x80 byte do not work when
            compiled with VIMDLL.
Solution:   Adjust the condition for fixing the input buffer. (Ken Takata,
            closes vim/vim#4330)
ed5ab2a959
2020-02-02 03:14:39 -05:00
d6625349f5 vim-patch:8.1.0140: recording into a register has focus events
Problem:    Recording into a register has focus events. (Michael Naumann)
Solution:   Don't record K_FOCUSGAINED and K_FOCUSLOST. (closes vim/vim#3143)
972bfddc6b
2020-02-01 22:15:21 -05:00
9c1a31927d vim-patch:8.2.0161: not recognizing .gv file as dot filetype
Problem:    Not recognizing .gv file as dot filetype.
Solution:   Add *.gv to dot pattern. (closes vim/vim#5544)
f8ddb25789
2020-02-01 18:06:34 -05:00
26199fedca vim-patch:8.2.0190: detect Kotlin files [ci skip] #11796
Problem:    Kotlin files are not recognized.
Solution:   Detect Kotlin files. (Alkeryn, closes vim/vim#5560)
ab067a21b9
2020-02-01 14:15:36 -08:00
14a8b3b98c doc: fix typos [ci skip] #11787 2020-01-30 22:56:34 -08:00
486fa21899 Merge #11795 from janlazo/vim-8.2.0014
vim-patch:8.2.{14,16}
2020-01-30 22:42:34 -08:00
ef11b800ac vim-patch:8.2.0016: test name used twice, option not restored properly
Problem:    Test name used twice, option not restored properly.
Solution:   Rename function, restore option with "&".
a48e78e11f
2020-01-30 21:30:40 -05:00
63983316bd vim-patch:8.2.0014: test69 and test95 are old style
Problem:    Test69 and test95 are old style.
Solution:   Convert to new style tests. (Yegappan Lakshmanan, closes vim/vim#5365)
afc13bd827
2020-01-30 21:29:21 -05:00
2538e61513 Fix shift change callbacks reading bad cursor (#11782)
Sloppy code inherited from Vim caused user scripts to be able
to observe the cursor line in an invalid intermediary state,
due to Neovim change callbacks being unbuffered unlike Vim listeners.

Manifested in Vimscript executed from the callback possibly erroring
when `:call`:ing any function,
due to the implicit range `curwin->w_cursor.lnum,curwin->w_cursor.lnum`
failing validation.

Fixed by deferring the call to `changed_lines()` until after
`curwin->w_cursor.lnum` gets its correct value.
2020-01-30 07:34:34 +01:00
4ea5d7d31a Merge #11792 from janlazo/vim-8.1.0445
vim-patch:8.1.{445,446},8.2.{77,177}
2020-01-29 20:30:23 -08:00
b7447a909f vim-patch:8.2.0177: memory leak in get_tags()
Problem:    Memory leak in get_tags().
Solution:   Free matches when finding a pseudo-tag line. (Dominique Pelle,
            closes vim/vim#5553)
70b3e706b4
2020-01-29 22:18:58 -05:00
31f31b40a8 vim-patch:8.2.0077: settagstack() cannot truncate at current index
Problem:    settagstack() cannot truncate at current index.
Solution:   Add the "t" action. (Yegappan Lakshmanan, closes vim/vim#5417)
271fa08a35
2020-01-29 21:00:11 -05:00
f719b8898b vim-patch:8.1.0446: options test fails in the GUI
Problem:    Options test fails in the GUI.
Solution:   Don't try changing 'term' in the GUI.
4f88875725
2020-01-29 20:31:16 -05:00
ca08d5c191 vim-patch:8.1.0445: setting 'term' does not store location for termcap options
Problem:    Setting 'term' does not store location for termcap options.
Solution:   Set the script context for termcap options that are changed when
            'term' is set.
35bc7d6c52
2020-01-29 20:30:40 -05:00
406464fa6e CONTRIBUTING.md: mention "good first issue" label 2020-01-29 12:06:35 +01:00
0b49cb67f2 vim-patch:8.2.0171: fix use of uninitialized buffer #11786
Problem:    Coverity warning for using uninitialized buffer.
Solution:   Check the skip flag.
9a5e5a3e33
2020-01-28 23:02:11 -08:00
01ff9db633 Merge pull request #11780 from bfredl/winhlparse
options: winhighlight: fix incorrect string equality test
2020-01-28 22:23:35 +01:00
bfe84adb5a options: winhighlight: fix incorrect string equality test 2020-01-28 19:10:41 +01:00
e956ea7672 LSP: show diagnostic in qf/loclist #11777
instead of the content of the file at this line.

ref https://github.com/neovim/nvim-lsp/issues/69
2020-01-28 01:45:25 -08:00
b2062368e7 Merge #11775 'refactor: move session fns to ex_session.c'
obviates vim patch:
vim-patch:8.1.1766
2020-01-28 01:35:38 -08:00
4d0dfb8f75 build/MSVC: fix gettext multibyte issue #11774
Problem:  On Windows with the MSVC build, gettext-translation
          "Questa è già la" displays as "Questa <e8> gi<e0> la".
Solution: Fix iconv detection iconv when building gettext.
          So HAVE_ICONV is correctly defined when building nvim.

* fix gettext mb chars on MSVC
* fix libintl detection failure on MSVC

fixes #11749
2020-01-28 00:56:26 -08:00
a4b9417c78 lint 2020-01-28 00:22:14 -08:00
75e8562249 refactor: move session functions to ex_session.c 2020-01-28 00:22:14 -08:00
d3a9d75c04 Merge #11772 from janlazo/vim-8.2.0152
vim-patch:8.2.{152,158}
2020-01-26 19:54:26 -08:00
b5daee7b8f Merge #7836 'session: restore same :terminal buf split windows' 2020-01-26 19:03:43 -08:00
5ede2766c8 vim-patch:8.2.0158: triggering CompleteDone earlier is not backwards compatible
Problem:    Triggering CompleteDone earlier is not backwards compatible.
            (Daniel Hahler)
Solution:   Add CompleteDonePre instead.
3f169ce17e
2020-01-26 21:50:37 -05:00
e673a0df1a vim-patch:8.2.0152: restoring ctrl_x_mode is not needed
Problem:    Restoring ctrl_x_mode is not needed.
Solution:   Remove restoring the old value, it's changed again soon.
da812e282a
2020-01-26 21:17:54 -05:00
1c3ca4f18f mksession: always unix slashes "/" for filepaths 2020-01-26 17:30:47 -08:00
c4f4719ced cleanup/ex_docmd.c: remove most put_eol() calls 2020-01-26 17:13:00 -08:00
9048627806 lint 2020-01-26 17:13:00 -08:00
2070c082b5 cleanup/ex_docmd.c: remove most put_line() calls
- prefer fprintf() instead of put_line()
- PUTLINE_FAIL macro to avoid some boilerplate
2020-01-26 17:13:00 -08:00
2c1d12d0be mksession: always write LF "\n" line-endings
- remove `MKSESSION_NL`, `mksession_nl`
- deprecate the "unix" flag of 'sessionoptions'

There is no reason to choose CRLF or LF for session files. Instead just
always write LF.
2020-01-26 17:13:00 -08:00
598a1cd7c5 mksession: avoid ":file …" when restoring non-terminal bufs 2020-01-26 17:13:00 -08:00
1e103b3c12 mksession: simplify generated commands
Doing ":file …" immediately after is enough to fixup the :terminal
buffer name.

ref #5250
2020-01-26 17:13:00 -08:00
cf67f19ac2 mksession: restore same :term buf in split windows
Problem: When session-restore creates a terminal buffer with command
         like `:edit term://.//16450:/bin/bash`, the buffer gets
         a different name (depends on PID). Thus the later call to
         `bufexists('term://.//16450:/bin/bash)` will return false.
Solution: Force the buffer name with :file. This as least ensures
         the same buffer will show in multiple windows correctly, as
         expected when saving the session.  But it still has problems:
           1. the PID in the buffer name is bogus
           2. redundant :terminal buffers still hang around

fix #5250
2020-01-26 17:13:00 -08:00
88f133c30d Merge #11763 'spell: remove non-UTF8 dead code' 2020-01-26 16:42:00 -08:00
9dc3247850 Merge #11766 from janlazo/vim-8.1.1143
vim-patch:8.1.{1143,1144}
2020-01-26 15:53:23 -08:00
0e1dd0a502 spell: towupper(),towlower() are not called 2020-01-26 17:44:24 -05:00
ad272cd2d7 vim-patch:8.1.1144: too strict checking of the 'spellfile' option
Problem:    Too strict checking of the 'spellfile' option.
Solution:   Allow for a path.
862f1e17ea
2020-01-26 17:38:31 -05:00
08c5a874ab vim-patch:8.1.1143: may pass weird strings to file name expansion
Problem:    May pass weird strings to file name expansion.
Solution:   Check for matching characters.  Disallow control characters.
8f130eda47
2020-01-26 17:38:30 -05:00
d5322c8381 spellfile: set_spell_chartab() is dead code 2020-01-26 10:33:01 -05:00
eab052eca2 spell_defs: remove enc_utf8 redundant checks 2020-01-26 10:33:01 -05:00
86c1630a1b spell: remove enc_utf8 dead code 2020-01-26 10:33:01 -05:00
6c7a995c5f spell: zero-init structs to fix garbage ptrs 2020-01-26 10:33:00 -05:00
6f073ccbf4 Merge pull request #11755 from bfredl/qf_msg
screen: add missing redraws after a message
2020-01-26 15:38:04 +01:00
1dc5e5ae9b doc 2020-01-26 15:20:51 +01:00
20f5f44883 set -u before return
Follow up to a4d21f059.
2020-01-26 15:07:44 +01:00
f755370682 scripts/vim-patch.sh: add -m to usage
Ref: https://github.com/neovim/neovim/pull/11514#issuecomment-569476828
2020-01-26 14:51:14 +01:00
687fc527de screen: add missing redraws after a message 2020-01-26 13:45:20 +01:00
07a105f0cb terminal: trim CWD slash #11762
Trailing CWD slash in term:// buffer name breaks the BufReadCmd
handler.

Before:
    term://~///25232:/bin/bash
After:
    term://~//25232:/bin/bash

ref c6ff23d7a0
ref #11289
2020-01-26 02:13:37 -08:00
c6ff23d7a0 terminal: absolute CWD in term:// URI #11289
This makes it possible to restore the working directory of :terminal
buffers when reading those buffers from a session file.

Fixes #11288

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2020-01-26 00:24:42 -08:00
451af7f087 vim-patch:8.1.2171: mouse support not always available #11761
Problem:    Mouse support not always available.
Solution:   Enable mouse support also in tiny version.  Do not define
            FEAT_MOUSE_XTERM on MS-Windows (didn't really work).
a1cb1d1dce
2020-01-25 22:05:04 -08:00
cbcb50dcc9 shell: "..." instead of "[...]" #11760
0c1be45ea0 changed pulse logic to output "[...]" instead of nothing.
But that doesn't align with the "..." pulse which may follow it.

ref #11130
2020-01-25 16:49:53 -08:00
a75c289eb8 Merge #11750 from janlazo/vim-8.2.0146
vim-patch:8.1.2245,8.2.{146,147}
2020-01-25 16:21:09 -08:00
94ad6652f1 Remove enc_utf8,has_mbyte dead code 2020-01-25 18:09:17 -05:00
9d826700f7 vim-patch:8.1.2245: third character of 'listchars' tab shows in wrong place
Problem:    Third character of 'listchars' tab shows in wrong place when
            'breakindent' is set.
Solution:   Set c_final to NUL. (Naruhiko Nishino, closes vim/vim#5165)
2f7b7b1e12
2020-01-24 02:17:21 -05:00
e22d0cf12c vim-patch:8.2.0147: block Visual mode operators not correct when 'linebreak' set
Problem:    Block Visual mode operators not correct when 'linebreak' set.
Solution:   Set w_p_lbr to lbr_saved more often. (Ken Takata, closes vim/vim#5524)
03c3bd9fd0
2020-01-24 02:02:40 -05:00
376fa27237 vim-patch:8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Problem:    Wrong indent when 'showbreak' and 'breakindent' are set and
            'briopt' includes "sbr".
Solution:   Reset "need_showbreak" where needed. (Ken Takata, closes vim/vim#5523)
dfede9a70b
2020-01-23 19:31:11 -05:00
961c528afc ex_getln.c: wildmenu add cancel and apply ops 2020-01-23 12:12:42 +08:00
71ee46accf vim-patch:8.2.0141: no swift filetype detection (#11747)
Problem:    No swift filetype detection.
Solution:   Add swift, swiftgyb and sil. (Emir Sarı, closes vim/vim#5517)
0d76683e09
2020-01-23 02:21:05 +01:00
91bd1ddf3b Merge pull request #11740 from Billy4195/fix_jobstop
make jobstop() return 0 instead of throw error for already stopped job
2020-01-22 19:23:29 +01:00
041ec8997a Fix f_jobstop() failed loudly
The return value of jobstop()
@return 1 for valid job id
        0 for invalid id, including jobs have exited or stopped
2020-01-22 17:30:43 +08:00
e53e860759 vim-patch:8.1.0061: fix resetting, setting 'title' #11733
Problem:    Window title is wrong after resetting and setting 'title'.
Solution:   Move resetting the title into maketitle(). (Jason Franklin)
84a9308511
2020-01-21 23:47:32 -08:00
97dcc48c99 wildmode: fix wildmode=longest,full with pum #11690
With "wildmode=longest,full" + wildoptions=pum, wildmode should show
popupmenu after Tab-Tab, not the horizontal wildmenu.

Fixes #11622
2020-01-21 00:35:01 -08:00
99aec38259 Merge #11703 'CI: install perl provider' 2020-01-20 17:27:28 -08:00
b4e4ed844a ci/Appveyor: respect -NoTest param
Skips nodejs and Neovim::Ext.
2020-01-20 19:49:51 -05:00
7853b61786 provider/perl: test older versions 2020-01-20 19:44:00 -05:00
670a14a2a6 provider/perl: add latest version health check 2020-01-20 19:44:00 -05:00
da0cd5436b doc: provider-perl
Enable 'has("perl")' as an alias for 'g:loaded_perl_provider'.

TODO:
- +perl interface
2020-01-20 19:43:59 -05:00
ff9f70a6bf provider/perl: skip tests on Windows
It worked for MINGW builds at one point
but it keeps failing now because of perl dependencies
or nvim session issues for tests (named pipes as sockets on Windows?).
2020-01-20 19:43:59 -05:00
2063af3c94 provider/perl: add health check 2020-01-20 19:43:59 -05:00
ef3e610138 provider/perl: simplify detection 2020-01-20 19:43:59 -05:00
3420bd21e1 provider/perl: add basic tests 2020-01-20 19:43:59 -05:00
c25b5a1576 remote plugins: add support for perl hosts 2020-01-20 19:43:59 -05:00
4faf30de3e ci/Appveyor: install diffutils via scoop
scoop is a Windows package manager, similar to homebrew on OSX.
It is written on powershell, works in unelevated accounts,
is regularly maintained, and does not need mingw/msys2/cygwin
or WSL environments.
Sample use case is running (busybox) bash,
which can be installed via scoop via "scoop install busybox",
to use CI bash scripts in Appveyor.

Parts of scoop's directory can be cached to avoid downloads.
scoop modifies the registry for persistence environment variables
so scoop itself cannot be cached.
2020-01-20 19:43:59 -05:00
40cc5822b1 ci: install perl provider 2020-01-20 19:43:58 -05:00
f245c0218a tabpage: "tabnext #" switches to previous tab #11734 2020-01-20 15:14:51 -08:00
ef379d4eaa Merge pull request #11742 from bfredl/shedbike
shed biking: it's always extmarks, never marks extended
2020-01-20 20:41:17 +01:00
48a869dc6d shed biking: it's always extmarks, never marks extended 2020-01-20 19:36:35 +01:00
4d4035400e Merge pull request #11715 from teto/fix_fillchar
[RDY] fillchars: fix display on closed fold
2020-01-20 18:39:17 +01:00
270cd623ef Merge #11735 ':tabs : show # for previous tabpage' 2020-01-19 22:25:53 -08:00
8e385eb46a tabpage: :tabs indicates previous tabpage's curwin 2020-01-19 14:30:12 -08:00
198d94da0b Merge #11737 from janlazo/vim-8.1.2421
vim-patch:8.1.{2031,2421}
2020-01-19 13:28:50 -08:00
75c2c4e1b4 Merge pull request #11736 from bfredl/tenc
restore old 'termencoding' behavior
2020-01-19 20:11:19 +01:00
b3974e4437 restore old 'termencoding' behavior
Partially reverts #11647. Replaces #11662

The old implementation was removed without clear motivation. The "term option"
hackaround added in its place is neither shorter nor simpler.

The new behavior breaks even init.vim that expliticly check against it:

    if exists('&termencoding')
      set termencoding=utf-8
    endif

There was nothing wrong with the 0.4.x behavior. Empty &tenc has
indicated that the &enc value should be used for all the history of
Nvim. Ignoring setting the option is the expected behavior for Vim
versions that does not support the option (and Nvim is such a version)

'tenc' was also irrelevant to the Test_unicode python3 test.
The reason this has to be disabled is that neovim can't change
internal 'encoding'
2020-01-19 16:07:52 +01:00
f5cc5153c6 vim-patch:8.1.2421: test88 is old style
Problem:    Test88 is old style.
Solution:   Turn into a new style test. (Yegappan Lakshmanan, closes vim/vim#5347)
213ed008bb

'test_conceal.vim' requires +conceal and +terminal so it is N/A.
2020-01-19 10:06:19 -05:00
4c152be726 fixup! fixup! vim-patch.sh: list related missing Vim patches [ci skip] #11514 2020-01-19 10:05:23 -05:00
58033e15d5 vim-patch:8.1.2031: cursor position wrong when resizing and using conceal
Problem:    Cursor position wrong when resizing and using conceal.
Solution:   Set the flags that the cursor position is valid when setting the
            row and column during redrawing. (closes vim/vim#4931)
5babc6e858
2020-01-19 09:47:57 -05:00
acaf5d233b Merge #11331 'WinClosed autocmd' 2020-01-18 22:08:49 -08:00
b648b38bb1 doc: autocmd.txt 2020-01-18 21:32:14 -08:00
156c25e498 WinClosed: sort auevents.lua; improve tests
- test: reduce verbosity, condense redundancy, improve readability
- auevents.lua: keep events sorted by name. ref afd1d412fa
2020-01-18 21:32:14 -08:00
2b8e66c6ce autocmd: WinClosed exposes window id as <afile> 2020-01-18 17:06:03 -08:00
757aad92e8 autocmd: add WinClosed event
- only fire once, just before freeing mem
- trigger when on a different buffer
- avoid recursive calls in another tab
2020-01-18 17:06:03 -08:00
fb8b0503ba Merge #11707 from janlazo/vim-8.1.1434
vim-patch:8.1.{716,1139},8.2.{112,120,123}
2020-01-18 16:12:16 -08:00
ad35cbca76 vim-patch:8.2.0123: complete_info() does not work when CompleteDone is triggered
Problem:    complete_info() does not work when CompleteDone is triggered.
Solution:   Trigger CompleteDone before clearing the info.
17e04781f2
2020-01-17 23:46:00 -05:00
3d0c3148fb vim-patch:8.1.1139: no test for what is fixed in patch 8.1.0716
Problem:    No test for what is fixed in patch 8.1.0716.
Solution:   Add a test. (Yasuhiro Matsumoto, closes vim/vim#3797)
9845f36aa6
2020-01-17 23:18:25 -05:00
9a9bb9186a vim-patch:8.1.0716: get warning message when 'completefunc' returns nothing
Problem:    Get warning message when 'completefunc' returns nothing.
Solution:   Allow for returning v:none to suppress the warning message.
            (Yasuhiro Matsumoto, closes vim/vim#3789)
cee9bc2e3d
2020-01-17 23:09:32 -05:00
a7aa1fc87d spell: spell_soundfold_sal() is dead code 2020-01-17 19:06:51 -05:00
1042338c00 clang/'Logic error': zero-init struct 2020-01-17 19:06:50 -05:00
d811fab0ad vim-patch:8.2.0120: virtcol() does not check arguments to be valid
Problem:    virtcol() does not check arguments to be valid, which may lead to
            a crash.
Solution:   Check the column to be valid.  Do not decrement MAXCOL.
            (closes vim/vim#5480)
b3d33d8570
2020-01-17 19:06:50 -05:00
03da3697a4 vim-patch:8.2.0112: illegal memory access when using 'cindent'
Problem:    Illegal memory access when using 'cindent'.
Solution:   Check for NUL byte. (Dominique Pelle, closes vim/vim#5470)
02ad46394e
2020-01-17 19:06:50 -05:00
fd89ad7bfb Merge pull request #11390 from erw7/feature-conpty
win/Terminal: Change to use ConPTY, if available
2020-01-17 12:59:50 +01:00
1e4f290691 Remove termtype option 2020-01-17 11:36:28 +01:00
c86d5fa981 Change to replace stderr with conout 2020-01-17 11:36:28 +01:00
4e06594c53 Add missing include file 2020-01-17 11:36:28 +01:00
a5a3d7160d Change option name from termwintype to termtype 2020-01-17 11:36:28 +01:00
8f91d709b0 Rename from os_win_conpty.{c,h} to pty_conpty_win.{c,h} 2020-01-17 11:36:28 +01:00
2c8016c704 Add stdin, stdout replacement functions 2020-01-17 11:36:28 +01:00
60c7eabb2f Change enum to a name that follows naming convention 2020-01-17 11:36:28 +01:00
59ae38a919 Change to use TriState instead of bool
Co-Authored-By: Justin M. Keyes <justinkz@gmail.com>
2020-01-17 11:36:28 +01:00
b25e42f798 Fix function prototype 2020-01-17 11:36:28 +01:00
b4ff583277 Minor changes in reviewer's point 2020-01-17 11:36:28 +01:00
7aff0340e1 Move ConPTY resize to os_win_conpty.c 2020-01-17 11:36:28 +01:00
ed37d1081c Change union name from pty_object to object
Co-Authored-By: Justin M. Keyes <justinkz@gmail.com>
2020-01-17 11:36:28 +01:00
5355cee77d Change to use ConPTY, if available 2020-01-17 11:36:28 +01:00
8fe0635e73 Merge pull request #11723 from bfredl/nocleareol
messages: echo "line1\r\nline2" should not clear line1
2020-01-16 20:35:27 +01:00
b4a92aadd2 messages: echo "line1\r\nline2" should not clear line1 2020-01-16 19:35:45 +01:00
6e78b21623 Merge pull request #11563 from bfredl/mark_madness
extmarks: mark sanity/madness
2020-01-16 15:31:05 +01:00
ca1a00edd6 extmarks/bufhl: reimplement using new marktree data structure
Add new "splice" interface for tracking buffer changes at the byte
level. This will later be reused for byte-resolution buffer updates.
(Implementation has been started, but using undocumented "_on_bytes"
option now as interface hasn't been finalized).

Use this interface to improve many edge cases of extmark adjustment.
Changed tests indicate previously incorrect behavior. Adding tests for
more edge cases will be follow-up work (overlaps on_bytes tests)

Don't consider creation/deletion of marks an undoable event by itself.
This behavior was never documented, and imposes  complexity for little gain.

Add nvim__buf_add_decoration temporary API for direct access to the new
implementation. This should be refactored into a proper API for
decorations, probably involving a huge dict.

fixes #11598
2020-01-16 12:36:10 +01:00
8ba3354d74 api_set_error: include expression with "Failed to evaluate expression" (#11713) 2020-01-15 09:08:22 +01:00
f86acd213b version.c: update [ci skip] #11689
vim-patch:8.0.1789: BufWinEnter does not work well for a terminal window
vim-patch:8.2.0105: Vim license not easy to find on github
vim-patch:8.2.0106: printf formats are not exactly right
vim-patch:8.2.0107: hgignore is out of sync from gitignore
2020-01-14 23:59:48 -08:00
53473b3b71 fillchars: fix display on closed fold
The rollback of the last written symbol was not thorough, hence
confusing the code later on and causing a buggy display.

To reproduce, use `set fillchars+=foldopen:▾,foldsep:│` and close a
fold. Foldcolumn should display a glitch.
2020-01-14 22:51:13 +01:00
55677ddc46 Add new marktree data structure for storing marks
This is inspired by Atom's "marker index" data structure to efficiently
adjust marks to text insertions deletions, but uses a wide B-tree
(derived from kbtree) to keep the nesting level down.
2020-01-14 12:57:31 +01:00
3d1531aee5 API: include invalid buffer/window/tabpage in error message (#11712) 2020-01-14 09:21:10 +01:00
9231684986 doc [ci skip] #11656 2020-01-12 23:41:55 -08:00
dfb676fe0d edit.c: Ensure undo sync when emulating <Esc>x #11706
After PR #8226 an unmapped META key in insert mode behaves like
ESC-<key> (:help i_META).

The behaviour does not fully match, since if <Esc>-<key> is pressed
manually then since it were pressed manually `gotchars` would be called
on the second <key> after insert-mode had already been left.

This would mean that `may_sync_undo` (called from `gotchars`) would
call `u_sync(FALSE)` on the second key (since we would be in normal
mode).

This overall means that <Meta-[something]> behaves differently with
respect to undo than <Esc>[something] when the [something] makes a
change.

As an example, under `nvim -u NONE`:
ihello<M-.>u

leaves the buffer empty, while
ihello<Esc>.u

leaves the buffer with one instance of `hello`.

- Fix by calling u_sync() manually in the new clause under
  `normalchar:` in `insert_handle_key`.
- Update test in tui_spec.lua that accidentally relied on the old behaviour.
2020-01-12 17:09:39 -08:00
05ea3c1997 defaults: set fillchars "foldsep" to box line #11702
"│" U+2502 BOX DRAWINGS LIGHT VERTICAL

Fallback to old default | if 'ambiwidth' is set.
2020-01-11 16:36:11 -08:00
1cbe8d6d78 vim-patch:8.0.1593: :qall never exits active :terminal #11704
Problem:    :qall never exits with an active terminal window.
Solution:   Add a way to kill a job in a terminal window.
25cdd9c33b
2020-01-11 16:31:05 -08:00
462ee281b7 vim-patch:8.0.1769: refactor save/restore of viewstate #11701
Problem:    Repeated saving and restoring viewstate for 'incsearch'.
Solution:   Use a structure.
9b25af3620
2020-01-11 13:21:21 -08:00
a4d21f0592 vim-patch.sh: fix for bash 4.3 or older #11700 2020-01-11 12:09:54 -08:00
29b1a4761a tabpage: disallow go-to-previous in cmdline-win #11692
After cbc8d72fde when editing
the command in the command editing window (q:, q/, q?) it was possible
to switch to the previous tab.  Doing so put Nvim in a bad state.
Moreover, switching tabs via the other available mechanisms (gt, gT,
<C-W>gt, <C-W>gT) is not possible when in the command editing window.

Here, the behavior is prevented.  It is no longer possible to switch to
the previous tab when editing the command in the command editing window.
The solution is to share code between gt, gT, and g<Tab>.  Specifically,
goto_tabpage_lastused now calls through goto_tabpage rather than
directly calling goto_tabpage_tp.  Doing so works well because all the
validation enjoyed by gt and gT is present in goto_tabpage.
2020-01-09 07:31:16 -08:00
25afa10f92 Merge #11669 'LSP: differentiate diagnostic underline by severity' 2020-01-08 22:48:57 -08:00
0a1c6d9a37 LSP: highlight groups test, doc 2020-01-08 22:18:18 -08:00
b6276f5aee Merge #11691 from janlazo/vim-8.2.0099 2020-01-08 22:13:46 -08:00
8c8681d594 test: hoist buf_lines() 2020-01-08 09:41:41 -08:00
844cd9cef1 test: just say no to hyper-granularity
- Move plugin/lsp/* to plugin/*
- Merge lsp/util_spec.lua into lsp_spec.lua
2020-01-08 09:30:59 -08:00
e616ec4394 LSP: differentiate diagnostic underline by severity 2020-01-08 08:50:02 -08:00
831fa45ad8 API: nvim_get_hl_by_id: omit hl instead of returning -1 #11685
Problem: When Normal highlight group defines ctermfg/bg, but other
         highlight group lacks ctermfg/bg, nvim_get_hl_by_id(hl_id,
         v:false) returns -1 for the missing ctermfg/bg instead of just
         omitting it.
Solution: checking for -1 in hlattrs2dict()

fix #11680
2020-01-08 06:19:23 -08:00
a91ea02830 version.c: update [ci skip] #11636
vim-patch:8.0.0902: cannot specify directory or environment for a job
vim-patch:8.0.1127: Test_peek_and_get_char fails on 32 bit system
vim-patch:8.1.0661: clipboard regexp might be used recursively
vim-patch:8.1.0834: GUI may wait too long before dealing with messages
vim-patch:8.2.0040: timers test is still flaky on Travis for Mac
vim-patch:8.2.0053: windowsversion() does not always return the right value
vim-patch:8.2.0055: cannot use ":gui" in vimrc with VIMDLL enabled
vim-patch:8.2.0057: cannot build with small features
vim-patch:8.2.0059: compiler warnings for unused variables in small build
vim-patch:8.2.0060: message test only runs with one encoding
vim-patch:8.2.0065: Amiga and alikes: autoopen only used on Amiga OS4
vim-patch:8.2.0080: globals using INIT4() are not in the tags file
vim-patch:8.2.0081: MS-Windows also need the change to support INIT4()
vim-patch:8.2.0086: build error for small version
vim-patch:8.2.0094: MS-Windows: cannot build with Strawberry Perl 5.30
vim-patch:8.2.0100: macros for Ruby are too complicated
2020-01-07 22:38:10 -08:00
45759e44f9 Remove (void) hacks, Mark unused attrs 2020-01-08 01:08:55 -05:00
3d6cca5a9d vim-patch:8.2.0099: use of NULL pointer when out of memory
Problem:    Use of NULL pointer when out of memory.
Solution:   Check for NULL pointer. (Dominique Pelle, closes vim/vim#5449)
8b7aa2f9b2
2020-01-07 23:24:38 -05:00
e8d61005dc third-party: upgrade libvterm to v0.1.3 (#11678) 2020-01-07 20:12:56 +01:00
013436c997 ui_grid_resize: fix resize logic for floating window #11655 2020-01-06 22:03:15 -08:00
4a7d84ae60 man.vim: workaround for 'cscopetag' #11679
The old `:Man` implementation would take either the word under
the cursor, or the argument passed in, and load that as a man page.

Since we now use 'tagfunc' and look for all relevant man-pages, if
your system has several (i.e. same name, different sections), we return
several, giving the user an option.

This works for most tag commands except `:tjump`, which will
fail if there's multiple tags to choose from. This just happens to
be what the cscope code uses (it actually attempts to prompt the
user, but this fails).
2020-01-06 21:57:36 -08:00
83b0054b87 Merge #11674 'vim-patch:8.0.1786,8.1.{851,1308,1309,1579}' 2020-01-06 06:52:52 -08:00
83083dd47b vim-patch:8.1.1309: test for Normal highlight fails on MS-Windows GUI
Problem:    Test for Normal highlight fails on MS-Windows GUI.
Solution:   Skip the test for MS-Windows GUI.
6b528fa062
2020-01-06 00:18:02 -05:00
3c764aabb5 vim-patch:8.1.1308: the Normal highlight is not defined when compiled with GUI
Problem:    The Normal highlight is not defined when compiled with GUI.
Solution:   Always define Normal. (Christian Brabandt, closes vim/vim#4072)
f90b6e03a9
2020-01-06 00:18:02 -05:00
1aacab49ea vim-patch:8.1.1579: dict and list could be GC'ed while displaying error
Problem:    Dict and list could be GC'ed while displaying error in a timer.
            (Yasuhiro Matsumoto)
Solution:   Block garbage collection when executing a timer.  Add
            test_garbagecollect_soon(). Add "no_wait_return" to
            test_override(). (closes vim/vim#4571)
adc6714aac
2020-01-05 10:40:53 -05:00
3a3fb08602 vim-patch:8.1.0851: feedkeys() with "L" does not work properly
Problem:    feedkeys() with "L" does not work properly.
Solution:   Do not set typebuf_was_filled when using "L". (Ozaki Kiichi,
            closes vim/vim#3885)
8d4ce56a19
2020-01-05 10:35:49 -05:00
e7d49dc909 vim-patch:8.0.1786: no test for 'termwinkey'
Problem:    No test for 'termwinkey'.
Solution:   Add a test.  Make feedkeys() handle terminal_loop() returning
            before characters are consumed.
b2ac14c0b5
2020-01-05 10:35:49 -05:00
fa9b057d35 Merge #11670 from janlazo/vim-8.0.1817
vim-patch:8.0.1817,8.1.{840,842,844}
2020-01-04 15:11:56 -08:00
d139fb5cd0 vim-patch:8.1.0844: when timer fails test will hang forever
Problem:    When timer fails test will hang forever.
Solution:   Use reltime() to limit waiting time. (Ozaki Kiichi, closes vim/vim#3878)
50948e4ac2
2020-01-03 22:49:05 -05:00
25613fa65b vim-patch:8.1.0842: getchar_zero test fails on MS-Windows
Problem:    getchar_zero test fails on MS-Windows.
Solution:   Disable the test for now.
cb908a813c
2020-01-03 22:47:52 -05:00
a2554858df vim-patch:8.1.0840: getchar(0) never returns a character in the terminal
Problem:    getchar(0) never returns a character in the terminal.
Solution:   Call wait_func() at least once.
12dfc9eef1
2020-01-03 22:43:52 -05:00
4c4bcecc4a vim-patch:8.0.1817: a timer may change v:count unexpectedly
Problem:    A timer may change v:count unexpectedly.
Solution:   Save and restore v:count and similar variables when a timer
            callback is invoked. (closes vim/vim#2897)
b0f42ba60d
2020-01-03 20:15:32 -05:00
234232ff4e Merge #11648 from butwerenotthereyet/vim-8.1.0972 2020-01-03 06:56:47 -08:00
a7b6b37519 vim-patch:8.1.0974: cannot switch from terminal window to previous tabpage
Problem:    Cannot switch from terminal window to previous tabpage.
Solution:   Make CTRL-W gT move to previous tabpage.
882d02eeb5
2020-01-03 06:02:10 -08:00
42aa876488 vim-patch:8.1.0972: cannot switch from terminal window to next tabpage
Problem:    Cannot switch from terminal window to next tabpage.
Solution:   Make CTRL-W gt move to next tabpage.
72e83c1ae5
2020-01-03 06:01:47 -08:00
c241395b3d LSP: place hover window by vertical space #11657
Make the hover window position itself vertically wherever is the most
space available.
2020-01-03 04:39:25 -08:00
94cc8a20b4 vim-patch:8.2.0079: test still fails on MS-Windows #11663
Problem:    Python 3 unicode test still fails on MS-Windows.
Solution:   Do not set 'encoding' to "euc-tw" on MS-Windows.
7fc4785ea1
2020-01-03 04:13:45 -08:00
77b61cb0df option: restore termencoding (readonly) #11662
'termencoding' option was removed in abaabd1d03
but some plugins check its value.
2020-01-02 21:42:52 -08:00
0c436559df Merge pull request #11658 from bfredl/clipstderr
clipboard: do not close stderr together with stdout (fixup #11617)
2020-01-02 19:31:49 +01:00
6e3793bf11 clipboard: do not close stderr together with stdout (fixup #11617)
stderr is needed to get error messages in case of failure, and
job handler expects it to be open.
2020-01-02 19:27:55 +01:00
cbc8d72fde tabpage: track last-used tabpage #11626
In a multi-window scenario, it is possible to return focus to the last
accessed window via n_CTRL-W_p.  However, in the case of a multi-tab
scenario, there was previously no way to return focus to the last
accessed *tab*.  Here, that ability is added via n_g<tab>.

Additionally, the index of the previous tab is exposed via
tabpagenr('#'), mirroring the existing functionality of winnr('#').
2020-01-02 06:06:11 -08:00
2c62b2fc56 build.ps1: add "-NoTests" param #11654 2020-01-02 05:52:18 -08:00
dc6077535f API: fix crash on copy_object(kObjectTypeWindow) #11651
Closes #11646
2020-01-02 02:00:39 -08:00
67d7906652 clipboard: close stdout when copying via xclip #11617
test_registers.vim can fail even if a clipboard manager is running.
If a clipboard manager is not running, this test always fails with xclip.
Use xsel as a workaround.
https://github.com/astrand/xclip/issues/20 suggests closing stdout
when sending input via stdin.

Environment
- Ubuntu Xenial
- Vim 7.4 (any app with broken clipboard code will do)
- Neovim nightly

Steps to reproduce:
0. Start the clipboard manager.
1. Open a file in Vim on Linux.
   Vim should have +clipboard enabled.
   'set clipboard='
2. Yank some text to the clipboard register.
3. Quit Vim.
4. Run 'cd /path/to/neovim/repo/'
5. Run 'make oldtest'.
   Do not run any individual tests.
   They likely pass with or without this fix.

Before fix: test_registers.vim can fail.
After fix: test_registers.vim always passes.

Close https://github.com/neovim/neovim/issues/7958

https://wiki.ubuntu.com/ClipboardPersistence#The_state_of_things
2020-01-02 00:41:36 -08:00
3917064504 doc: mention *_host_prog ordering sensitivity #11639
Any uses of `has("python3")` will cause the `g:loaded_python3_provider`
variable to be set if the system path does not have a Python with Neovim
support. Subsequent assignments to `g:python3_host_program` will
therefore not cause the provider to be activated.
2020-01-02 00:38:49 -08:00
8645d480bd Merge pull request #11470 from bfredl/emptytable
metatable for empty dict value
2020-01-01 21:03:08 +01:00
a495d49012 Merge #11647 from janlazo/vim-8.2.0070
vim-patch:8.2.{70,74,75,76}
2020-01-01 11:09:01 -08:00
ea4127e9a7 lua: metatable for empty dict value 2020-01-01 19:26:29 +01:00
7dca8383db vim-patch:8.2.0076: Python 3 unicode test fails on MS-Windows
Problem:    Python 3 unicode test fails on MS-Windows.
Solution:   Do not set 'encoding' to "debug" on MS-Windows.
955f4e6f36
2020-01-01 13:13:44 -05:00
a11c3b7920 vim-patch:8.2.0075: Python 3 unicode test still sometimes fails
Problem:    Python 3 unicode test still sometimes fails.
Solution:   Skip the test when 'termencoding' is not empty.
2466aea508
2020-01-01 13:13:29 -05:00
abaabd1d03 vim-patch:8.2.0074: Python 3 unicode test someitmes fails
Problem:    Python 3 unicode test someitmes fails.
Solution:   Make 'termencoding' empty.  Correct number of error message.
4b7cdca230
2020-01-01 13:11:54 -05:00
5f0d5ec985 vim-patch:8.2.0070: crash when using Python 3 with "debug" encoding
Problem:    Crash when using Python 3 with "debug" encoding. (Dominique Pelle)
Solution:   Use "euc-jp" whenever enc_dbcs is set.
d518f952f0
2020-01-01 10:30:36 -05:00
a251b588ac Merge #11642 'CI: test powershell core' 2020-01-01 06:36:10 -08:00
070bd3ea23 Merge #11604 "LSP: shrink API, improve docs" 2020-01-01 06:30:29 -08:00
99eca04835 Merge #11645 from janlazo/vim-8.1.1346
vim-patch:8.1.1346,8.2.0068
2020-01-01 06:03:48 -08:00
dec165b268 PVS/V618: fix emsgf format specifier #11643 2020-01-01 05:59:37 -08:00
0f47870d1b vim-patch:8.2.0068: crash when using Python 3 with "utf32" encoding
Problem:    Crash when using Python 3 with "utf32" encoding. (Dominique Pelle)
Solution:   Use "utf-8" whenever enc_utf8 is set. (closes vim/vim#5423)
556684ff71
2019-12-31 23:24:14 -05:00
0301de758b vim-patch:8.1.1346: error for Python exception does not show useful info
Problem:    Error for Python exception does not show useful info.
Solution:   Show the last line instead of the first one. (Ben Jackson,
            closes vim/vim#4381)
7f3a28490a
2019-12-31 23:21:25 -05:00
0da7774cf0 doc: powershell is 'pwsh' on non-Windows OS 2019-12-31 22:29:40 -05:00
d53456c68f ci: set nodejs version for tests outside fold 2019-12-31 22:22:56 -05:00
0cebdf0ed9 ci: test powershell core on macOS 2019-12-31 21:15:58 -05:00
ac6ebfcc1d LSP: eliminate lsp.print_debug_info…()
Reduce API surface.  We should not add functions unless they are really
needed.  Users should be nudged to use vim.inspect() directly.
2019-12-31 15:39:17 -08:00
8b84119650 LSP: eliminate lsp.stop_all_clients()
Reduce API surface.  We don't need so many variations of functions. Too
many functions means verbose, largely redundant documentation, tests,
and cognitive burden.
2019-12-31 15:39:17 -08:00
0dcf4bd3eb gen_vimdoc.py: rename mode to target 2019-12-31 15:39:17 -08:00
1836853955 ci: test powershell core on Linux 2019-12-31 15:11:08 -05:00
b112fe828f gen_vimdoc.py: generate LSP docs 2019-12-31 08:06:48 -08:00
d839c35871 doc: LSP 2019-12-31 02:55:12 -08:00
93e7c7e3bd doc [ci skip] 2019-12-31 02:25:10 -08:00
e922576bdd Merge #11637 from janlazo/vim-8.1.1739
vim-patch:8.1.{1739,1741},8.2.0063
2019-12-31 04:03:11 +01:00
4bd51d8988 CI: set nodejs version to 10 on main scripts
nvm can run within a bash shell only.
2019-12-30 18:48:32 -05:00
eeabd3a8c6 vim-patch:8.2.0063: wrong size argument to vim_snprintf()
Problem:    Wrong size argument to vim_snprintf(). (Dominique Pelle)
Solution:   Reduce the size by the length. (related to vim/vim#5410)
08b28b7ad5
2019-12-30 17:02:15 -05:00
0e7baed219 vim-patch:8.1.1741: cleared/added match highlighting not updated in other window
Problem:    Cleared/added match highlighting not updated in other window.
            (Andi Massimino)
Solution:   Mark the right window for refresh.
4ef18dcc2e
2019-12-30 16:30:58 -05:00
6e6544d645 vim-patch:8.1.1739: deleted match highlighting not updated in other window
Problem:    Deleted match highlighting not updated in other window.
Solution:   Mark the window for refresh. (closes vim/vim#4720)  Also fix that
            ambi-width check clears with wrong attributes.
06029a857a
2019-12-30 16:26:43 -05:00
22a92a59a6 Merge #11605 'gen_vimdoc.py: fix formatting; sort by name' 2019-12-30 12:36:41 +01:00
c24f8f46b4 gen_vimdoc.py: sort by name 2019-12-30 03:31:32 -08:00
b81547ce6d gen_vimdoc.py: better handling of inline (non-block) nodes 2019-12-30 03:12:24 -08:00
27b678f577 gen_vimdoc.py: fix deprecated check 2019-12-30 00:15:49 -08:00
f9be48436c Merge #11632 from janlazo/vim-8.1.2087
vim-patch:8.1.2087,8.2.0058
2019-12-30 08:47:19 +01:00
00af06b372 Merge #11616 from janlazo/vim-8.0.1491
vim-patch:8.0.{1356,1491,1495,1522,1538,1540},8.1.{554,670,1300,1303,1875,2377}
2019-12-30 08:27:56 +01:00
5e1cad6d33 vim-patch:8.0.1356: using simalt in a GUIEnter autocommand inserts characters
Problem:    Using simalt in a GUIEnter autocommand inserts strange characters.
            (Chih-Long Chang)
Solution:   Ignore K_NOP in Insert mode. (closes vim/vim#2379)
c5aa55db7e
2019-12-30 01:15:18 -05:00
78aa41354e vim-patch:8.1.2377: GUI: when losing focus a pending operator is executed
Problem:    GUI: when losing focus a pending operator is executed.
Solution:   Do not execute an operator when getting K_IGNORE. (closes vim/vim#5300)
fa5612c7d8
2019-12-30 00:49:30 -05:00
5fc8a7ee09 vim-patch:8.1.1300: in a terminal 'ballooneval' does not work right away
Problem:    In a terminal 'ballooneval' does not work right away.
Solution:   Flush output after drawing the balloon.  Add the <Ignore> key
            code.  Add a test.
2f10658b06
2019-12-30 00:34:44 -05:00
ebd5c2cdda ui: add basic tests for pumheight,pumwidth 2019-12-29 23:16:52 -05:00
1250a01325 vim-patch:8.2.0058: running tests changes ~/.viminfo
Problem:    Running tests changes ~/.viminfo.
Solution:   Make 'viminfo' empty when summarizing tests results. (closes vim/vim#5414)
eb698d0b32
2019-12-29 22:43:43 -05:00
74e37ac665 vim-patch:8.1.2087: cannot easily select one test function to execute
Problem:    Cannot easily select one test function to execute.
Solution:   Support the $TEST_FILTER environment variable. (Ozaki Kiichi,
            closes vim/vim#2695)
a7f6c3cf07
2019-12-29 22:43:16 -05:00
6c606c1191 vim-patch:8.1.1875: cannot get size and position of the popup menu
Problem:    Cannot get size and position of the popup menu.
Solution:   Add pum_getpos(). (Ben Jackson, closes vim/vim#4827)
e9bd57286a

https://github.com/neovim/neovim/pull/11562 backported the vim patch.
This patch only updates the runtime/doc/ files to match Vim.
2019-12-29 18:34:05 -05:00
e80f61020a vim-patch:8.0.1540: popup menu positioning fails with longer string
Problem:    Popup menu positioning fails with longer string.
Solution:   Only align with right side of window when width is less than
            'pumwidth' (closes vim/vim#2661)
2b10bcbfc1
2019-12-29 18:34:05 -05:00
81a0d10f13 fixup! vim-patch.sh: list related missing Vim patches [ci skip] #11514 2019-12-29 18:34:04 -05:00
1e693ac97d vim-patch:8.1.1303: not possible to hide a balloon
Problem:    Not possible to hide a balloon.
Solution:   Hide the balloon when balloon_show() is called with an empty
            string or list.  Add balloon_gettext().
be0a2597ae
2019-12-29 18:34:04 -05:00
be4165308f screen: fix pvs/v1048 2019-12-29 18:34:04 -05:00
1d3d84fe81 vim-patch:8.1.0554: popup menu overlaps with preview window
Problem:    Popup menu overlaps with preview window.
Solution:   Adjust the height computation. (Hirohito Higashi, closes vim/vim#3414)
614ab8aa00

Cherry-picked "row -> pum_win_row" rename changes from patch 8.1.0062.
2019-12-29 18:34:04 -05:00
51c9e3c4d1 vim-patch:8.0.1538: popupmenu is too far left when completion is long
Problem:    Popupmenu is too far left when completion is long. (Linwei)
Solution:   Adjust column computations. (Hirohito Higashi, closes vim/vim#2661)
bb008dd323
2019-12-29 18:34:04 -05:00
d56f36f46c vim-patch:8.0.1522: popup menu is positioned in the wrong place
Problem:    Popup menu is positioned in the wrong place. (Davit Samvelyan,
            Boris Staletic)
Solution:   Correct computation of the column and the conditions for that.
            (Hirohito Higashi, closes vim/vim#2640)
4287ed33dd
2019-12-29 18:34:04 -05:00
ac85d1f52f vim-patch:8.1.0670: macro for popup menu width is unused
Problem:    Macro for popup menu width is unused.
Solution:   Remove it. (Hirohito Higashi)
3d631cb0b3
2019-12-29 18:34:03 -05:00
669d675ef3 vim-patch:8.0.1495: having 'pumwidth' default to zero has no merit
Problem:    Having 'pumwidth' default to zero has no merit.
Solution:   Make the default 15, as the actual default value.
42443c7d7f

Includes 'pumwidth' documentation changes from 8.0.1531.
Sort 'pum*' option in alphabetical order.
2019-12-29 18:31:04 -05:00
703ed11c97 vim-patch:8.0.1491: the minimum width of the popup menu is hard coded
Problem:    The minimum width of the popup menu is hard coded.
Solution:   Add the 'pumwidth' option. (Christian Brabandt, James McCoy,
            closes vim/vim#2314)
a8f04aa275
2019-12-29 18:15:46 -05:00
34a59242a0 Revert "runtime: Add vim.lsp.get_client_by_name" #11623
reverts 680693e263 #11603
2019-12-29 09:05:32 +01:00
ddffd31737 netrw.vim: do not save +/* registers p.2 #11625
remove last place where system clipboard was used by netrw
(extends 6c22c7ab97)

fix #11592
2019-12-29 08:57:28 +01:00
680693e263 runtime: Add vim.lsp.get_client_by_name (#11603)
Since the client name is more obvious than the client id for the user, add an
API to get the lsp client by the client name.
2019-12-28 09:28:00 -08:00
4f4c06a7a4 doc: update 'cpoptions' default value #11619
Since version 0.2, the `_` compatibility option is turned on by default.

ref 1743df82f9
ref b0196586de/src/nvim/option_defs.h (L135)
2019-12-28 08:07:27 +01:00
52566dd780 LSP: Fix flaky test #11618 2019-12-27 12:20:17 +01:00
b0196586de Merge #11568 'fillchars: foldopen, foldsep, foldclose' 2019-12-26 07:06:43 +01:00
927a4f24e0 Merge #11612 from janlazo/clang-pvs 2019-12-26 07:02:44 +01:00
234c4a846b os/env: fix pvs/v781 2019-12-26 00:29:15 -05:00
d6ba578ccb misc1: fix pvs/v781 2019-12-26 00:29:15 -05:00
251177b63b ex_getln: fix pvs/v781 2019-12-26 00:29:15 -05:00
23dbe73585 ex_docmd: fix pvs/v781 2019-12-26 00:29:15 -05:00
f6b4547598 ex_cmds: fix pvs/v781 2019-12-26 00:29:15 -05:00
fd429345c9 search: fix pvs/v1048 2019-12-26 00:29:14 -05:00
6a0242beea quickfix: qf_parse_fmt_plus never fails 2019-12-26 00:29:14 -05:00
0be59d2b5e hardcopy: fix pvs/v1048 2019-12-26 00:29:14 -05:00
362c3a3ccf api/vim: fix pvs/v1048 2019-12-26 00:29:14 -05:00
35c3985da6 clang/'Dead store': remove dead code 2019-12-26 00:29:13 -05:00
c740e3b4b5 clang/'Logic error': set ret_tv if non-null 2019-12-25 17:16:39 -05:00
bbad324b17 fillchars: adding foldopen, foldsep, foldclose
You can try it with
set fillchars+=foldopen:▾,foldsep:│,foldclose:▸
2019-12-25 14:28:36 +01:00
5f1aec5abd Fix scripts/vim-patch.sh for Bash 4.3
Ref: https://github.com/neovim/neovim/pull/11514#issuecomment-568780231
2019-12-25 13:03:16 +01:00
07a2260e1d LSP: Handle rpc RequestCancelled specifically. (#11606)
This was creating extra noise in errors that we should've been handling
internally.

Fixes #11515
2019-12-24 14:28:09 -08:00
34abe8fd23 vim-patch.sh: list related missing Vim patches [ci skip] #11514
* scripts/vim-patch.sh: factor out _set_tokens_and_tags

This allows for caching `$tokens` and `$vim_commit_tags`, which will
become relevant with the next commit adding
`list_missing_previous_vimpatches_for_patch`.
2019-12-24 08:15:18 +01:00
b3686b1597 system(), jobstart(): raise error on non-executable #11234
* tv_to_argv: error when cmd is not executable
  Callers always assume that emsg was emitted:
  - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L12509
  - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L17923
  - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L18202
* test/functional/provider: display reason from missing_provider
* provider#node#Detect: skip / handle non-existing node executable
2019-12-24 07:53:56 +01:00
53fe877a97 snap: set "classic" confinement #11601 2019-12-24 06:43:25 +01:00
31cfd67453 version.c: update [ci skip] #11600
vim-patch:8.2.0001: #endif comments do reflect corresponding #ifdef
vim-patch:8.2.0003: Build file dependencies are incomplete
vim-patch:8.2.0009: VMS: terminal version doesn't build
vim-patch:8.2.0022: click in popup window doesn't close it in the GUI
vim-patch:8.2.0029: MS-Windows: crash with empty job command
vim-patch:8.2.0031: MS-Windows: test for empty job fails
vim-patch:8.2.0032: MS-Windows: test for blank job fails
vim-patch:8.2.0034: missing check for out of memory
2019-12-24 06:41:13 +01:00
7dacab9afd vim-patch:8.2.0033: make_extmatch() OOM #11602
Problem:    Crash when make_extmatch() runs out of memory.
Solution:   Check for NULL. (Dominique Pelle, closs vim/vim#5392)
7c77b34967
2019-12-24 06:40:39 +01:00
2ef72437fc Merge #11594 from janlazo/vim-8.0.1767
vim-patch:8.0.1767,8.2.0030
2019-12-23 07:16:21 +01:00
2e280dac7d gen_vimdoc.py: lint #11593 2019-12-23 07:08:49 +01:00
d6593d850a snap: set "strict" confinement #11596 2019-12-23 07:04:14 +01:00
a16de288c3 spellfile: fix pvs/v1048 2019-12-22 22:26:05 -05:00
dd2e2f8aaa getchar: fix pvs/v1048 2019-12-22 21:17:30 -05:00
0c70aa6509 charset: fix pvs/v1048 2019-12-22 21:14:04 -05:00
8758e96bf0 tag: fix pvs/v1048 2019-12-22 21:11:18 -05:00
33f6c25af8 eval: fix pvs/V1048 2019-12-22 21:02:49 -05:00
80ebfc304e vim-patch:8.2.0030: "gF" does not work on output of "verbose command"
Problem:    "gF" does not work on output of "verbose command".
Solution:   Recognize " line " and translations. (closes vim/vim#5391)
64e74c9cc7
2019-12-22 19:43:18 -05:00
bc8da6cdbe vim-patch:8.0.1767: with 'incsearch' text may jump up and down
Problem:    With 'incsearch' text may jump up and down. ()
Solution:   Besides w_botline also save and restore w_empty_rows.
            (closes # 2530)
9d34d90210
2019-12-22 11:50:16 -05:00
9e9dcd4bd7 Merge pull request #11113 from bfredl/tree-sitter-query
tree-sitter step 2: query API and  highlighting prototype
2019-12-22 13:47:45 +01:00
440695c296 tree-sitter: implement query functionality and highlighting prototype [skip.lint] 2019-12-22 12:51:46 +01:00
c21511b2f4 tree-sitter: fix prototypes (to be upstreamed) 2019-12-22 11:57:19 +01:00
f486d2145a tree-sitter: fix relative paths in unicode/ subdir 2019-12-22 11:56:13 +01:00
e1d63c180c tests: ex_terminal_spec: retry ":terminal (with fake shell)" (#11588)
Flaky failure (Travis CI, macOS):

    [ RUN      ] :terminal (with fake shell) works with gf: 10518.41 ms FAIL
    test/functional/terminal/ex_terminal_spec.lua:248: Row 1 did not match.
    Expected:
      |*^ready $ echo "scripts/shadacat.py"                |
      |*                                                  |
      |*[Process exited 0]                                |
      |:terminal echo "scripts/shadacat.py"              |
    Actual:
      |*^                                                  |
      |*[Process exited 0]                                |
      |*                                                  |
      |:terminal echo "scripts/shadacat.py"              |
    To print the expect() call that would assert the current screen state, use
    screen:snapshot_util(). In case of non-deterministic failures, use
    screen:redraw_debug() to show all intermediate screen states.
    stack traceback:
            test/functional/ui/screen.lua:579: in function '_wait'
            test/functional/ui/screen.lua:361: in function 'expect'
            test/functional/terminal/ex_terminal_spec.lua:248: in function <test/functional/terminal/ex_terminal_spec.lua:245>
2019-12-22 11:23:39 +01:00
79bd8d2ab6 tree-sitter: update vendored tree-sitter runtime
tree-sitter/tree-sitter commit edb569310005c66838b7d69fa60850acac6abeee

Included files are:
lib/include/tree-sitter/*.h
lib/src/*.[ch]
lib/src/unicode/*
LICENSE
2019-12-22 10:35:00 +01:00
781c708c27 Merge #11396 'gen_vimdoc.py: mpack result' [ci skip] 2019-12-22 05:40:31 +01:00
9ea7aeb308 gen_vimdoc.py: rename for clarity
- render_para => fmt_node_as_vimhelp
- Inline parse_parblock() in fmt_node_as_vimhelp()
2019-12-21 20:36:00 -08:00
4657819e80 gen_vimdoc.py: mpack: collect functions in 1 dict
All Nvim API, core Vimscript, and core Lua functions are globally
unique, so there is no need for per-module nested dicts.

BEFORE (generated mpack structure):
    [
      {
        "buffer.c": {
          "nvim__buf_stats": { ... },
          ...
        },
        "window.c": {
          "nvim_win_close": { ... },
          ...
        },
        ...
      }
    ]

AFTER (generated mpack structure):
    [
      {
        "nvim__buf_stats": {
          ...
        },
        "nvim_buf_attach": {
          ...
        },
        "nvim_tabpage_set_var": {
          ...
        },
        "nvim_ui_attach": {
          ...
        },
        "nvim_win_close": {
          ...
        }
      }
    ]
2019-12-21 20:36:00 -08:00
f968dad3bf gen_vimdoc.py: fix "seealso", "xrefs"
- Also fix xrefs ("Deprecated" section)
- Fix "Deprecated" rendering by a weird hack (see comment).
- Eliminate unnecessary use of render_para()
2019-12-21 20:36:00 -08:00
62e365f577 gen_vimdoc.py: mpack: exclude deprecated functions
The `mpack` variable was a tuple, which manifests as an array in the
generated msgpack structure.
- Removes noise from the mpack data (deprecated functions are
  deprecated).
- Eliminates 1 level of nesting.

BEFORE:
    [
      {
        "buffer.c": [
          {
            "nvim__buf_stats": { ... },
            ...
          },
          {
            "buffer_del_line": { ... },
            ...
          },
        ],
        ...
      }
    ]

AFTER:
    [
      {
        "buffer.c": {
          "nvim__buf_stats": { ... },
          ...
        },
        ...
    ]
2019-12-21 20:36:00 -08:00
481da1ce40 gen_vimdoc.py: fix mpack generator
- make parameters_doc a dict intead of a list
  BEFORE:
    "parameters_doc": [
        {
            "buffer": "Buffer handle, or 0 for current buffer"
        }
    ],
  AFTER:
    "parameters_doc": {
        "buffer": "Buffer handle, or 0 for current buffer"
    },
- make "return", "seealso", lists instead of strings
2019-12-21 20:36:00 -08:00
01adb81c55 gen_vimdoc.py: DRY 2019-12-21 20:36:00 -08:00
c60f656839 termdebug.vim: Comment out Winbar related things #11552 2019-12-22 04:45:11 +01:00
64248e64a0 tests: sync Test_undojoin_redo from Vim #11589
This was not added in e0e482589 with Vim patch 8.0.0205.
2019-12-22 04:41:11 +01:00
138480939a vim-patch:8.2.0025: repeated word in comment (#11586)
Problem:    Repeated word in comment.
Solution:   Remove one. (Rene Nyffenegger, closes vim/vim#5384)
fe72d08400
2019-12-21 13:55:14 +01:00
ee7ac469c6 LSP: Use async completion for omnifunc. (#11578) 2019-12-20 22:49:29 -08:00
b2443361ca build: DownloadAndExtractFile.cmake: retry status_code=7 #11582
Retry downloads with "Couldn't connect to server" errors.

Ref: https://lgtm.com/projects/g/neovim/neovim/logs/rev/pr-ca2f193a91f02881deb637f18694818bda49a7ed/lang:cpp/stage:Build%20master_026ba804d173c41ab99ee270c93f7975c1d6d713
2019-12-21 06:39:26 +01:00
416de695f9 Merge pull request #11577 from janlazo/vim-8.2.0019
vim-patch:8.2.{19,24}
2019-12-20 17:25:43 +01:00
a115f23143 vim-patch:8.2.0024: filetype Rego not recognized
Problem:    Filetype Rego not recognized.
Solution:   Add *.rego. (Matt Dunford, closes vim/vim#5376)
a4ce82fe2e
2019-12-20 08:14:54 -05:00
c147806e23 vim-patch:8.2.0019: cannot number of lines of another buffer
Problem:    Cannot number of lines of another buffer.
Solution:   Add "linecount" to getbufinfo(). (Yasuhiro Matsumoto,
            closes vim/vim#5370)
a9e9679de3
2019-12-20 08:14:54 -05:00
026ba804d1 LSP: Improve the display of the default hover callback. (#11576)
Strips the code blocks from markdown and does syntax highlighting.
2019-12-20 02:50:37 -08:00
d00c624ba4 LSP: fix omnifunc findstart (#11522) 2019-12-20 02:46:47 -08:00
65aca4d857 TUI: can make the cursor transparent #11519
when setting 'guicursor' highlight blend=100.
2019-12-19 12:27:21 -08:00
486ddb6eb7 Merge #11572 from janlazo/vim-8.2.0015
vim-patch:8.2.{15,18}
2019-12-19 12:25:25 -08:00
35813c62ed test/old: skip Test_screenpos for now
It fails in CI.
2019-12-18 07:57:45 -05:00
04ebfeb881 vim-patch:8.2.0018: :join does not add white space where it should
Problem:    :join does not add white space where it should. (Zdenek Dohnal)
Solution:   Handle joining multiple lines propely.
91b65e4944
2019-12-18 05:38:59 -05:00
74a547d340 vim-patch:8.2.0015: not all modeline variants are tested
Problem:    Not all modeline variants are tested.
Solution:   Add modeline tests. (Dominique Pelle, closes vim/vim#5369)
e74331db4b
2019-12-17 21:43:48 -05:00
1bfccf0286 Merge #11556 from janlazo/vim-8.2.0002
vim-patch:8.2.{2,8,10,12,13}
2019-12-16 22:16:30 -08:00
3de1bc4bf9 fileio: use uint64_t for temp_count #11555
Band-aid workaround to file collision when using `tempname` for temporary batchfiles.
2019-12-16 22:14:22 -08:00
9e6ebed6f4 vim-patch:8.2.0013: not using a typedef for condstack
Problem:    Not using a typedef for condstack.
Solution:   Add a typedef.
ddef129160
2019-12-16 20:36:11 -05:00
fcd9105018 vim-patch:8.2.0012: some undo functionality is not tested
Problem:    Some undo functionality is not tested.
Solution:   Add a few more test cases. (Dominique Pelle, closes vim/vim#5364)
559b9c68fe
2019-12-16 19:38:29 -05:00
ad5049aa60 vim-patch:8.2.0010: test64 is old style
Problem:    Test64 is old style.
Solution:   Convert to new style test. (Yegappan Lakshmanan, closes vim/vim#5363)
f9cb05c147
2019-12-16 19:38:29 -05:00
06f37709e7 vim-patch:8.2.0008: test72 is old style
Problem:    Test72 is old style.
Solution:   Convert to new style test. (Yegappan Lakshmanan, closes vim/vim#5362)
3e2d1c8cd6
2019-12-16 19:38:28 -05:00
63cd5dd0ae vim-patch:8.2.0002: "dj" only deletes first line of closed fold
Problem:    "dj" only deletes first line of closed fold.
Solution:   Adjust last line of operator for linewise motion. (closes vim/vim#5354)
3b68123cd2
2019-12-16 19:38:28 -05:00
251b20e533 Add support for the pum_getpos() API (#11562)
Add support for the pum_getpos() API
2019-12-16 20:08:55 +01:00
473aea92cb Merge pull request #11564 from jamessan/libcall
libcallnr: Use int, not int64_t, as the return type for Vim compat
2019-12-16 07:32:58 -05:00
6566251d14 Merge remote-tracking branch 'upstream/master' into libcall 2019-12-15 21:17:16 -05:00
9c4223215f libcallnr: Use int, not int64_t, as the return type for Vim compat
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).
2019-12-15 21:17:00 -05:00
9f3d483c79 Merge pull request #7202 from teto/jobstart_env
[RFC] override environment for jobstart
2019-12-13 06:52:48 -05:00
91b313a904 Add negative test for type of job's env option 2019-12-12 07:57:27 -05:00
bc879dd1f1 snap: allow job failure
This thing still fails with "need manual review" error.

Try devmode (again)--since we got approved once, maybe it works now?

ref 49849745f1
ref d9ab83d057
ref #11482
2019-12-12 01:29:11 -08:00
914555b14c version.c: update [ci skip] #11415
vim-patch:8.1.0121: crash when using ballooneval related to 'vartabstop'
vim-patch:8.1.0132: lua tests are old style
vim-patch:8.1.0134: Lua interface does not support funcref
vim-patch:8.1.0758: font number is always one instead of the actual
vim-patch:8.1.0808: MS-Windows: build error with GUI
vim-patch:8.1.1767: FEAT_SESSION defined separately
vim-patch:8.1.1958: old style comments taking up space
vim-patch:8.1.2327: cannot build with Hangul input
vim-patch:8.1.2328: a few hangul input pieces remain
vim-patch:8.1.2352: CI doesn't cover FreeBSD
vim-patch:8.1.2354: Cirrus CI runs on another repository
vim-patch:8.1.2359: cannot build without FEAT_FLOAT
vim-patch:8.1.2370: build problems on VMS
vim-patch:8.1.2372: VMS: failing realloc leaks memory
vim-patch:8.1.2374: unused parts of libvterm are included
vim-patch:8.1.2376: preprocessor indents are incorrect
vim-patch:8.1.2383: using old C style comments
vim-patch:8.1.2404: channel test fails under valgrind
vim-patch:8.1.2407: proto files, dependencies and build instructions outdated
vim-patch:8.1.2409: creating the distribution doesn't work as documented
vim-patch:8.1.2410: MS-Windows: test_iminsert fails without IME support
vim-patch:8.1.2413: cannot update ex_cmdidxs.h on MS-Windows
vim-patch:8.1.2414: MS-Windows: properties dialog box shows wrong character
vim-patch:8.1.2417: MinGW/Cygwin build does not clean up all files
vim-patch:8.1.2423: MS-Windows properties shows version as "8, 1, 0"
2019-12-12 00:37:23 -08:00
39963c6a04 os_getenvname_at_index: Handle Windows env vars whose name starts with = 2019-12-11 22:04:29 -05:00
6dc1005787 Add os_getfullenv_size/os_copyfullenv 2019-12-11 22:04:29 -05:00
19b6237087 jobstart now supports env/clear_env
to modify the environment of the launched job.
2019-12-11 21:07:13 -05:00
f3fcaedfad test: new test for setting environment 2019-12-11 21:06:42 -05:00
d9ab83d057 snap: re-enable CI job
ref 49849745f1
ref #11482
2019-12-11 02:27:28 -08:00
3383f1ce26 PVS/V1049: fix numerous "DEFINE_FUNC_ATTRIBUTES" warnings #11544
PVS erroneously flags our DEFINE_FUNC_ATTRIBUTES guard:

  V1049 The 'DEFINE_FUNC_ATTRIBUTES' include guard is already defined in
  the 'lang.h.generated.h' header. The 'profile.h.generated.h' header
  will be excluded from compilation.

To satisfy PVS, just remove the `#ifndef` check. It's not needed anyway:
C allows to redundantly #define a macro.

https://gcc.gnu.org/onlinedocs/cpp/Undefining-and-Redefining-Macros.html

> if an identifier which is currently a macro is redefined, then the new
> definition must be effectively the same as the old one
> ...
> If a macro is redefined with a definition that is not effectively the
> same as the old one, the preprocessor issues a warning and changes the
> macro to use the new definition. If the new definition is effectively
> the same, the redefinition is silently ignored. This allows, for
> instance, two different headers to define a common macro. The
> preprocessor will only complain if the definitions do not match.
2019-12-11 02:21:39 -08:00
39094b3fae jumplist: browser-style (or 'tagstack') navigation #11530
Traditionally, when navigating to a specific location from the middle of
the jumplist results in shifting the current location to the bottom of
the list and adding the new location after it.  This behavior is not
desireable to all users--see, for example
https://vi.stackexchange.com/questions/18344/how-to-change-jumplist-behavior.

Here, another jumplist behavior is introduced.  When jumpoptions (a new
option set added here) includes stack, the jumplist behaves like the
tagstack or like history in a web browser.  That is, when navigating to
a location from the middle of the jumplist

    2 first
    1 second
    0 third <-- current location
    1 fourth
    2 fifth

to a new location the locations after the current location in the jump
list are discarded

    2 first
    1 second
    0 third
            <-- current location

The result is that when moving forward from that location, the new
location will be appended to the jumplist:

    3 first
    2 second
    1 third
    0 new

If the new location is the same

  new == second

as some previous (but not immediately prior) entry in the jumplist,

    2 first
    1 second
    0 third <-- current location
    1 fourth
    2 fifth

both occurrences preserved

    3 first
    2 second
    1 third
    0 second (new)

when moving forward from that location.

It would be desireable to go farther and, when the new location is the
same as the location that is currently next in the jumplist,

    new == fourth

make the result of navigating to the new location by jumping (e.g. 50gg)
be the same as moving forward in the jumplist

    2 first
    1 second
    0 third
    1 new <-- current location
    2 fifth

and simply increment the jumplist index.  That change is NOT part of
this patch because it would require passing the new cursor location to
the function (setpcmark) from all of its callees.  That in turn would
require those callees to know *before* calling what the new cursor
location is, which do they do not currently.
2019-12-10 00:56:56 -08:00
6c22c7ab97 netrw.vim: do not save +/* registers
netrw shouldn't be touching these in the first place.

fix #11089
ref #6892
ref #6695
2019-12-10 00:46:04 -08:00
7111fe9459 doc: LSP [ci skip] #11524 2019-12-10 00:29:39 -08:00
76d1e9360a Merge #11528 from janlazo/vim-8.1.2402
vim-patch:8.1.{2402,2408}
2019-12-07 18:01:15 -08:00
6a4bdeb572 vim-patch:8.1.2408: syntax menu and build instructions outdated
Problem:    Syntax menu and build instructions outdated.
Solution:   Update build instructions and syntax menu.
bfd3433330
2019-12-07 17:39:43 -05:00
7d8f32338f vim-patch:8.1.2402: typos and other small things
Problem:    Typos and other small things.
Solution:   Small fixes.
f48ee3c284
2019-12-07 11:48:55 -05:00
30ed245d00 LSP: Add jump when calling gotodef (#11521) 2019-12-07 03:34:22 -08:00
0e6c6261e1 Fix access on vim.wo (#11517)
* Add more tests for vim.wo
2019-12-07 03:34:02 -08:00
fbae9f8541 runtime/syntax/vim.vim: highlight "blend" keyword #11520 2019-12-05 22:14:54 -08:00
ed424655be vim-patch:8.1.2385: open cmdline window with feedkeys() #11516
Problem:    Opening cmdline window with feedkeys() does not work. (Yegappan
            Lakshmanan)
Solution:   Recognize K_CMDWIN also when ex_normal_busy is set.
85db547598
2019-12-04 23:04:19 -08:00
3aa95ef27e defaults: set nostartofline (#11135)
Having the cursor change column can be surprising.

Force startofline in functional and old tests.
Remove the functional breakindent test, as it's a subset of the oldtest one.
2019-12-03 20:58:03 -08:00
bcd5fc9764 vim-patch:8.1.2384: test 48 is old style #11509
Problem:    Test 48 is old style.
Solution:   Merge test cases into new style test. (Yegappan Lakshmanan,
            closes vim/vim#5307)
079119babe
2019-12-03 20:54:53 -08:00
4598e489c7 test: always pass a string to expect_msg_seq
Seems like pcall doesn't always return a string as a 2nd element of the tuple.
2019-12-03 23:51:30 -05:00
3beef8ee1c defaults: set nostartofline
Having the cursor change column can be surprising.

Force startofline in functional and old tests.
Remove the functional breakindent test, as it's a subset of the oldtest one.
2019-12-03 13:31:17 +01:00
b1e4ec1c2a Merge #11500 from justinmk/api-deprecate
API: rename nvim_execute_lua, deprecate nvim_command_output
2019-12-02 22:38:36 -08:00
a3b6c2a3dc API: rename nvim_execute_lua => nvim_exec_lua
- We already find ourselves renaming nvim_execute_lua in tests and
  scripts, which suggests "exec" is the verb we actually want.
- Add "exec" verb to `:help dev-api`.
2019-12-02 22:06:42 -08:00
c34130d13a API: deprecate nvim_command_output 2019-12-02 20:52:06 -08:00
22b52dd462 log_init: call log_path_init (#11501)
This has to be done after `init_homedir` for XDG default and `set_init_1` for
lookup from env, which could be done earlier likely (to help with
https://github.com/neovim/neovim/issues/10937), but this keeps it in
sync with Vim.

Fixes https://github.com/neovim/neovim/issues/11499.
2019-12-02 22:21:15 +01:00
56be9fbde1 testdir/runnvim.sh: create messages file always (#11503) 2019-12-02 18:26:40 +01:00
0b7a7b23cc oldtest: support for running by filename (#11473)
Follow-up to 8969efca8 (Vim patch 8.1.0723)

NOTE: This changes the main entrypoint for running single oldtest files
to not use/require the ".res" extension anymore.  But it is handled for
B/C.

Adds a phony rule to run oldtest by filename.
Not going through "$(MAKE)" avoids GNUmakefile being used then (which I
use for WIP things), and it seems like SINGLE_MAKE should be used anyway
probably.
2019-12-02 17:18:37 +01:00
7d66a02b88 build: CMakeLists: do not set MIN_LOG_LEVEL with C flags (#11498)
Fixes https://github.com/neovim/neovim/issues/11496.
2019-12-02 17:12:51 +01:00
3b0191e330 src/nvim/testdir/test_quickfix.vim: align with Vim (#11502) 2019-12-02 17:12:26 +01:00
ab860cb5f6 dictwatcher: fix use-after-free #11495
fixes #11494
2019-12-02 02:09:30 -08:00
735d89d09e Merge #11159 'API: nvim_exec'
API: nvim_exec: function to source multiline Vimscript ("anonymous :source")
2019-12-01 23:15:16 -08:00
b1991f66d5 API: rename nvim_source => nvim_exec
- Eliminate nvim_source_output(): add boolean `output` param to
  nvim_exec() instead.
2019-12-01 22:35:15 -08:00
bd43e011b5 API: nvim_source_output
- Similar to nvim_source but will capture the output
- Add meaningful VimL tracebacks for nvim_source
- Handle got_int
- Add error reporting
2019-12-01 19:07:57 -08:00
276c2da286 API: nvim_source: fix multiline input
- DOCMD_REPEAT is needed to source all lines of input.
- Fix ":verbose set {option}?" by handling SID_STR in get_scriptname().

closes #8722
2019-12-01 16:09:24 -08:00
0a8d145075 API: nvim_source: save/restore script context #11159
Use a constant for the script id.
2019-12-01 16:09:24 -08:00
6aa03e86da API: nvim_source 2019-12-01 16:09:24 -08:00
70b6061666 Add vim.startswith and vim.endswith (#11248) 2019-12-01 05:32:55 -08:00
e6da21d128 Add vim.cmd as an alias for nvim_command (#11446) 2019-12-01 05:28:53 -08:00
edca84cfc9 Return nil instead of NIL for vim.env (#11486) 2019-12-01 05:04:57 -08:00
a17ccb0d24 screen.lua: remove screen:_on_event #11488
Tests can redefine the handlers, so we don't need this extra hook.
2019-12-01 01:06:10 -08:00
bff42cd7b3 ci: revisit OpenBSD/FreeBSD config (#11477) 2019-12-01 06:45:35 +01:00
cd6f755cf7 ci: SourceHut: revisit OpenBSD/FreeBSD config 2019-12-01 06:44:35 +01:00
fe927b84de terminfo_is_bsd_console: fallback to false
Ref: https://github.com/neovim/neovim/commit/ab7da4c53138768#r36200515
2019-12-01 06:44:35 +01:00
590082a58f vim-patch:8.1.2367: registers are not sufficiently tested (#11489)
Problem:    Registers are not sufficiently tested.
Solution:   Add a few more test cases. (Yegappan Lakshmanan, closes vim/vim#5288)
71136db1bf
2019-12-01 06:41:40 +01:00
49849745f1 snap: disable job until we are approved
We are waiting for snapcraft.io to review/approve us for "classic" mode.
reverts 1f684cf80a
ref #11482
2019-11-30 15:18:48 -08:00
f700170197 Merge #11483 from janlazo/vim-8.1.2355
vim-patch:8.1.{2355,2363}
2019-11-30 14:32:06 -08:00
5b60023a8c vim-patch:8.1.2363: ml_get error when accessing Visual area in 'statusline'
Problem:    ml_get error when accessing Visual area in 'statusline'.
Solution:   Disable Visual mode when using another window. (closes vim/vim#5278)
dee50a5180
2019-11-30 16:21:33 -05:00
6c6afbcddd doc: mention OS pseudo-features in :h feature-list 2019-11-30 16:21:33 -05:00
7646e73a27 vim-patch:8.1.2355: test with "man" fails on FreeBSD
Problem:    Test with "man" fails on FreeBSD.
Solution:   Use "-P" instead of "--pager".
c7d2a57b3a

Cherry-picked "has('bsd')" from vim-patch:8.1.0846.
Cherry-picked test_normal.vim fix from vim-patch:8.1.2358
2019-11-30 11:42:31 -05:00
f6e7857c54 floatwin: show error if window is closed immediately #11476
Autocmds may close window while it is being entered, then
win_set_minimal_style(wp) operates on an invalid pointer.

We could silently ignore this instead, but it is unlikely to be
intentional, so it is more useful to show an error.

fix #11383
2019-11-29 23:48:14 -08:00
1f684cf80a snap: declare "devmode" instead of "classic" #11482 2019-11-29 10:07:02 -08:00
0a9ecf460a vim-patch:8.1.2315: switchbuf=uselast #11480
Problem:    Not always using the right window when jumping to an error.
Solution:   Add the "uselast" flag in 'switchbuf'. (closes vim/vim#1652)
539aa6b25e
2019-11-29 09:57:27 -08:00
f33371c03f vim-patch:8.1.2017: cannot execute commands after closing cmdline window #11479
Problem:    Cannot execute commands after closing the cmdline window.
Solution:   Also trigger BufEnter and WinEnter. (closes vim/vim#4762)
96e38a86a7

Fixes https://github.com/neovim/neovim/issues/11279.
2019-11-29 09:51:25 -08:00
e138c4c874 Merge pull request #11469 from bfredl/lspdiag
lsp: allow the user to config LspDiagnosticError like any hl group
2019-11-29 12:38:07 +01:00
5c9063cf2d snap: fix line continuation #11475
reverts commit 5298169068.
2019-11-28 20:51:43 -08:00
5298169068 snap: disable job
snap job hangs on travis:
https://travis-ci.org/neovim/neovim/builds/618434882
2019-11-28 20:32:06 -08:00
1bb7ea189e win_line: Fix crash with 'rightleft' in :terminal #11460
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
2019-11-28 20:09:03 -08:00
ad17ef118a deps: update libtermkey to 0.22 #11429 2019-11-28 19:45:43 -08:00
835f959193 Merge #11428 'Update SNAP packaging' 2019-11-28 19:33:51 -08:00
c6d70d1786 snap: more yak-shaving
- generate decryption step
- skip job for PRs
- remove transfer.sh support
- deploy every (master) commit
2019-11-28 19:30:27 -08:00
8501e4a1ff snap: add snapcraft secrets to CI 2019-11-28 15:38:48 -08:00
e160c9b3be snap: add desktop file, icon 2019-11-28 15:38:40 -08:00
6325ec90dc snap: add "snap" job to Travis CI 2019-11-28 15:38:40 -08:00
86867c2f95 snap: fix/update snap builds
* rename to nvim
* bump base to core18
* fix versioning, match binary
* set prefix to /usr
2019-11-28 15:34:12 -08:00
ee1199eaba man.vim: remove K mapping #11472
Since #11457 this mapping is no longer necessary.
'keywordprg' defaults to :Man in options.lua
2019-11-28 14:04:40 -08:00
950690e48a lsp: allow the user to config LspDiagnosticError etc by standard means 2019-11-28 18:48:18 +01:00
7fef0f8db4 runtime: russian-jcukenwintype.vim keymap #11461
Author: Denis Proskurin <danwerspb@gmail.com>
2019-11-27 22:57:11 -08:00
001e69cd46 doc: fix typos
close #11459
2019-11-27 22:47:25 -08:00
86c4a87fe9 Merge #11467 from janlazo/vim-8.1.2345
vim-patch:8.1.{1252,1253,1254,1268,2345,2348,2349}
2019-11-27 22:06:31 -08:00
33beeed4d9 man.vim: Improve ft=man 'iskeyword' #11457
This addresses a minor quality problem with the recent `'tagfunc'`
changes for `man.vim` (see [link]).

Currently, with the cursor on a parenthese, hitting `K` will jump us to
the man page of the next mentioned entry, instead of the one to which
the parenthese (or section number) belongs.

```
pcrepattern(3), terminfo(5), glob(7), regex(7).
       e.g. ^        e.g. ^
```

Adding the parentheses to `'iskeyword'` means we correctly handle these cases too.

[link]: https://github.com/neovim/neovim/pull/11280#discussion_r348342357
2019-11-27 21:01:04 -08:00
585e3ddfc7 vim-patch:8.1.1268: map completion test fails in GUI
Problem:    Map completion test fails in GUI.
Solution:   Skip the test that fails.
510671a055
2019-11-26 22:09:30 -05:00
006beb73c7 vim-patch:8.1.1254: mapping completion contains dead code
Problem:    Mapping completion contains dead code.
Solution:   Remove the code.
61df0c7996
2019-11-26 22:07:53 -05:00
5ee6c3bd71 vim-patch:8.1.1253: mapping completion test fails
Problem:    Mapping completion test fails.
Solution:   Fix expected output.
92b9e60cb5
2019-11-26 22:04:35 -05:00
278a0b8df3 vim-patch:8.1.1252: not all mapping completion is tested
Problem:    Not all mapping completion is tested.
Solution:   Add a few more mapping completion tests.
1776a28e9c
2019-11-26 21:58:04 -05:00
90f2b13604 vim-patch:8.1.2349: :lockvar and :unlockvar cannot be followed by "| endif"
Problem:    :lockvar and :unlockvar cannot be followed by "| endif".
Solution:   Check for following commands. (closes vim/vim#5269)
cc4423ae13
2019-11-26 20:41:51 -05:00
f196ab87a1 vim-patch:8.1.2348: :const cannot be followed by "| endif"
Problem:    :const cannot be followed by "| endif".
Solution:   Check following command for :const. (closes vim/vim#5269)
            Also fix completion after :const.
8f76e6b12b
2019-11-26 20:38:59 -05:00
d697690e24 vim-patch:8.1.2345: .cjs files are not recognized as Javascript
Problem:    .cjs files are not recognized as Javascript.
Solution:   Add the *.cjs pattern. (closes vim/vim#5268)
c1faf3dc38
2019-11-26 20:01:16 -05:00
5f9209389b Merge pull request #11445 from bfredl/fcslcs
options: make 'fillchars' and 'listchars' global-local instead of local-only
2019-11-26 22:10:13 +01:00
a40ae96a38 Merge pull request #11466 from bfredl/luaopt
lua: make vim.wo and vim.bo used nested indexing for specified handle
2019-11-26 21:08:16 +01:00
49a40f425d options: make 'fillchars' and 'listchars' global-local
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
2019-11-26 19:14:54 +01:00
a76a669ac2 lua: make vim.wo and vim.bo used nested indexing for specified handle
Also missing option should be an error. Options are functionality,
not arbitrary variable names (as for vim.g)
2019-11-26 18:44:36 +01:00
f53822d89f Merge pull request #11464 from bfredl/luaexport
cmake: enable exporting symbols from static libs again
2019-11-26 18:41:09 +01:00
3cffd17b2b cmake: enable exporting symbols from static libs again
Reverts the effect of disabling CMP0065 in ac32426 (#11131)
"build: get rid of warnings with `cmake --debug-output`"

We need symbols from statically linked libraries to be exported.
Otherwise cpath lua modules will not find liblua/libluajit
symbols as needed.
2019-11-26 17:34:00 +01:00
6e8c5779cf LSP: Move default buf callbacks to vim.lsp.callbacks (#11452)
- In the process, refactored focusable_preview to a util function.
- Add text for locations_to_items of the current line.
- Improve location callback to handle multiple return values by using
set_qflist.
- Remove update_tagstack and leave note for future travelers.
2019-11-26 05:59:40 -08:00
36d1335a66 UI: emit mouse_on/mouse_off on attach #11455
closes #11372
2019-11-25 08:56:42 -08:00
4a77df2e51 [RFC] extmark: fix E315 in nvim_buf_set_extmark (#11449)
extmark: need to use buf instead of curbuf
2019-11-25 16:50:30 +01:00
fd5710ae9a doc + extmarks tweaks #11421
- nvim_buf_get_extmarks: rename "amount" => "limit"
- rename `set_extmark_index_from_obj`
2019-11-25 01:08:02 -08:00
967f229f32 Merge #11454 from janlazo/vim-8.1.1732
vim-patch:8.1.{223,836,1732}
2019-11-25 01:07:43 -08:00
0ee4df4d96 vim-patch:8.1.0836: user completion test can fail on MS-Windows
Problem:    User completion test can fail on MS-Windows.
Solution:   Allow for other names befor "Administrator".
346d2a359a
2019-11-25 03:29:49 -05:00
226ad89a2c vim-patch:8.1.0223: completing shell command finds sub-directories in $PATH
Problem:    Completing shell command finds sub-directories in $PATH.
Solution:   Remove EW_DIR when completing an item in $PATH. (Jason Franklin)
6ab9e429da
2019-11-25 03:29:49 -05:00
7a0a2eb310 vim-patch:8.1.1732: completion in cmdwin does not work for buffer-local commands
Problem:    Completion in cmdwin does not work for buffer-local commands.
Solution:   Use the right buffer. (closes vim/vim#4711)
f03e328348
2019-11-24 23:37:10 -05:00
edb194f330 Improve terminal close error message formatting (#11434) 2019-11-24 20:18:40 -08:00
8819b5c06e vim-patch:8.1.0461: quickfix: change comment style #11453
Problem:    Quickfix code uses too many /* */ comments.
Solution:   Change to // comments. (Yegappan Lakshmanan)
00bf8cd211
2019-11-24 20:10:25 -08:00
f460bae441 release.sh [ci skip] 2019-11-24 17:53:33 -08:00
544eeeb0d6 Merge #11451 'man.vim: Fixes' 2019-11-24 17:37:47 -08:00
afaa062643 man.vim: Update maintainer email 2019-11-24 20:31:46 -05:00
4ce96e4979 man.vim: Hard wrap by default
Closes #11436
2019-11-24 20:31:46 -05:00
078f279691 man.vim: Document how to disable bold highlighting
Closes #11435
2019-11-24 20:31:18 -05:00
526798a941 man.vim: Ensure 'modifiable' in man#init_pager #11450 2019-11-24 17:30:04 -08:00
d5aaad14ec Followup improvements to LSP (#11430)
Addressing things brought up in https://github.com/neovim/neovim/issues/11389 and beyond.

- Bugfix for empty dictionary serialization.
- Reduce markdown previews of code.
- Refactor method triggers to `lsp.buf.*` methods
- Switch to v:lua and get rid of vim interface.
- Get rid of filetype config in favor of something from https://github.com/neovim/nvim-lsp
- Switch error messages to something which doesn't require `ENTER` because if an LSP goes crazy, it'll block neovim.
- Rename `builtin_callbacks` to `default_callbacks`
- Resolve callback at time of calling using default_callbacks instead of at client creation
- Make hover/signatureHelp preview focusable so you can mess with it.
- Add vim.lsp.util.set_qflist and vim.lsp.util.set_loclist and vim.lsp.util.locations_to_items().
- Add apply_textedit and tests which enables a new class of features.
- Fix column offsets in character and bytes in vim.lsp.buf to be correct.

New methods:
- Add textDocument/references under vim.lsp.buf.references()
- Finish textDocument/rename
- Finish textDocument/rangeFormatting and textDocument/format
2019-11-24 04:44:50 -08:00
a9036502dc Bring vim into local scope 2019-11-24 03:14:03 -08:00
b35f6aa9dd Add support for textDocument/references.
Add set_qflist and set_loclist.
- Also add locations_to_items, which calculates byte offsets for
character positions in files and avoids unnecessary operations.
2019-11-24 03:01:18 -08:00
b78fdd7ce5 Merge branch 'master' into lsp-followup 2019-11-24 02:29:23 -08:00
d0d38fc36e Lua: vim.env, vim.{g,v,w,bo,wo} #11442
- Add vim variable meta accessors: vim.env, vim.{g,v,w,bo,wo}
- Redo gen_char_blob to generate multiple blobs instead of just one
  so that multiple Lua modules can be inlined.
- Reorder vim.lua inclusion so that it can use previously defined C
  functions and utility functions like vim.shared and vim.inspect things.
- Inline shared.lua into nvim, but also keep it available in runtime.
2019-11-24 02:28:48 -08:00
f7c20b94c7 Merge branch 'master' into lsp-followup 2019-11-24 01:22:16 -08:00
222637c341 vim-patch:8.1.1334: respect shortmess=F when buffer is hidden #11443
Problem:    When buffer is hidden "F" in 'shortmess' is not used.
Solution:   Check the "F" flag in 'shortmess' when the buffer is already
            loaded. (Jason Franklin)  Add test_getvalue() to be able to test
            this.
eda652215a

test_getvalue() is not implemented.
It is only used for checking "need_fileinfo" internal variable.
2019-11-23 21:56:58 -08:00
2aa7b10114 Merge #11431 from janlazo/vim-8.1.1235
vim-patch:8.1.{471,723,1235,1490,1951,2183,2269,2329,2330}
2019-11-23 18:57:24 -08:00
d410812311 UI tweaks.
- Hide diagnostics on client exit
- Stop insert on popup focus.
- Hide popup on insertchar (for signature_help)
2019-11-23 16:14:24 -08:00
42c53d266a Merge remote-tracking branch 'origin/master' into lsp-followup 2019-11-23 14:28:54 -08:00
61d2a12743 Merge pull request #11382 from bfredl/extmark_bufhl
use extmark adjustment for bufhl. use vim code for within-line adjustments.
2019-11-23 22:06:43 +01:00
4c532f5469 vim-patch:8.1.0471: some tests are flaky or fail on some systems
Problem:    Some tests are flaky or fail on some systems.
Solution:   Increase waiting time for port number. Use "cmd /c" to execute
            "echo" on win32. (Ken Takata, closes vim/vim#3534)
453ce7c16b
2019-11-23 15:44:41 -05:00
7d5988feee tests: remove irrelevant timing info 2019-11-23 21:26:16 +01:00
ddf509c2ba test was wrong 2019-11-23 16:46:47 +01:00
2cc83c961c refactor: use inserted_bytes pattern from vim
This covers all "small" inserts and deletes in insert mode, as well
as a few more cases like small normal mode deletes

vim-patch:8.1.0678: text properties as not adjusted for inserted text
2019-11-23 16:46:47 +01:00
bdebe8516c bufhl: use extmark column adjustment for bufhl
NB: this is not the final implementation. Bufhl should be made a
part of the extmark tree, so that "start" adjustment just works
automatically. But "stop" will still need some ad-hoc trickery,
until extended marks natively support ranges (hopefully sooner than
forever).
2019-11-23 14:50:31 +01:00
7639ccdd0d vim-patch:8.1.1951: mouse double click test is a bit flaky
Problem:    Mouse double click test is a bit flaky.
Solution:   Add to list of flaky tests.  Update a couple of comments.
f1699968ba
2019-11-22 23:43:01 -05:00
cb107d28a0 vim-patch:8.1.2330: vi' does not always work when 'selection' is exclusive
Problem:    vi' does not always work when 'selection' is exclusive.
Solution:   Adjust start position.
94d9f4fa65
2019-11-22 20:10:12 -05:00
3d7d52ee8b vim-patch:8.1.2329: mouse multiple click test is a bit flaky
Problem:    Mouse multiple click test is a bit flaky.
Solution:   Add it to the list of flaky tests.
44f0bd878a
2019-11-22 20:10:12 -05:00
273ab19452 vim-patch:8.1.2183: running a test is a bit verbose
Problem:    Running a test is a bit verbose.
Solution:   Silence some messages. (Daniel Hahler, closes vim/vim#5070)
ba089307bb
2019-11-22 20:10:12 -05:00
a6714cf35c vim-patch:8.1.1490: when a single test fails the exit code is not set
Problem:    When a single test fails the exit code is not set. (Daniel Hahler)
Solution:   Add an exit command. (closes vim/vim#4506)
4e0bf84627
2019-11-22 20:10:12 -05:00
8969efca8c vim-patch:8.1.0723: cannot easily run specific test when in src/testdir
Problem:    Cannot run specific test when in src/testdir the same was as in
            the src directory.
Solution:   Move build rule to src/testdir/Makefile.
ec50401e1e

Developer can omit '.res' suffix now.
TEST_FILE=test_syntax make oldtest
or
make -C src/nvim/testdir test_syntax
2019-11-22 20:10:12 -05:00
970329ff8d vim-patch:8.1.2269: tags file with very long line stops using binary search
Problem:    Tags file with very long line stops using binary search.
Solution:   Reallocate the buffer if needed.
dc9ef26845
2019-11-22 20:10:11 -05:00
0f29deec80 vim-patch:8.1.1235: compiler warnings for using STRLEN() value
Problem:    Compiler warnings for using STRLEN() value.
Solution:   Cast to int. (Christian Brabandt, Mike Williams)
c0af78fa08
2019-11-22 20:10:11 -05:00
d5f14b8372 Clear 'cc' in nvim_open_win 'minimal' style #11361 (#11427)
* Clear 'cc' in nvim_open_win 'minimal' style #11361

Add 'colorcolumn' to the list of options that should be cleared when creating
a 'minimal'-style floating window.
2019-11-22 10:55:04 +01:00
73487f4130 Improve the character_offset code. 2019-11-22 00:31:10 -08:00
78991ffbf4 Improve performance of util.set_lines + bugfix
Also permit character_offset for col past the end of line (useful in
range formatting).
2019-11-22 00:02:04 -08:00
a3d67dac5f Fix encoding translation in other places. 2019-11-21 16:23:12 -08:00
c055ca00ce Remove comments. 2019-11-21 15:55:45 -08:00
43d73ee884 Fix position params for encoding. 2019-11-21 15:41:32 -08:00
da07e71b18 Account for character length in jump position. 2019-11-21 15:34:28 -08:00
b4ca07896c lualint 2019-11-21 15:23:43 -08:00
b27965538d Fix hovers staying on bufhidden 2019-11-21 15:20:32 -08:00
bcae04f6c6 Updates
- Use correct implementation of text_edits.
- Send indent options to rangeFormatting and formatting.
- Remove references to vim bindings and filetype from lsp.txt
- Add more examples to docs.
- Add before_init to allow changing initialize_params.
2019-11-21 15:19:06 -08:00
b5f99a8d73 Fix terminal close error message formatting 2019-11-21 14:56:36 -08:00
6a51401378 Merge remote-tracking branch 'origin/master' into lsp-followup 2019-11-21 10:04:32 -08:00
cc5487e32f Merge pull request #11433 from bfredl/lspeol
lsp: transmit "\n" after last line when 'eol' is set
2019-11-21 12:45:52 +01:00
76e0a8bd93 lsp: transmit "\n" after last line when 'eol' is set
Otherwise some servers like clangd will emit spurious
"no newline at end of file" warnings.
2019-11-21 11:12:57 +01:00
b7170f2d72 Remove resolve_bufnr/lualint 2019-11-20 20:59:52 -08:00
7bf766ad09 Use the apply_text_edits from util. 2019-11-20 20:59:12 -08:00
6d9f48ddcf Fix reference in rename. 2019-11-20 20:57:21 -08:00
6fc409d593 Add full text_edit implementation.
- Implements textDocument/formatting, textDocument/rangeFormatting,
workspace/applyEdit.
TODO:
- still has edge cases around replacement probably. Only tested with
inserts on the same position.
2019-11-20 20:51:44 -08:00
b984f613c1 Extend list_extend to take start/finish. 2019-11-20 17:09:21 -08:00
9b7f956715 Use err_message in default_callbacks 2019-11-20 16:39:45 -08:00
4c7ef3754a Satisfy lualint. 2019-11-20 16:37:23 -08:00
93beae4f31 Fix rename support. 2019-11-20 16:35:11 -08:00
1e16b3cf28 Spaces not tabs. 2019-11-20 16:16:36 -08:00
c40f8600d2 Change error writer to not be annoying. 2019-11-20 16:16:13 -08:00
03eb88848c Change callback resolution to be dynamic.
This allows default_callbacks to be specified after client creation to
be considered. Also it simplifies the code.
2019-11-20 16:09:03 -08:00
a4b7004f48 Move everything to buf & default_callbacks
- Rename builtin_callbacks to default_callbacks and slightly change its
semantics:
  - No longer contains the default implementations. Instead, any
  default_callbacks will be used in preference for our .buf methods.
  - Add this to the docs.
2019-11-20 16:03:32 -08:00
2d580756ca Add everything to lsp.buf and get rid of autoload. 2019-11-20 15:35:18 -08:00
c83380cf80 Add lsp.buf and hover implementation. 2019-11-20 14:21:57 -08:00
ff65cc990a Bugfix. Don't use nvim.lua that doesn't exist :) 2019-11-20 11:41:45 -08:00
568b454088 Add vim.uri_to_bufnr 2019-11-20 11:39:54 -08:00
0904ffe387 Bugfixes.
- Return after an error in RPC.
- Use an empty vim table for serialization.
2019-11-20 11:36:50 -08:00
3ae9b3781e Bugfix for floating_preview
Don't modify your inputs.
2019-11-20 11:34:10 -08:00
69a0712a9c Reduce code blocks in markdown previews.
If the preview is just a code block, then use the language as the
filetype instead of using markdown.
This reduces the size of the preview.
2019-11-20 11:23:50 -08:00
525bb1b55d Merge #11280 "man.vim: implement 'tagfunc'" 2019-11-20 00:31:22 -08:00
182d3cebcf Merge #11426 from janlazo/vim-8.0.1449
vim-patch:8.0.{1449,1793}
2019-11-19 21:32:48 -08:00
756e2b5f65 vim-patch:8.0.1793: no test for "vim -g"
Problem:    No test for "vim -g".
Solution:   Add a test for "-g" and "-y".
248be5c5de
2019-11-19 21:36:28 -05:00
025399aedb vim-patch:8.0.1449: slow redrawing with DirectX
Problem:    Slow redrawing with DirectX.
Solution:   Avoid calling gui_mch_flush() unnecessarily, especially when
            updating the cursor. (Ken Takata, closes vim/vim#2560)
a338adcf22
2019-11-19 20:33:09 -05:00
629ea19994 deps: upgrade bundled LuaRocks: 2.4.4 => 3.2.1 (#10292)
Changelog: https://github.com/luarocks/luarocks/compare/v2.4.4..v3.2.1#diff-4ac32a78649ca5bdd8e0ba38b7006a1e
2019-11-19 19:10:30 +01:00
1ff5b60cb9 vim-patch:8.1.0251: support full paths for 'backupdir' #11269
Problem:    Using a full path is supported for 'directory' but not for
            'backupdir'. (Mikolaj Machowski)
Solution:   Support 'backupdir' as well. (Christian Brabandt, closes vim/vim#179)
b782ba475a
2019-11-17 23:38:27 -08:00
b1c4a8191e version.c: update [ci skip] #11160
vim-patch:8.0.1405: duplicated code for getting a typed character

vim-patch:8.1.0828: still using FEAT_VIRTUALEDIT
vim-patch:8.1.1971: manually enabling features causes build errors
vim-patch:8.1.2000: plugin cannot get the current IME status
vim-patch:8.1.2119: memory access error for empty string
vim-patch:8.1.2122: cannot build without terminal feature
vim-patch:8.1.2123: parsing CSI sequence is messy
vim-patch:8.1.2128: renamed libvterm sources makes merging difficult
vim-patch:8.1.2130: MSVC build fails
vim-patch:8.1.2132: MS-Windows: screen mess when not recognizing insider build
vim-patch:8.1.2138: including the build number in the Win32 binary is confusing
vim-patch:8.1.2144: side effects when using t_ti to enable modifyOtherKeys
vim-patch:8.1.2157: libvterm source files missing from distribution
vim-patch:8.1.2160: cannot build with +syntax but without +terminal
vim-patch:8.1.2163: cannot build with +spell but without +syntax
vim-patch:8.1.2170: cannot build without the +termresponse feature
vim-patch:8.1.2179: pressing "q" at the more prompt doesn't stop Python output
vim-patch:8.1.2186: error for bad regexp even though regexp is not used
vim-patch:8.1.2196: MS-Windows: running tests with MSVC lacks updates
vim-patch:8.1.2199: build failure when using normal features without GUI
vim-patch:8.1.2201: cannot build with dynamically linked Python 3.8
vim-patch:8.1.2202: MS-Windows: build failure with GUI and small features
vim-patch:8.1.2203: running libvterm tests without the +terminal feature
vim-patch:8.1.2204: crash on exit when closing terminals
vim-patch:8.1.2209: LF in escape codes may be expanded to CR-LF
vim-patch:8.1.2217: compiler warning for unused variable
vim-patch:8.1.2224: cannot build Amiga version
vim-patch:8.1.2237: mode() result depends on whether CURSOR_SHAPE is defined
vim-patch:8.1.2248: CTRL-W dot does not work when modifyOtherKeys is enabled
vim-patch:8.1.2254: MS-Windows: mouse scroll wheel doesn't work in popup
vim-patch:8.1.2255: ":term ++shell" does not work on MS-Windows
vim-patch:8.1.2256: test for ":term ++shell" fails on MS-Windows
vim-patch:8.1.2260: terminal test may fail on MS-Windows
vim-patch:8.1.2271: build error if FEAT_TAG_BINS is not defined
vim-patch:8.1.2284: compiler warning for unused variable
vim-patch:8.1.2291: memory leak when executing command in a terminal
vim-patch:8.1.2301: MS-Windows GUI: drawing error when background color changes
vim-patch:8.1.2311: warning for missing function prototype
vim-patch:8.1.2316: FORTIFY_SOURCE can also be present in CPPFLAGS
vim-patch:8.1.2318: MS-Windows GUI: main background shows in toolbar

https://github.com/neovim/neovim/pull/11215
vim-patch:8.1.0084: user name completion does not work on MS-Windows
vim-patch:8.1.0085: no test for completing user name and language
vim-patch:8.1.0361: remote user not used for completion
2019-11-17 19:19:52 -08:00
d547c8d9ad Merge #11414 from janlazo/vim-8.1.2312
vim-patch:8.1.{2312,2314,2317}
2019-11-17 19:18:40 -08:00
af53a0c012 doc: Lua [ci skip] #11378
- Rework :help lua-commands
- Rename if_lua.txt => lua.txt
2019-11-17 19:06:59 -08:00
6ca3e6bfa9 vim-patch:8.1.2317: no test for spell affix file with flag on suffix
Problem:    No test for spell affix file with flag on suffix.
Solution:   Add a test case.
37ff4cf870
2019-11-17 21:55:56 -05:00
f484d3b2d4 vim-patch:8.1.2314: vi' sometimes does not select anything
Problem:    vi' sometimes does not select anything.
Solution:   Recognize an empty selection. (Christian Brabandt, closes vim/vim#5183)
7170b295b0
2019-11-17 21:51:19 -05:00
e4b185893f vim-patch:8.1.2312: "line:" field in tags file not used
Problem:    "line:" field in tags file not used.
Solution:   Recognize the field and use the value. (Andy Massimino, Daniel
            Hahler, closes vim/vim#5232, closes vim/vim#2546, closes vim/vim#1057)
077b9dd354
2019-11-17 21:37:52 -05:00
54402d6b8f Merge #11340 'Factor out parse_one_cmd()'
This will allow us to reuse the parsing logic elsewhere, namely for
'inccommand' logic, so we don't need to duplicate it for changes such as the
repeated colon fix in #11319.
2019-11-17 15:53:30 -08:00
91f4bb0aee TUI: use stdio names instead of magic numbers #11410 2019-11-17 12:58:58 -08:00
1f0fc4e452 build/macOS: set -fno-stack-check for LuaJIT build #11412
Fixes LuaJIT build on macOS Catalina.
ref https://github.com/LuaJIT/LuaJIT/issues/521
ref https://github.com/Homebrew/homebrew-core/pull/46823
2019-11-17 12:55:25 -08:00
97f1222005 provider/python: add python3.8 executable (#11402)
Python 3.8 was released 2019-10-14:

  https://www.python.org/dev/peps/pep-0569
2019-11-17 14:23:17 +01:00
a45890e82e Merge #11406 from janlazo/vim-8.1.1922
vim-patch:8.1.{1922,2289,2305}
2019-11-16 18:43:03 -08:00
7116a41e30 tutor: change arrows (--->) to symbols ✗ and ✓ #11404
* Display ✓ or ✗ based on the line user sees
* Add vim-tutor-mode expectations to the lines marked with an arrow.
* Fix some existing expectations to behave predictably.
2019-11-16 15:35:32 -08:00
3056ff4b8c vim-patch:8.1.2305: no warning for wrong entry in translations
Problem:    No warning for wrong entry in translations.
Solution:   Check semicolons in keywords entry of desktop file.
e53ec39270
2019-11-16 16:41:29 -05:00
b83027858a vim-patch:8.1.2289: after :diffsplit closing the window does not disable diff
Problem:    After :diffsplit closing the window does not disable diff.
Solution:   Add "closeoff" to 'diffopt' and add it to the default.
c823477979
2019-11-16 16:40:25 -05:00
da7bb53d99 diff: move diff globals to diff.h 2019-11-16 16:40:25 -05:00
7274f5c177 vim-patch:8.1.1922: in diff mode global operations can be very slow
Problem:    In diff mode global operations can be very slow.
Solution:   Do not call diff_redraw() many times, call it once when redrawing.
            And also don't update folds multiple times.
4f57eefe1e
2019-11-16 16:40:24 -05:00
d3ef88db63 Merge pull request #11338 from bfredl/vvlua
v:lua and better error messages for vimL->lua
2019-11-16 22:36:32 +01:00
dab40f43b1 Add v:lua.func() vimL syntax for calling lua
Also simplify error messages when calling lua from vimL.
2019-11-16 22:33:21 +01:00
18096631b1 Merge pull request #11399 from bfredl/markundo
extmark: do not crash in read-only buffer
2019-11-16 12:01:53 +01:00
ebdf90e7d7 extmark: don't crash in RO buffer. 2019-11-16 11:58:32 +01:00
6222cca36a undo: delete undo_off global without effect 2019-11-16 11:03:43 +01:00
d79164c9f9 vim-patch:8.1.0992: :normal resets reg_executing() result #11398
Problem:    A :normal command while executing a register resets the
            reg_executing() result.
Solution:   Save and restore reg_executing. (closes vim/vim#4066)
cce713ddcc
2019-11-16 00:34:25 -08:00
4bd7881fce [scripts/gen_vimdoc.py] Generate better-formatted mpack
Changes the generated msgpack result values in the runtime/doc/*.mpack
files to be formatted like this (instead of being formatted like Vim help text):
    [
        'nvim_win_get_var': {
                'signature': 'nvim_win_get_var({window}, {name}, {err})',
                'parameters': [('Window', 'window'), ('String', 'name'), ('Error *', 'err')],
                'parameters_doc': [{'window': 'Window handle, or 0 for current window', 'name': 'Variable name'}],
                'doc': ['Gets a window-scoped (w:) variable'],
                'return': ['Variable value'],
                'seealso': []
            }
        },
        ...
    ]
2019-11-15 20:00:13 -06:00
e3b08a0fc4 Merge #11384 from janlazo/vim-8.1.2293
vim-patch:8.1.{927,2293}
2019-11-14 00:02:29 -08:00
570ee5f404 f_getenv/setenv: Access v_special when v_type is VAR_SPECIAL #11388
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.
2019-11-13 21:34:10 -08:00
a0c18bf201 spell: fix clang logic error
https://neovim.io/doc/reports/clang/report-487b01.html#EndPath
https://neovim.io/doc/reports/clang/report-ce4c3c.html#EndPath
2019-11-13 19:25:40 -05:00
c2ceed4994 quickfix: fix dead assignment
Cherry-picked from vim patch 8.1.1489.
2019-11-13 19:25:40 -05:00
6989ac05f4 vim-patch:8.1.0927: USE_CR is never defined
Problem:    USE_CR is never defined.
Solution:   Remove usage of USE_CR. (Ken Takata, closes vim/vim#3958)
0059074008
2019-11-13 19:25:39 -05:00
0cb6fc804d vim-patch:8.1.2293: join adds trailing space when second line is empty
Problem:    Join adds trailing space when second line is empty. (Brennan
            Vincent)
Solution:   Do not add a trailing space.
cc184cfb09
2019-11-13 19:25:39 -05:00
807e4039cb Sort man pages by relevance during goto_tag() 2019-11-13 22:00:11 +00:00
18c5f6ab9f Don't attempt swapfiles for man pages
This is because we now use :tag to open a man page, which attempts
to open a swap file for a path under man://...
2019-11-13 21:57:17 +00:00
aeee41192b Remove eventignore - :Man now uses :tag to populate the page 2019-11-13 21:56:28 +00:00
63abe3ca19 Factor out parse_one_cmd()
This will allow us to reuse the parsing logic elsewhere,
namely for inccommand logic.
2019-11-13 21:05:47 +00:00
c512dffb55 vim-patch:8.1.0266: parsing Ex address range is not a separate function
Problem:    Parsing Ex address range is not a separate function.
Solution:   Refactor do_one_cmd() to separate address parsing.
ee8415bc59
2019-11-13 20:59:21 +00:00
00dc12c5d8 lua LSP client: initial implementation (#11336)
Mainly configuration and RPC infrastructure can be considered "done". Specific requests and their callbacks will be improved later (and also served by plugins). There are also some TODO:s for the client itself, like incremental updates.

Co-authored by at-tjdevries and at-h-michael, with many review/suggestion contributions.
2019-11-13 21:55:26 +01:00
db436d5277 Merge #11376 'extmark: renames, docs' 2019-11-12 00:05:26 -08:00
a24eff0e27 extmark: fix spelling of "Extmark"
The spelling "Extmark" is used almost everywhere, so don't spell it
"ExtMark" inconsistently.
2019-11-11 22:12:59 -08:00
2d7e1c32a8 extmark: rename ExtendedMark => Extmark 2019-11-11 22:12:59 -08:00
54473e9a67 doc [ci skip] 2019-11-11 22:12:59 -08:00
0190de9aab Merge #11307 'Lua: vim.validate()' 2019-11-11 21:25:16 -08:00
8d70335b00 vim-patch:8.1.0622: adding quickfix items marks items as valid errors #11373
Problem:    Adding quickfix items marks items as valid errors. (Daniel Hahler)
Solution:   Check when items are valid. (Yegappan Lakshmanan, closes vim/vim#3683,
            closes vim/vim#3633)
9752c72f49
2019-11-11 21:24:25 -08:00
122426966e Merge pull request #11356 from bfredl/extmark2
extmark API feature
2019-11-11 21:48:14 +01:00
18a8b702c0 extmark: review changes 2019-11-11 20:18:15 +01:00
a9065a5051 nsmarks: initial commit 2019-11-11 19:43:15 +01:00
e757f4d536 namespace: add ns_initialized func 2019-11-11 19:43:15 +01:00
181486d7e6 api: fix typo in debug function name 2019-11-11 19:25:10 +01:00
f59e1f58a2 Lua: mark some functions as "private"
Problem:  scripts/gen_vimdoc.py gets confused and tries to generate docs
          for `fn_index` and `func`.
Solution: Rename them to be private.
2019-11-11 00:43:02 -08:00
7a3d3257db fix nvim__buf_stats
Accidentally renamed in 1cb4674547.
2019-11-10 23:43:49 -08:00
a0d992785f Lua: Use vim.validate() instead of assert() 2019-11-10 23:43:49 -08:00
7aa4042d3b Lua: vim.validate() 2019-11-10 23:43:49 -08:00
678a51b1da Lua: vim.validate()
We often want to do type checking of public function arguments.

- test: Rename utility_function_spec.lua to vim_spec.lua
- .luacov: Map lua module names
2019-11-10 22:50:24 -08:00
b9c9283f72 spellfile.vim: improve error message for missing spellfile
Problem:  If spellfile is missing, then "set spell" in modeline/sandbox
          fails with a non-obvious error.
Solution: Check for sandbox early and give a meaningful error.
          Fixes #11359

Test case:
    # test.latex has `% vim: set spelllang=hu:`
    # no spell file for `hu` yet!
    nvim -u NORC --cmd 'autocmd FileType tex setlocal spell' --cmd 'set modeline' test.latex

Before:
    No spell file for "hu" in utf-8
    Download it?
    Downloading hu.utf-8.spl...
    Error detected while processing /usr/local/share/nvim/runtime/autoload/netrw.vim:
    line  583:
    E12: Command not allowed from exrc/vimrc in current dir or tag search: au WinEnter *^Iif &ft == "netrw"|call s:NetrwInsureWinVars()|endif
    Error detected while processing function spellfile#LoadFile[60]..spellfile#Nread[13]..netrw#NetRead[4]..<SNR>67_NetrwOptionsSave:
    line   66:
    E171: Missing :endif
    Error detected while processing function spellfile#LoadFile[60]..spellfile#Nread:
    line   13:
    E171: Missing :endif
    Error detected while processing function spellfile#LoadFile:
    line   60:
    E171: Missing :endif
    Error detected while processing modelines:
    line    1:
    E12: Command not allowed from exrc/vimrc in current dir or tag search

After:
    Error detected while processing function spellfile#LoadFile:
    line    5:
    E605: Exception not caught: Cannot download spellfile in sandbox/modeline. Try ":set spell" from the cmdline.
    Error detected while processing modelines:
    line    1:
    E12: Command not allowed from exrc/vimrc in current dir or tag search
2019-11-10 12:35:45 -08:00
06a020af09 Merge pull request #11366 from bfredl/flakycat
tests: vim.rpcnotify test is flaky
2019-11-10 19:26:40 +01:00
d200a818a7 tests: vim.rpcnotify test is flaky 2019-11-10 17:13:53 +01:00
1cb4674547 api: add nvim_buf_get_virtual_text() (#11354)
This adds the missing partner function of nvim_buf_set_virtual_text().
2019-11-10 16:38:04 +01:00
3a075ce3dc Merge pull request #11310 from bfredl/luarpc
lua: add vim.rpcrequest, vim.rpcnotify and vim.NIL
2019-11-10 14:46:14 +01:00
474d0bcbf7 lua: vim.rpcrequest, vim.rpcnotify, vim.NIL 2019-11-10 13:08:05 +01:00
ece3d19b02 Merge #11004 'test/Screen:expect: support "{MATCH:…}"' 2019-11-09 23:16:52 -08:00
4abb67c027 test/Screen:expect: replace "{IGNORE}" with "{MATCH:…}"
ref #11004
2019-11-09 22:26:01 -08:00
c0abaf9ca6 tests: Screen:expect: support "{MATCH:…}" 2019-11-09 21:58:28 -08:00
268252c8c7 Merge #11343 from janlazo/vim-8.1.2244
vim-patch:8.1.{324,1091,2244,2258,2262,2268,2270,2272}
2019-11-09 21:55:28 -08:00
7a23b67d35 paste: Select-mode, Visual-mode #11360
fix #11344
2019-11-09 21:18:51 -08:00
099c38efed quickfix: fix pvs/v547 2019-11-09 10:11:56 -05:00
6e42eb4dc9 vim-patch:8.1.0324: off-by-one error in cmdidx check
Problem:    Off-by-one error in cmdidx check. (Coverity)
Solution:   Use ">=" instead of ">".
74c8be2c68

Fix pvs/v557.
2019-11-09 09:58:33 -05:00
2ed23af9b2 vim-patch:8.1.2272: test may hang at more prompt
Problem:    Test may hang at more prompt.
Solution:   Reset 'more' after resetting 'compatible'. (Michael Soyka)
34059e7b67
2019-11-09 09:58:32 -05:00
2a59ae0f1d vim-patch:8.1.2270: "gf" is not tested in Visual mode
Problem:    "gf" is not tested in Visual mode.
Solution:   Add Visual mode test and test errors. (Dominique Pelle,
            closes vim/vim#5197)
0208b6b771
2019-11-09 09:58:32 -05:00
805a577f71 vim-patch:8.1.2268: spell file flag zero is not recognized
Problem:    Spell file flag zero is not recognized.
Solution:   Use -1 as an error value, so that zero can be used as a valid flag
            number.
3d2a47c782
2019-11-09 09:58:32 -05:00
3e2f7baf21 vim-patch:8.1.2262: unpack assignment in function not recognized
Problem:    Unpack assignment in function not recognized.
Solution:   Skip over "[a, b]". (closes vim/vim#5051)
1e673b9eb6
2019-11-09 09:58:32 -05:00
c3cb54b5ff vim-patch:8.1.1091: MS-Windows: cannot use multi-byte chars in environment var
Problem:    MS-Windows: cannot use multi-byte chars in environment var.
Solution:   Use the wide API. (Ken Takata, closes vim/vim#4008)
f0908e6fe1
2019-11-09 09:58:32 -05:00
697b0d73a7 vim-patch:8.1.2258: may get hit-enter prompt after entering a number
Problem:    May get hit-enter prompt after entering a number. (Malcolm Rowe)
Solution:   Put back accidentally deleted lines. (closes vim/vim#5176)
dc968e7a45
2019-11-09 09:58:32 -05:00
b8a56e0986 vim-patch:8.1.2244: 'wrapscan' is not used for "gn"
Problem:    'wrapscan' is not used for "gn".
Solution:   Only reset 'wrapscan' for the first search round. (closes vim/vim#5164)
82cf7f6df7
2019-11-09 09:58:31 -05:00
5689008060 build: add shlint target for shellcheck (#11350) 2019-11-09 13:39:01 +01:00
9fb278ddea vim-patch.sh: multiline printf -> heredoc (#11351)
The following script is cut out from vim-patch.sh:

```sh
#!/usr/bin/env bash

BASENAME=vim-patch.sh

printf "\nInstructions:
To port one of the above patches to Neovim, execute this script with the patch revision as argument and follow the instructions, e.g.
'%s -p v8.0.1234', or '%s -P v8.0.1234'

NOTE: Please port the _oldest_ patch if you possibly can.
      You can use '%s -l path/to/file' to see what patches are missing for a file.
" "${BASENAME}" "${BASENAME}" "${BASENAME}"
```

The code itself should be correct, but shellcheck 0.7.0 says:

```
In /tmp/test.sh line 5:
  printf "\nInstructions:
         ^-- SC2183: This format string has 2 variables, but is passed 3 arguments.
```

We also had a problem before that a `%s` was added, but the accompanying
argument to printf was forgotten. Using a heredoc is less error-prone, since we
insert variables directly.
2019-11-08 20:47:58 +01:00
2ba212e8c2 vim-patch.sh: add missing argument
[skip ci]
2019-11-08 15:18:01 +01:00
f79369d420 Merge #11277 'doc [ci skip]' 2019-11-06 01:49:33 -08:00
9ef16a1628 doc: vim.fn, vim.call(), vim.api [ci skip] 2019-11-06 01:37:50 -08:00
c66297452c doc: file-change-detect [ci skip] 2019-11-05 21:50:48 -08:00
3e21d49836 Merge #11319 'inccommand: fix issues with modifiers and prompting' 2019-11-05 17:34:21 -08:00
4f124702c0 Simplify + inline/align comment 2019-11-05 18:56:54 +00:00
610755ff62 Merge PR #11291 from shanesmith/vim-8.1.1256-take2 2019-11-04 12:28:31 +01:00
e2b54fda72 autocmd: Fix event name casing #11332
Affects getcompletion()
2019-11-04 16:18:06 +09:00
93626b8af9 Merge pull request #10994 from bfredl/colorindex
allow pass through of :terminal palette colors with termguicolors
2019-11-03 11:07:40 +01:00
f707a7ef68 terminal: add tests for palette color forwarding 2019-11-03 10:14:58 +01:00
75ad558747 Merge #11324 from janlazo/vim-8.1.2235
vim-patch:8.1.{2235,2236}
2019-11-03 05:13:52 +09:00
1c43fb1d51 syntax: zero-init local structs
Fix https://neovim.io/doc/reports/clang/report-ee5dbd.html#EndPath
2019-11-02 14:38:28 -04:00
6c5772f7da quickfix: fix pvs/v547 error 2019-11-02 14:26:49 -04:00
4a5adae950 vim-patch:8.1.2236: ml_get error if pattern matches beyond last line
Problem:    Ml_get error if pattern matches beyond last line.
Solution:   Adjust position if needed. (Christian Brabandt, closes )
bb26596242
2019-11-02 12:21:15 -04:00
33cdff1b5c test/screen: make snapshot_util() work properly in rgb_cterm mode 2019-11-02 11:01:58 +01:00
cbaba19001 terminal: preserve support for g:terminal_color_X = "#1234ab" 2019-11-02 11:01:58 +01:00
31137e9bc7 highlight: correctly disable index attribute with combine/blend 2019-11-02 11:01:58 +01:00
08fe10010a terminal: enable pass through indexed colors to TUI 2019-11-02 11:01:58 +01:00
0cee300194 Simplify split_success logic 2019-11-02 09:31:48 +00:00
eb509dc7c5 tui: simplify branching of rgb vs cterm colors 2019-11-02 09:58:25 +01:00
63ab994fba vim-patch:8.1.2235: "C" with 'virtualedit' set does not include multi-byte char
Problem:    "C" with 'virtualedit' set does not include multi-byte char.
Solution:   Include the whole multi-byte char. (Nobuhiro Takasaki,
            closes vim/vim#5152)
77ccc00340
2019-11-01 22:29:48 -04:00
90981f5861 update_version_stamp.lua: Use NUL on Windows #11323 2019-11-02 04:54:59 +09:00
471427d045 vim-patch:8.1.2231: introduce gM command #11321
Problem:    Not easy to move to the middle of a text line.
Solution:   Add the gM command. (Yasuhiro Matsumoto, closes vim/vim#2070)
8b530c1ff9
2019-11-01 13:43:20 +09:00
98d7c7db12 Minor updates and comment format fixes
- cursel argument for qf_list_entry() changed from int to bool
- Return type of qf_list_has_valid_entries() changed from int to bool
- Unnecessary size_t casting in qf_new_list removed
- Use Doxygen-style comment blocks for functions
2019-11-01 00:25:51 -04:00
36b4191e41 Document skip_colon_white() 2019-10-31 23:21:14 +00:00
d04ab11f24 Prevent prompts during inccommand previews
For example, "Backwards range given, OK to swap (y/n)?" on each keypress.
2019-10-31 19:22:22 +00:00
d52d782389 Prevent :topleft, etc modifying the inccommand preview window 2019-10-31 19:16:52 +00:00
1f6ce1f97d Only apply 'icm' substitutions when preview was successfully opened 2019-10-31 19:16:52 +00:00
1c7aa11312 Allow multiple leading colons before and after modifiers for 'inccommand' 2019-10-31 19:16:52 +00:00
3b3d217754 Factor out skip_colon_white() 2019-10-31 19:16:52 +00:00
d4384cbbf3 Remove unnecessary expr in 'icm' test 2019-10-31 18:55:43 +00:00
efaf4732e2 lua/executor.c: use TRY_WRAP 2019-10-29 22:39:07 -07:00
c6afad78d3 man.vim: remove push_tag and simplify man#open_page 2019-10-29 18:41:30 +00:00
83b6d9f197 termdebug.vim: reset evalFromBalloonExprResult #11309
The value is used again in case of a pointer and it will cause errors then.
2019-10-28 21:05:49 -07:00
a4d48d37c1 vim-patch:8.1.1256: cannot navigate through errors relative to the cursor
Problem:    Cannot navigate through errors relative to the cursor.
Solution:   Add :cabove, :cbelow, :labove and :lbelow. (Yegappan Lakshmanan,
            closes vim/vim#4316)
3ff33114d7
2019-10-27 23:43:47 -04:00
cf7c34dea1 vim-patch:8.1.1112: duplicate code in quickfix file
Problem:    Duplicate code in quickfix file.
Solution:   Move code into functions. (Yegappan Lakshmanan, closes vim/vim#4207)
87f59b09ea
2019-10-27 23:24:54 -04:00
c222f3e006 vim-patch:8.1.1098: quickfix code duplication
Problem:    Quickfix code duplication.
Solution:   Refactor the qf_init_ext() function. (Yegappan Lakshmanan,
            closes vim/vim#4193)
95946f1209
2019-10-27 23:15:28 -04:00
e55eac92c6 vim-patch:8.1.1062: quickfix code is repeated
Problem:    Quickfix code is repeated.
Solution:   Define FOR_ALL_QFL_ITEMS(). Move some code to separate functions.
            (Yegappan Lakshmanan, closes vim/vim#4166)
a16123a666
2019-10-27 22:42:29 -04:00
5a212a96a6 Merge #11276 from h-michael/module-pattern
Use module pattern with vim/shared.lua
2019-10-27 15:43:38 -07:00
fdd243bf3b Merge #11303 from janlazo/vim-8.1.1245
vim-patch:8.1.{1245,2154}
2019-10-27 14:30:36 -07:00
31536ae003 provider/pythonx: don't assume CWD (empty string) is in path #11304
sys.path.remove("") raises ValueError if the item is missing.

https://docs.python.org/3/library/functions.html#filter:
> filter(function, iterable) is equivalent to the generator expression (item
> for item in iterable if function(item))

fixes #11293
2019-10-27 14:27:22 -07:00
d10d7aed79 vim-patch:8.1.1030: quickfix function arguments are inconsistent
Problem:    Quickfix function arguments are inconsistent.
Solution:   Pass a list pointer instead of info and index. (Yegappan
            Lakshmanan, closes vim/vim#4135)
0398e00a1b
2019-10-27 16:25:59 -04:00
7714c9e210 vim-patch:8.1.1006: repeated code in quickfix support
Problem:    Repeated code in quickfix support.
Solution:   Move code to functions. (Yegappan Lakshmanan, closes vim/vim#4091)
4aa47b28f4
2019-10-27 16:19:17 -04:00
0f93528d1f vim-patch:8.1.0532: cannot distinguish between quickfix and location list
Problem:    Cannot distinguish between quickfix and location list.
Solution:   Add an explicit type variable. (Yegappan Lakshmanan)
2d67d307ee
2019-10-27 16:19:17 -04:00
8d10241a62 vim-patch:8.1.0488: using freed memory in quickfix code
Problem:    Using freed memory in quickfix code. (Dominique Pelle)
Solution:   Add the quickfix_busy() flag to postpone deleting quickfix lists
            until it is safe. (Yegappan Lakshmanan, closes #3538)
9f84ded38b
2019-10-27 16:17:35 -04:00
f0dc110f31 vim-patch:8.1.0469: too often indexing in qf_lists[]
Problem:    Too often indexing in qf_lists[].
Solution:   Use a qf_list_T pointer. (Yegappan Lakshmanan)
108e7b422b
2019-10-27 15:33:30 -04:00
b041096ed4 vim-patch:8.1.0407: quickfix code mixes using the stack and a list pointer
Problem:    Quickfix code mixes using the stack and a list pointer.
Solution:   Use a list pointer in more places. (Yegappan Lakshmanan,
            closes vim/vim#3443)
fe15b7dfa6
2019-10-27 15:33:30 -04:00
a123050c1a vim-patch:8.1.0252: quickfix functions are too long
Problem:    Quickfix functions are too long.
Solution:   Refactor. (Yegappan Lakshmanan, closes vim/vim#2950)
de3b3677f7
2019-10-27 15:33:29 -04:00
e085cacba4 Merge pull request #11302 from bfredl/luacall
lua: add vim.fn.{func} for direct access to vimL function
2019-10-27 19:49:30 +01:00
8ee7c94a92 lua: add vim.fn.{func} for direct access to vimL function
compared to vim.api.|nvim_call_function|, this fixes some typing issues
due to the indirect conversion via the API. float values are preserved
as such (fixes #9389) as well as empty dicts/arrays.

Ref https://github.com/norcalli/nvim.lua for the call syntax
2019-10-27 17:23:17 +01:00
0f7a645f54 vim-patch:8.1.2154: quickfix window height wrong when there is a tabline
Problem:    Quickfix window height wrong when there is a tabline. (Daniel
            Hahler)
Solution:   Take the tabline height into account. (closes vim/vim#5058)
1142a31b8c
2019-10-27 11:35:11 -04:00
7c26be61bb vim-patch:8.1.1245: ":copen 10" sets height in full-height window
Problem:    ":copen 10" sets height in full-height window. (Daniel Hahler)
Solution:   Don't set the height if the quickfix window is full height.
            (closes vim/vim#4325)
36d502225c
2019-10-27 11:31:10 -04:00
f9da267373 scripts/lua2dox.lua: Remove class declaration block
Judging class definitions in the form "string.find (line, '=% s * class% (')"
must force writing class definitions in this format, but such a mechanism is Absent.
Also, Lua has no formal class in the language specification, and implements inheritance with setmetadable.
To detect this, we should have a parser for it, not a simple regular expression.
2019-10-27 11:58:28 +09:00
479c014122 Merge #11298 from janlazo/vim-8.1.2220
vim-patch:8.1.2220
2019-10-26 19:19:03 -07:00
0cf694e83e ci: do not skip before_install on lint job 2019-10-26 21:19:02 -04:00
3bee2f1604 ci: use python3 for flake8
'make pylint' fails if flake8 runs on python2.
2019-10-26 20:27:03 -04:00
c3d81a4902 vim-patch:8.1.2220: :cfile does not abort like other quickfix commands
Problem:    :cfile does not abort like other quickfix commands.
Solution:   Abort when desired. Add tests for aborting. (Yegappan Lakshmanan,
            closes vim/vim#5121)
6a0cc916bd
2019-10-26 20:23:53 -04:00
6d8fe9b3f4 lint 2019-10-26 16:21:22 -07:00
46bde66147 gen_vimdoc.py: dump API docs to msgpack #11296
Convenient for API clients who want to reuse the API docs in their own
docs. Could be used e.g. to eliminate nvim.net's own doxygen parser:
3a736232a4/src/NvimClient.APIGenerator/Docs

TODO: currently the result values are formatted as Vim help docs. We
should change the values to have structure, something like this:

    [{
      'nvim_win_get_var': [
        'line1,
        'line2',
        [ 'item1', 'item2', ... ]
      ],
      'nvim_win_set_var': [
        ...
      ],
      ...
    }]

close #11296
2019-10-26 15:31:15 -07:00
726c8c7d74 win/dist: nvim-qt v0.2.15 #11295 2019-10-26 13:18:14 -07:00
ad532d3c66 Merge #11294 from tomtomjhj/vim-8.1.2173
vim-patch:8.1.{2173,2207,2218}
2019-10-26 12:50:51 -07:00
4b5e2f7a0b tests: remove some redundant legacy tests #11028
These were turned into new-style Vim tests in cbecae46f.
2019-10-26 12:43:38 -07:00
ec5776d92d build: add -fstack-protector* to linker #11292
Needed by chromeOS.
fixes #11228
2019-10-26 12:36:26 -07:00
6dcc1d1005 vim-patch:8.1.2218: "gN" is off by one in Visual mode
Problem:    "gN" is off by one in Visual mode.
Solution:   Check moving forward. (Christian Brabandt, vim/vim#5075)
453c19257f
2019-10-27 03:35:19 +09:00
c26466ae8b vim-patch:8.1.2207: "gn" doesn't work quite right
Problem:    "gn" doesn't work quite right. (Jaehwang Jerry Jung)
Solution:   Improve and simplify the search logic. (Christian Brabandt,
            closes vim/vim#5103, closes vim/vim#5075)
edaad6e0a0
2019-10-27 03:35:19 +09:00
034077ed1c vim-patch:8.1.2173: searchit() has too many arguments
Problem:    Searchit() has too many arguments.
Solution:   Move optional arguments to a struct.  Add the "wrapped" argument.
92ea26b925
2019-10-27 03:35:19 +09:00
19ba36d0e1 Merge #11271 from h-michael/add-more-info
lua/vim.shared: improve some validation messages
2019-10-26 02:30:40 -07:00
316c29bbf3 test/pcall_err(): truncate full paths, omit linenr
ref #11271
2019-10-26 02:00:58 -07:00
996a057fb9 lua/stdlib: adjust some validation messages #11271
close #11271
2019-10-26 00:27:01 -07:00
91b831da8b Merge #11275 from janlazo/ci/nodejs
ci/nodejs: use node v10, prefer shell builtins in ci scripts
2019-10-25 22:26:15 -07:00
0b771cd9aa vim-patch:8.1.0859: handle multibyte "%v" in 'errorformat' #11285
Problem:    "%v" in 'errorformat' does handle multi-byte characters.
Solution:   Handle multi-byte characters. (Yegappan Lakshmanan, closes vim/vim#3700)
c45eb770a5
2019-10-25 22:17:21 -07:00
99aa166cb1 man.vim: never switch to non-man window #11286
In order to find if there was already an open man page, the :Man command
would cycle through each window to see if &ft=='man'. This triggers
autocmds, e.g. BufEnter, unnecessarily and can have unexpected
side-effects.

Change the logic to check each window's ft without switching to it
unless it is actually a man window.

Signed-off-by: Joshua Rubin <me@jawa.dev>
2019-10-25 09:41:22 -07:00
ec205f4b9b ci: simplify tree-sitter-cli install
Remove useless `npm link` for tree-sitter-cli.
Use powershell builtins.
2019-10-25 07:24:57 -04:00
9b22b69454 CI/Appveyor: set powershell strict mode
Set-PSDebug produces too much noise and has global scope.
Strict mode is scoped to the script context and catches errors.
2019-10-25 07:24:56 -04:00
c065b0d75f CI: bump nodejs to v10.x (LTS)
v8.x will be EOL at end of 2019.
nvm on Travis has outdated LTS aliases.
2019-10-25 07:24:56 -04:00
4f4f5ef4fd Merge #11213 from janlazo/vim-8.1.0014
vim-patch:8.1.{14,288,345,410,434,438,455}
2019-10-24 20:41:39 -07:00
ced2a38ad4 tag: fix pvs/v547 error 2019-10-24 22:40:30 -04:00
0173bdf98b man.vim: parse the section from the tag 2019-10-24 22:15:57 +01:00
2f0412e61d man.vim: :Man preserves the tag stack 2019-10-24 22:15:57 +01:00
63f0ca3263 man.vim: use 'tagfunc' instead of remapping
man#pop_tag() is also no longer used
2019-10-24 21:15:18 +01:00
ed72d9597d man.vim: pull out s:get_paths() 2019-10-24 21:15:16 +01:00
8daefa348e vim-patch:8.1.0455: checking for empty quickfix stack is not consistent
Problem:    Checking for empty quickfix stack is not consistent.
Solution:   Use qf_stack_empty(). (Yegappan Lakshmanan)
019dfe6855
2019-10-23 01:33:17 -04:00
aa8f059397 vim-patch:8.1.0438: the ex_make() function is too long
Problem:    The ex_make() function is too long.
Solution:   Split it into several functions. (Yegappan Lakshmanan)
b434ae2a1f
2019-10-23 01:33:16 -04:00
279ff23379 vim-patch:8.1.0434: copy_loclist() is too long
Problem:    copy_loclist() is too long.
Solution:   Split in multiple functions. (Yegappan Lakshmanan)
09037503ea
2019-10-23 01:33:16 -04:00
8257d49ff6 vim-patch:8.1.0410: the ex_copen() function is too long
Problem:    The ex_copen() function is too long.
Solution:   Refactor to split off two functions. (Yegappan Lakshmanan)
476c0db002
2019-10-23 01:33:16 -04:00
f3d6d8750b vim-patch:8.1.0345: cannot get the window id associated with the location list
Problem:    Cannot get the window id associated with the location list.
Solution:   Add the "filewinid" argument to getloclist(). (Yegappan
            Lakshmanan, closes vim/vim#3202)
c9cc9c78f2
2019-10-23 01:33:16 -04:00
5e02bd071e vim-patch:8.1.0288: quickfix code uses cmdidx too often
Problem:    Quickfix code uses cmdidx too often.
Solution:   Add is_loclist_cmd(). (Yegappan Lakshmanan)
396659592f
2019-10-23 01:33:16 -04:00
6dceaf3361 vim-patch:8.1.0014: qf_init_ext() is too long
Problem:    qf_init_ext() is too long.
Solution:   Split it into multiple functions. (Yegappan Lakshmanan,
            closes vim/vim#2939)
6053f2d29a
2019-10-23 01:33:15 -04:00
53b025887e Merge #11261 from janlazo/vim-8.1.2185
vim-patch:8.1.{2185,2188,2190,2197}
2019-10-22 21:09:45 -07:00
9e4db2ef50 Merge #11199 from bobrippling/vim-8.1.1228
vim-patch:8.1.{1099,1228,1962} add 'tagfunc'
2019-10-22 20:27:35 -07:00
c2fc4255f9 runtime: Use module pattern with vim/shared.lua
It's a bit cumbersome for us to add an export target every time we define a new function.
It's also cumbersome to care about the order of definition when creating a new function by referring to other functions in the module.
2019-10-23 10:50:42 +09:00
3b6b528ea9 vim-patch:8.1.1962: leaking memory when using tagfunc()
Problem:    Leaking memory when using tagfunc().
Solution:   Free the user_data. (Dominique Pelle, closes vim/vim#4886)
55008aad50
2019-10-22 20:13:02 +01:00
194f7bface vim-patch:8.1.1228: not possible to process tags with a function
Problem:    Not possible to process tags with a function.
Solution:   Add tagfunc() (Christian Brabandt, Andy Massimino, closes vim/vim#4010)
45e18cbdc4
2019-10-22 20:13:02 +01:00
e284b7233f Perform HASHTAB_ITER bookkeeping before user-code
The `HASHTAB_ITER` logic keeps track of how many entries in the hash
table are left to visit, decrementing this on each iteration of the
loop. This was previously decremented at the end of the loop body:

```c
size_t hi##todo_ = hi##ht_->ht_used;
for (hashitem_T *hi = hi##ht_->ht_array; hi##todo_; hi++) {
  if (!HASHITEM_EMPTY(hi)) {
    {
      <user code, macro-inserted>
    }
    hi##todo_--; // <--- important decrement here
  }
}
```

This meant that if the body of the loop (substituted in via macro
expansion) contained a `continue` statement, we'd skip decrementing our
counter, meaning we'd iterate too many times over the hash table,
usually leading to an out of bounds read beyond the hash table's
memory, or uninitialised/null pointers from unused hash table slots.

Decrementing `hi##todo` before the arbitrary loop body protects us from
this, and has no adverse side-effects since only the macro code can (or
should) use this variable.

Before this commit, no code within `HASHTAB_ITER()` contained a
`continue`, meaning this bug was left dormant and the fix has a very
minimal chance of introducing any bugs.
2019-10-22 19:55:55 +01:00
c067efa696 vim-patch:8.1.2197: ExitPre autocommand may cause accessing freed memory
Problem:    ExitPre autocommand may cause accessing freed memory.
Solution:   Check the window pointer is still valid. (closes vim/vim#5093)
34ba06b6e6
2019-10-21 07:34:06 -04:00
13a6878d18 vim-patch:8.1.2190: syntax test fails on Mac
Problem:    Syntax test fails on Mac.
Solution:   Limit the window size to 20 rows.
83e9a1ce75
2019-10-21 07:34:05 -04:00
60415a5d3a vim-patch:8.1.2188: build error for missing define
Problem:    Build error for missing define.
Solution:   Add missing change.
2b78ab5d0c

These "WILD_" macros are used in earlier vim patches.
2019-10-21 07:34:05 -04:00
f4cbe96488 vim-patch:8.1.2185: syntax test fails
Problem:    Syntax test fails.
Solution:   Add missing file patch.
bbfd1562ae
2019-10-21 07:34:05 -04:00
02393a0c74 ci/install.sh: pin treesitter to v0.15.9 #11266
When "tree-sitter test" is executed, query test is also executed, but "tree-sitter-c" does not have query test yet, so cli version that does not include query test execution To use.

ref e14e285a10
2019-10-20 22:53:00 -07:00
2e4465e058 vim-patch:8.1.2168: heredoc not skipped in if-block #11265
Problem:    Heredoc assignment not skipped in if block.
Solution:   Check if "skip" is set.

b1ba9abcb3

Fixes https://github.com/neovim/neovim/issues/11264
2019-10-20 17:17:25 -07:00
6fd6f4683d TUI/thread: guard env map from potential race with unibilium #11259
unibi_from_term calls getenv internally, so exclusive control is required.
2019-10-20 15:47:08 -07:00
019c8d13dd build/doc/CI: remove/update quickbuild references #11258 2019-10-19 18:04:08 -07:00
06a6828f01 Merge #11211 from jbradaric/vim-8.1.1585
vim-patch:8.1.{1585,1625,1723,1729}
2019-10-19 15:23:14 -07:00
93fe30593b ex_echo: fix check for got_int #11225
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
2019-10-19 14:45:27 -07:00
029b828693 Merge #11249 from janlazo/vim-8.1.2151
vim-patch:8.1.{2151,2152,2161,2162,2175,2177,2178}
2019-10-19 14:17:22 -07:00
d89ec55c45 test/functional: retry/Screen: failure instead of error #11173
- Running out of retries, or unexpected screen state should make the
  test FAIL, not ERROR.
- Uses levels to report the location of the caller.
- Improve message with retry-failure (formatting).

Before:

    [ RUN      ] test: 103.53 ms ERR
    test/functional/helpers.lua:388:
    retry() attempts: 1
    test/functional/ui/screen.lua:587: Row 1 did not match.
    Expected:
      |*X^                         |
      |{0:~                        }|
      |{0:~                        }|
      |                         |
    Actual:
      |*^                         |
      |{0:~                        }|
      |{0:~                        }|
      |                         |

    To print the expect() call that would assert the current screen state, use
    screen:snapshot_util(). In case of non-deterministic failures, use
    screen:redraw_debug() to show all intermediate screen states.

    stack traceback:
            test/functional/helpers.lua:388: in function 'retry'
            test/functional/test_spec.lua:24: in function <test/functional/test_spec.lua:23>

After:

    [ RUN      ] test: 105.22 ms FAIL
    test/functional/test_spec.lua:24: stopping after 1 retry() attempts.
    test/functional/test_spec.lua:25: Row 1 did not match.
    Expected:
      |*X^                         |
      |{0:~                        }|
      |{0:~                        }|
      |                         |
    Actual:
      |*^                         |
      |{0:~                        }|
      |{0:~                        }|
      |                         |

    To print the expect() call that would assert the current screen state, use
    screen:snapshot_util(). In case of non-deterministic failures, use
    screen:redraw_debug() to show all intermediate screen states.

    stack traceback:
            test/functional/helpers.lua:389: in function 'retry'
            test/functional/test_spec.lua:24: in function <test/functional/test_spec.lua:23>
2019-10-19 14:15:07 -07:00
3de4dc539a vim-patch:8.1.2180: Error E303 is not useful when 'directory' is empty (#11257)
Problem:    Error E303 is not useful when 'directory' is empty.
Solution:   Skip the error message. (Daniel Hahler, vim/vim#5067)
00e192becd
2019-10-19 14:11:31 -07:00
68b0873c45 vim-patch:8.1.2182: test42 seen as binary by git diff #11256
Problem:    Test42 seen as binary by git diff.
Solution:   Add .gitattributes file.  Make explicit that 'cpo' does not
            contain 'S'. (Daniel Hahler, closes vim/vim#5072)
5b39d7adb0
2019-10-19 11:31:50 -07:00
d27fc08257 vim-patch:8.1.2178: accessing uninitialized memory in test
Problem:    Accessing uninitialized memory in test.
Solution:   Check if there was a match before using the match position.
            (Dominique Pelle, closes vim/vim#5088)
15ee567809
2019-10-19 11:59:09 -04:00
437fe261ab vim-patch:8.1.2177: Dart files are not recognized
Problem:    Dart files are not recognized.
Solution:   Add a filetype rule. (Eugene Ciurana, closes vim/vim#5087)
afbdb905c3
2019-10-19 11:55:32 -04:00
1e4a9f9993 vim-patch:8.1.2175: meson files are not recognized
Problem:    Meson files are not recognized.
Solution:   Add the meson filetype. (Liam Beguin , Nirbheek Chauhan,
            closes vim/vim#5056)  Also recognize hollywood.
c3bf7b56f2
2019-10-18 23:23:14 -04:00
6c6abd11f7 vim-patch:8.1.2151: state test is a bit flaky
Problem:    State test is a bit flaky.
Solution:   Add to the list of flaky tests.
3c8cd4a1dc
2019-10-18 23:19:55 -04:00
7ba26ef3c0 vim-patch:8.1.2162: popup resize test is flaky
Problem:    Popup resize test is flaky. (Christian Brabandt)
Solution:   Add the function to the list of flaky tests.
4e03933726
2019-10-18 23:19:55 -04:00
c54a7e586b vim-patch:8.1.2161: mapping test fails
Problem:    Mapping test fails.
Solution:   Run the test separately.
4bd88d568a
2019-10-18 23:19:55 -04:00
0e0d4a7b4c vim-patch:8.1.2152: problems navigating tags file on MacOS Catalina
Problem:    Problems navigating tags file on MacOS Catalina.
Solution:   Use fseek instead of lseek. (John Lamb, fixes vim/vim#5061)
27fc8cab22
2019-10-18 23:19:54 -04:00
175ca82ca7 tests: let_spec: enable "multibyte env var to child process" (#11233) 2019-10-18 20:41:24 +02:00
84aa86afb7 build: do not build test fixtures by default (#11230)
- tty-test is also used on Windows
- FUNCTIONALTEST_PREREQS: add printenv-test
2019-10-18 16:32:56 +02:00
4bbad54817 tests: fix non-controversial misuse of pending (#11247)
Ref: https://github.com/neovim/neovim/pull/11184
2019-10-18 04:46:30 +02:00
0785f8e8b1 vim-patch:8.1.2140: "gk" and "gj" do not work correctly in number column #11208
Problem:    "gk" and "gj" do not work correctly in number column.
Solution:   Allow for a negative "curswant". (Zach Wegner, closes vim/vim#4969)
ceba3dd518
2019-10-17 01:24:23 -07:00
94bda2fec8 Merge #11215 from erw7/vim-8.1.0084
vim-patch:8.1.{84,85,361}
2019-10-17 01:19:30 -07:00
913d01bb03 vim-patch:8.1.2096: too many #ifdefs #11229
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_COMMENTS.
8c96af9c05

Fixes https://github.com/vim/vim/issues/4972.
2019-10-17 00:44:10 -07:00
c5c06665ed scripts/vim-patch.sh: lazily update Vim source (#11207)
This gets done only initially, for `-l`, and when a commit cannot be found.

Also provide more compact instructions with `-l` / `show_vimpatches`.
2019-10-16 15:44:38 +02:00
932edf4f33 tests: tui_spec: fix waiting for terminal to be ready (#11232)
The screen would have '-- TERMINAL --' already initially.

Related to flakiness of "TUI FocusGained/FocusLost in terminal-mode".
2019-10-15 20:50:51 +02:00
2e14dffbb4 deps: pass LDFLAGS+=-static (#11138)
This is required when `build_old_libs=no` is used in `libtool`.

Fixes https://github.com/neovim/neovim/issues/11198
2019-10-14 15:16:58 +02:00
d0efc1c906 mac: fix "tags file not sorted" bug on Catalina (#11222)
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
2019-10-14 13:58:41 +02:00
8add4cb8fd vim-patch 8.1.0361: remote user not used for completion
Problem:    Remote user not used for completion. (Stucki)
Solution:   Use $USER too. (Dominique Pelle, closes #3407)
6b0b83f768
2019-10-14 15:07:10 +09:00
ba082885d2 Merge pull request #11206 from bfredl/testattr
tests/refactor: make screen.ui use "linegrid" representation internally
2019-10-13 23:43:06 +02:00
5cf6beb221 scripts/vim-patch.sh -l: display commit subjects
Closes https://github.com/neovim/neovim/pull/11182.
2019-10-13 23:14:33 +02:00
cc0d725230 tests/ui: completely delete "attr_ignore" feature
All existing usages are ad-hoc/random/lazyness. Generating attribute
specifications is not hard since four years, just do it always.
2019-10-13 22:10:42 +02:00
4987311fb5 tests/ui: remove unnecessary screen:detach()
It is perfectly fine and expected to detach from the screen just by
the UI disconnecting from nvim or exiting nvim. Just keep detach() in
screen_basic_spec, to get some coverage of the detach method itself.

This avoids hang on failure in many situations (though one could argue
that detach() should be "fast", or at least "as fast as resize",
which works in press-return already).

Never use detach() just to change the size of the screen, try_resize()
method exists for that specifically.
2019-10-13 22:10:42 +02:00
a330129a28 tests/ui: cleanup illegitimate usages of "attr_ignore"
"attr_ignore" is an anti-pattern, with snapshot_util()
just include all the highlights already.
2019-10-13 22:10:42 +02:00
5a85699425 tests/ui: make screen.lua use "linegrid" representation internally
PR #8221 took a short-cut when implementing the tests: screen.lua would
translate the linegrid highlight ids back into the old per-cell
attribute description.

Apart from cleaning up technical debt, this enables to check both rgb
and cterm colors in the same expect(), which previously was needlessly
restricted to ext_hlstate tests only.
2019-10-13 22:10:42 +02:00
76f548a476 vim-patch:8.1.1729: heredoc with trim not properly handled in function
Problem:    Heredoc with trim not properly handled in function.
Solution:   Allow for missing indent. (FUJIWARA Takuya, closes vim/vim#4713)
ecaa75b4ce
2019-10-13 11:54:54 +02:00
3b894b1cb1 vim-patch:8.1.1723: heredoc assignment has no room for new features
Problem:    Heredoc assignment has no room for new features. (FUJIWARA Takuya)
Solution:   Require the marker does not start with a lower case character.
            (closes vim/vim#4705)
2458200729
2019-10-13 11:54:54 +02:00
fcc24d0df3 vim-patch:8.1.1625: script line numbers are not exactly right
Problem:    Script line numbers are not exactly right.
Solution:   Handle heredoc and continuation lines better. (Ozaki Kiichi,
            closes vim/vim#4611, closes vim/vim#4511)
bc2cfe4672
2019-10-13 11:54:54 +02:00
b89e970cfb vim-patch 8.1.0085: no test for completing user name and language
Problem:    No test for completing user name and language.
Solution:   Add tests. (Dominique Pelle, closes #2978)
5f8f2d378a
2019-10-13 17:48:01 +09:00
14c611ed77 vim-patch 8.1.0084: user name completion does not work on MS-Windows
Problem:    User name completion does not work on MS-Windows.
Solution:   Use NetUserEnum() to get user names. (Yasuhiro Matsumoto)
828c3d7083
2019-10-13 17:34:08 +09:00
6c012b0624 vim-patch:8.1.1585: :let-heredoc does not trim enough
Problem:    :let-heredoc does not trim enough.
Solution:   Trim indent from the contents based on the indent of the first
            line.  Use let-heredoc in more tests.
e7eb92708e
2019-10-13 00:03:27 +02:00
dd49a130ff vim-patch:8.1.1099: the do_tag() function is too long
Problem:    The do_tag() function is too long.
Solution:   Factor parts out to separate functions.  Move simplify_filename()
            to a file where it fits better. (Andy Massimino, closes vim/vim#4195)
b4a6020ac6
2019-10-12 12:17:10 +01:00
9af0fe529d recovery mode (-r/-L): use headless_mode (#11187)
Fixes https://github.com/neovim/neovim/issues/11181.
2019-10-11 19:17:11 +02:00
401398bc4b vim-patch:8.1.2125: fnamemodify() fails when repeating :e
Problem:    Fnamemodify() fails when repeating :e.
Solution:   Do not go before the tail. (Rob Pilling, closes vim/vim#5024)
b189295b72
2019-10-10 22:33:42 -07:00
5f60861f5a fnamemodify: fix handling of :r after :e #11165
- Test fnamemodify()
- Test handling of `expand("%:e:e:r")`.
- Fix :e:e:r on filenames with insufficiently many extensions

During `fnamemodify()`, ensuring that we don't go before the filename's
tail is insufficient in cases where we've already handled a ":e"
modifier, for example:

```
"path/to/this.file.ext" :e:e:r:r
         ^    ^-------- *fnamep
         +------------- tail
```

This means for a ":r", we'll go before `*fnamep`, and outside the bounds
of the filename. This is both incorrect and causes neovim to exit with
an allocation error.

We exit because we attempt to calculate `s - *fnamep` (line 23948).
Since `s` is before `*fnamep`, we caluclate a negative length, which
ends up being interpreted as an amount to allocate, causing neovim to
exit with ENOMEM (`memory.c:xmalloc`).

We must instead ensure we don't go before `*fnamep` nor `tail`.
The check for `tail` is still relevant, for example:

```
"path/to/this.file.ext" :r:r:r
 ^       ^------------- tail
 +--------------------- *fnamep
```
Here we don't want to go before `tail`.

close #11165
2019-10-10 22:33:42 -07:00
a7fc2f3f64 test: "!:&" works with powershell #11201
Removed 'echo' alias because it does not behave like POSIX echo.
2019-10-10 21:30:20 -07:00
b772b86d2b Remove "highbright bold" conversion. Fixes #11190
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).
2019-10-10 23:59:59 +02:00
6768c43e21 update_version_stamp: redirect stderr on first try, --first-parent #11186
Avoid noise during builds:

> fatal: No annotated tags can describe '417449f468c4ba186954f6295b3338fb55ee7b4a'.
> However, there were unannotated tags: try --tags.

This might be useful in general, but is expected to not happen - and
falling back is OK then.  The fallback command would still display
errors then.

It also uses `--first-parent`, which is important for when a release
branch gets merged back.
2019-10-10 01:38:15 -07:00
51f2826f61 doc: update shellquote for powershell #11122
shellquote is not treated like shellxquote for non-quote values.
2019-10-10 01:16:02 -07:00
f2ad93168b third-party: upgrade libvterm to 0.1.2 (#11177) 2019-10-09 19:44:44 +02:00
db9f68f98d ci: AppVeyor: coverage for Lua (Windows) (#10426) 2019-10-09 03:07:42 +02:00
7e4b744b64 ci: OpenBSD: enable functionaltest (#11178) 2019-10-08 17:36:58 +02:00
3b3a409781 Merge #11077 'vim-patch:8.1.{1354,1356,1362,1588}' 2019-10-07 21:51:04 -07:00
7faa6c41c8 cmake: only set LUA_PRG with successful check (#11172)
This is relevant for when using `USE_BUNDLED_LUAJIT=ON` with
`USE_BUNDLED_LUAROCKS=OFF`, and then building without the necessary modules
being installed/activated there yet: it would check the other (system) "lua"
interpreters also, and in case all failed keep the `LUA_PRG` in the cache for
the last failed entry - making it not re-check the previous ones on the next
build (after you might have activated your custom LuaRocks installation).

Only setting LUA_PRG if the check was successful handles the case better where
it is configured already - we should not try to re-configure it then.
2019-10-07 17:42:40 +02:00
0586a4b512 vim-patch:8.1.1588: in :let-heredoc line continuation is recognized
Problem:    In :let-heredoc line continuation is recognized.
Solution:   Do not consume line continuation. (Ozaki Kiichi, closes vim/vim#4580)
e96a2498f9
2019-10-07 14:14:13 +02:00
c84b39150f vim-patch:8.1.1362: code and data in tests can be hard to read
Problem:    Code and data in tests can be hard to read.
Solution:   Use the new heredoc style. (Yegappan Lakshmanan, closes vim/vim#4400)
c79745a82f
2019-10-07 14:14:13 +02:00
b5ac11139e vim-patch:8.1.1356: some text in heredoc assignment ends the text
Problem:    Some text in heredoc assignment ends the text. (Ozaki Kiichi)
Solution:   Recognize "let v =<<" and skip until the end.
8471e57026
2019-10-07 14:14:13 +02:00
b1ada8ec21 vim-patch:8.1.1354: getting a list of text lines is clumsy
Problem:    Getting a list of text lines is clumsy.
Solution:   Add the =<< assignment. (Yegappan Lakshmanan, closes vim/vim#4386)
f5842c5a53
2019-10-07 14:14:13 +02:00
dfed0e60d7 Merge pull request #11154 from blueyed/bump-tree-sitter
ci: upgrade tree-sitter from 0.15.2 to 0.15.9
2019-10-07 13:34:23 +02:00
6ea49d8c76 ci: use cluacov for better performance (#11152) 2019-10-07 13:01:14 +02:00
23ba875b82 Merge #11170 from janlazo/vim-8.1.2120
vim-patch:8.1.2120
2019-10-06 18:52:38 -07:00
97cdfdcde2 Remove dead code 2019-10-06 21:22:02 -04:00
09232958ff vim-patch:8.1.2120: some MB_ macros are more complicated than necessary
Problem:    Some MB_ macros are more complicated than necessary. (Dominique
            Pelle)
Solution:   Simplify the macros.  Expand inline.
1614a14901
2019-10-06 21:11:38 -04:00
8f20c50caa ci: submit_coverage: run luacov actually (#11169)
Apparently this got lost with #11127 / 77a551b65.
2019-10-07 00:44:54 +02:00
c8fe2a8d23 test/old: add test_fnamemodify.vim (#11168)
Moved to a new-style test in vim/vim@610cc1b9b (v7.4.1652).

Ref: https://github.com/neovim/neovim/pull/11165#issuecomment-538785588
2019-10-06 23:35:52 +02:00
e9b420dba5 lint 2019-10-06 22:55:24 +02:00
7a3602378f ci: upgrade tree-sitter from 0.15.2 to 0.15.9
tree-sitter-c is still at 0.15.2 though.
2019-10-06 22:55:11 +02:00
2b08dd8f06 tests: retry: "wait() evaluates the condition on given interval" (#11155)
Ref: https://github.com/neovim/neovim/issues/11137
2019-10-06 22:47:40 +02:00
e452988960 tests/functional: keep $TMPDIR in env (#11163) 2019-10-06 22:26:54 +02:00
93bceac9bd Merge #11157 from janlazo/vim-8.1.2113
vim-patch:8.1.{59, 586, 2113}
2019-10-06 12:32:27 -07:00
d1abd6513e vim-patch:8.1.0586: :digraph output is not easy to read
Problem:    :digraph output is not easy to read.
Solution:   Add highlighting for :digraphs. (Marcin Szamotulski, closes vim/vim#3572)
            Also add section headers for :digraphs!.
eae8ae1b2b
2019-10-06 09:43:39 -04:00
b007e5d882 vim-patch:8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Problem:    Displayed digraph for "ga" wrong with 'encoding' "cp1251".
Solution:   Convert from 'encoding' to "utf-8" if needed. (closes vim/vim#3015)
bc5020aa4d
2019-10-06 09:34:47 -04:00
55007180a3 doc: Fix TEST_FILTER example #11158 2019-10-06 02:21:06 -07:00
fe074611cd vim-patch:8.1.1371: cannot recover from a swap file #11081
Problem:    Cannot recover from a swap file.
Solution:   Do not expand environment variables in the swap file name.
            Do not check the extension when we already know a file is a swap
            file.  (Ken Takata, closes 4415, closes vim/vim#4369)
99499b1c05
2019-10-05 20:35:48 -07:00
1396cc9abb version.c: update [ci skip] #10981
vim-patch:8.0.0934: change to struts.h missing in patch
vim-patch:8.0.1176: job_start() does not handle quote and backslash correctly
vim-patch:8.0.1492: memory leak in balloon_split()
vim-patch:8.0.1582: in the MS-Windows console mouse movement is not used
vim-patch:8.0.1619: Win32 GUI: crash when winpty is not installed
vim-patch:8.0.1624: options for term_dumpdiff() and term_dumpload() not implemented
vim-patch:8.0.1665: when running a terminal from the GUI 'term' is not useful
vim-patch:8.0.1666: % argument in ch_log() causes trouble
vim-patch:8.0.1685: can't set ANSI colors of a terminal window
vim-patch:8.0.1711: term_setsize() is not implemented yet
vim-patch:8.0.1722: cannot specify a minimal size for a terminal window
vim-patch:8.0.1725: terminal debugger doesn't handle command arguments
vim-patch:8.0.1742: cannot get a list of all the jobs
vim-patch:8.0.1798: MS-Windows: file considered read-only too often
vim-patch:8.0.1835: print document name does not support multi-byte

vim-patch:8.1.0080: can't see the breakpoint number in the terminal debugger
vim-patch:8.1.0156: MS-Windows compiler warning
vim-patch:8.1.0226: too many #ifdefs
vim-patch:8.1.0722: cannot build without the virtualedit feature
vim-patch:8.1.0745: compiler warnings for signed/unsigned string
vim-patch:8.1.0752: one more compiler warning for signed/unsigned string
vim-patch:8.1.2025: MS-Windows: Including shlguid.h causes problems for msys2
vim-patch:8.1.2027: MS-Windows: problem with ambiwidth characters
vim-patch:8.1.2033: cannot build with tiny features
vim-patch:8.1.2049: cannot build tiny version
vim-patch:8.1.2061: MS-Windows GUI: ":sh" crashes when trying to use a terminal
vim-patch:8.1.2075: get many log messages when waiting for a typed character
vim-patch:8.1.2078: build error with +textprop but without +terminal
vim-patch:8.1.2084: Amiga: cannot get the user name
vim-patch:8.1.2086: missing a few changes for the renamed files
vim-patch:8.1.2088: renamed libvterm mouse.c file not in distributed file list
vim-patch:8.1.2090: not clear why channel log file ends
vim-patch:8.1.2101: write_session_file() often defined but not used
vim-patch:8.1.2102: can't build with GTK and FEAT_GUI_GNOME
vim-patch:8.1.2112: build number for ConPTY is outdated

The following `if_pyth` patch seems to be N/A. In `~/.local/`, python 2 and 3 have their own subfolders in `~/.local/include/` and `~/.local/lib/`. `PYTHONUSERBASE` is enough to make the user modules work (on my machine) for the legacy tests.
vim-patch:8.0.1451: difficult to set the python home directories properly

The following patch requires `set compatible` and unsupported `cpoptions`:
vim-patch:8.1.1331: test 29 is old style
2019-10-05 20:13:47 -07:00
5581ffac74 vim-patch:8.1.2113: ":help expr-!~?" only works after searching
Problem:    ":help expr-!~?" only works after searching.
Solution:   Escape "~" after "expr-". (closes vim/vim#5015)
9ca250855b
2019-10-05 11:17:30 -04:00
402afb0895 Makefile: use $TMPDIR below src/nvim/testdir (#11153)
This makes it ignored/cleaned automatically.
It was made absolute in 8821579ba, but to the root back then.
2019-10-04 22:10:16 +02:00
b4ea09cc06 Fix potential deadlock #11151
ELOG may call os_getenv and os_setenv internally. In that case, a
deadlock occurs.
2019-10-04 08:18:24 -07:00
77a551b657 ci: coverage for Lua (no Windows, using luacov) (#11127) 2019-10-04 16:09:42 +02:00
a341eb6087 win_line: update w_last_cursorline always
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.
2019-10-04 08:48:57 +02:00
cd73a0342a tests: tui_spec: improve/merge OptionSet/deferred
Closes https://github.com/neovim/neovim/pull/11129.
2019-10-04 08:39:16 +02:00
382391bb2d health: provider: skip checks with g:loaded_X_provider = 0 (#11147)
The Python provider was special (via [1]), and would continue to do
checks with `0` being set explicitly even.
This was fixed in #11044 (45447e3b6), ref: #11040.

This extends it to use the same method with all providers.

1: https://github.com/neovim/neovim/pull/8047
2019-10-04 08:16:30 +02:00
c3ae5e1375 test/old: align with Vim #11096 2019-10-03 00:32:14 -07:00
8d68a37c5a refactor: wrap common plines() usage in plines_win_full() #11141 2019-10-02 23:06:05 -07:00
f96d1e6bc4 tui: fix handling of bg response after suspend (#11145)
`tui_terminal_after_startup` gets called right after resuming from
suspending (via `Ctrl-z`) already (not delayed as with the startup
itself), and would set `waiting_for_bg_response` to false then directly.
This results in the terminal response not being processed then anymore,
and leaking into Neovim itself.

This changes it to try 5 times always, which means that it typically
would stop after a few characters of input from the user typically, e.g.
with tmux, which does not send a reply.

While it might be better to have something based on the time (e.g. only
wait for max 1s), this appears to be easier to do.

Fixes regression in 8a4ae3d.
2019-10-03 08:04:24 +02:00
30479417e8 Merge #11087 from janlazo/vim-8.1.0010
vim-patch:8.1.{10,230,315,330,514,517,518,1327,1347,1758,2072,2074,2091,2095,2103}
2019-10-02 22:43:59 -07:00
b069e9b20f tests: unit: NVIM_TEST_TRACE_LEVEL: default to 0 #11144
Traces are not useful normally (unless debugging/fixing tests), but only add
overhead.  Disable them by default.
2019-10-02 22:41:57 -07:00
3d3c783fea ci: Travis: simplify 32bit build (#11093)
- `CMAKE_SYSTEM_LIBRARY_PATH` should not be used, and is a
  semicolon-separated list anyway [1]

1: https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_LIBRARY_PATH.html
2019-10-03 05:40:25 +02:00
4518f230fa vim-patch:8.1.0330: the qf_add_entries() function is too long
Problem:    The qf_add_entries() function is too long.
Solution:   Split in two parts. (Yegappan Lakshmanan)
6f6ef7c195
2019-10-02 00:52:22 -04:00
0c1be45ea0 shell: improve displaying of pulse (#11130)
- output "[...]" to indicate throttling is being used, instead of just
  an empty line
- go to beginning of line after displaying the pulse, so that following
  output is displayed over it
2019-10-02 06:26:57 +02:00
333dc3d138 Fix flaky test: tui_spec: increase timeout (#11134)
Meant to fix:

    [  ERROR   ] test/functional/terminal/tui_spec.lua @ 925: TUI FocusGained/FocusLost in terminal-mode
    test/functional/ui/screen.lua:587: Row 6 did not match.
    Expected:
      |{1:r}eady $                                           |
      |[Process exited 0]                                |
      |                                                  |
      |                                                  |
      |                                                  |
      |*gained                                            |
      |{3:-- TERMINAL --}                                    |
    Actual:
      |{1:r}eady $                                           |
      |[Process exited 0]                                |
      |                                                  |
      |                                                  |
      |                                                  |
      |*:terminal                                         |
      |{3:-- TERMINAL --}                                    |

    To print the expect() call that would assert the current screen state, use
    screen:snapshot_util(). In case of non-deterministic failures, use
    screen:redraw_debug() to show all intermediate screen states.

    stack traceback:
    	test/functional/ui/screen.lua:587: in function '_wait'
    	test/functional/ui/screen.lua:370: in function 'expect'
    	test/functional/terminal/tui_spec.lua:934: in function <test/functional/terminal/tui_spec.lua:925>

I've thought about adding this, but it might not be really relevant, and
slows down the tests a bit (and a warning "warning: Screen test
succeeded immediately" with another test):

```diff
diff --git i/test/functional/terminal/tui_spec.lua w/test/functional/terminal/tui_spec.lua
index ada073c4e..4bc2ab4e0 100644
--- i/test/functional/terminal/tui_spec.lua
+++ w/test/functional/terminal/tui_spec.lua
@@ -818,6 +818,11 @@ describe('TUI FocusGained/FocusLost', function()
       ..'", "-u", "NONE", "-i", "NONE", "--cmd", "set noswapfile noshowcmd noruler"]')
     feed_data(":autocmd FocusGained * echo 'gained'\n")
     feed_data(":autocmd FocusLost * echo 'lost'\n")
+    -- Wait for autocommand to be registered.
+    retry(nil, nil, function()
+      feed_data(":autocmd FocusLost\n")
+      screen:expect{any="         echo 'lost'"}
+    end)
     feed_data("\034\016")  -- CTRL-\ CTRL-N
   end)
```
2019-10-02 04:56:22 +02:00
ada2ec4416 vim-patch:8.1.0315: helpgrep with language doesn't work properly
Problem:    Helpgrep with language doesn't work properly. (Takuya Fujiwara)
Solution:   Check for the language earlier. (Hirohito Higashi)
c631f2df62
2019-10-01 22:27:45 -04:00
efef797126 vim-patch:8.1.2103: wrong error message if "termdebugger" is not executable
Problem:    wrong error message if "termdebugger" is not executable.
Solution:   Check if "termdebugger" is executable and give a clear error
            message. (Ozaki Kiichi, closes vim/vim#5000)  Fix indents.
18223a592e
2019-10-01 22:27:45 -04:00
655085204e vim-patch:8.1.0230: directly checking 'buftype' value
Problem:    Directly checking 'buftype' value.
Solution:   Add the bt_normal() function. (Yegappan Lakshmanan)
91335e5a67
2019-10-01 22:27:45 -04:00
8b67c8f8c6 vim-patch:8.1.2095: leaking memory when getting item from dict
Problem:    Leaking memory when getting item from dict.
Solution:   Also free the key when not evaluating.
a893194d91
2019-10-01 22:27:44 -04:00
74947203af vim-patch:8.1.2091: double free when memory allocation fails
Problem:    Double free when memory allocation fails. (Zu-Ming Jiang)
Solution:   Use VIM_CLEAR() instead of vim_free(). (closes vim/vim#4991)
0f1c6708fd
2019-10-01 22:27:44 -04:00
56c860ac4a quickfix: fix pvs/v547 errors 2019-10-01 22:27:44 -04:00
8732cce315 vim-patch:8.1.2074: test for SafeState autocommand is a bit flaky
Problem:    Test for SafeState autocommand is a bit flaky.
Solution:   Add to list of flaky tests.
0d0c3ca007
2019-10-01 22:27:44 -04:00
1f4c9da9c6 test: fix screen assertions 2019-10-01 22:27:44 -04:00
90c2abc53f vim-patch:8.1.1347: fractional scroll position not restored after closing window
Problem:    Fractional scroll position not restored after closing window.
Solution:   Do restore fraction if topline is not one.
bd2d68c2f4
2019-10-01 22:27:44 -04:00
6ed20ff25c vim-patch:8.1.1327: unnecessary scroll after horizontal split
Problem:    Unnecessary scroll after horizontal split.
Solution:   Don't adjust to fraction if all the text fits in the window.
            (Martin Kunev, closes vim/vim#4367)
a9b2535f44
2019-10-01 22:27:43 -04:00
e8144d204c vim-patch:8.1.0518: Test_window_split_edit_bufnr() fails on AppVeyor
Problem:    Test_window_split_edit_bufnr() fails on AppVeyor.
Solution:   Disable the failing part for now.
8617b40159
2019-10-01 22:27:43 -04:00
14f3287b98 vim-patch:8.1.0517: Test_window_split_edit_alternate() fails on AppVeyor
Problem:    Test_window_split_edit_alternate() fails on AppVeyor.
Solution:   Disable the failing part for now.
d42333d8e9
2019-10-01 22:27:43 -04:00
17e96d96ba vim-patch:8.1.0514: CTRL-W ^ does not work when alternate buffer has no name
Problem:    CTRL-W ^ does not work when alternate buffer has no name.
Solution:   Use another method to split and edit the alternate buffer. (Jason
            Franklin)
1bbb619483
2019-10-01 22:27:43 -04:00
8d0bc3c189 vim-patch:8.1.1758: count of g$ not used correctly when text is not wrapped
Problem:    Count of g$ not used correctly when text is not wrapped.
Solution:   Do use the count. (Christian Brabandt, closes vim/vim#4729, closes vim/vim#4566)
d5c8234517
2019-10-01 22:27:43 -04:00
24c4d4e125 vim-patch:8.1.2072: "gk" moves to start of line instead of upwards
Problem:    "gk" moves to start of line instead of upwards.
Solution:   Fix off-by-one error. (Christian Brabandt, closes vim/vim#4969)
03ac52fc02
2019-10-01 22:27:43 -04:00
0253f0cd92 vim-patch:8.1.0010: efm_to_regpat() is too long
Problem:    efm_to_regpat() is too long.
Solution:   Split off three functions. (Yegappan Lakshmanan, closes vim/vim#2924)
6bff719f7e
2019-10-01 22:27:42 -04:00
8e25cf3881 patch_terminfo_bugs: TERM=xterm with non-xterm: ignore smglr (#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
2019-10-02 04:07:10 +02:00
b7d6caaa03 Fix redraw regression with w_p_cole in visual mode
Fixes https://github.com/neovim/neovim/issues/11024, regressed in 23c71d51.
Closes https://github.com/neovim/neovim/pull/11120.
2019-10-02 03:51:46 +02:00
30ae60e7ca Fix/revisit git-describe enhancement (#11124)
* Fix/keep massaging git-describe result

Ref: https://github.com/neovim/neovim/pull/11117#issuecomment-536416223

* build: revisit generation of version from Git

Fixes "make clean && make", where "auto/versiondef.h" would be missing
since b18b84d - because BYPRODUCTS are apparently removed when cleaning.

This includes the following improvements/changes:

- do not run git-describe during CMake's configure phase just for
  reporting
- do not print with changed Git version (too noisy, simplifies code)

* Move to src/nvim (included before config) for easier flow

* fallback to describe always, write empty include file

* update_version_stamp.lua: use prefix always
2019-10-02 03:45:59 +02:00
ac32426b94 build: get rid of warnings with cmake --debug-output (#11131) 2019-10-02 03:44:57 +02:00
8a4ae3d664 tui: improve handle_background_color: short-circuit (#11067)
* handle_background_color: short-circuit if handled already

* Unit tests for handle_background_color

* set waiting_for_bg_response to false in tui_terminal_after_startup
  By then it should have been received.
2019-09-30 22:00:55 +02:00
7e46fcaf23 Merge pull request #11121 from bfredl/invalidcell
screen: don't crash on invalid cells being recomposed (tui_raw_line assert)
2019-09-30 20:32:59 +02:00
dd26bd5974 screen: don't crash on invalid grid cells being recomposed 2019-09-30 19:05:54 +02:00
dc52458522 third-party: upgrade libluv: 1.30.0-0 => 1.30.1-1 (#11092)
Changes: https://github.com/luvit/luv/compare/1.30.0-0...1.30.1-1
2019-09-30 12:55:47 +02:00
179c46a016 provider#pythonx: resolve/expand exe from host var (#11047)
This reverts part of ade88fe4c [1].

This is required for `let g:python3_host_prog = 'python'` etc, where it
should get picked up from PATH.

Without this it would show:

```
  - INFO: pyenv: Path: /home/user/.pyenv/libexec/pyenv
  - INFO: pyenv: Root: /home/user/.pyenv
  - INFO: Using: g:python3_host_prog = "python"
  - ERROR: "python" was not found.
  - INFO: Executable: Not found
  - ERROR: Detected pip upgrade failure: Python executable can import "pynvim" but not "neovim": python
    - ADVICE:
      - Use that Python version to reinstall "pynvim" and optionally "neovim".
          pip3 uninstall pynvim neovim
          pip3 install pynvim
          pip3 install neovim  # only if needed by third-party software
```

Note that it additionally causes a weird error
("Detected pip upgrade failure"), due to `s:check_bin` emptying
`python_exe` (because the non-absolute file not being readable), and
`provider#pythonx#DetectByModule('pynvim', a:version)` from 75593e6fce
then just getting the value from the host var again (without actual
checks).
This is implicitly fixed via this patch now (because it is skipped), but
could need some improvement in this regard probably.

With this patch it resolves it (for a virtualenv where pynvim is not
made available intentionally):
```
  - INFO: pyenv: Path: /home/daniel/.pyenv/libexec/pyenv
  - INFO: pyenv: Root: /home/daniel/.pyenv
  - INFO: Using: g:python3_host_prog = "python"
  - WARNING: $VIRTUAL_ENV exists but appears to be inactive. This could lead to unexpected results.
    - ADVICE:
      - If you are using Zsh, see: http://vi.stackexchange.com/a/7654
  - INFO: Executable: /home/daniel/.pyenv/shims/tmp-system-deoplete.nvim-f205aF/python
  - ERROR: Command error (job=11, exit code 1): `'/home/daniel/.pyenv/shims/tmp-system-deoplete.nvim-f205aF/python' -c 'import sys; sys.path.remove(""); import neovim; print(neovim.__file__)'` (in '/home/daniel/.dotfiles/vim/plugged/deoplete.nvim')
    Output: Traceback (most recent call last):  File "<string>", line 1, in <module>ModuleNotFoundError: No module named 'neovim'
    Stderr: Traceback (most recent call last):  File "<string>", line 1, in <module>ModuleNotFoundError: No module named 'neovim'
  - INFO: Python version: 3.7.4
  - INFO: pynvim version: unable to load neovim Python module
  - ERROR: pynvim is not installed.
    Error: unable to load neovim Python module
    - ADVICE:
      - Run in shell: pip3 install pynvim

```

Note: this appears to display the error twice via "Output:" and
"Stderr:".

1: https://github.com/neovim/neovim/pull/8784
2019-09-30 12:52:04 +02:00
b0f5441c5e bundle: upgrade LuaJIT to latest v2.1 (#10321) 2019-09-30 12:50:22 +02:00
b18b84df5e build: run git-describe for dev version during build (#11117)
This avoids invoking CMake after a new commit, which might take 15s on
some systems.

Skipped on CMake < 3.2.0 (missing BYPRODUCTS support).

Co-Authored-By: Justin M. Keyes <justinkz@gmail.com>
2019-09-30 00:10:29 +02:00
ce637d0ef1 Merge pull request #11115 from bfredl/wildmenumode
cmdline: wildmenumode() should be true with wildoptions+=pum
2019-09-29 15:55:18 +02:00
0a2a1e241f cmake: use LibFindMacros for utf8proc (#11114)
Also update doc.
2019-09-29 04:44:02 +02:00
34d55f8607 terminfo_start: keep first flushing of ui buffer (#11118)
Initially done in 3626d2107 (#11074, for #11062), it was reverted then
in 445f2f409 (#11083, which added flushing later).

But it is still required here to avoid the reporting of the background
response with urxvt/kitty (`nvim -u NONE -cq`).
Apparently I've tested this not enough with 445f2f409 (probably only within tmux).
2019-09-29 03:06:36 +02:00
0636b25f28 cmdline: wildmenumode() should be true with wildoptions+=pum 2019-09-28 21:00:27 +02:00
e933426299 Merge pull request #10124 from bfredl/tree-sitter-api
Tree-sitter step 1: vendor runtime lib + add lua API
2019-09-28 18:35:02 +02:00
9fa850991d tree-sitter: improve and cleanup tests 2019-09-28 17:46:25 +02:00
c844f986d4 tree-sitter: use "module" pattern in lua source 2019-09-28 17:46:25 +02:00
d5a69eb076 tree-sitter: handle node equality 2019-09-28 17:46:25 +02:00
3ffcb477ef tree-sitter: start docs 2019-09-28 17:46:25 +02:00
e0d6228978 tree-sitter: use "range" instead of "point_range" consistently in lua API 2019-09-28 17:46:25 +02:00
f86a2c33a2 tree-sitter: simplify editing using the new old_byte_size parameter 2019-09-28 17:46:25 +02:00
06ee45b9b1 tree-sitter: fix lint, delete "demo" plugin (replaced by functional tests) 2019-09-28 17:46:25 +02:00
167a1cfdef tree-sitter: improve parser API (shared parser between plugins) 2019-09-28 14:55:43 +02:00
d697841a9d tree-sitter: cleanup tree refcounting 2019-09-28 14:55:43 +02:00
d24dec596c tree-sitter: inspect language 2019-09-28 14:55:43 +02:00
a88a9f128e tree-sitter: add some more API 2019-09-28 14:55:43 +02:00
c1dc1bedba tree-sitter: style 2019-09-28 14:55:43 +02:00
a361e09cc5 tree-sitter: use standard luaL_newmetatable and luaL_checkudata pattern 2019-09-28 14:55:43 +02:00
c8f861b739 tree-sitter: rename tree_sitter => treesitter for consistency 2019-09-28 14:55:43 +02:00
4ea5e63aa8 tree-sitter: add basic testing on ci
build tree-sitter c parser on ci for testing purposes
2019-09-28 14:55:43 +02:00
afba23099f tree-sitter: support pre-registration of languages 2019-09-28 14:55:43 +02:00
1e9e2451be tree-sitter: objectify API 2019-09-28 14:55:43 +02:00
005b6d638c tree-sitter: split tree-sitter lua interface from demo code 2019-09-28 14:55:43 +02:00
c07e1e8696 tree-sitter: cleanup build code 2019-09-28 14:55:43 +02:00
b871100be7 Create BuildUtf8proc.cmake and FindUtf8proc.cmake
Using advanced search and replace technology
2019-09-28 14:31:03 +02:00
0e0beef85e tree-sitter: load parsers as .so files 2019-09-28 14:31:03 +02:00
cd10096386 tree-sitter: initial tree-sitter support 2019-09-28 14:31:03 +02:00
8ff2f193bb tree-sitter: change vendored tree-sitter to use nvim memory management 2019-09-28 14:31:03 +02:00
3bddf05023 tree-sitter: vendor tree-sitter runtime
tree-sitter/tree-sitter commit 7685b7861ca475664b6ef57e14d1da9acf741275

Included files are:
lib/include/tree-sitter/*.h
lib/src/*.[ch]
LICENSE
2019-09-28 14:30:48 +02:00
0d9a3c86a1 vim-patch:8.1.2083: multi-byte chars do not work properly with "%.*S" in printf() (#11106)
Problem:    Multi-byte chars do not work properly with "%.*S" in printf().
Solution:   Use mb_ptr2cells(). Daniel Hahler, closes vim/vim#4989)
ce0fac2897
2019-09-28 00:32:22 +02:00
fe9d54f418 doc: contrib/local.mk.example: include ENABLE_LTO (#11097)
Using it takes 30+ additional seconds for me with a ccache-enabled build
(43s vs. 12s).

While it certainly makes sense to use DEBUG during development,
bisecting etc, it should be made clearer what causes this.
2019-09-26 23:43:49 +02:00
298da52fdc Merge pull request #10907 from jszakmeister/add-freebsd-sourcehut-support
build: add support for building for FreeBSD under Sourcehut
2019-09-26 05:35:12 -04:00
54c66e636a Fix two more flaky tests (#11095)
* mode_spec: retry with increasing matchtime

`matchtime=2` might still be too low (with luacov on AppVeyor).

    [  ERROR   ] test/functional\ui\mode_spec.lua @ 47: ui mode_change event works in insert mode
    test\functional\ui\screen.lua:587: mode
    Expected objects to be the same.
    Passed in:
    (string) 'insert'
    Expected:
    (string) 'showmatch'
    Hint: full state of "mode":
      "insert"

Followup to fe60013fb.
ref #10941
Initially regressed in 7ed2122622

``

* ui/screen_basic_spec: set timeoutlen=10000

This fixes the test on slow CI.

Ref: https://ci.appveyor.com/project/neovim/neovim/builds/27600387/job/t468h2b3w9lwtlm5#L10930
2019-09-26 07:37:51 +02:00
b52ae0e8ba build: add support for building for FreeBSD under Sourcehut [skip ci] 2019-09-25 19:55:49 -04:00
cb25207171 vim-patch:8.0.0914: highlight attributes are always combined (#10256)
Problem:    Highlight attributes are always combined.
Solution:   Add the 'nocombine' value to replace attributes instead of
            combining them. (scauligi, closes vim/vim#1963)
0cd2a94a40

Closes https://github.com/neovim/neovim/pull/10256.
2019-09-26 00:50:54 +02:00
2621f4455d Merge pull request #10978 from blueyed/update-libuv
third-party: update libuv to v1.32.0
2019-09-25 11:52:41 +02:00
0571145c40 paste: fix handling of "<" in cmdline (#11094)
Fixes https://github.com/neovim/neovim/issues/11088.
2019-09-25 09:15:33 +02:00
70827ea1fa test/functional/preload.lua: _set_fmode for Windows 2019-09-25 05:47:15 +02:00
bb6b1267e7 Revert "win/os_env_exists(): workaround libuv bug #10734"
This reverts commit 278c5d452c.
2019-09-25 05:47:12 +02:00
227ef71621 third-party: update libuv to v1.31.0 2019-09-25 05:45:54 +02:00
db6b4b677d tests: busted: nvim handler: display durations always (#11075)
This shows them also with test failures/errors, where it is useful to
see how long the test took (for flaky failures running into timeout).
2019-09-25 02:20:32 +02:00
81b19df5f2 cmake/GetCompileFlags: include CMAKE_C_COMPILER_ARG1 (#11091)
This is used internally (e.g. on Travis) for 32-bit builds (`-m32`).
2019-09-25 00:09:23 +02:00
0ab7da8561 timer_spec: fix/harden flaky tests (#11080)
Those are flaky when using luacov (which causes reproducible slowness).

E.g.:

    [  ERROR   ] test/functional\eval\timer_spec.lua @ 105: timers can invoke redraw in blocking getchar() call
    test\functional\ui\screen.lua:587: Row 3 did not match.
    Expected:
      |ITEM 1                                  |
      |ITEM 2                                  |
      |*{1:~                                       }|
      |{1:~                                       }|
      |{1:~                                       }|
      |^                                        |
    Actual:
      |ITEM 1                                  |
      |ITEM 2                                  |
      |*ITEM 3                                  |
      |{1:~                                       }|
      |{1:~                                       }|
      |^                                        |
2019-09-24 08:55:27 +02:00
2476a97ced tui_spec: improve "TUI paste: exactly 64 bytes" (#11086)
Doing the screen test first might give insights about a possible
(flaky?) failure, where it looks like "feed_data" is processed out of
order:

    [  ERROR   ] test/functional/terminal/tui_spec.lua @ 561: TUI paste: exactly 64 bytes #10311
    test/functional/helpers.lua:388:
    retry() attempts: 490
    test/functional/terminal/tui_spec.lua:66: Expected objects to be the same.
    Passed in:
    (table: 0x44042de8) {
     *[1] = ' endzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' }
    Expected:
    (table: 0x41d6e568) {
     *[1] = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz end' }
    stack traceback:
            test/functional/helpers.lua:388: in function 'retry'
            test/functional/terminal/tui_spec.lua:63: in function 'expect_child_buf_lines'
            test/functional/terminal/tui_spec.lua:569: in function <test/functional/terminal/tui_spec.lua:561>

Ref: https://github.com/neovim/neovim/pull/11083#issuecomment-534375201
Build log: https://travis-ci.org/neovim/neovim/jobs/588749739#L5597
2019-09-24 08:35:29 +02:00
445f2f4096 tui: flush ui buffer in tui_terminal_after_startup (#11083)
This avoids having a dummy event to tickle the main loop.

Confirmed using `nvim -u NONE -c 'au FocusGained * q'` in tmux (with
`:set -g focus-events on`): without the flushing it would only exit
after pressing a key.

Moves the flushing done recently in 3626d2107.
`nvim -u NONE -cq` is still working (i.e. consuming the response for the
terminal background query itself), and the flickering mentioned in
3626d2107 is reduced again.

Reverts part of bfb21f3e0 (#7729).
2019-09-24 08:34:00 +02:00
6d213593ed vim-patch:8.0.1754: ex_helpgrep() is too long #11084
Problem:    ex_helpgrep() is too long.
Solution:   Refactor the function. (Yegappan Lakshmanan, closes vim/vim#2766)
2225ebb486
2019-09-23 22:28:04 -07:00
d9032308fb vim-patch:8.0.1812: refactor qf_jump_to_usable_window() #11078
Problem:    The qf_jump_to_usable_window() function is too long.
Solution:   Split it in parts. (Yegappan Lakshmanan, closes vim/vim#2891)
7a2b0e55e9
2019-09-22 18:56:31 -07:00
3626d2107e terminfo_start: flush buffer #11074
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
2019-09-22 12:51:55 -07:00
fb26c38434 Merge #11076 from blueyed/fix-fold-patches
Fix fold patches: vim-patch:8.1.2052, vim-patch:8.1.2059
fix #11002
2019-09-22 12:32:46 -07:00
6c3d34e4df vim-patch:8.1.2059: fix for "x" deleting a fold has side effects
Problem:    Fix for "x" deleting a fold has side effects.
Solution:   Fix it where the fold is included.
56ebbabea1
2019-09-22 20:11:04 +02:00
97b82553e0 vim-patch:8.1.2052: using "x" before a closed fold may delete that fold
Problem:    Using "x" before a closed fold may delete that fold.
Solution:   Do not translate 'x' do "dl". (Christian Brabandt, closes vim/vim#4927)
7a9bd7c1e0
2019-09-22 20:11:04 +02:00
6807779c68 tests: make 'win_update redraws lines properly' more readable (#11068) 2019-09-22 14:58:38 +02:00
ed11721b6b tests: unit: fix preprocess: pass -m32 for 32bit ABI (#11073) 2019-09-22 14:57:44 +02:00
bb90e41ee2 Merge pull request #11049 from bfredl/rulermsg
screen: missing redraw/highlight for ruler in message area
2019-09-22 12:14:07 +02:00
f316916758 screen: missing redraw/highlight for ruler in message area 2019-09-22 09:38:52 +02:00
028d76e5d5 env: use putenv_s for LC_ALL, LANG, etc. #11050
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
2019-09-22 00:02:28 -07:00
c534ab8447 Merge #11034 from zwegner/precedes
Fix "precedes" listchar behavior in wrap mode
2019-09-21 23:48:08 -07:00
1654932498 vim-patch:8.1.2060: "precedes" in 'listchars' not used properly
(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.
bffba7f704
2019-09-21 22:13:55 -07:00
18e5869f56 Fix "precedes" listchar behavior in wrap mode
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.
2019-09-21 22:09:52 -07:00
45447e3b64 checkhealth: skip python checks if intentionally disabled #11044
close #11040
2019-09-21 16:17:22 -07:00
ad0f97f412 vim-patch:8.1.2055: profile: adjust line format #11058
Problem:    Not easy to jump to function line from profile.
Solution:   Use "file:99" instead of "file line 99" so that "gf" works.
            (Daniel Hahler, closes vim/vim#4951)
181d4f58cc
2019-09-21 14:18:56 -07:00
fd82ce4a3a Merge #11060 from janlazo/vim-8.1.1783
vim-patch:8.0.{1109,1529,1539,1621,1733,1771,1776},8.1.{1783,2054,2058}
2019-09-21 14:07:50 -07:00
b3e56957f8 vim-patch:8.1.0460: assert_fails() message argument #11051
Problem:    assert_fails() does not take a message argument
Solution:   Add the argument.
1307d1c003
2019-09-21 14:03:46 -07:00
111d34849a vim-patch:8.0.1621: using invalid default value for highlight attribute
Problem:    Using invalid default value for highlight attribute.
Solution:   Use zero instead of -1.
6185903e3d
2019-09-21 11:07:59 -04:00
eb3888a322 vim-patch:8.0.1529: assert_equalfile() does not close file descriptors
Problem:    Assert_equalfile() does not close file descriptors. (Coverity)
Solution:   Close the file descriptors.
3049418f3d
2019-09-21 08:43:08 -04:00
2a7ffc6567 vim-patch:8.0.1776: in tests, when WaitFor() fails it doesn't say why
Problem:    In tests, when WaitFor() fails it doesn't say why.
Solution:   Turn a few more WaitFor() into WaitForAssert().
0e9d1ae321
2019-09-21 08:43:07 -04:00
3878b0822e vim-patch:8.0.1771: in tests, when WaitFor() fails it doesn't say why
Problem:    In tests, when WaitFor() fails it doesn't say why. (James McCoy)
Solution:   Add WaitForAssert(), which produces an assert error when it fails.
50182fa84e
2019-09-21 08:43:07 -04:00
7cffc87868 vim-patch:8.0.1733: incomplete testing for completion fix
Problem:    Incomplete testing for completion fix. (Lifepillar)
Solution:   Add a test with CTRL-P.
bad0ce7b26
2019-09-21 08:43:07 -04:00
ca11662515 vim-patch:8.0.1539: no test for the popup menu positioning
Problem:    No test for the popup menu positioning.
Solution:   Add a screendump test for the popup menu.
6bb2cdfe60
2019-09-21 08:43:07 -04:00
b853b6e4ea vim-patch:8.0.1109: timer causes error on exit from Ex mode
Problem:    Timer causes error on exit from Ex mode. (xtal8)
Solution:   save and restore the ex_pressedreturn flag. (Christian Brabandt,
            closes vim/vim#2079)
f5291f301e
2019-09-21 08:43:07 -04:00
42a0513095 vim-patch:8.1.2058: function for ex command is named inconsistently
Problem:    Function for ex command is named inconsistently.
Solution:   Rename do_marks() to ex_marks().
4bd782339e
2019-09-21 08:43:06 -04:00
1c71a3c657 vim-patch:8.1.2054: compiler test for Perl may fail
Problem:    Compiler test for Perl may fail.
Solution:   Accept any error line number. (James McCoy, closes vim/vim#4944)
cebfcffa40
2019-09-21 08:43:06 -04:00
690cd4f012 vim-patch:8.1.1783: MS-Windows: compiler test may fail when using %:S
Problem:    MS-Windows: compiler test may fail when using %:S.
Solution:   Reset 'shellslash'.
dff2adc8dd
2019-09-21 08:43:06 -04:00
d6f658e38f Merge pull request #11069 from bfredl/virtualcol
screen: fix vcol counting with virtual text.
2019-09-21 10:40:41 +02:00
828a6e7568 screen: fix vcol counting with virtual text. Fixes #9941 2019-09-21 09:39:10 +02:00
afd576ee94 Merge pull request #11057 from blueyed/test-indent
Vim patches for indent tests
2019-09-19 00:12:45 +02:00
660b452440 vim-patch:8.1.2056: "make test" for indent files doesn't cause make to fail
Problem:    "make test" for indent files doesn't cause make to fail.
Solution:   Exit the script with ":cquit". (Daniel Hahler, closes vim/vim#4949)
cd67059c0c
2019-09-18 22:59:13 +02:00
0e75a9eead Update runtime/indent/testdir to latest Vim runtime
Several runtime updates ignored the non-existing files.
2019-09-18 22:59:13 +02:00
48b2d21d5e vim-patch:8.1.1213: "make clean" in top dir does not cleanup indent test output
Problem:    "make clean" in top dir does not cleanup indent test output.
Solution:   Clean the indent test output.  Do not rely on the vim executable
            for that. (closes vim/vim#4307)
e13a3901ca
2019-09-18 22:46:47 +02:00
10c050caf9 vim-patch:8.1.0599: without the +eval feature the indent tests don't work
Problem:    Without the +eval feature the indent tests don't work.
Solution:   Skip the body of the tests.
eeed665b0e
2019-09-18 22:38:37 +02:00
865aaa031a vim-patch:8.1.0576: indent script tests pick up installed scripts
Problem:    Indent script tests pick up installed scripts.
Solution:   Use current runtime indent scripts.
30700cd5ff
2019-09-18 22:38:15 +02:00
b466f0e114 vim-patch:8.1.0545: when executing indent tests user preferences interfere
Problem:    When executing indent tests user preferences interfere.
Solution:   Add "--clean".
dc2f73a698
2019-09-18 22:37:54 +02:00
7f59f5b104 vim-patch:8.1.0496: no tests for indent files
Problem:    No tests for indent files.
Solution:   Add a mechanism for running indent file tests.  Add a first test
            for Vim indenting.
c0fe4978f2
2019-09-18 22:37:25 +02:00
1070c092c7 win_update: fix redraw regression (#11027)
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
2019-09-18 18:22:38 +02:00
d478542110 health#provider: fix duplicated output/stderr (#11048)
Ref: https://github.com/neovim/neovim/pull/11047#issuecomment-532268826
2019-09-18 18:21:44 +02:00
618045685b Merge #11035 from janlazo/vim-8.0.1523
vim-patch:8.0.{1523,1770}
2019-09-17 21:49:45 -07:00
8db9e82e3e vim-patch:8.0.1770: assert functions don't return anything
Problem:    Assert functions don't return anything.
Solution:   Return non-zero when the assertion fails.
65a5464985
2019-09-16 23:42:44 -04:00
792c290343 vim-patch:8.0.1523: cannot write and read terminal screendumps
Problem:    Cannot write and read terminal screendumps.
Solution:   Add term_dumpwrite(), term_dumpread() and term_dumpdiff().
            Also add assert_equalfile().
d96ff16511
2019-09-16 21:36:46 -04:00
0b71bb73e8 tests: improve error message with literat "~" directory (#11032) 2019-09-17 00:39:33 +02:00
4b2d7bb5ea tests: fix flaky 'scrollback' option deletes lines (only) if necessary (#11003)
Using `screen:expect` with the complete grid appears to fix its
flakiness.

Fixes https://github.com/neovim/neovim/issues/10723.
2019-09-16 19:17:07 +02:00
4df38ec9df server_requests_spec: fix assertion, pass Lua paths via args (#10875)
This makes it pick up the nvim Luarocks module properly when not
installed via third-party.
2019-09-16 19:16:39 +02:00
8f3d0276ee release.sh [ci skip] 2019-09-15 23:08:40 -07:00
60e0000c5d nvim.appdata.xml [ci skip] 2019-09-15 19:44:11 -07:00
f9d1e788af CI/AppVeyor: revert whitelist
revert 6b028ec5f2 #10746

This seems to skip tags also, which breaks our release automation.
From the AppVeyor logs:

    2019-09-15 17:25:00.232 Warning Commit "1f76c4af" of branch "master" skipped as commit message contains either "[skip ci]" or "[ci skip]" or "[skip appveyor]"
    2019-09-15 17:20:24.152 Warning Commit "baa5263b" skipped as branch "stable" is not in white-list
    2019-09-15 17:20:03.163 Warning Commit "6cb5ffc0" skipped as branch "release-0.4" is not in white-list
    2019-09-15 17:20:02.977 Warning Commit "baa5263b" skipped as branch "v0.4.1" is not in white-list
    2019-09-15 16:35:38.810 Warning Commit "31956372" of branch "master" skipped as commit message contains either "[skip ci]" or "[ci skip]" or "[skip appveyor]"
    2019-09-15 16:28:35.237 Warning Commit "e2cc5fe0" skipped as branch "stable" is not in white-list
    2019-09-15 16:28:17.814 Information Build version 31489 created
    2019-09-15 16:28:16.364 Warning Commit "e2cc5fe0" skipped as branch "v0.4.0" is not in white-list
2019-09-15 17:36:17 -07:00
c410440edc fix api_level_6.mpack
This was generated incorrectly in the 0.4.1 release, fixed in the 0.4.1
release.
2019-09-15 17:28:42 -07:00
1f76c4af13 nvim.appdata.xml [ci skip] 2019-09-15 17:24:41 -07:00
3195637252 release.sh [ci skip] 2019-09-15 16:35:22 -07:00
9915b5497b version bump 2019-09-15 16:19:49 -07:00
1833 changed files with 326625 additions and 148537 deletions

40
.builds/freebsd.yml Normal file
View File

@ -0,0 +1,40 @@
image: freebsd/latest
packages:
- cmake
- gmake
- ninja
- libtool
- automake
- pkgconf
- unzip
- wget
- gettext
- python
- libffi
- gdb
sources:
- https://github.com/neovim/neovim
environment:
SOURCEHUT: 1
LANG: en_US.UTF-8
CMAKE_EXTRA_FLAGS: -DCI_BUILD=ON -DMIN_LOG_LEVEL=3
tasks:
- build-deps: |
cd neovim
gmake deps
- build: |
cd neovim
gmake CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_EXTRA_FLAGS="${CMAKE_EXTRA_FLAGS}" nvim
- functionaltest: |
cd neovim
gmake functionaltest
- unittest: |
cd neovim
gmake unittest
- oldtest: |
cd neovim
gmake oldtest

View File

@ -1,41 +1,44 @@
# sourcehut CI: https://builds.sr.ht/~jmk/neovim
image: openbsd/6.5
image: openbsd/latest
packages:
- autoconf-2.69p2
- automake-1.15.1
- autoconf-2.71
- automake-1.16.3
- cmake
- gettext-0.19.8.1p3
- gettext-tools-0.19.8.1
- gettext-runtime-0.21p1
- gettext-tools-0.21p1
- gmake
- libtool
- ninja-1.8.2p0
- unzip-6.0p11
- ninja-1.10.2p0
- unzip-6.0p14
- gdb
sources:
- https://github.com/neovim/neovim
environment:
SOURCEHUT: 1
LC_CTYPE: en_US.UTF-8
CMAKE_EXTRA_FLAGS: -DCI_BUILD=ON -DMIN_LOG_LEVEL=3
tasks:
- build: |
export AUTOCONF_VERSION=2.69
export AUTOMAKE_VERSION=1.15
cd neovim
mkdir .deps
cd .deps
- build-deps: |
export AUTOCONF_VERSION=2.71
export AUTOMAKE_VERSION=1.16
mkdir neovim/.deps
cd neovim/.deps
cmake -G Ninja ../third-party/
cmake --build . --config Debug
cd ..
mkdir build
cd build
cmake -G Ninja -DMIN_LOG_LEVEL=3 ..
cmake --build . --config Debug
./bin/nvim --version
- test: |
export LC_CTYPE=en_US.UTF-8
# functional tests
cmake --build . --config RelWithDebInfo
- build: |
mkdir neovim/build
cd neovim/build
# cmake --build . --config Debug --target functionaltest
# oldtests
cd ..
cmake -G Ninja $CMAKE_EXTRA_FLAGS ..
cmake --build . --config RelWithDebInfo
./bin/nvim --version
- functionaltest: |
cd neovim/build
cmake --build . --config RelWithDebInfo --target functionaltest
- oldtest: |
cd neovim
gmake oldtest

View File

@ -1,11 +1,11 @@
BasedOnStyle: Google
Language: Cpp
ColumnLimit: 80
ColumnLimit: 100
IndentWidth: 2
TabWidth: 2
TabWidth: 8
UseTab: Never
IndentCaseLabels: true
BreakBeforeBraces: Linux
IndentCaseLabels: false
BreakBeforeBraces: Custom
AlignEscapedNewlinesLeft: false
AllowShortFunctionsOnASingleLine: false
AlignTrailingComments: true
@ -17,4 +17,24 @@ AllowShortLoopsOnASingleLine: false
BinPackParameters: false
BreakBeforeBinaryOperators: true
BreakBeforeTernaryOperators: true
ContinuationIndentWidth: 4
ContinuationIndentWidth: 2
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: No
AlwaysBreakTemplateDeclarations: No
AlignEscapedNewlines: DontAlign
BinPackArguments: false
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
PointerAlignment: Right
SortIncludes: false
Cpp11BracedListStyle: false

2
.clangd Normal file
View File

@ -0,0 +1,2 @@
CompileFlags:
CompilationDatabase: build/ # Search build/ directory for compile_commands.json

View File

@ -8,6 +8,9 @@ end_of_line = lf
insert_final_newline = true
charset = utf-8
[*.{c,h,in,lua}]
max_line_length = 100
[{Makefile,**/Makefile,runtime/doc/*.txt}]
indent_style = tab
indent_size = 8

53
.git-blame-ignore-revs Normal file
View File

@ -0,0 +1,53 @@
# To use this file (requires git 2.23):
# git config blame.ignoreRevsFile .git-blame-ignore-revs
# eval.c: factor out eval/funcs.c #11828
# - This is a move/rename. git 2.33 doesn't know how to ignore it.
# It is here anyway, (1) in case git improves later, and (2) to
# save you the trouble of attempting this.
6c5bbf07d988ef55e5e8ba8d70b62c1f0885261b
# symbol renames
6186df3562e33e92f04ed8c850204ceabc4746e1
# style (uncrustify, etc.)
2d240024acbd68c2d3f82bc72cb12b1a4928c6bf
61178778230e609d68b271ffd53ffd993cd23c42
15af08ad176339d1f269ce264bb0efea283c9536
47f99d66440ae8be26b34531989ac61edc1ad9fe
1e49a1c888a3d9a581f4aa409a26ada3ac2417cb
3b3dbcf7b7ba5466e6ab643e256f2374b520a6b2
e8067d1490a31ff76143d576dc9948b4f09c6c55
d5b66e88601b4d2fde5d905f9d12847126ba4449
07715044887d82f74254e64c4c32fa49b0501bea
6ed43f8f1caad702f9590d174c5ec142f3d85b18
0a83017fe95df0290adb98ec6bf457b96a3fab17
867e8885991ae450019c18aa5e42546bd4b62c2c
1f49268c46fcbe65f7e2e2cb620e6f51c059cf9e
51a98aa0c2fe3231a0ffc8a78189bc6fafd6abf6
853346a94d6aa78c97314a3b217fb5a5408a47f1
30fefee684e641a0c6867446c6de30efa2f0a126
f4ca3a29ddcb0c98e8e09c45a6342af709f8cc45
48e67b229415b4e2b3315bd00b817e5f9ab970c8
7a26eb8a567cbc831d4f629f9eccb767a44436b8
2f9b9e61d7417183f2d9f36d804247c0926be9d4
c0767bd4f3ce7b34bb77da0657c49ba10ba1b32e
d90fb1c0bfc1e64c783c385a79e7de87013dadba
9c268263b1792d00b3ffdfd7495af2575862656e
8c74c895b300bcee5fa937a2329d1d4756567b42
40be47e0faef7aa015eb4ba44ceb1ee1a03e97cf
4472c56d54f447040f6e8610b261b7efa0d04eb6
a68faed02dc8e37b8f10da14dc02e33e6ed93947
725cbe7d414f609e769081276f2a034e32a4337b
7e3bdc75e44b9139d8afaea4381b53ae78b15746
4ba12b3dda34472c193c9fa8ffd7d3bd5b6c04d6
849f104c2789c884428fd45501912c6591a78e12
38dd53c525054daf83dba27d7d46e90e8b41fa50
6059784770c4c88fb6fe528b9f7634192fa1164e
ee031eb5256bb83e0d6add2bae6fd943a4186ffe
69e11b58b4db0952f11a5ff85aa7150b5f5b8db8
271bb32855853b011fceaf0ad2f829bce66b2a19
# typos
d238b8f6003d34cae7f65ff7585b48a2cd9449fb
4547137aaff32b20172870a549d3a28a3c7adf1c

5
.gitattributes vendored
View File

@ -1 +1,6 @@
*.h linguist-language=C
src/nvim/testdir/test42.in diff
.github/ export-ignore
.travis.yml export-ignore
codecov.yml export-ignore
.builds/ export-ignore

3
.github/FUNDING.yml vendored
View File

@ -1 +1,2 @@
custom: https://salt.bountysource.com/teams/neovim
github: neovim
open_collective: neovim

View File

@ -1,29 +0,0 @@
---
name: Bug report
about: Report a problem in Nvim
title: ''
labels: bug
---
<!-- Before reporting: search existing issues and check the FAQ. -->
- `nvim --version`:
- `vim -u DEFAULTS` (version: ) behaves differently?
- Operating system/version:
- Terminal name/version:
- `$TERM`:
### Steps to reproduce using `nvim -u NORC`
```
nvim -u NORC
# Alternative for shell-related problems:
# env -i TERM=ansi-256color "$(which nvim)"
```
### Actual behaviour
### Expected behaviour

75
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@ -0,0 +1,75 @@
name: Bug Report
description: Report a problem in Neovim
labels: [bug]
body:
- type: markdown
attributes:
value: |
_Before reporting:_ search [existing issues](https://github.com/neovim/neovim/issues?q=is%3Aissue+is%3Aopen+label%3Abug) and check the [FAQ](https://github.com/neovim/neovim/wiki/FAQ). Usage questions such as "How do I...?" belong on the [Neovim Discourse](https://neovim.discourse.group/c/7-category/7) and will be closed.
- type: input
attributes:
label: "Neovim version (nvim -v)"
placeholder: "0.6.0 commit db1b0ee3b30f"
validations:
required: true
- type: input
attributes:
label: "Vim (not Nvim) behaves the same?"
description: "Does `vim -u DEFAULTS` have the same issue? Note the exact Vim version (`8.x.yyyy`)."
placeholder: "no, vim 7.3.432"
validations:
required: true
- type: input
attributes:
label: "Operating system/version"
placeholder: "macOS 11.5"
validations:
required: true
- type: input
attributes:
label: "Terminal name/version"
placeholder: "xterm 3.1"
validations:
required: true
- type: input
attributes:
label: "$TERM environment variable"
placeholder: "xterm-256color"
validations:
required: true
- type: input
attributes:
label: "Installation"
description: "How did you install neovim: build from repo / system package manager / appimage / homebrew / snap / chocolatey / other (describe)?"
placeholder: "Arch User Repository (AUR)"
validations:
required: true
- type: textarea
attributes:
label: "How to reproduce the issue"
description: |
- Steps to reproduce using `nvim --clean` ("factory defaults").
- For build failures: list the exact steps including CMake flags (if any).
- For shell-related problems: try `env -i TERM=ansi-256color "$(which nvim)"`.
placeholder: |
nvim --clean
:edit foo
yiwp
validations:
required: true
- type: textarea
attributes:
label: "Expected behavior"
description: "Describe the behavior you expect. May include logs, images, or videos."
validations:
required: true
- type: textarea
attributes:
label: "Actual behavior"
validations:
required: true

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Question
url: https://neovim.discourse.group/
about: Ask questions about configuration and usage of Neovim

View File

@ -1,27 +0,0 @@
---
name: Feature request
about: Request an enhancement for Nvim
title: ''
labels: enhancement
---
<!-- Before reporting: search existing issues and check the FAQ. -->
- `nvim --version`:
- `vim -u DEFAULTS` (version: ) behaves differently?
- Operating system/version:
- Terminal name/version:
- `$TERM`:
### Steps to reproduce using `nvim -u NORC`
```
nvim -u NORC
```
### Actual behaviour
### Expected behaviour

View File

@ -0,0 +1,21 @@
name: Feature request
description: Request an enhancement for Neovim
labels: [enhancement]
body:
- type: markdown
attributes:
value: |
Before requesting: search [existing issues](https://github.com/neovim/neovim/labels/enhancement) and check the [FAQ](https://github.com/neovim/neovim/wiki/FAQ).
- type: input
attributes:
label: "Feature already in Vim?"
description: "Does the feature already exist in Vim? If possible, specify which version (or commit) that introduced it."
placeholder: "Yes, Vim 7.3.432"
- type: textarea
attributes:
label: "Feature description"
validations:
required: true

View File

@ -0,0 +1,54 @@
name: Language server (LSP) client bug
description: Report an issue with Neovim LSP
labels: [bug, lsp]
body:
- type: markdown
attributes:
value: |
_Before reporting:_ search [existing issues](https://github.com/neovim/neovim/issues?q=is%3Aissue+is%3Aopen+label%3Abug) and check the [FAQ](https://github.com/neovim/neovim/wiki/FAQ). Usage questions such as "How do I...?" or "Why isn't X language server/feature working?" belong on the [Neovim Discourse](https://neovim.discourse.group/c/7-category/7) and will be closed.
- type: input
attributes:
label: "Neovim version (nvim -v)"
placeholder: "0.6.0 commit db1b0ee3b30f"
validations:
required: true
- type: input
attributes:
label: "Language server name/version"
placeholder: "rls 0.5.2"
validations:
required: true
- type: input
attributes:
label: "Operating system/version"
placeholder: "emacs 23"
validations:
required: true
- type: textarea
attributes:
label: 'Steps to reproduce using "nvim -u minimal_init.lua"'
description: |
- Download the minimal config with `curl -LO https://raw.githubusercontent.com/neovim/nvim-lspconfig/master/test/minimal_init.lua` and modify it to include any specific commands or servers pertaining to your issues.
- _Note_: if the issue is with an autocompletion or other LSP plugin, report to that plugin's issue tracker.
validations:
required: true
- type: textarea
attributes:
label: "Expected behavior"
description: "Describe the behavior you expect. May include logs, images, or videos."
- type: textarea
attributes:
label: "Actual behavior"
- type: input
attributes:
label: "Log file"
placeholder: "https://gist.github.com/prakhar1989/1b0a2c9849b2e1e912fb"
description: |
- Upload `lsp.log` before and after the problem in a [secret gist](https://gist.github.com/). Paste the URL to the gist.
- You can set the log level by adding `vim.lsp.set_log_level("debug")` after setting up LSP in your config.
- You can find the location of the log with `:lua print(vim.lsp.get_log_path())`

65
.github/labeler.yml vendored Normal file
View File

@ -0,0 +1,65 @@
"lsp":
- runtime/lua/vim/lsp.lua
- runtime/lua/vim/lsp/*
"lua":
- runtime/lua/**/*
- src/nvim/lua/*
"tui":
- src/nvim/tui/tui.*
"treesitter":
- src/nvim/lua/treesitter.*
- runtime/lua/vim/treesitter.lua
- runtime/lua/vim/treesitter/*
"diagnostic":
- runtime/lua/vim/diagnostic.lua
"dependencies":
- third-party/**/*
"spell":
- src/nvim/spell*
"terminal":
- src/nvim/terminal.*
"column":
- src/nvim/mark.h
- src/nvim/mark.c
- src/nvim/sign*
"folds":
- src/nvim/fold*
"mouse":
- src/nvim/mouse*
"documentation":
- all: ["runtime/doc/*"]
"clipboard":
- runtime/autoload/provider/clipboard.vim
"diff":
- src/nvim/diff.*
"build":
- CMakeLists.txt
- "**/CMakeLists.txt"
- "**/Makefile"
- "**/*.cmake"
"test":
- all: ["test/**/*"]
"ci":
- .github/labeler.yml
- .github/workflows/**/*
- .builds/*
- ci/**/*
"filetype":
- runtime/lua/vim/filetype.lua

16
.github/scripts/remove-reviewers.js vendored Normal file
View File

@ -0,0 +1,16 @@
module.exports = async ({github, context}) => {
const requestedReviewers = await github.rest.pulls.listRequestedReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number
});
const reviewers = requestedReviewers.data.users.map(e => e.login)
github.rest.pulls.removeRequestedReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
reviewers: reviewers
});
}

95
.github/scripts/reviews.js vendored Normal file
View File

@ -0,0 +1,95 @@
module.exports = async ({github, context}) => {
const pr_data = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number
})
const labels = pr_data.data.labels.map(e => e.name)
const reviewers = new Set()
if (labels.includes('api')) {
reviewers.add("bfredl")
reviewers.add("gpanders")
reviewers.add("muniter")
}
if (labels.includes('build')) {
reviewers.add("jamessan")
}
if (labels.includes('ci')) {
reviewers.add("jamessan")
}
if (labels.includes('column')) {
reviewers.add("lewis6991")
}
if (labels.includes('diagnostic')) {
reviewers.add("gpanders")
}
if (labels.includes('diff')) {
reviewers.add("lewis6991")
}
if (labels.includes('dependencies')) {
reviewers.add("jamessan")
}
if (labels.includes('distribution')) {
reviewers.add("jamessan")
}
if (labels.includes('documentation')) {
reviewers.add("clason")
}
if (labels.includes('extmarks')) {
reviewers.add("bfredl")
}
if (labels.includes('filetype')) {
reviewers.add("clason")
reviewers.add("gpanders")
}
if (labels.includes('gui')) {
reviewers.add("glacambre")
reviewers.add("smolck")
}
if (labels.includes('lsp')) {
reviewers.add("mfussenegger")
reviewers.add("mjlbach")
}
if (labels.includes('treesitter')) {
reviewers.add("bfredl")
reviewers.add("vigoux")
}
if (labels.includes('typo')) {
reviewers.add("dundargoc")
}
if (labels.includes('ui')) {
reviewers.add("bfredl")
}
if (labels.includes('vim-patch')) {
reviewers.add("seandewar")
reviewers.add("zeertzjq")
}
// Remove person that opened the PR since they can't review themselves
const pr_opener = pr_data.data.user.login
reviewers.delete(pr_opener)
github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
reviewers: Array.from(reviewers)
});
}

20
.github/workflows/api-docs-check.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: Missing API docs
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches-ignore:
- 'marvim/api-doc-update**'
paths:
- 'src/nvim/api/*.[ch]'
- 'runtime/lua/**.lua'
- 'runtime/doc/**'
jobs:
call-regen-api-docs:
if: github.event.pull_request.draft == false
permissions:
contents: write
pull-requests: write
uses: ./.github/workflows/api-docs.yml
with:
check_only: true

70
.github/workflows/api-docs.yml vendored Normal file
View File

@ -0,0 +1,70 @@
# Autogenerate the API docs on new commit to important branches
# Also work as a check for PR's to not forget committing their doc changes
# called from api-docs-check.yml
name: Autogenerate API docs
on:
push:
paths:
- 'src/nvim/api/*.[ch]'
- 'runtime/lua/**.lua'
- 'runtime/doc/**'
branches:
- 'master'
- 'release-[0-9]+.[0-9]+'
workflow_dispatch:
workflow_call:
inputs:
check_only:
type: boolean
default: false
required: false
jobs:
regen-api-docs:
runs-on: ubuntu-20.04
permissions:
contents: write
pull-requests: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update
sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y python3 luajit
conda install -c conda-forge doxygen=1.9.2 msgpack-python
echo "$CONDA/bin" >> $GITHUB_PATH
- name: Setup git config
run: |
git config --global user.name 'marvim'
git config --global user.email 'marvim@users.noreply.github.com'
- run: printf 'DOC_BRANCH=marvim/api-doc-update/%s\n' ${GITHUB_REF#refs/heads/} >> $GITHUB_ENV
- name: Generate docs
id: docs
run: |
git checkout -b ${DOC_BRANCH}
python3 scripts/gen_vimdoc.py
printf '::set-output name=UPDATED_DOCS::%s\n' $([ -z "$(git diff)" ]; echo $?)
- name: FAIL, PR has not committed doc changes
if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 && inputs.check_only }}
run: |
echo "Job failed, run ./scripts/gen_vimdoc.py and commit your doc changes"
echo "The doc generation produces the following changes:"
git --no-pager diff
exit 1
- name: Automatic PR
if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 && !inputs.check_only }}
run: |
git add -u
git commit -m 'docs: regenerate [skip ci]'
git push --force https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} ${DOC_BRANCH}
gh pr create --draft --fill --base ${GITHUB_REF#refs/heads/} --head ${DOC_BRANCH} || true

33
.github/workflows/backport.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Backport
on:
pull_request_target:
types: [closed, labeled]
issue_comment:
types: [created]
jobs:
backport:
permissions:
contents: write
pull-requests: write
name: Backport Pull Request
if: >
github.repository_owner == 'neovim' && (
github.event_name == 'pull_request_target' &&
github.event.pull_request.merged
) || (
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
contains(github.event.comment.body, '/backport')
)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# required to find all branches
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Create backport PRs
uses: zeebe-io/backport-action@v0.0.7
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_workspace: ${{ github.workspace }}

249
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,249 @@
name: CI
on:
push:
branches:
- 'master'
- 'release-[0-9]+.[0-9]+'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- 'master'
- 'release-[0-9]+.[0-9]+'
paths-ignore:
- 'runtime/doc/*'
# Cancel any in-progress CI runs for a PR if it is updated
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
lint:
# This job tests two things: it lints the code but also builds neovim using
# system dependencies instead of bundled dependencies. This is to make sure
# we are able to build neovim without pigeonholing ourselves into specifics
# of the bundled dependencies.
if: (github.event_name == 'pull_request' && github.base_ref == 'master' && !github.event.pull_request.draft) || (github.event_name == 'push' && github.ref == 'refs/heads/master')
runs-on: ubuntu-20.04
timeout-minutes: 10
env:
CC: gcc
steps:
- uses: actions/checkout@v2
- name: Setup common environment variables
run: ./.github/workflows/env.sh lint
- name: Install apt packages
run: |
sudo add-apt-repository ppa:neovim-ppa/stable
sudo apt-get update
sudo apt-get install -y \
autoconf \
automake \
build-essential \
ccache \
cmake \
flake8 \
gettext \
gperf \
libluajit-5.1-dev \
libmsgpack-dev \
libtermkey-dev \
libtool-bin \
libtree-sitter-dev \
libunibilium-dev \
libuv1-dev \
libvterm-dev \
locales \
lua-busted \
lua-check \
lua-filesystem \
lua-inspect \
lua-lpeg \
lua-luv-dev \
lua-nvim \
luajit \
ninja-build \
pkg-config
- name: Cache artifacts
uses: actions/cache@v2
with:
path: |
${{ env.CACHE_NVIM_DEPS_DIR }}
~/.ccache
key: lint-${{ hashFiles('cmake/*', '**/CMakeLists.txt', '!third-party/**CMakeLists.txt') }}-${{ github.base_ref }}
- name: Build third-party
run: ./ci/before_script.sh
- name: Build nvim
run: ./ci/run_tests.sh build_nvim
- if: "!cancelled()"
name: clint-full
run: ./ci/run_lint.sh clint-full
- if: "!cancelled()"
name: lualint
run: ./ci/run_lint.sh lualint
- if: "!cancelled()"
name: pylint
run: ./ci/run_lint.sh pylint
- if: "!cancelled()"
name: shlint
run: ./ci/run_lint.sh shlint
- if: "!cancelled()"
name: check-single-includes
run: ./ci/run_lint.sh check-single-includes
- name: Cache dependencies
run: ./ci/before_cache.sh
posix:
name: ${{ matrix.runner }} ${{ matrix.flavor }} (cc=${{ matrix.cc }})
strategy:
fail-fast: false
matrix:
include:
- flavor: asan
cc: clang-13
runner: ubuntu-20.04
os: linux
- flavor: tsan
cc: clang-13
runner: ubuntu-20.04
os: linux
- cc: clang
runner: macos-10.15
os: osx
- cc: clang
runner: macos-11.0
os: osx
# The functionaltest-lua test two things simultaneously:
# 1. Check that the tests pass with PUC Lua instead of LuaJIT.
# 2. Use as oldest/minimum versions of dependencies/build tools we
# still explicitly support so we don't accidentally rely on
# features that is only available on later versions.
- flavor: functionaltest-lua
cc: gcc
runner: ubuntu-20.04
os: linux
cmake: minimum_required
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
if: github.event.pull_request.draft == false
env:
CC: ${{ matrix.cc }}
CI_OS_NAME: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup common environment variables
run: ./.github/workflows/env.sh ${{ matrix.flavor }}
- name: Install apt packages
if: matrix.os == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y autoconf automake build-essential ccache cmake cpanminus cscope gcc-multilib gdb gettext gperf language-pack-tr libtool-bin locales ninja-build pkg-config python3 python3-pip python3-setuptools unzip valgrind xclip
- name: Install minimum required version of cmake
if: matrix.cmake == 'minimum_required'
env:
CMAKE_URL: 'https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.sh'
CMAKE_VERSION: '3.10.0'
shell: bash
run: |
curl --retry 5 --silent --show-error --fail -o /tmp/cmake-installer.sh "$CMAKE_URL"
mkdir -p "$HOME/.local/bin" /opt/cmake-custom
chmod a+x /tmp/cmake-installer.sh
/tmp/cmake-installer.sh --prefix=/opt/cmake-custom --skip-license
ln -sfn /opt/cmake-custom/bin/cmake "$HOME/.local/bin/cmake"
cmake_version="$(cmake --version | head -1)"
echo "$cmake_version" | grep -qF "cmake version $CMAKE_VERSION" || {
echo "Unexpected CMake version: $cmake_version"
exit 1
}
- name: Install new clang
if: matrix.flavor == 'asan' || matrix.flavor == 'tsan'
run: |
wget https://apt.llvm.org/llvm.sh
chmod a+x llvm.sh
sudo ./llvm.sh 13
rm llvm.sh
- name: Install brew packages
if: matrix.os == 'osx'
run: |
brew update --quiet
brew install automake ccache cpanminus ninja
- name: Setup interpreter packages
run: ./ci/install.sh
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
${{ env.CACHE_NVIM_DEPS_DIR }}
~/.ccache
key: ${{ matrix.runner }}-${{ matrix.flavor }}-${{ matrix.cc }}-${{ hashFiles('cmake/*', 'third-party/**', '**/CMakeLists.txt') }}-${{ github.base_ref }}
- name: Build third-party
run: ./ci/before_script.sh
- name: Build
run: ./ci/run_tests.sh build_nvim
- if: matrix.flavor != 'tsan' && matrix.flavor != 'functionaltest-lua' && !cancelled()
name: Unittests
run: ./ci/run_tests.sh unittests
- if: matrix.flavor != 'tsan' && !cancelled()
name: Functionaltests
run: ./ci/run_tests.sh functionaltests
- if: "!cancelled()"
name: Oldtests
run: ./ci/run_tests.sh oldtests
- if: "!cancelled()"
name: Install nvim
run: ./ci/run_tests.sh install_nvim
- name: Cache dependencies
run: ./ci/before_cache.sh
windows:
runs-on: windows-2019
timeout-minutes: 45
if: github.event.pull_request.draft == false
env:
DEPS_BUILD_DIR: ${{ format('{0}/nvim-deps', github.workspace) }}
DEPS_PREFIX: ${{ format('{0}/nvim-deps/usr', github.workspace) }}
strategy:
fail-fast: false
matrix:
config: [ MINGW_64-gcov, MSVC_64 ]
name: windows (${{ matrix.config }})
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ${{ env.DEPS_BUILD_DIR }}
key: ${{ matrix.config }}-${{ hashFiles('third-party\**') }}
- name: Run CI
run: powershell ci\build.ps1
env:
CONFIGURATION: ${{ matrix.config }}

23
.github/workflows/commitlint.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: "Commit Linter"
on:
# Only pull_request and push honor [skip ci]. Since this workflow must pass
# to merge a PR, it can't be skipped, so use pull_request_target
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- 'master'
jobs:
lint-commits:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
path: pr_nvim
- uses: rhysd/action-setup-vim@v1
with:
neovim: true
- run: wget https://raw.githubusercontent.com/neovim/neovim/master/scripts/lintcommit.lua
- run: nvim --clean -es +"cd pr_nvim" +"lua dofile('../lintcommit.lua').main({trace=true})"

44
.github/workflows/coverity-scan.yml vendored Normal file
View File

@ -0,0 +1,44 @@
name: Coverity
on:
schedule:
- cron: '0 10 * * 1' # Run every Monday at 00:10
workflow_dispatch:
jobs:
scan:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y autoconf automake build-essential cmake gettext gperf libtool-bin locales ninja-build pkg-config unzip
- name: Download Coverity
run: |
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=neovim%2Fneovim" -O coverity_tool.tgz
mkdir cov-scan
tar ax -f coverity_tool.tgz --strip-components=1 -C cov-scan
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
- name: Build dependencies
run: make deps
- name: Build/scan neovim
run: |
env PATH=$(pwd)/cov-scan/bin:$PATH cov-build --dir cov-int make
- name: Submit results
run: |
tar zcf cov-scan.tgz cov-int
curl --form token=$TOKEN \
--form email=$EMAIL \
--form file=@cov-scan.tgz \
--form version="$(git rev-parse HEAD)" \
--form description="Weekly GHA scan" \
'https://scan.coverity.com/builds?project=neovim%2Fneovim'
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }}

70
.github/workflows/env.sh vendored Executable file
View File

@ -0,0 +1,70 @@
#!/bin/bash
set -e -u
FLAVOR=${1:-}
cat <<EOF >> "$GITHUB_PATH"
$HOME/.local/bin
EOF
cat <<EOF >> "$GITHUB_ENV"
CACHE_ENABLE=true
CI_TARGET=tests
CI_BUILD_DIR=$GITHUB_WORKSPACE
BUILD_DIR=$GITHUB_WORKSPACE/build
DEPS_BUILD_DIR=$HOME/nvim-deps
INSTALL_PREFIX=$HOME/nvim-install
LOG_DIR=$GITHUB_WORKSPACE/build/log
NVIM_LOG_FILE=$GITHUB_WORKSPACE/build/.nvimlog
VALGRIND_LOG=$GITHUB_WORKSPACE/build/log/valgrind-%p.log
CACHE_NVIM_DEPS_DIR=$HOME/.cache/nvim-deps
CACHE_MARKER=$HOME/.cache/nvim-deps/.ci_cache_marker
CCACHE_BASEDIR=$GITHUB_WORKSPACE
CCACHE_COMPRESS=1
CCACHE_SLOPPINESS=time_macros,file_macro
CCACHE_DIR=$HOME/.ccache
EOF
DEPS_CMAKE_FLAGS=-DUSE_BUNDLED_GPERF=OFF
FUNCTIONALTEST=functionaltest
BUILD_FLAGS="CMAKE_FLAGS=-DCI_BUILD=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=$HOME/nvim-install -DBUSTED_OUTPUT_TYPE=nvim -DDEPS_PREFIX=$HOME/nvim-deps/usr -DMIN_LOG_LEVEL=3"
case "$FLAVOR" in
asan)
BUILD_FLAGS="$BUILD_FLAGS -DPREFER_LUA=ON"
cat <<EOF >> "$GITHUB_ENV"
CLANG_SANITIZER=ASAN_UBSAN
SYMBOLIZER=asan_symbolize-13
ASAN_OPTIONS=detect_leaks=1:check_initialization_order=1:log_path=$GITHUB_WORKSPACE/build/log/asan:intercept_tls_get_addr=0
UBSAN_OPTIONS=print_stacktrace=1 log_path=$GITHUB_WORKSPACE/build/log/ubsan
EOF
;;
tsan)
cat <<EOF >> "$GITHUB_ENV"
TSAN_OPTIONS=log_path=$GITHUB_WORKSPACE/build/log/tsan
CLANG_SANITIZER=TSAN
EOF
;;
lint)
# Re-enable once system deps are available
# BUILD_FLAGS="$BUILD_FLAGS -DLIBLUV_LIBRARY:FILEPATH=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/lua/5.1/luv.so -DLIBLUV_INCLUDE_DIR:PATH=/usr/include/lua5.1"
DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUV=ON"
cat <<EOF >> "$GITHUB_ENV"
USE_BUNDLED=OFF
CI_TARGET=lint
EOF
;;
functionaltest-lua)
BUILD_FLAGS="$BUILD_FLAGS -DPREFER_LUA=ON"
FUNCTIONALTEST=functionaltest-lua
DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUAJIT=OFF"
;;
*)
;;
esac
cat <<EOF >> "$GITHUB_ENV"
$BUILD_FLAGS
DEPS_CMAKE_FLAGS=$DEPS_CMAKE_FLAGS
FUNCTIONALTEST=$FUNCTIONALTEST
EOF

49
.github/workflows/labeler.yml vendored Normal file
View File

@ -0,0 +1,49 @@
name: "Pull Request Labeler"
on:
pull_request_target:
types: [opened]
jobs:
triage:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/labeler@main
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: ""
type-scope:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
steps:
- name: "Extract commit type and add as label"
run: gh pr edit "$PR_NUMBER" --add-label "$(echo "$PR_TITLE" | sed -E 's|([[:alpha:]]+)(\(.*\))?!?:.*|\1|')" || true
- name: "Extract commit scope and add as label"
run: gh pr edit "$PR_NUMBER" --add-label "$(echo "$PR_TITLE" | sed -E 's|[[:alpha:]]+\((.+)\)!?:.*|\1|')" || true
- name: "Extract if the PR is a breaking change and add it as label"
run: gh pr edit "$PR_NUMBER" --add-label "$(echo "$PR_TITLE" | sed -E 's|[[:alpha:]]+(\(.*\))?!:.*|breaking-change|')" || true
request-reviewer:
if: github.event.pull_request.state == 'open' && github.event.pull_request.draft == false
runs-on: ubuntu-latest
needs: ["triage", "type-scope"]
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v2
- name: 'Request reviewers'
uses: actions/github-script@v6
with:
script: |
const script = require('./.github/scripts/reviews.js')
await script({github, context})

64
.github/workflows/notes.md vendored Normal file
View File

@ -0,0 +1,64 @@
```
${NVIM_VERSION}
```
## Install
### Windows
#### Zip
1. Download **nvim-win64.zip**
2. Extract the zip.
3. Run `nvim-qt.exe`
#### MSI
1. Download **nvim-win64.msi**
2. Run the MSI
3. Search and run `nvim-qt.exe` or run `nvim.exe` on your CLI of choice.
### macOS
1. Download **nvim-macos.tar.gz**
2. Extract: `tar xzvf nvim-macos.tar.gz`
3. Run `./nvim-macos/bin/nvim`
### Linux (x64)
#### Tarball
1. Download **nvim-linux64.tar.gz**
2. Extract: `tar xzvf nvim-linux64.tar.gz`
3. Run `./nvim-linux64/bin/nvim`
#### Debian Package
1. Download **nvim-linux64.deb**
2. Install the package using `sudo apt install ./nvim-linux64.deb`
3. Run `nvim`
#### AppImage
1. Download **nvim.appimage**
2. Run `chmod u+x nvim.appimage && ./nvim.appimage`
- If your system does not have FUSE you can [extract the appimage](https://github.com/AppImage/AppImageKit/wiki/FUSE#type-2-appimage):
```
./nvim.appimage --appimage-extract
./squashfs-root/usr/bin/nvim
```
### Other
- Install by [package manager](https://github.com/neovim/neovim/wiki/Installing-Neovim)
## SHA256 Checksums
```
${SHA_LINUX_64_TAR}
${SHA_LINUX_64_DEB}
${SHA_APP_IMAGE}
${SHA_APP_IMAGE_ZSYNC}
${SHA_MACOS}
${SHA_WIN_64_ZIP}
${SHA_WIN_64_MSI}
```

243
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,243 @@
name: Release
on:
schedule:
- cron: '5 5 * * *'
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name for release'
required: false
default: nightly
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
# Build on the oldest supported images, so we have broader compatibility
# Upgrade to gcc-11 to prevent it from using its builtins (#14150)
jobs:
linux:
runs-on: ubuntu-18.04
outputs:
version: ${{ steps.build.outputs.version }}
release: ${{ steps.build.outputs.release }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y autoconf automake build-essential cmake gcc-11 gettext gperf libtool-bin locales ninja-build pkg-config unzip
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
run: printf 'NVIM_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV
- name: Build release
id: build
run: |
CC=gcc-11 make CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH="
printf '::set-output name=version::%s\n' "$(./build/bin/nvim --version | head -n 3 | sed -z 's/\n/%0A/g')"
printf '::set-output name=release::%s\n' "$(./build/bin/nvim --version | head -n 1)"
make DESTDIR="$GITHUB_WORKSPACE/build/release/nvim-linux64" install
cd "$GITHUB_WORKSPACE/build/"
cpack -C $NVIM_BUILD_TYPE
- uses: actions/upload-artifact@v2
with:
name: nvim-linux64
path: build/nvim-linux64.tar.gz
retention-days: 1
- uses: actions/upload-artifact@v2
with:
name: nvim-linux64
path: build/nvim-linux64.deb
retention-days: 1
appimage:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y autoconf automake build-essential cmake gcc-11 gettext gperf libtool-bin locales ninja-build pkg-config unzip
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
run: CC=gcc-11 make appimage-latest
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
run: CC=gcc-11 make appimage-nightly
- uses: actions/upload-artifact@v2
with:
name: appimage
path: build/bin/nvim.appimage
retention-days: 1
- uses: actions/upload-artifact@v2
with:
name: appimage
path: build/bin/nvim.appimage.zsync
retention-days: 1
macOS:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install brew packages
run: |
brew update --quiet
brew install automake ninja
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
run: printf 'NVIM_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV
- name: Provision universal `libintl`
run: |
GETTEXT_PREFIX="$(brew --prefix gettext)"
printf 'GETTEXT_PREFIX=%s\n' "$GETTEXT_PREFIX" >> $GITHUB_ENV
bottle_tag="arm64_big_sur"
brew fetch --bottle-tag="$bottle_tag" gettext
cd "$(mktemp -d)"
tar xf "$(brew --cache)"/**/*gettext*${bottle_tag}*.tar.gz
lipo gettext/*/lib/libintl.a "${GETTEXT_PREFIX}/lib/libintl.a" -create -output libintl.a
mv -f libintl.a /usr/local/lib/
- name: Ensure static linkage to `libintl`
run: |
# We're about to mangle `gettext`, so let's remove any potentially broken
# installs (e.g. curl, git) as those could interfere with our build.
brew uninstall $(brew uses --installed --recursive gettext)
brew unlink gettext
ln -sf "$(brew --prefix)/opt/$(readlink "${GETTEXT_PREFIX}")/bin"/* /usr/local/bin/
rm -f "$GETTEXT_PREFIX"
- name: Build release
run: |
export MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion | cut -f1 -d.)"
OSX_FLAGS="-DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} -DCMAKE_OSX_ARCHITECTURES=arm64\;x86_64"
make CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} \
CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH= $OSX_FLAGS" \
DEPS_CMAKE_FLAGS="$OSX_FLAGS"
make DESTDIR="$GITHUB_WORKSPACE/build/release/nvim-macos" install
- name: Create package
run: |
cd "$GITHUB_WORKSPACE/build/release"
tar cfz nvim-macos.tar.gz nvim-macos
- uses: actions/upload-artifact@v3
with:
name: nvim-macos
path: build/release/nvim-macos.tar.gz
retention-days: 1
windows:
runs-on: windows-2019
env:
DEPS_BUILD_DIR: ${{ format('{0}/nvim-deps', github.workspace) }}
DEPS_PREFIX: ${{ format('{0}/nvim-deps/usr', github.workspace) }}
strategy:
matrix:
include:
- config: MSVC_64
archive: nvim-win64
name: windows (${{ matrix.config }})
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: powershell ci\build.ps1 -NoTests
env:
CONFIGURATION: ${{ matrix.config }}
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.archive }}
path: build/${{ matrix.archive }}.zip
retention-days: 1
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.archive }}
path: build/${{ matrix.archive }}.msi
retention-days: 1
publish:
needs: [linux, appimage, macOS, windows]
runs-on: ubuntu-20.04
env:
GH_REPO: ${{ github.repository }}
permissions:
contents: write
steps:
# Must perform checkout first, since it deletes the target directory
# before running, and would therefore delete the downloaded artifacts
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gettext-base
- if: github.event_name == 'workflow_dispatch'
run: echo "TAG_NAME=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV
- if: github.event_name == 'schedule'
run: echo 'TAG_NAME=nightly' >> $GITHUB_ENV
- if: github.event_name == 'push'
run: |
TAG_NAME=${{ github.ref }}
echo "TAG_NAME=${TAG_NAME#refs/tags/}" >> $GITHUB_ENV
- if: env.TAG_NAME == 'nightly'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
(echo 'SUBJECT=Nvim development (prerelease) build';
echo 'PRERELEASE=--prerelease') >> $GITHUB_ENV
gh release delete nightly --yes || true
git push origin :nightly || true
- if: env.TAG_NAME != 'nightly'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
(echo 'SUBJECT=Nvim release build';
echo 'PRERELEASE=') >> $GITHUB_ENV
gh release delete stable --yes || true
git push origin :stable || true
# `sha256sum` outputs <sha> <path>, so we cd into each dir to drop the
# containing folder from the output.
- name: Generate Linux64 SHA256 checksums
run: |
cd ./nvim-linux64
sha256sum nvim-linux64.tar.gz > nvim-linux64.tar.gz.sha256sum
echo "SHA_LINUX_64_TAR=$(cat nvim-linux64.tar.gz.sha256sum)" >> $GITHUB_ENV
sha256sum nvim-linux64.deb > nvim-linux64.deb.sha256sum
echo "SHA_LINUX_64_DEB=$(cat nvim-linux64.deb.sha256sum)" >> $GITHUB_ENV
- name: Generate App Image SHA256 checksums
run: |
cd ./appimage
sha256sum nvim.appimage > nvim.appimage.sha256sum
echo "SHA_APP_IMAGE=$(cat nvim.appimage.sha256sum)" >> $GITHUB_ENV
- name: Generate App Image Zsync SHA256 checksums
run: |
cd ./appimage
sha256sum nvim.appimage.zsync > nvim.appimage.zsync.sha256sum
echo "SHA_APP_IMAGE_ZSYNC=$(cat nvim.appimage.zsync.sha256sum)" >> $GITHUB_ENV
- name: Generate macOS SHA256 checksums
run: |
cd ./nvim-macos
sha256sum nvim-macos.tar.gz > nvim-macos.tar.gz.sha256sum
echo "SHA_MACOS=$(cat nvim-macos.tar.gz.sha256sum)" >> $GITHUB_ENV
- name: Generate Win64 SHA256 checksums
run: |
cd ./nvim-win64
sha256sum nvim-win64.zip > nvim-win64.zip.sha256sum
echo "SHA_WIN_64_ZIP=$(cat nvim-win64.zip.sha256sum)" >> $GITHUB_ENV
sha256sum nvim-win64.msi > nvim-win64.msi.sha256sum
echo "SHA_WIN_64_MSI=$(cat nvim-win64.msi.sha256sum)" >> $GITHUB_ENV
- name: Publish release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NVIM_VERSION: ${{ needs.linux.outputs.version }}
DEBUG: api
run: |
envsubst < "$GITHUB_WORKSPACE/.github/workflows/notes.md" > "$RUNNER_TEMP/notes.md"
gh release create $TAG_NAME $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos/* nvim-linux64/* appimage/* nvim-win64/*
if [ "$TAG_NAME" != "nightly" ]; then
gh release create stable $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos/* nvim-linux64/* appimage/* nvim-win64/*
fi

View File

@ -0,0 +1,17 @@
name: "Remove reviewers"
on:
pull_request_target:
types: [converted_to_draft, closed]
jobs:
remove-reviewers:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v2
- name: 'Remove reviewers'
uses: actions/github-script@v6
with:
script: |
const script = require('./.github/scripts/remove-reviewers.js')
await script({github, context})

18
.github/workflows/reviews.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: "Request reviews"
on:
pull_request_target:
types: [labeled, ready_for_review]
jobs:
request-reviewer:
if: github.event.pull_request.state == 'open' && github.event.pull_request.draft == false
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v2
- name: 'Request reviewers'
uses: actions/github-script@v6
with:
script: |
const script = require('./.github/scripts/reviews.js')
await script({github, context})

52
.github/workflows/vim-patches.yml vendored Normal file
View File

@ -0,0 +1,52 @@
name: vim-patches
on:
schedule:
- cron: '3 3 * * *'
jobs:
update-vim-patches:
runs-on: ubuntu-20.04
permissions:
contents: write
pull-requests: write
env:
VIM_SOURCE_DIR: ${{ format('{0}/vim-src', github.workspace) }}
VERSION_BRANCH: marvim/ci-version-update
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/checkout@v2
with:
repository: vim/vim
path: ${{ env.VIM_SOURCE_DIR }}
fetch-depth: 0
- run: |
gh release download -R neovim/neovim -p nvim.appimage
chmod a+x nvim.appimage
mkdir -p $HOME/.local/bin
mv nvim.appimage $HOME/.local/bin/nvim
printf '%s\n' "$HOME/.local/bin" >> $GITHUB_PATH
- name: Setup git config
run: |
git config --global user.name 'marvim'
git config --global user.email 'marvim@users.noreply.github.com'
- name: Update src/version.c
id: update-version
run: |
git checkout -b ${VERSION_BRANCH}
nvim -i NONE -u NONE --headless +'luafile scripts/vimpatch.lua' +q
printf '::set-output name=NEW_PATCHES::%s\n' $([ -z "$(git diff)" ]; echo $?)
- name: Automatic PR
if: ${{ steps.update-version.outputs.NEW_PATCHES != 0 }}
run: |
git add -u
git commit -m 'version.c: update [skip ci]'
git push --force https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} ${VERSION_BRANCH}
gh pr create --draft --fill --label vim-patch --base ${GITHUB_REF#refs/heads/} --head ${VERSION_BRANCH} || true

34
.gitignore vendored
View File

@ -1,16 +1,23 @@
# Tools
.ropeproject/
/venv/
compile_commands.json
# Visual Studio
/.luarc.json
# IDEs
/.vs/
/.vscode/
/.idea/
# Build/deps dir
/build/
/cmake-build-debug/
/dist/
/.deps/
/tmp/
/.clangd/
/.cache/clangd/
/.ccls-cache/
/.clang-tidy
.DS_Store
*.mo
.*.sw?
*~
@ -18,8 +25,6 @@ compile_commands.json
*.o
*.so
tags
/src/nvim/po/vim.pot
/src/nvim/po/*.ck
@ -27,13 +32,14 @@ tags
/.nvimlog
# Generated by scripts/vim-patch.sh
/.vim-src/
/.vim-src
*.rej
# Generated by old (Vim) tests.
/src/nvim/testdir/del
/src/nvim/testdir/test*.out
/src/nvim/testdir/test*.res
/src/nvim/testdir/test.log
/src/nvim/testdir/test*.log
/src/nvim/testdir/messages
/src/nvim/testdir/viminfo
/src/nvim/testdir/test.ok
@ -42,6 +48,7 @@ tags
/src/nvim/testdir/valgrind.*
/src/nvim/testdir/.gdbinit
/runtime/indent/testdir/*.out
+runtime/indent/testdir/*.fail
# Generated by src/nvim/testdir/runnvim.sh.
/src/nvim/testdir/*.tlog
@ -54,10 +61,15 @@ tags
# local make targets
local.mk
# runtime/doc
# Generated from :help docs
tags
/runtime/doc/*.html
/runtime/doc/tags.ref
/runtime/doc/errors.log
# CLion
/.idea/
# Generated by gen_vimdoc.py:
/runtime/doc/*.mpack
/tmp-*-doc
# vim patches
/vim-*.patch

View File

@ -1,7 +1,14 @@
-- vim: ft=lua tw=80
stds.nvim = {
read_globals = { "jit" }
}
std = "lua51+nvim"
-- Ignore W211 (unused variable) with preload files.
files["**/preload.lua"] = {ignore = { "211" }}
-- Allow vim module to modify itself, but only here.
files["src/nvim/lua/vim.lua"] = {ignore = { "122/vim" }}
-- Don't report unused self arguments of methods.
self = false
@ -18,3 +25,11 @@ ignore = {
read_globals = {
"vim",
}
globals = {
"vim.g",
}
exclude_files = {
'test/functional/fixtures/lua/syntax_error.lua',
}

22
.luacov Normal file
View File

@ -0,0 +1,22 @@
-- Configuration file for LuaCov
local source = require("lfs").currentdir()
local function pesc(s)
assert(type(s) == 'string', s)
return s:gsub('[%(%)%.%%%+%-%*%?%[%]%^%$]', '%%%1')
end
return {
include = {
-- Absolute paths (starting with source dir, not hidden (i.e. .deps)).
pesc(source) .. "[/\\][^.].+",
-- Relative (non-hidden) paths.
'^[^/\\.]',
},
modules = {
['vim'] = 'runtime/lua/vim/shared.lua'
},
}
-- vim: ft=lua tw=80 sw=2 et

134
.mailmap Normal file
View File

@ -0,0 +1,134 @@
Abdelhakeem <abdelhakeem.osama@hotmail.com> Abdelhakeem Osama
Alvaro Muñoz <alvaro@pwntester.com> Alvaro Muñoz
Andreas Johansson <andreas@ndrs.xyz> <ndreas@users.noreply.github.com>
Andrew Pyatkov <mrbiggfoot@gmail.com> <mrbiggfoot@users.noreply.github.com>
Anmol Sethi <hi@nhooyr.io> <anmol@aubble.com>
Anmol Sethi <hi@nhooyr.io> <me@anmol.io>
Anmol Sethi <hi@nhooyr.io> <nhooyr@users.noreply.github.com>
BK1603 <chouhan.shreyansh2702@gmail.com> Shreyansh Chouhan
Billy Su <g4691821@gmail.com> Billy SU
Billy Vong <billyvg@gmail.com> <billyvg@users.noreply.github.com>
Björn Linse <bjorn.linse@gmail.com> bfredl
Carlos Hernandez <carlos@techbyte.ca> <hurricanehrndz@users.noreply.github.com>
Chris Kipp <ckipp@pm.me> ckipp01
Christian Clason <c.clason@uni-graz.at> <christian.clason@uni-due.de>
Cédric Barreteau <> <cbarrete@users.noreply.github.com>
Dan Aloni <alonid@gmail.com> <dan@kernelim.com>
Daniel Hahler <git@thequod.de> <github@thequod.de>
Eisuke Kawashima <e-kwsm@users.noreply.github.com> E Kawashima
ElPiloto <luis.r.piloto@gmail.com> Luis Piloto
Eliseo Martínez <eliseomarmol@gmail.com> Eliseo Martínez
Fabian Viöl <f.vioel@googlemail.com> Fabian
Florian Walch <florian@fwalch.com> <fwalch@users.noreply.github.com>
Gabriel Cruz <gabs.oficial98@gmail.com> <LTKills@users.noreply.github.com>
Gaelan Steele <gbs@canishe.com> Gaelan
Gavin D. Howard <gavin@schedmd.com> <yzena.tech@gmail.com>
George Zhao <zhaozg@gmail.com> <zhaozg@aliyun.com>
George Zhao <zhaozg@gmail.com> George Zhao
Gregory Anders <greg@gpanders.com> <8965202+gpanders@users.noreply.github.com>
Gregory Anders <greg@gpanders.com> Greg Anders
Grzegorz Milka <grzegorzmilka@gmail.com> Grzegorz
Harm te Hennepe <dhtehennepe@gmail.com> <d.h.tehennepe@student.utwente.nl>
Harm te Hennepe <dhtehennepe@gmail.com> <harm@tehennepe.org>
Hirokazu Hata <h.hata.ai.t@gmail.com> <h-michael@users.noreply.github.com>
Ihor Antonov <ngortheone@gmail.com> <ngortheone@users.noreply.github.com>
J Phani Mahesh <phanimahesh@gmail.com> <github@phanimahesh.me>
Jack Bracewell <FriedSock@users.noreply.github.com> <jack.bracewell@unboxedconsulting.com>
Jack Bracewell <FriedSock@users.noreply.github.com> <jbtwentythree@gmail.com>
Jacques Germishuys <jacquesg@striata.com> <jacquesg@users.noreply.github.com>
Jakub Łuczyński <doubleloop@o2.pl> <doubleloop@users.noreply.github.com>
James McCoy <jamessan@jamessan.com> <vega.james@gmail.com>
Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> <janedmundlazo@hotmail.com>
Jan Viljanen <jan.a.viljanen@gmail.com> <jan.viljanen@greenpeace.org>
Javier Lopez <graulopezjavier@gmail.com> Javier López
Jit Yao Yap <jityao@gmail.com> <jityao+github@gmail.com>
Jit Yao Yap <jityao@gmail.com> Jit
John Gehrig <jdg.gehrig@gmail.com> <jgehrig@users.noreply.github.com>
John Schmidt <john.schmidt.h@gmail.com> John
John Szakmeister <john@szakmeister.net> <jszakmeister@users.noreply.github.com>
Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.com> <jdebp@users.noreply.github.com>
Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.com> <postmaster@localhost>
Jurica Bradaric <jbradaric@gmail.com> <jbradaric@users.noreply.github.com>
Jurica Bradaric <jbradaric@gmail.com> <jurica.bradaric@avl.com>
KillTheMule <KillTheMule@users.noreply.github.com> <github@pipsfrank.de>
Kwon-Young Choi <kwon-young.choi@hotmail.fr> Kwon-Young
Lucas Hoffmann <l-m-h@web.de> <lucc@posteo.de>
Lucas Hoffmann <l-m-h@web.de> <lucc@users.noreply.github.com>
Marco Hinz <mh.codebro@gmail.com> <mh.codebro+github@gmail.com>
Marvim the Paranoid Android <marvim@users.noreply.github.com> marvim
Mateusz Czapliński <czapkofan@gmail.com> Mateusz Czaplinski
Mathias Fussenegger <f.mathias@zignar.net> <mfussenegger@users.noreply.github.com>
Mathias Fussenegger <f.mathias@zignar.net> Mathias Fußenegger
Matt Wozniski <godlygeek@gmail.com> <godlygeek+git@gmail.com>
Matthieu Coudron <mattator@gmail.com> <coudron@iij.ad.jp>
Matthieu Coudron <mattator@gmail.com> <matthieu.coudron@upmc.fr>
Matthieu Coudron <mattator@gmail.com> <mcoudron@hotmail.com>
Matthieu Coudron <mattator@gmail.com> <teto@users.noreply.github.com>
MichaHoffmann <michoffmann.potsdam@gmail.com> Michael Hoffmann
MichaHoffmann <michoffmann.potsdam@gmail.com> micha
Michael Ennen <mike.ennen@gmail.com> <brcolow@users.noreply.github.com>
Michael Ennen <mike.ennen@gmail.com> brcolow
Michael Reed <m.reed@mykolab.com> <Pyrohh@users.noreply.github.com>
Michael Schupikov <michael@schupikov.de> <DarkDeepBlue@users.noreply.github.com>
Nicolas Hillegeer <nicolas@hillegeer.com> <nicolashillegeer@gmail.com>
Panashe M. Fundira <fundirap@gmail.com> Panashe Fundira
Patrice Peterson <patrice.peterson@mailbox.org> runiq
Pavel Platto <hinidu@gmail.com> Hinidu
Petter Wahlman <petter@wahlman.no> <pwahlman@cisco.com>
Poh Zi How <poh.zihow@gmail.com> pohzipohzi
Rich Wareham <rjw57@cam.ac.uk> <rjw57@cantab.net>
Rui Abreu Ferreira <equalsraf@users.noreply.github.com> @equalsraf
Rui Abreu Ferreira <raf-ep@gmx.com> <equalsraf@users.noreply.github.com>
Rui Abreu Ferreira <raf-ep@gmx.com> <rap-ep@gmx.com>
Sam Wilson <tecywiz121@hotmail.com> <sawilson@akamai.com>
Sander Bosma <sanderbosma@gmail.com> sander2
Santos Gallegos <stsewd@protonmail.com> <santos_g@outlook.com>
Sebastian Parborg <darkdefende@gmail.com> DarkDefender
Shirasaka <tk.shirasaka@gmail.com> tk-shirasaka
Shota <shotat@users.noreply.github.com> shotat
Shougo Matsushita <Shougo.Matsu@gmail.com> Shougo
Stephan Seitz <stephan.seitz@fau.de> <stephan.lauf@yahoo.de>
Steven Sojka <Steven.Sojka@tdameritrade.com> <steelsojka@gmail.com>
Steven Sojka <steelsojka@gmail.com> <steelsojka@users.noreply.github.com>
TJ DeVries <devries.timothyj@gmail.com> <timothydvrs1234@gmail.com>
Thomas Fehér <thomas.feher@yahoo.de> <thomasfeher@web.de>
Thomas Vigouroux <tomvig38@gmail.com> <39092278+vigoux@users.noreply.github.com>
Utkarsh Maheshwari <UtkarshME96@gmail.com> UTkarsh Maheshwari
Utkarsh Maheshwari <utkarshme96@gmail.com> <UtkarshME96@gmail.com>
VVKot <volodymyr.kot.ua@gmail.com> Volodymyr Kot
Victor Adam <victor.adam@cofelyineo-gdfsuez.com> <Victor.Adam@derpymail.org>
Wang Shidong <wsdjeg@outlook.com> <wsdjeg@users.noreply.github.com>
Wei Huang <daviseago@gmail.com> davix
Xu Cheng <xucheng@me.com> <xu-cheng@users.noreply.github.com>
Yamakaky <yamakaky@gmail.com> <yamakaky@yamaworld.fr>
Yegappan Lakshmanan <yegappan@yahoo.com> <4298407+yegappan@users.noreply.github.com>
Yichao Zhou <broken.zhoug@gmail.com> Yichao Zhou <broken.zhou@gmail.com>
Yichao Zhou <broken.zhoug@gmail.com> zhou13 <broken.zhou@gmail.com>
Yorick Peterse <git@yorickpeterse.com> <yorick@yorickpeterse.com>
ZyX <kp-pav@yandex.ru> <kp-pav@ya.ru>
ZyX <kp-pav@yandex.ru> Nikolai Aleksandrovich Pavlov
aph <a.hewson@gmail.com> Ashley Hewson
butwerenotthereyet <58348703+butwerenotthereyet@users.noreply.github.com> We're Yet
chemzqm <chemzqm@gmail.com> Qiming zhao
chentau <tchen1998@gmail.com> Tony Chen
dedmass <carlo.abelli@gmail.com> Carlo Abelli
equal-l2 <eng.equall2@gmail.com> <equal-l2@users.noreply.github.com>
francisco souza <fsouza@users.noreply.github.com> <108725+fsouza@users.noreply.github.com>
glacambre <code@lacamb.re> <me@r4>
glacambre <code@lacamb.re> Ghjuvan Lacambre
ii14 <ii14@users.noreply.github.com> <59243201+ii14@users.noreply.github.com>
jdrouhard <john@jmdtech.org> <github@jmdtech.org>
kuuote <znmxodq1@gmail.com> <36663503+kuuote@users.noreply.github.com>
matveyt <matthewtarasov@gmail.com> <35012635+matveyt@users.noreply.github.com>
nate <nateozemon@gmail.com> nateozem
ray-x <rayx.cn@gmail.com> rayx
relnod <mail@paul-schiffers.de> <relnod@users.noreply.github.com>
rockerBOO <rockerboo@gmail.com> Dave Lage
rpigott <rpigott@berkeley.edu> Ronan Pigott
sach1t <sach0010t@gmail.com> <sach1t@users.noreply.github.com>
shade-of-noon <73705427+shade-of-noon@users.noreply.github.com> Edwin Pujols
shadmansaleh <shadmansaleh3@gmail.com> <13149513+shadmansaleh@users.noreply.github.com>
shadmansaleh <shadmansaleh3@gmail.com> Shadman
sohnryang <loop.infinitely@gmail.com> 손량
timeyyy <timeyyy_da_man@hotmail.com> Timothy C Eichler
timeyyy <timeyyy_da_man@hotmail.com> timothy eichler

View File

@ -1,9 +1,23 @@
dist: xenial
dist: bionic
language: c
env:
global:
# Encrypted environment variables, see
# http://docs.travis-ci.com/user/encryption-keys/
#
# SNAP_SECRET_KEY: generated by:
# travis encrypt SNAP_SECRET_KEY=xx --add
# https://github.com/neovim/neovim/pull/11428
# snapcraft key expires after 1 year. Steps to refresh it:
# 1. snapcraft enable-ci travis --refresh
# 2. mv .snapcraft/travis_snapcraft.cfg ci/snap/travis_snapcraft.cfg
# 3. Copy after_success command to ci/snap/deploy.sh from .travis.yml
# 4. Undo changes to .travis.yml
- secure: hd0qn2u8ABbJg5Bx4pBRcUQbKYFmcSHoecyHIPTCnGJT+NI41Bvm/IkN/N5DhBF+LbD3Q2nmR/dzI5H/dqS7RxMFvEx1DuFLendFHHX3MYf0AuKpXYY3gwgMTmqx8p/v6srlU7RBGWNGzHCWqksAem+EIWCe3I7WvfdKo1/DV/Y=
- PATH="$HOME/.local/bin:$PATH"
# Set "false" to force rebuild of third-party dependencies.
- CACHE_ENABLE=true
# Build directory for Neovim.
@ -17,17 +31,13 @@ env:
# Nvim log file.
- NVIM_LOG_FILE="$BUILD_DIR/.nvimlog"
# Default CMake flags.
- CMAKE_FLAGS="-DTRAVIS_CI_BUILD=ON
- CMAKE_FLAGS="-DCI_BUILD=ON
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX
-DBUSTED_OUTPUT_TYPE=nvim
-DDEPS_PREFIX=$DEPS_BUILD_DIR/usr
-DMIN_LOG_LEVEL=3"
- DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_GPERF=OFF"
# Additional CMake flags for 32-bit builds.
- CMAKE_FLAGS_32BIT="-DCMAKE_SYSTEM_LIBRARY_PATH=/lib32:/usr/lib32:/usr/local/lib32
-DCMAKE_IGNORE_PATH=/lib:/usr/lib:/usr/local/lib
-DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/i386-linux-gnu.toolchain.cmake"
# Environment variables for Clang sanitizers.
- ASAN_OPTIONS="detect_leaks=1:check_initialization_order=1:log_path=$LOG_DIR/asan"
- TSAN_OPTIONS="log_path=$LOG_DIR/tsan"
@ -36,7 +46,7 @@ env:
- VALGRIND_LOG="$LOG_DIR/valgrind-%p.log"
- CACHE_NVIM_DEPS_DIR="$HOME/.cache/nvim-deps"
# If this file exists, the cache is valid (compile was successful).
- CACHE_MARKER="$CACHE_NVIM_DEPS_DIR/.travis_cache_marker"
- CACHE_MARKER="$CACHE_NVIM_DEPS_DIR/.ci_cache_marker"
# default target name for functional tests
- FUNCTIONALTEST=functionaltest
- CI_TARGET=tests
@ -44,8 +54,7 @@ env:
- CCACHE_COMPRESS=1
- CCACHE_SLOPPINESS=time_macros,file_macro
- CCACHE_BASEDIR="$TRAVIS_BUILD_DIR"
# Default since 3.3, but Travis (Xenial) has 3.2.4; required with newer gcc/clang.
- CCACHE_CPP2=1
- CI_OS_NAME="$TRAVIS_OS_NAME"
anchors:
envs: &common-job-env
@ -62,12 +71,12 @@ addons:
- build-essential
- clang
- cmake
- cpanminus
- cscope
- gcc-multilib
- gdb
- gperf
- language-pack-tr
- libc6-dev-i386
- libtool-bin
- locales
- ninja-build
@ -76,22 +85,17 @@ addons:
- valgrind
- xclip
homebrew:
update: false
update: true
casks:
- powershell
packages:
- ccache
- cpanminus
- ninja
- perl
jobs:
include:
- stage: baseline
name: clang-asan
os: linux
compiler: clang
# Use Lua so that ASAN can test our embedded Lua support. 8fec4d53d0f6
env:
- CLANG_SANITIZER=ASAN_UBSAN
- CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
- *common-job-env
- name: gcc-coverage (gcc 9)
os: linux
compiler: gcc-9
@ -99,28 +103,19 @@ jobs:
- GCOV=gcov-9
- CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
- GCOV_ERROR_FILE="/tmp/libgcov-errors.log"
- USE_LUACOV=1
- BUSTED_ARGS="--coverage"
- *common-job-env
addons:
snaps:
- name: powershell
confinement: classic
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- *common-apt-packages
- gcc-9
- if: branch = master AND commit_message !~ /\[skip.lint\]/
name: lint
os: linux
env:
- CI_TARGET=lint
- *common-job-env
- stage: second stage
name: "macOS: clang"
os: osx
compiler: clang
osx_image: xcode10.2 # macOS 10.14
env:
- *common-job-env
- name: gcc-functionaltest-lua
os: linux
compiler: gcc
@ -136,15 +131,67 @@ jobs:
compiler: gcc
env:
- BUILD_32BIT=ON
# Minimum required CMake.
- CMAKE_URL=https://cmake.org/files/v2.8/cmake-2.8.12-Linux-i386.sh
- CMAKE_FLAGS="$CMAKE_FLAGS -m32 -DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/i386-linux-gnu.toolchain.cmake"
- DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -m32 -DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/i386-linux-gnu.toolchain.cmake"
- *common-job-env
- name: clang-tsan
- name: big-endian
os: linux
compiler: clang
arch: s390x
compiler: gcc
env:
- CLANG_SANITIZER=TSAN
- FUNCTIONALTEST=functionaltest-lua
- CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
- DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUAJIT=OFF"
- *common-job-env
addons:
apt:
packages:
- *common-apt-packages
- gettext
- python-pip
- python3-pip
- python-setuptools
- python3-setuptools
- python-dev
- python3-dev
- if: type != pull_request
name: snap
os: linux
env:
- LC_ALL: C.UTF-8
- LANG: C.UTF-8
- SNAPCRAFT_ENABLE_SILENT_REPORT: y
- SNAPCRAFT_ENABLE_DEVELOPER_DEBUG: y
- SNAPCRAFT_BUILD_ENVIRONMENT: lxd
addons:
snaps:
- name: snapcraft
channel: stable
classic: true
- name: http
- name: transfer
- name: lxd
channel: stable
# Override default before_install, before_cache.
before_install: /bin/true
before_cache: /bin/true
install: ci/snap/install.sh
before_script: echo "Building snap..."
script: ci/snap/script.sh
after_success: ci/snap/after_success.sh
deploy:
skip_cleanup: true
provider: script
script: ci/snap/deploy.sh
on:
branch: master
allow_failures:
- env:
- LC_ALL: C.UTF-8
- LANG: C.UTF-8
- SNAPCRAFT_ENABLE_SILENT_REPORT: y
- SNAPCRAFT_ENABLE_DEVELOPER_DEBUG: y
- SNAPCRAFT_BUILD_ENVIRONMENT: lxd
fast_finish: true
before_install: ci/before_install.sh

View File

@ -1,4 +1,4 @@
.DONE:
@echo "Please use GNU Make (gmake) to build neovim"
@echo "Use GNU Make (gmake) to build neovim"
.DEFAULT:
@echo "Please use GNU Make (gmake) to build neovim"
@echo "Use GNU Make (gmake) to build neovim"

View File

@ -2,10 +2,20 @@
# intro: https://codingnest.com/basic-cmake/
# best practices (3.0+): https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1
# Version should match the tested CMAKE_URL in .travis.yml.
cmake_minimum_required(VERSION 2.8.12)
# Version should match the tested CMAKE_URL in .github/workflows/ci.yml.
cmake_minimum_required(VERSION 3.10)
project(nvim C)
if(POLICY CMP0065)
cmake_policy(SET CMP0065 NEW)
endif()
if(POLICY CMP0060)
cmake_policy(SET CMP0060 NEW)
endif()
if(POLICY CMP0075)
cmake_policy(SET CMP0075 NEW)
endif()
# Point CMake at any custom modules we may ship
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
@ -16,9 +26,23 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Prefer our bundled versions of dependencies.
if(DEFINED ENV{DEPS_BUILD_DIR})
set(DEPS_PREFIX "$ENV{DEPS_BUILD_DIR}/usr" CACHE PATH "Path prefix for finding dependencies")
if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
# pkg-config 29.2 has a bug on OpenBSD which causes it to drop any paths that
# *contain* system include paths. To avoid this, we prefix what would be
# "/usr/include" as "/_usr/include".
# This check is also performed in the third-party/CMakeLists.txt and in the
# else clause following here.
# https://github.com/neovim/neovim/pull/14745#issuecomment-860201794
set(DEPS_PREFIX "$ENV{DEPS_BUILD_DIR}/_usr" CACHE PATH "Path prefix for finding dependencies")
else()
set(DEPS_PREFIX "$ENV{DEPS_BUILD_DIR}/usr" CACHE PATH "Path prefix for finding dependencies")
endif()
else()
set(DEPS_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/.deps/usr" CACHE PATH "Path prefix for finding dependencies")
if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
set(DEPS_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/.deps/_usr" CACHE PATH "Path prefix for finding dependencies")
else()
set(DEPS_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/.deps/usr" CACHE PATH "Path prefix for finding dependencies")
endif()
# When running from within CLion or Visual Studio,
# build bundled dependencies automatically.
if(NOT EXISTS ${DEPS_PREFIX}
@ -47,13 +71,8 @@ else()
endif()
endif()
if(CMAKE_CROSSCOMPILING AND NOT UNIX)
list(INSERT CMAKE_FIND_ROOT_PATH 0 ${DEPS_PREFIX})
list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX}/../host/bin)
else()
list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX})
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${DEPS_PREFIX}/lib/pkgconfig")
endif()
list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX})
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${DEPS_PREFIX}/lib/pkgconfig")
# used for check_c_compiler_flag
include(CheckCCompilerFlag)
@ -76,6 +95,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
endif()
if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
# Ignore case when comparing filenames on Windows and Mac.
set(CASE_INSENSITIVE_FILENAME TRUE)
# Enable fixing case-insensitive filenames for Windows and Mac.
set(USE_FNAME_CASE TRUE)
endif()
@ -113,47 +134,32 @@ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
# If not in a git repo (e.g., a tarball) these tokens define the complete
# version string, else they are combined with the result of `git describe`.
set(NVIM_VERSION_MAJOR 0)
set(NVIM_VERSION_MINOR 4)
set(NVIM_VERSION_PATCH 0)
set(NVIM_VERSION_MINOR 7)
set(NVIM_VERSION_PATCH 1)
set(NVIM_VERSION_PRERELEASE "") # for package maintainers
# API level
set(NVIM_API_LEVEL 6) # Bump this after any API change.
set(NVIM_API_LEVEL 9) # Bump this after any API change.
set(NVIM_API_LEVEL_COMPAT 0) # Adjust this after a _breaking_ API change.
set(NVIM_API_PRERELEASE false)
file(TO_CMAKE_PATH ${CMAKE_CURRENT_LIST_DIR}/.git FORCED_GIT_DIR)
include(GetGitRevisionDescription)
get_git_head_revision(GIT_REFSPEC NVIM_VERSION_COMMIT)
if(NVIM_VERSION_COMMIT) # is a git repo
git_describe(NVIM_VERSION_MEDIUM)
# `git describe` annotates the most recent tagged release; for pre-release
# builds we must replace that with the unreleased version.
string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.[0-9]+"
"v${NVIM_VERSION_MAJOR}.${NVIM_VERSION_MINOR}.${NVIM_VERSION_PATCH}"
NVIM_VERSION_MEDIUM
${NVIM_VERSION_MEDIUM})
endif()
set(NVIM_VERSION_BUILD_TYPE "${CMAKE_BUILD_TYPE}")
# NVIM_VERSION_CFLAGS set further below.
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Minimize logging for release-type builds.
if(NOT CMAKE_C_FLAGS_RELEASE MATCHES DMIN_LOG_LEVEL)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DMIN_LOG_LEVEL=3")
endif()
if(NOT CMAKE_C_FLAGS_MINSIZEREL MATCHES DMIN_LOG_LEVEL)
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -DMIN_LOG_LEVEL=3")
endif()
if(NOT CMAKE_C_FLAGS_RELWITHDEBINFO MATCHES DMIN_LOG_LEVEL)
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DMIN_LOG_LEVEL=3")
endif()
# Log level (MIN_LOG_LEVEL in log.h)
if("${MIN_LOG_LEVEL}" MATCHES "^$")
message(STATUS "MIN_LOG_LEVEL not specified, default is 1 (INFO)")
# Minimize logging for release-type builds.
if(CMAKE_BUILD_TYPE STREQUAL "Release"
OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"
OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
message(STATUS "MIN_LOG_LEVEL not specified, default is 3 (ERROR) for release builds")
set(MIN_LOG_LEVEL 3)
else()
message(STATUS "MIN_LOG_LEVEL not specified, default is 1 (INFO)")
set(MIN_LOG_LEVEL 1)
endif()
else()
if(NOT MIN_LOG_LEVEL MATCHES "^[0-3]$")
message(FATAL_ERROR "invalid MIN_LOG_LEVEL: " ${MIN_LOG_LEVEL})
@ -273,13 +279,37 @@ if(MSVC)
else()
add_compile_options(-Wall -Wextra -pedantic -Wno-unused-parameter
-Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion
-Wdouble-promotion
-Wmissing-noreturn
-Wmissing-format-attribute
-Wmissing-prototypes)
check_c_compiler_flag(-Wimplicit-fallthrough HAS_WIMPLICIT_FALLTHROUGH_FLAG)
if(HAS_WIMPLICIT_FALLTHROUGH_FLAG)
check_c_compiler_flag(-Wimplicit-fallthrough HAVE_WIMPLICIT_FALLTHROUGH_FLAG)
if(HAVE_WIMPLICIT_FALLTHROUGH_FLAG)
add_compile_options(-Wimplicit-fallthrough)
endif()
# Clang doesn't have -Wsuggest-attribute so check for each one.
check_c_compiler_flag(-Wsuggest-attribute=pure HAVE_WSUGGEST_ATTRIBUTE_PURE)
if(HAVE_WSUGGEST_ATTRIBUTE_PURE)
add_compile_options(-Wsuggest-attribute=pure)
endif()
check_c_compiler_flag(-Wsuggest-attribute=const HAVE_WSUGGEST_ATTRIBUTE_CONST)
if(HAVE_WSUGGEST_ATTRIBUTE_CONST)
add_compile_options(-Wsuggest-attribute=const)
endif()
check_c_compiler_flag(-Wsuggest-attribute=malloc HAVE_WSUGGEST_ATTRIBUTE_MALLOC)
if(HAVE_WSUGGEST_ATTRIBUTE_MALLOC)
add_compile_options(-Wsuggest-attribute=malloc)
endif()
check_c_compiler_flag(-Wsuggest-attribute=cold HAVE_WSUGGEST_ATTRIBUTE_COLD)
if(HAVE_WSUGGEST_ATTRIBUTE_COLD)
add_compile_options(-Wsuggest-attribute=cold)
endif()
# On FreeBSD 64 math.h uses unguarded C11 extension, which taints clang
# 3.4.1 used there.
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND CMAKE_C_COMPILER_ID MATCHES "Clang")
@ -309,11 +339,18 @@ if(UNIX)
if(HAS_FSTACK_PROTECTOR_STRONG_FLAG)
add_compile_options(-fstack-protector-strong)
link_libraries(-fstack-protector-strong)
elseif(HAS_FSTACK_PROTECTOR_FLAG)
add_compile_options(-fstack-protector --param ssp-buffer-size=4)
link_libraries(-fstack-protector --param ssp-buffer-size=4)
endif()
endif()
check_c_compiler_flag(-fno-common HAVE_FNO_COMMON)
if (HAVE_FNO_COMMON)
add_compile_options(-fno-common)
endif()
check_c_compiler_flag(-fdiagnostics-color=auto HAS_DIAG_COLOR_FLAG)
if(HAS_DIAG_COLOR_FLAG)
if(CMAKE_GENERATOR MATCHES "Ninja")
@ -323,10 +360,10 @@ if(HAS_DIAG_COLOR_FLAG)
endif()
endif()
option(TRAVIS_CI_BUILD "Travis/QuickBuild CI, extra flags will be set" OFF)
option(CI_BUILD "CI, extra flags will be set" OFF)
if(TRAVIS_CI_BUILD)
message(STATUS "Travis/QuickBuild CI build enabled")
if(CI_BUILD)
message(STATUS "CI build enabled")
add_compile_options(-Werror)
if(DEFINED ENV{BUILD_32BIT})
# Get some test coverage for unsigned char
@ -353,8 +390,8 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_definitions(-D_GNU_SOURCE)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
# Required for luajit.
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT PREFER_LUA AND LUAJIT_VERSION LESS "2.1.0-beta3")
# Required for luajit < 2.1.0-beta3.
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} -pagezero_size 10000 -image_base 100000000")
set(CMAKE_SHARED_LINKER_FLAGS
@ -372,9 +409,41 @@ include_directories(SYSTEM ${LIBUV_INCLUDE_DIRS})
find_package(Msgpack 1.0.0 REQUIRED)
include_directories(SYSTEM ${MSGPACK_INCLUDE_DIRS})
find_package(LibLUV 1.30.0 REQUIRED)
find_package(LibLUV 1.43.0 REQUIRED)
include_directories(SYSTEM ${LIBLUV_INCLUDE_DIRS})
find_package(TreeSitter REQUIRED)
include_directories(SYSTEM ${TreeSitter_INCLUDE_DIRS})
list(APPEND CMAKE_REQUIRED_INCLUDES "${TreeSitter_INCLUDE_DIRS}")
list(APPEND CMAKE_REQUIRED_LIBRARIES "${TreeSitter_LIBRARIES}")
check_c_source_compiles("
#include <tree_sitter/api.h>
int
main(void)
{
TSQueryCursor *cursor = ts_query_cursor_new();
ts_query_cursor_set_match_limit(cursor, 32);
return 0;
}
" TS_HAS_SET_MATCH_LIMIT)
if(TS_HAS_SET_MATCH_LIMIT)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNVIM_TS_HAS_SET_MATCH_LIMIT")
endif()
check_c_source_compiles("
#include <stdlib.h>
#include <tree_sitter/api.h>
int
main(void)
{
ts_set_allocator(malloc, calloc, realloc, free);
return 0;
}
" TS_HAS_SET_ALLOCATOR)
if(TS_HAS_SET_ALLOCATOR)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNVIM_TS_HAS_SET_ALLOCATOR")
endif()
# Note: The test lib requires LuaJIT; it will be skipped if LuaJIT is missing.
option(PREFER_LUA "Prefer Lua over LuaJIT in the nvim executable." OFF)
@ -454,17 +523,17 @@ if((CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN) AND NOT CMAKE_C_COMPILER_ID MA
message(FATAL_ERROR "Sanitizers are only supported for Clang")
endif()
if(ENABLE_LIBICONV)
find_package(Iconv REQUIRED)
include_directories(SYSTEM ${Iconv_INCLUDE_DIRS})
endif()
if(ENABLE_LIBINTL)
# LibIntl (not Intl) selects our FindLibIntl.cmake script. #8464
find_package(LibIntl REQUIRED)
include_directories(SYSTEM ${LibIntl_INCLUDE_DIRS})
endif()
if(ENABLE_LIBICONV)
find_package(Iconv REQUIRED)
include_directories(SYSTEM ${Iconv_INCLUDE_DIRS})
endif()
# Determine platform's threading library. Set CMAKE_THREAD_PREFER_PTHREAD
# explicitly to indicate a strong preference for pthread.
set(CMAKE_THREAD_PREFER_PTHREAD ON)
@ -486,18 +555,19 @@ include(LuaHelpers)
set(LUA_DEPENDENCIES lpeg mpack bit)
if(NOT LUA_PRG)
foreach(CURRENT_LUA_PRG luajit lua5.1 lua5.2 lua)
# If LUA_PRG is set find_program() will not search
unset(LUA_PRG CACHE)
unset(_CHECK_LUA_PRG CACHE)
unset(LUA_PRG_WORKS)
find_program(LUA_PRG ${CURRENT_LUA_PRG})
find_program(_CHECK_LUA_PRG ${CURRENT_LUA_PRG})
if(LUA_PRG)
check_lua_deps(${LUA_PRG} "${LUA_DEPENDENCIES}" LUA_PRG_WORKS)
if(_CHECK_LUA_PRG)
check_lua_deps(${_CHECK_LUA_PRG} "${LUA_DEPENDENCIES}" LUA_PRG_WORKS)
if(LUA_PRG_WORKS)
set(LUA_PRG "${_CHECK_LUA_PRG}" CACHE FILEPATH "Path to a program.")
break()
endif()
endif()
endforeach()
unset(_CHECK_LUA_PRG CACHE)
else()
check_lua_deps(${LUA_PRG} "${LUA_DEPENDENCIES}" LUA_PRG_WORKS)
endif()
@ -508,6 +578,33 @@ endif()
message(STATUS "Using Lua interpreter: ${LUA_PRG}")
if(DEBUG)
option(COMPILE_LUA "Pre-compile Lua sources into bytecode (for sources that are included in the binary)" OFF)
else()
option(COMPILE_LUA "Pre-compile Lua sources into bytecode (for sources that are included in the binary)" ON)
endif()
if(COMPILE_LUA AND NOT WIN32)
if(PREFER_LUA)
foreach(CURRENT_LUAC_PRG luac5.1 luac)
find_program(_CHECK_LUAC_PRG ${CURRENT_LUAC_PRG})
if(_CHECK_LUAC_PRG)
set(LUAC_PRG "${_CHECK_LUAC_PRG} -s -o - %s" CACHE STRING "Format for compiling to Lua bytecode")
break()
endif()
endforeach()
elseif(LUA_PRG MATCHES "luajit")
check_lua_module(${LUA_PRG} "jit.bcsave" LUAJIT_HAS_JIT_BCSAVE)
if(LUAJIT_HAS_JIT_BCSAVE)
set(LUAC_PRG "${LUA_PRG} -b -s %s -" CACHE STRING "Format for compiling to Lua bytecode")
endif()
endif()
endif()
if(LUAC_PRG)
message(STATUS "Using Lua compiler: ${LUAC_PRG}")
endif()
# Setup busted.
find_program(BUSTED_PRG NAMES busted busted.bat)
find_program(BUSTED_LUA_PRG busted-lua)
@ -555,15 +652,10 @@ if(BUSTED_PRG)
# console pool: to do so we need to use the USES_TERMINAL
# option, but this is only available in CMake 3.2
set(TEST_TARGET_ARGS)
if(NOT (${CMAKE_VERSION} VERSION_LESS 3.2.0))
list(APPEND TEST_TARGET_ARGS "USES_TERMINAL")
endif()
list(APPEND TEST_TARGET_ARGS "USES_TERMINAL")
set(UNITTEST_PREREQS nvim-test unittest-headers)
set(FUNCTIONALTEST_PREREQS nvim printargs-test shell-test streams-test ${GENERATED_HELP_TAGS})
if(NOT WIN32)
list(APPEND FUNCTIONALTEST_PREREQS tty-test)
endif()
set(FUNCTIONALTEST_PREREQS nvim printenv-test printargs-test shell-test pwsh-test streams-test tty-test ${GENERATED_HELP_TAGS})
set(BENCHMARK_PREREQS nvim tty-test)
# Useful for automated build systems, if they want to manually run the tests.
@ -659,21 +751,26 @@ endif()
if(LUACHECK_PRG)
add_custom_target(lualint
COMMAND ${LUACHECK_PRG} -q runtime/ src/ test/
COMMAND ${LUACHECK_PRG} -q runtime/ scripts/ src/ test/
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
else()
add_custom_target(lualint false
COMMENT "lualint: LUACHECK_PRG not defined")
endif()
set(CPACK_PACKAGE_NAME "Neovim")
set(CPACK_PACKAGE_VENDOR "neovim.io")
set(CPACK_PACKAGE_VERSION ${NVIM_VERSION_MEDIUM})
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Neovim")
# Set toplevel directory/installer name as Neovim
set(CPACK_PACKAGE_FILE_NAME "Neovim")
set(CPACK_TOPLEVEL_TAG "Neovim")
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
set(CPACK_NSIS_MODIFY_PATH ON)
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
include(CPack)
#add uninstall target
if(NOT TARGET uninstall)
configure_file(
"cmake/UninstallHelper.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/UninstallHelper.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/UninstallHelper.cmake)
endif()
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory(packaging)
endif()

View File

@ -7,10 +7,11 @@ Getting started
If you want to help but don't know where to start, here are some
low-risk/isolated tasks:
- [Merge a Vim patch].
- Try a [complexity:low] issue.
- Fix bugs found by [Clang](#clang-scan-build), [PVS](#pvs-studio) or
[Coverity](#coverity).
- [Improve documentation][wiki-contribute-help]
- [Merge a Vim patch] (familiarity with Vim is *strongly* recommended)
Reporting problems
------------------
@ -18,19 +19,21 @@ Reporting problems
- [Check the FAQ][wiki-faq].
- [Search existing issues][github-issues] (including closed!)
- Update Neovim to the latest version to see if your problem persists.
- Disable plugins incrementally, to narrow down the cause of the issue.
- Try to reproduce with `nvim --clean` ("factory defaults").
- [Bisect](https://neovim.io/doc/user/starting.html#bisect) your config: disable plugins incrementally, to narrow down the cause of the issue.
- [Bisect][git-bisect] Neovim's source code to find the cause of a regression, if you can. This is _extremely_ helpful.
- When reporting a crash, [include a stacktrace](https://github.com/neovim/neovim/wiki/FAQ#backtrace-linux).
- [Bisect][git-bisect] to the cause of a regression, if you are able. This is _extremely_ helpful.
- Check `$NVIM_LOG_FILE`, if it exists.
- Use [ASAN/UBSAN](#clang-sanitizers-asan-and-ubsan) to get detailed errors for segfaults and undefined behavior.
- Check the logs. `:edit $NVIM_LOG_FILE`
- Include `cmake --system-information` for build-related issues.
Developer guidelines
--------------------
- Nvim contributors should read `:help dev`.
- External UI developers should read `:help dev-ui`.
- API client developers should read `:help dev-api-client`.
- Nvim developers are _strongly encouraged_ to install `ninja` for faster builds.
- Read `:help dev` if you are working on Nvim core.
- Read `:help dev-ui` if you are developing a UI.
- Read `:help dev-api-client` if you are developing an API client.
- Install `ninja` for faster builds of Nvim.
```
sudo apt-get install ninja-build
make distclean
@ -40,8 +43,8 @@ Developer guidelines
Pull requests (PRs)
---------------------
- To avoid duplicate work, create a `[WIP]` pull request as soon as possible.
- Your PR must include **test coverage.** See [test/README.md][run-tests].
- To avoid duplicate work, create a draft pull request.
- Your PR must include [test coverage][run-tests].
- Avoid cosmetic changes to unrelated files in the same commit.
- Use a [feature branch][git-feature-branch] instead of the master branch.
- Use a **rebase workflow** for small PRs.
@ -60,33 +63,55 @@ Pull requests (PRs)
- During a squash/fixup, use `exec make -C build unittest` between each
pick/edit/reword.
### Stages: WIP, RFC, RDY
### Stages: Draft and Ready for review
Pull requests have three stages: `[WIP]` (Work In Progress), `[RFC]` (Request
For Comment) and `[RDY]` (Ready).
Pull requests have two stages: Draft and Ready for review.
- `[RFC]` is assumed by default, i.e. you are requesting a review.
- Add `[WIP]` to the PR title if you are _not_ requesting feedback and the work
is still in flux.
- Add `[RDY]` if you are _done_ and only waiting on merge.
1. [Create a Draft PR][pr-draft] while you are _not_ requesting feedback as
you are still working on the PR.
- You can skip this if your PR is ready for review.
2. [Change your PR to ready][pr-ready] when the PR is ready for review.
- You can convert back to Draft at any time.
Do __not__ add labels like `[RFC]` or `[WIP]` in the title to indicate the
state of your PR: this just adds noise. Non-Draft PRs are assumed to be open
for comments; if you want feedback from specific people, `@`-mention them in
a comment.
### Commit messages
Follow [commit message hygiene][hygiene] to *make reviews easier* and to make
the VCS/git logs more valuable.
Follow the [conventional commits guidelines][conventional_commits] to *make reviews easier* and to make
the VCS/git logs more valuable. The general structure of a commit message is:
- Try to keep the first line under 72 characters.
- **Prefix the commit subject with a _scope_:** `doc:`, `test:`, `foo.c:`,
`runtime:`, ...
- Subject line for commits with only style/lint changes can be a single
word: `style` or `lint`.
- A blank line must separate the subject from the description.
```
<type>([optional scope]): <description>
[optional body]
[optional footer(s)]
```
- Prefix the commit subject with one of these [_types_](https://github.com/commitizen/conventional-commit-types/blob/master/index.json):
- `build`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor`, `revert`, `test`, `vim-patch`, `chore`
- You can **ignore this for "fixup" commits** or any commits you expect to be squashed.
- Append optional scope to _type_ such as `(lsp)`, `(treesitter)`, `(float)`, …
- _Description_ shouldn't start with a capital letter or end in a period.
- Use the _imperative voice_: "Fix bug" rather than "Fixed bug" or "Fixes bug."
- Try to keep the first line under 72 characters.
- A blank line must follow the subject.
- Breaking API changes must be indicated by
1. "!" after the type/scope, and
2. a "BREAKING CHANGE" footer describing the change.
Example:
```
refactor(provider)!: drop support for Python 2
BREAKING CHANGE: refactor to use Python 3 features since Python 2 is no longer supported.
```
### Automated builds (CI)
Each pull request must pass the automated builds on [Travis CI], [QuickBuild]
and [AppVeyor].
Each pull request must pass the automated builds on [sourcehut] and [GitHub Actions].
- CI builds are compiled with [`-Werror`][gcc-warnings], so compiler warnings
will fail the build.
@ -100,14 +125,19 @@ and [AppVeyor].
- The [lint](#lint) build checks modified lines _and their immediate
neighbors_, to encourage incrementally updating the legacy style to meet our
[style](#style). (See [#3174][3174] for background.)
- [How to investigate QuickBuild failures](https://github.com/neovim/neovim/pull/4718#issuecomment-217631350)
- QuickBuild uses this invocation:
```
mkdir -p build/${params.get("buildType")} \
&& cd build/${params.get("buildType")} \
&& cmake -G "Unix Makefiles" -DBUSTED_OUTPUT_TYPE=TAP -DCMAKE_BUILD_TYPE=${params.get("buildType")}
-DTRAVIS_CI_BUILD=ON ../.. && ${node.getAttribute("make", "make")}
VERBOSE=1 nvim unittest-prereqs functionaltest-prereqs
- CI for freebsd and openbsd runs on [sourcehut].
- To get a backtrace on freebsd (after connecting via ssh):
```sh
sudo pkg install tmux # If you want tmux.
lldb build/bin/nvim -c nvim.core
# To get a full backtrace:
# 1. Rebuild with debug info.
rm -rf nvim.core build
gmake CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_EXTRA_FLAGS="-DCI_BUILD=ON -DMIN_LOG_LEVEL=3" nvim
# 2. Run the failing test to generate a new core file.
TEST_FILE=test/functional/foo.lua gmake functionaltest
lldb build/bin/nvim -c nvim.core
```
### Clang scan-build
@ -132,7 +162,7 @@ see potential bugs found by [PVS Studio](https://www.viva64.com/en/pvs-studio/).
- Use this format for commit messages (where `{id}` is the PVS warning-id)):
```
PVS/V{id}: {description}
fix(PVS/V{id}): {description}
```
- Search the Neovim commit history to find examples:
```
@ -148,13 +178,27 @@ master build. To view the defects, just request access; you will be approved.
- Use this format for commit messages (where `{id}` is the CID (Coverity ID);
([example](https://github.com/neovim/neovim/pull/804))):
```
coverity/{id}: {description}
fix(coverity/{id}): {description}
```
- Search the Neovim commit history to find examples:
```
git log --oneline --no-merges --grep coverity
```
### Clang sanitizers (ASAN and UBSAN)
ASAN/UBSAN can be used to detect memory errors and other common forms of undefined behavior at runtime in debug builds.
- To build Neovim with sanitizers enabled, use
```
rm -rf build && CMAKE_EXTRA_FLAGS="-DCMAKE_C_COMPILER=clang -DCLANG_ASAN_UBSAN=1" make
```
- When running Neovim, use
```
UBSAN_OPTIONS=print_stacktrace=1 ASAN_OPTIONS=log_path=/tmp/nvim_asan nvim args...
```
- If Neovim exits unexpectedly, check `/tmp/nvim_asan.{PID}` (or your preferred `log_path`) for log files with error messages.
Coding
------
@ -174,20 +218,36 @@ You can lint a single file (but this will _not_ exclude legacy errors):
### Style
The repo includes a `.clang-format` config file which (mostly) matches the
[style-guide]. You can use `clang-format` to format code with the `gq`
operator in Nvim:
if !empty(findfile('.clang-format', ';'))
setlocal formatprg=clang-format\ -style=file
endif
- Style rules are (mostly) defined by `src/uncrustify.cfg` which tries to match
the [style-guide]. To use the Nvim `gq` command with `uncrustify`:
```
if !empty(findfile('src/uncrustify.cfg', ';'))
setlocal formatprg=uncrustify\ -q\ -l\ C\ -c\ src/uncrustify.cfg\ --no-backup
endif
```
The required version of `uncrustify` is specified in `uncrustify.cfg`.
- There is also `.clang-format` which has drifted from the [style-guide], but
is available for reference. To use the Nvim `gq` command with `clang-format`:
```
if !empty(findfile('.clang-format', ';'))
setlocal formatprg=clang-format\ -style=file
endif
```
### Navigate
- Set `blame.ignoreRevsFile` to ignore [noise commits](https://github.com/neovim/neovim/commit/2d240024acbd68c2d3f82bc72cb12b1a4928c6bf) in git blame:
```
git config blame.ignoreRevsFile .git-blame-ignore-revs
```
- Use **[universal-ctags](https://github.com/universal-ctags/ctags).**
("Exuberant ctags", the typical `ctags` binary provided by your distro, is
unmaintained and won't recognize many function signatures in Neovim source.)
- Explore the source code [on the web](https://sourcegraph.com/github.com/neovim/neovim).
- If using [lua-language-server][], symlink `contrib/luarc.json` into the
project root:
$ ln -s contrib/luarc.json .luarc.json
Reviewing
@ -196,10 +256,10 @@ Reviewing
To help review pull requests, start with [this checklist][review-checklist].
Reviewing can be done on GitHub, but you may find it easier to do locally.
Using [`hub`][hub], you can create a new branch with the contents of a pull
Using [GitHub CLI][gh], you can create a new branch with the contents of a pull
request, e.g. [#1820][1820]:
hub checkout https://github.com/neovim/neovim/pull/1820
gh pr checkout https://github.com/neovim/neovim/pull/1820
Use [`git log -p master..FETCH_HEAD`][git-history-filtering] to list all
commits in the feature branch which aren't in the `master` branch; `-p`
@ -214,18 +274,22 @@ as context, use the `-W` argument as well.
[git-rebasing]: http://git-scm.com/book/en/v2/Git-Branching-Rebasing
[github-issues]: https://github.com/neovim/neovim/issues
[1820]: https://github.com/neovim/neovim/pull/1820
[hub]: https://hub.github.com/
[hygiene]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[style-guide]: http://neovim.io/develop/style-guide.xml
[gh]: https://cli.github.com/
[conventional_commits]: https://www.conventionalcommits.org
[style-guide]: https://neovim.io/doc/user/dev_style.html#dev-style
[ASan]: http://clang.llvm.org/docs/AddressSanitizer.html
[run-tests]: https://github.com/neovim/neovim/blob/master/test/README.md#running-tests
[wiki-faq]: https://github.com/neovim/neovim/wiki/FAQ
[review-checklist]: https://github.com/neovim/neovim/wiki/Code-review-checklist
[3174]: https://github.com/neovim/neovim/issues/3174
[Travis CI]: https://travis-ci.org/neovim/neovim
[QuickBuild]: http://neovim-qb.szakmeister.net/dashboard
[AppVeyor]: https://ci.appveyor.com/project/neovim/neovim
[sourcehut]: https://builds.sr.ht/~jmk
[GitHub Actions]: https://github.com/neovim/neovim/actions
[Merge a Vim patch]: https://github.com/neovim/neovim/wiki/Merging-patches-from-upstream-Vim
[Clang report]: https://neovim.io/doc/reports/clang/
[complexity:low]: https://github.com/neovim/neovim/issues?q=is%3Aopen+is%3Aissue+label%3Acomplexity%3Alow
[master error list]: https://raw.githubusercontent.com/neovim/doc/gh-pages/reports/clint/errors.json
[wiki-contribute-help]: https://github.com/neovim/neovim/wiki/contribute-%3Ahelp
[pr-draft]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request
[pr-ready]: https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request
[uncrustify]: http://uncrustify.sourceforge.net/
[lua-language-server]: https://github.com/sumneko/lua-language-server/

View File

@ -189,8 +189,17 @@ contributed under the Vim license and (2) externally maintained libraries.
The externally maintained libraries used by Neovim are:
- Klib: a Generic Library in C. MIT/X11 license.
- libuv. Copyright Joyent, Inc. and other Node contributors. Node.js license.
- Lua: MIT license
- LuaJIT: a Just-In-Time Compiler for Lua. Copyright Mike Pall. MIT license.
- Luv: Apache 2.0 license
- libmpack: MIT license
- libtermkey: MIT license
- libuv. Copyright Joyent, Inc. and other Node contributors. Node.js license.
- libvterm: MIT license
- lua-compat: MIT license
- tree-sitter: MIT license
- xdiff: LGPL license
- lua-cjson: MIT license
====

View File

@ -10,14 +10,13 @@ General guidelines
* Write down what was decided
* Constraints are good
* Use automation to solve problems
* Never break the API
* Never break the API... but sometimes break the UI
Ticket triage
-------------
In practice we haven't found a meaningful way to forecast more precisely than
"next" and "after next". That means there are usually one or two (at most)
planned milestones:
In practice we haven't found a way to forecast more precisely than "next" and
"after next". So there are usually one or two (at most) planned milestones:
- Next bugfix-release (1.0.x)
- Next feature-release (1.x.0)
@ -25,16 +24,16 @@ planned milestones:
The forecasting problem might be solved with an explicit priority system (like
Bram's todo.txt). Meanwhile the Neovim priority system is defined by:
- PRs nearing completion (RDY).
- PRs nearing completion.
- Issue labels. E.g. the `+plan` label increases the ticket's priority merely
for having a plan written down: it is _closer to completion_ than tickets
without a plan.
- Comment activity or new information.
Anything that isn't in the next milestone, and doesn't have a RDY PR ... is
Anything that isn't in the next milestone, and doesn't have a finished PR—is
just not something you care very much about, by construction. Post-release you
can review open issues, but chances are your next milestone is already getting
full :)
full... :)
Release policy
--------------
@ -53,9 +52,45 @@ has a major bug:
3. Cut a release from `release-x.y`.
- Run `./scripts/release.sh`
- Update (force-push) the remote `stable` tag.
- The [nightly job](https://github.com/neovim/bot-ci/blob/master/ci/nightly.sh)
- The [nightly job](https://github.com/neovim/neovim/blob/master/.github/workflows/release.yml#L4)
will update the release assets based on the `stable` tag.
The neovim repository includes a backport [github action](https://github.com/zeebe-io/backport-action).
In order to trigger the action, a PR must be labeled with a label matching the
form `backport release-0.X`. If the label is applied before the PR is merged,
the backport will be filed automatically against the target branch. Otherwise,
comment `\backport` on the merged PR *after* the label has been applied to trigger
a backport. Note, the PR must have a description in the issue body, or the backport
will fail.
Third-party dependencies
--------------
These "bundled" dependencies can be updated by bumping their versions in `third-party/CMakeLists.txt`:
- [Lua](https://www.lua.org/download.html)
- [LuaJIT](https://github.com/LuaJIT/LuaJIT)
- [Luv](https://github.com/luvit/luv)
- [libtermkey](https://github.com/neovim/libtermkey)
- [libuv](https://github.com/libuv/libuv)
- [libvterm](http://www.leonerd.org.uk/code/libvterm/)
- [lua-compat](https://github.com/keplerproject/lua-compat-5.3)
- [tree-sitter](https://github.com/tree-sitter/tree-sitter)
`scripts/bump-dep.sh` is a script that can automate this process for `LuaJIT`, `Luv`, `libuv` & `tree-sitter`. See usage guide:
- Run `./scripts/bump-deps.sh --dep Luv --version 1.43.0-0` to update a dependency.
See `./scripts/bump-deps.sh -h` for more detailed usage
- Run `./scripts/bump-deps.sh --pr` to create a pr
To generate the default PR title and body, the script uses the most recent commit (not in `master`) with prefix `build(deps): `
These dependencies are "vendored" (inlined), we need to update the sources manually:
- [libmpack](https://github.com/libmpack/libmpack)
- [xdiff](https://github.com/git/git/tree/master/xdiff)
- [lua-cjson](https://github.com/openresty/lua-cjson)
- [Klib](https://github.com/attractivechaos/klib)
We also maintain some forks, particularly for Windows, if we are waiting on upstream changes:
https://github.com/neovim/neovim/wiki/Deps
See also
--------

103
Makefile
View File

@ -1,4 +1,6 @@
THIS_DIR = $(shell pwd)
MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
MAKEFILE_DIR := $(dir $(MAKEFILE_PATH))
filter-false = $(strip $(filter-out 0 off OFF false FALSE,$1))
filter-true = $(strip $(filter-out 1 on ON true TRUE,$1))
@ -12,6 +14,7 @@ CMAKE_BUILD_TYPE ?= Debug
CMAKE_FLAGS := -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE)
# Extra CMake flags which extend the default set
CMAKE_EXTRA_FLAGS ?=
NVIM_PRG := $(MAKEFILE_DIR)/build/bin/nvim
# CMAKE_INSTALL_PREFIX
# - May be passed directly or as part of CMAKE_EXTRA_FLAGS.
@ -35,7 +38,7 @@ else
checkprefix: ;
endif
BUILD_TYPE ?= $(shell (type ninja > /dev/null 2>&1 && echo "Ninja") || \
CMAKE_GENERATOR ?= $(shell (command -v ninja > /dev/null 2>&1 && echo "Ninja") || \
echo "Unix Makefiles")
DEPS_BUILD_DIR ?= .deps
ifneq (1,$(words [$(DEPS_BUILD_DIR)]))
@ -43,25 +46,28 @@ ifneq (1,$(words [$(DEPS_BUILD_DIR)]))
endif
ifeq (,$(BUILD_TOOL))
ifeq (Ninja,$(BUILD_TYPE))
ifeq (Ninja,$(CMAKE_GENERATOR))
ifneq ($(shell $(CMAKE_PRG) --help 2>/dev/null | grep Ninja),)
BUILD_TOOL := ninja
BUILD_TOOL = ninja
else
# User's version of CMake doesn't support Ninja
BUILD_TOOL = $(MAKE)
BUILD_TYPE := Unix Makefiles
CMAKE_GENERATOR := Unix Makefiles
endif
else
BUILD_TOOL = $(MAKE)
endif
endif
BUILD_CMD = $(BUILD_TOOL)
ifneq ($(VERBOSE),)
# Only need to handle Ninja here. Make will inherit the VERBOSE variable.
ifeq ($(BUILD_TYPE),Ninja)
BUILD_CMD += -v
# Only need to handle Ninja here. Make will inherit the VERBOSE variable, and the -j, -l, and -n flags.
ifeq ($(CMAKE_GENERATOR),Ninja)
ifneq ($(VERBOSE),)
BUILD_TOOL += -v
endif
BUILD_TOOL += $(shell printf '%s' '$(MAKEFLAGS)' | grep -o -- ' *-[jl][0-9]\+ *')
ifeq (n,$(findstring n,$(firstword -$(MAKEFLAGS))))
BUILD_TOOL += -n
endif
endif
@ -83,22 +89,22 @@ endif
SINGLE_MAKE = export MAKEFLAGS= ; $(MAKE)
nvim: build/.ran-cmake deps
+$(BUILD_CMD) -C build
+$(BUILD_TOOL) -C build
libnvim: build/.ran-cmake deps
+$(BUILD_CMD) -C build libnvim
+$(BUILD_TOOL) -C build libnvim
cmake:
touch CMakeLists.txt
$(MAKE) build/.ran-cmake
build/.ran-cmake: | deps
cd build && $(CMAKE_PRG) -G '$(BUILD_TYPE)' $(CMAKE_FLAGS) $(CMAKE_EXTRA_FLAGS) $(THIS_DIR)
cd build && $(CMAKE_PRG) -G '$(CMAKE_GENERATOR)' $(CMAKE_FLAGS) $(CMAKE_EXTRA_FLAGS) $(MAKEFILE_DIR)
touch $@
deps: | build/.ran-third-party-cmake
ifeq ($(call filter-true,$(USE_BUNDLED)),)
+$(BUILD_CMD) -C $(DEPS_BUILD_DIR)
+$(BUILD_TOOL) -C $(DEPS_BUILD_DIR)
endif
ifeq ($(call filter-true,$(USE_BUNDLED)),)
@ -106,8 +112,8 @@ $(DEPS_BUILD_DIR):
mkdir -p "$@"
build/.ran-third-party-cmake:: $(DEPS_BUILD_DIR)
cd $(DEPS_BUILD_DIR) && \
$(CMAKE_PRG) -G '$(BUILD_TYPE)' $(BUNDLED_CMAKE_FLAG) $(BUNDLED_LUA_CMAKE_FLAG) \
$(DEPS_CMAKE_FLAGS) $(THIS_DIR)/third-party
$(CMAKE_PRG) -G '$(CMAKE_GENERATOR)' $(BUNDLED_CMAKE_FLAG) $(BUNDLED_LUA_CMAKE_FLAG) \
$(DEPS_CMAKE_FLAGS) $(MAKEFILE_DIR)/third-party
endif
build/.ran-third-party-cmake::
mkdir -p build
@ -117,26 +123,39 @@ build/.ran-third-party-cmake::
oldtest: | nvim build/runtime/doc/tags
+$(SINGLE_MAKE) -C src/nvim/testdir clean
ifeq ($(strip $(TEST_FILE)),)
+$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG="$(realpath build/bin/nvim)" $(MAKEOVERRIDES)
+$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG=$(NVIM_PRG) $(MAKEOVERRIDES)
else
+$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG="$(realpath build/bin/nvim)" NEW_TESTS=$(TEST_FILE) SCRIPTS= $(MAKEOVERRIDES)
@# Handle TEST_FILE=test_foo{,.res,.vim}.
+$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG=$(NVIM_PRG) SCRIPTS= $(MAKEOVERRIDES) $(patsubst %.vim,%,$(patsubst %.res,%,$(TEST_FILE)))
endif
# Build oldtest by specifying the relative .vim filename.
.PHONY: phony_force
src/nvim/testdir/%.vim: phony_force
+$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG=$(NVIM_PRG) SCRIPTS= $(MAKEOVERRIDES) $(patsubst src/nvim/testdir/%.vim,%,$@)
build/runtime/doc/tags helptags: | nvim
+$(BUILD_CMD) -C build runtime/doc/tags
+$(BUILD_TOOL) -C build runtime/doc/tags
# Builds help HTML _and_ checks for invalid help tags.
helphtml: | nvim build/runtime/doc/tags
+$(BUILD_CMD) -C build doc_html
+$(BUILD_TOOL) -C build doc_html
functionaltest: | nvim
+$(BUILD_CMD) -C build functionaltest
+$(BUILD_TOOL) -C build functionaltest
functionaltest-lua: | nvim
+$(BUILD_CMD) -C build functionaltest-lua
+$(BUILD_TOOL) -C build functionaltest-lua
lualint: | build/.ran-cmake deps
$(BUILD_CMD) -C build lualint
$(BUILD_TOOL) -C build lualint
shlint:
@shellcheck --version | head -n 2
shellcheck scripts/vim-patch.sh
_opt_shlint:
@command -v shellcheck && { $(MAKE) shlint; exit $$?; } \
|| echo "SKIP: shlint (shellcheck not found)"
pylint:
flake8 contrib/ scripts/ src/ test/
@ -146,37 +165,45 @@ _opt_pylint:
@command -v flake8 && { $(MAKE) pylint; exit $$?; } \
|| echo "SKIP: pylint (flake8 not found)"
commitlint:
$(NVIM_PRG) -u NONE -es +"lua require('scripts.lintcommit').main({trace=false})"
_opt_commitlint:
@test -x build/bin/nvim && { $(MAKE) commitlint; exit $$?; } \
|| echo "SKIP: commitlint (build/bin/nvim not found)"
unittest: | nvim
+$(BUILD_CMD) -C build unittest
+$(BUILD_TOOL) -C build unittest
benchmark: | nvim
+$(BUILD_CMD) -C build benchmark
+$(BUILD_TOOL) -C build benchmark
test: functionaltest unittest
clean:
+test -d build && $(BUILD_CMD) -C build clean || true
+test -d build && $(BUILD_TOOL) -C build clean || true
$(MAKE) -C src/nvim/testdir clean
$(MAKE) -C runtime/doc clean
$(MAKE) -C runtime/indent clean
distclean:
rm -rf $(DEPS_BUILD_DIR) build
$(MAKE) clean
install: checkprefix nvim
+$(BUILD_CMD) -C build install
+$(BUILD_TOOL) -C build install
clint: build/.ran-cmake
+$(BUILD_CMD) -C build clint
+$(BUILD_TOOL) -C build clint
clint-full: build/.ran-cmake
+$(BUILD_CMD) -C build clint-full
+$(BUILD_TOOL) -C build clint-full
check-single-includes: build/.ran-cmake
+$(BUILD_CMD) -C build check-single-includes
+$(BUILD_TOOL) -C build check-single-includes
generated-sources: build/.ran-cmake
+$(BUILD_CMD) -C build generated-sources
+$(BUILD_TOOL) -C build generated-sources
appimage:
bash scripts/genappimage.sh
@ -187,16 +214,16 @@ appimage:
appimage-%:
bash scripts/genappimage.sh $*
lint: check-single-includes clint lualint _opt_pylint
lint: check-single-includes clint lualint _opt_pylint _opt_shlint _opt_commitlint
# Generic pattern rules, allowing for `make build/bin/nvim` etc.
# Does not work with "Unix Makefiles".
ifeq ($(BUILD_TYPE),Ninja)
build/%:
$(BUILD_CMD) -C build $(patsubst build/%,%,$@)
ifeq ($(CMAKE_GENERATOR),Ninja)
build/%: phony_force
$(BUILD_TOOL) -C build $(patsubst build/%,%,$@)
$(DEPS_BUILD_DIR)/%:
$(BUILD_CMD) -C $(DEPS_BUILD_DIR) $(patsubst $(DEPS_BUILD_DIR)/%,%,$@)
$(DEPS_BUILD_DIR)/%: phony_force
$(BUILD_TOOL) -C $(DEPS_BUILD_DIR) $(patsubst $(DEPS_BUILD_DIR)/%,%,$@)
endif
.PHONY: test lualint pylint functionaltest unittest lint clint clean distclean nvim libnvim cmake deps install appimage checkprefix
.PHONY: test lualint pylint shlint functionaltest unittest lint clint clean distclean nvim libnvim cmake deps install appimage checkprefix commitlint

View File

@ -1,12 +1,12 @@
[![Neovim](https://raw.githubusercontent.com/neovim/neovim.github.io/master/logos/neovim-logo-300x87.png)](https://neovim.io)
<h1 align="center">
<img src="https://raw.githubusercontent.com/neovim/neovim.github.io/master/logos/neovim-logo-300x87.png" alt="Neovim">
</h1>
[Wiki](https://github.com/neovim/neovim/wiki) |
[Documentation](https://neovim.io/doc) |
[Chat/Discussion](https://gitter.im/neovim/neovim) |
[Documentation](https://neovim.io/doc/general/) |
[Chat](https://app.element.io/#/room/#neovim:matrix.org) |
[Twitter](https://twitter.com/Neovim)
[![Travis build status](https://travis-ci.org/neovim/neovim.svg?branch=master)](https://travis-ci.org/neovim/neovim)
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/urdqjrik5u521fac/branch/master?svg=true)](https://ci.appveyor.com/project/neovim/neovim/branch/master)
[![GitHub CI](https://github.com/neovim/neovim/workflows/CI/badge.svg)](https://github.com/neovim/neovim/actions?query=workflow%3ACI+branch%3Amaster+event%3Apush)
[![Codecov coverage](https://img.shields.io/codecov/c/github/neovim/neovim.svg)](https://codecov.io/gh/neovim/neovim)
[![Coverity Scan analysis](https://scan.coverity.com/projects/2227/badge.svg)](https://scan.coverity.com/projects/2227)
[![Clang analysis](https://neovim.io/doc/reports/clang/badge.svg)](https://neovim.io/doc/reports/clang)
@ -15,6 +15,7 @@
[![Packages](https://repology.org/badge/tiny-repos/neovim.svg)](https://repology.org/metapackage/neovim)
[![Debian CI](https://badges.debian.net/badges/debian/testing/neovim/version.svg)](https://buildd.debian.org/neovim)
[![Downloads](https://img.shields.io/github/downloads/neovim/neovim/total.svg?maxAge=2592001)](https://github.com/neovim/neovim/releases/)
[![nvim](https://snapcraft.io//nvim/badge.svg)](https://snapcraft.io/nvim)
Neovim is a project that seeks to aggressively refactor Vim in order to:
@ -47,13 +48,15 @@ Install from package
Pre-built packages for Windows, macOS, and Linux are found on the
[Releases](https://github.com/neovim/neovim/releases/) page.
[Managed packages] are in Homebrew, [Debian], [Ubuntu], [Fedora], [Arch Linux],
[Gentoo], and more!
[Managed packages] are in [Homebrew], [Debian], [Ubuntu], [Fedora], [Arch Linux], [Void Linux], [Gentoo], and more!
Install from source
-------------------
See the [Building Neovim](https://github.com/neovim/neovim/wiki/Building-Neovim) wiki page for details.
The build is CMake-based, but a Makefile is provided as a convenience.
After installing the dependencies, run the following command.
make CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make install
@ -63,29 +66,12 @@ To install to a non-default location:
make CMAKE_INSTALL_PREFIX=/full/path/
make install
To skip bundled (`third-party/*`) dependencies:
1. Install the dependencies using a package manager.
```
sudo apt install gperf luajit luarocks libuv1-dev libluajit-5.1-dev libunibilium-dev libmsgpack-dev libtermkey-dev libvterm-dev
sudo luarocks build mpack
sudo luarocks build lpeg
sudo luarocks build inspect
```
2. Build with `USE_BUNDLED=OFF`:
```
make CMAKE_BUILD_TYPE=RelWithDebInfo USE_BUNDLED=OFF
sudo make install
```
To inspect the build, these CMake features are useful:
CMake hints for inspecting the build:
- `cmake --build build --target help` lists all build targets.
- `build/CMakeCache.txt` (or `cmake -LAH build/`) contains the resolved values of all CMake variables.
- `build/compile_commands.json` shows the full compiler invocations for each translation unit.
See the [Building Neovim](https://github.com/neovim/neovim/wiki/Building-Neovim) wiki page for details.
Transitioning from Vim
--------------------
@ -113,17 +99,9 @@ Project layout
License
-------
Neovim is licensed under the terms of the Apache 2.0 license, except for
parts that were contributed under the Vim license.
- Contributions committed before [b17d96][license-commit] remain under the Vim
license.
- Contributions committed after [b17d96][license-commit] are licensed under
Apache 2.0 unless those contributions were copied from Vim (identified in
the commit logs by the `vim-patch` token).
See `LICENSE` for details.
Neovim contributions since [b17d96][license-commit] are licensed under the
Apache 2.0 license, except for contributions copied from Vim (identified by the
`vim-patch` token). See LICENSE for details.
Vim is Charityware. You can use and copy it as much as you like, but you are
encouraged to make a donation for needy children in Uganda. Please see the
@ -143,8 +121,10 @@ See `LICENSE` for details.
[Managed packages]: https://github.com/neovim/neovim/wiki/Installing-Neovim#install-from-package
[Debian]: https://packages.debian.org/testing/neovim
[Ubuntu]: http://packages.ubuntu.com/search?keywords=neovim
[Fedora]: https://apps.fedoraproject.org/packages/neovim
[Fedora]: https://packages.fedoraproject.org/pkgs/neovim/neovim/
[Arch Linux]: https://www.archlinux.org/packages/?q=neovim
[Void Linux]: https://voidlinux.org/packages/?arch=x86_64&q=neovim
[Gentoo]: https://packages.gentoo.org/packages/app-editors/neovim
[Homebrew]: https://formulae.brew.sh/formula/neovim
<!-- vim: set tw=80: -->

View File

@ -1,45 +0,0 @@
version: '{build}'
environment:
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma -mx=9"
DEPS_BUILD_DIR: "C:/projects/nvim-deps"
DEPS_PREFIX: "C:/projects/nvim-deps/usr"
# Silence/redirect errors due to missing locking support (via libgcov).
GCOV_ERROR_FILE: "$(TEMP)/libgcov-errors.log"
image: Visual Studio 2017
configuration:
- MINGW_64-gcov
- MINGW_32
- MSVC_64
- MSVC_32
init:
- ps: |
# Pull requests: skip some build configurations to save time.
if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -and $env:CONFIGURATION -match '^(MSVC_64|MINGW_32)$') {
$env:APPVEYOR_CACHE_SKIP_SAVE = "true"
Exit-AppVeyorBuild
}
# RDP
#- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
matrix:
fast_finish: true
install: []
before_build:
- ps: Install-Product node 8
build_script:
- powershell ci\build.ps1
after_build:
- ps: |
if (Test-Path $env:GCOV_ERROR_FILE) {
Get-Content $env:GCOV_ERROR_FILE -Head 10
Get-Content $env:GCOV_ERROR_FILE -Tail 10
} else {
write-host "no GCOV_ERROR_FILE"
}
cache:
- C:\projects\nvim-deps -> third-party\**
artifacts:
- path: build/Neovim.zip
- path: build/bin/nvim.exe
branches:
only:
- master

View File

@ -7,6 +7,8 @@ CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${CI_DIR}/common/build.sh"
source "${CI_DIR}/common/suite.sh"
mkdir -p "${HOME}/.cache"
echo "before_cache.sh: cache size"
du -chd 1 "${HOME}/.cache" | sort -rh | head -20
@ -16,7 +18,7 @@ ccache -s 2>/dev/null || true
find "${HOME}/.ccache" -name stats -delete
# Update the third-party dependency cache only if the build was successful.
if ended_successfully; then
if ended_successfully && [ -d "${DEPS_BUILD_DIR}" ]; then
# Do not cache downloads. They should not be needed with up-to-date deps.
rm -rf "${DEPS_BUILD_DIR}/build/downloads"
rm -rf "${CACHE_NVIM_DEPS_DIR}"

View File

@ -1,64 +0,0 @@
#!/usr/bin/env bash
set -e
set -o pipefail
if [[ "${CI_TARGET}" == lint ]]; then
exit
fi
echo 'Python info:'
(
set -x
python3 --version
python2 --version
python --version
pip3 --version
pip2 --version
pip --version
pyenv --version
pyenv versions
) 2>&1 | sed 's/^/ /' || true
# Use pyenv, but not for OSX on Travis, where it only has the "system" version.
if [[ "${TRAVIS_OS_NAME}" != osx ]] && command -v pyenv; then
echo 'Setting Python versions via pyenv'
# Prefer Python 2 over 3 (more conservative).
pyenv global 2.7.15:3.7
echo 'Updated Python info:'
(
set -x
python3 --version
python2 --version
python --version
python3 -m pip --version
python2 -m pip --version
) 2>&1 | sed 's/^/ /'
fi
echo "Install node (LTS)"
if [[ "${TRAVIS_OS_NAME}" == osx ]] || [ ! -f ~/.nvm/nvm.sh ]; then
curl -o ~/.nvm/nvm.sh https://raw.githubusercontent.com/creationix/nvm/master/nvm.sh
fi
source ~/.nvm/nvm.sh
nvm install --lts
nvm use --lts
if [[ -n "$CMAKE_URL" ]]; then
echo "Installing custom CMake: $CMAKE_URL"
curl --retry 5 --silent --fail -o /tmp/cmake-installer.sh "$CMAKE_URL"
mkdir -p "$HOME/.local/bin" /opt/cmake-custom
bash /tmp/cmake-installer.sh --prefix=/opt/cmake-custom --skip-license
ln -sfn /opt/cmake-custom/bin/cmake "$HOME/.local/bin/cmake"
cmake_version="$(cmake --version)"
echo "$cmake_version" | grep -qF '2.8.12' || {
echo "Unexpected CMake version: $cmake_version"
exit 1
}
fi

View File

@ -3,10 +3,6 @@
set -e
set -o pipefail
if [[ "${CI_TARGET}" == lint ]]; then
exit
fi
CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${CI_DIR}/common/build.sh"
@ -25,15 +21,13 @@ ccache -s
# Reset ccache stats for real results in before_cache.
ccache --zero-stats
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
# Adds user to a dummy group.
# That allows to test changing the group of the file by `os_fchown`.
sudo dscl . -create /Groups/chown_test
sudo dscl . -append /Groups/chown_test GroupMembership "${USER}"
fi
# Compile dependencies.
build_deps
# Install cluacov for Lua coverage.
if [[ "$USE_LUACOV" == 1 ]]; then
"${DEPS_BUILD_DIR}/usr/bin/luarocks" install cluacov
fi
rm -rf "${LOG_DIR}"
mkdir -p "${LOG_DIR}"

View File

@ -1,10 +1,11 @@
$ErrorActionPreference = 'stop'
Set-PSDebug -Strict -Trace 1
param([switch]$NoTests)
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
$isPullRequest = ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -ne $null)
$env:CONFIGURATION -match '^(?<compiler>\w+)_(?<bits>32|64)(?:-(?<option>\w+))?$'
$compiler = $Matches.compiler
$compileOption = $Matches.option
$compileOption = if ($Matches -contains 'option') {$Matches.option} else {''}
$bits = $Matches.bits
$cmakeBuildType = $(if ($env:CMAKE_BUILD_TYPE -ne $null) {$env:CMAKE_BUILD_TYPE} else {'RelWithDebInfo'});
$buildDir = [System.IO.Path]::GetFullPath("$(pwd)")
@ -23,11 +24,15 @@ $uploadToCodeCov = $false
function exitIfFailed() {
if ($LastExitCode -ne 0) {
Set-PSDebug -Off
exit $LastExitCode
}
}
if (-not $NoTests) {
node --version
npm.cmd --version
}
if (-Not (Test-Path -PathType container $env:DEPS_BUILD_DIR)) {
write-host "cache dir not found: $($env:DEPS_BUILD_DIR)"
mkdir $env:DEPS_BUILD_DIR
@ -46,13 +51,17 @@ if ($compiler -eq 'MINGW') {
$nvimCmakeVars['USE_GCOV'] = 'ON'
$uploadToCodecov = $true
$env:GCOV = "C:\msys64\mingw$bits\bin\gcov"
# Setup/build Lua coverage.
$env:USE_LUACOV = 1
$env:BUSTED_ARGS = "--coverage"
}
# These are native MinGW builds, but they use the toolchain inside
# MSYS2, this allows using all the dependencies and tools available
# in MSYS2, but we cannot build inside the MSYS2 shell.
$cmakeGenerator = 'Ninja'
$cmakeGeneratorArgs = '-v'
$mingwPackages = @('ninja', 'cmake', 'perl', 'diffutils').ForEach({
$mingwPackages = @('ninja', 'cmake', 'diffutils').ForEach({
"mingw-w64-$arch-$_"
})
@ -63,91 +72,117 @@ if ($compiler -eq 'MINGW') {
& C:\msys64\usr\bin\mkdir -p /var/cache/pacman/pkg
# Build third-party dependencies
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Su" ; exitIfFailed
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Syu" ; exitIfFailed
# Update again in case updating pacman changes pacman.conf
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Syu" ; exitIfFailed
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S $mingwPackages" ; exitIfFailed
}
elseif ($compiler -eq 'MSVC') {
$cmakeGeneratorArgs = '/verbosity:normal'
if ($bits -eq 32) {
$cmakeGenerator = 'Visual Studio 15 2017'
}
elseif ($bits -eq 64) {
$cmakeGenerator = 'Visual Studio 15 2017 Win64'
$cmakeGenerator = 'Visual Studio 16 2019'
}
if ($compiler -eq 'MSVC') {
$installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
if ($installationPath -and (test-path "$installationPath\Common7\Tools\vsdevcmd.bat")) {
& "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x${bits} -no_logo && set" | foreach-object {
$name, $value = $_ -split '=', 2
set-content env:\"$name" $value
}
}
}
# Setup python (use AppVeyor system python)
C:\Python27\python.exe -m pip install pynvim ; exitIfFailed
C:\Python35\python.exe -m pip install pynvim ; exitIfFailed
# Disambiguate python3
move c:\Python35\python.exe c:\Python35\python3.exe
$env:PATH = "C:\Python35;C:\Python27;$env:PATH"
# Sanity check
python -c "import pynvim; print(str(pynvim))" ; exitIfFailed
python3 -c "import pynvim; print(str(pynvim))" ; exitIfFailed
if (-not $NoTests) {
python -m ensurepip
python -m pip install pynvim ; exitIfFailed
# Sanity check
python -c "import pynvim; print(str(pynvim))" ; exitIfFailed
$env:PATH = "C:\Ruby24\bin;$env:PATH"
gem.cmd install neovim
Get-Command -CommandType Application neovim-ruby-host.bat
gem.cmd install --pre neovim
Get-Command -CommandType Application neovim-ruby-host.bat
npm.cmd install -g neovim
Get-Command -CommandType Application neovim-node-host.cmd
npm.cmd link neovim
npm.cmd install -g neovim
Get-Command -CommandType Application neovim-node-host.cmd
npm.cmd link neovim
}
function convertToCmakeArgs($vars) {
return $vars.GetEnumerator() | foreach { "-D$($_.Key)=$($_.Value)" }
}
cd $env:DEPS_BUILD_DIR
cmake -G $cmakeGenerator $(convertToCmakeArgs($depsCmakeVars)) "$buildDir/third-party/" ; exitIfFailed
if ($compiler -eq 'MSVC') {
if ($bits -eq 32) {
cmake -G $cmakeGenerator -A Win32 $(convertToCmakeArgs($depsCmakeVars)) "$buildDir/third-party/" ; exitIfFailed
} else {
cmake -G $cmakeGenerator -A x64 $(convertToCmakeArgs($depsCmakeVars)) "$buildDir/third-party/" ; exitIfFailed
}
} else {
cmake -G $cmakeGenerator $(convertToCmakeArgs($depsCmakeVars)) "$buildDir/third-party/" ; exitIfFailed
}
cmake --build . --config $cmakeBuildType -- $cmakeGeneratorArgs ; exitIfFailed
cd $buildDir
# Build Neovim
mkdir build
cd build
cmake -G $cmakeGenerator $(convertToCmakeArgs($nvimCmakeVars)) .. ; exitIfFailed
if ($compiler -eq 'MSVC') {
if ($bits -eq 32) {
cmake -G $cmakeGenerator -A Win32 $(convertToCmakeArgs($nvimCmakeVars)) .. ; exitIfFailed
} else {
cmake -G $cmakeGenerator -A x64 $(convertToCmakeArgs($nvimCmakeVars)) .. ; exitIfFailed
}
} else {
cmake -G $cmakeGenerator $(convertToCmakeArgs($nvimCmakeVars)) .. ; exitIfFailed
}
cmake --build . --config $cmakeBuildType -- $cmakeGeneratorArgs ; exitIfFailed
.\bin\nvim --version ; exitIfFailed
# Ensure that the "win32" feature is set.
.\bin\nvim -u NONE --headless -c 'exe !has(\"win32\").\"cq\"' ; exitIfFailed
# Functional tests
# The $LastExitCode from MSBuild can't be trusted
$failed = $false
# Temporarily turn off tracing to reduce log file output
Set-PSDebug -Off
cmake --build . --config $cmakeBuildType --target functionaltest -- $cmakeGeneratorArgs 2>&1 |
foreach { $failed = $failed -or
$_ -match 'functional tests failed with error'; $_ }
if ($failed) {
if ($env:USE_LUACOV -eq 1) {
& $env:DEPS_PREFIX\luarocks\luarocks.bat install cluacov
}
if (-not $NoTests) {
# Functional tests
# The $LastExitCode from MSBuild can't be trusted
$failed = $false
# Run only this test file:
# $env:TEST_FILE = "test\functional\foo.lua"
cmake --build . --config $cmakeBuildType --target functionaltest -- $cmakeGeneratorArgs 2>&1 |
foreach { $failed = $failed -or
$_ -match 'functional tests failed with error'; $_ }
if ($uploadToCodecov) {
if ($env:USE_LUACOV -eq 1) {
& $env:DEPS_PREFIX\bin\luacov.bat
}
bash -l /c/projects/neovim/ci/common/submit_coverage.sh functionaltest
}
exit $LastExitCode
}
Set-PSDebug -Strict -Trace 1
if ($failed) {
exit $LastExitCode
}
# Old tests
# Add MSYS to path, required for e.g. `find` used in test scripts.
# But would break functionaltests, where its `more` would be used then.
$OldPath = $env:PATH
$env:PATH = "C:\msys64\usr\bin;$env:PATH"
& "C:\msys64\mingw$bits\bin\mingw32-make.exe" -C $(Convert-Path ..\src\nvim\testdir) VERBOSE=1 ; exitIfFailed
$env:PATH = $OldPath
if ($uploadToCodecov) {
bash -l /c/projects/neovim/ci/common/submit_coverage.sh functionaltest
if ($uploadToCodecov) {
bash -l /c/projects/neovim/ci/common/submit_coverage.sh oldtest
}
}
# Old tests
# Add MSYS to path, required for e.g. `find` used in test scripts.
# But would break functionaltests, where its `more` would be used then.
$OldPath = $env:PATH
$env:PATH = "C:\msys64\usr\bin;$env:PATH"
& "C:\msys64\mingw$bits\bin\mingw32-make.exe" -C $(Convert-Path ..\src\nvim\testdir) VERBOSE=1 ; exitIfFailed
$env:PATH = $OldPath
if ($uploadToCodecov) {
bash -l /c/projects/neovim/ci/common/submit_coverage.sh oldtest
# Ensure choco's cpack is not in PATH otherwise, it conflicts with CMake's
if (Test-Path -Path $env:ChocolateyInstall\bin\cpack.exe) {
Remove-Item -Path $env:ChocolateyInstall\bin\cpack.exe -Force
}
# Build artifacts
cpack -G ZIP -C RelWithDebInfo
if ($env:APPVEYOR_REPO_TAG_NAME -ne $null) {
cpack -G NSIS -C RelWithDebInfo
}
cpack -C $cmakeBuildType

View File

@ -1,5 +1,5 @@
_stat() {
if test "${TRAVIS_OS_NAME}" = osx ; then
if test "${CI_OS_NAME}" = osx ; then
stat -f %Sm "${@}"
else
stat -c %y "${@}"
@ -8,8 +8,6 @@ _stat() {
top_make() {
printf '%78s\n' | tr ' ' '='
# Travis has 1.5 virtual cores according to:
# http://docs.travis-ci.com/user/speeding-up-the-build/#Paralellizing-your-build-on-one-VM
ninja "$@"
}
@ -18,9 +16,6 @@ build_make() {
}
build_deps() {
if test "${BUILD_32BIT}" = ON ; then
DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}"
fi
if test "${FUNCTIONALTEST}" = "functionaltest-lua" \
|| test "${CLANG_SANITIZER}" = "ASAN_UBSAN" ; then
DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -DUSE_BUNDLED_LUA=ON"
@ -32,7 +27,7 @@ build_deps() {
if test "${CACHE_ENABLE}" = "false" ; then
export CCACHE_RECACHE=1
elif test -f "${CACHE_MARKER}" ; then
echo "Using third-party dependencies from Travis cache (last update: $(_stat "${CACHE_MARKER}"))."
echo "Using third-party dependencies from cache (last update: $(_stat "${CACHE_MARKER}"))."
cp -a "${CACHE_NVIM_DEPS_DIR}"/. "${DEPS_BUILD_DIR}"
fi
@ -40,30 +35,28 @@ build_deps() {
# update CMake configuration and update to newer deps versions.
cd "${DEPS_BUILD_DIR}"
echo "Configuring with '${DEPS_CMAKE_FLAGS}'."
CC= cmake -G Ninja ${DEPS_CMAKE_FLAGS} "${TRAVIS_BUILD_DIR}/third-party/"
CC= cmake -G Ninja ${DEPS_CMAKE_FLAGS} "${CI_BUILD_DIR}/third-party/"
if ! top_make; then
exit 1
fi
cd "${TRAVIS_BUILD_DIR}"
cd "${CI_BUILD_DIR}"
}
prepare_build() {
build_nvim() {
check_core_dumps --delete quiet
if test -n "${CLANG_SANITIZER}" ; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DCLANG_${CLANG_SANITIZER}=ON"
fi
if test "${BUILD_32BIT}" = ON ; then
CMAKE_FLAGS="${CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}"
fi
mkdir -p "${BUILD_DIR}"
cd "${BUILD_DIR}"
echo "Configuring with '${CMAKE_FLAGS} $@'."
cmake -G Ninja ${CMAKE_FLAGS} "$@" "${TRAVIS_BUILD_DIR}"
}
cmake -G Ninja ${CMAKE_FLAGS} "$@" "${CI_BUILD_DIR}"
build_nvim() {
echo "Building nvim."
if ! top_make nvim ; then
exit 1
@ -90,14 +83,5 @@ build_nvim() {
fi
check_sanitizer "${LOG_DIR}"
cd "${TRAVIS_BUILD_DIR}"
}
macos_rvm_dance() {
# neovim-ruby gem requires a ruby newer than the macOS default.
source ~/.rvm/scripts/rvm
rvm get stable --auto-dotfiles
rvm reload
rvm use 2.2.5
rvm use
cd "${CI_BUILD_DIR}"
}

View File

@ -4,7 +4,7 @@
# Args:
# $1: Flag(s) for codecov, separated by comma.
set -ex
set -e
# Change to grandparent dir (POSIXly).
CDPATH='' cd -P -- "$(dirname -- "$0")/../.." || exit
@ -18,12 +18,12 @@ if ! [ -f "$codecov_sh" ]; then
curl --retry 5 --silent --fail -o "$codecov_sh" https://codecov.io/bash
chmod +x "$codecov_sh"
python3 -m pip install --quiet --user gcovr
python -m pip install --quiet --user gcovr
fi
(
cd build
python3 -m gcovr --branches --exclude-unreachable-branches --print-summary -j 2 --exclude '.*/auto/.*' --root .. --delete -o ../coverage.xml --xml
python -m gcovr --branches --exclude-unreachable-branches --print-summary -j 2 --exclude '.*/auto/.*' --root .. --delete -o ../coverage.xml --xml
)
# Upload to codecov.
@ -43,3 +43,14 @@ fi
# Cleanup always, especially collected data.
find . \( -name '*.gcov' -o -name '*.gcda' \) -ls -delete | wc -l
rm -f coverage.xml
# Upload Lua coverage (generated manually on AppVeyor/Windows).
if [ "$USE_LUACOV" = 1 ] && [ "$1" != "oldtest" ]; then
if [ -x "${DEPS_BUILD_DIR}/usr/bin/luacov" ]; then
"${DEPS_BUILD_DIR}/usr/bin/luacov"
fi
if ! "$codecov_sh" -f luacov.report.out -X gcov -X fix -Z -F "lua,${codecov_flags}"; then
echo "codecov upload failed."
fi
rm luacov.stats.out
fi

View File

@ -1,9 +1,3 @@
# HACK: get newline for use in strings given that "\n" and $'' do not work.
NL="$(printf '\nE')"
NL="${NL%E}"
FAIL_SUMMARY=""
# Test success marker. If END_MARKER file exists, we know that all tests
# finished. If FAIL_SUMMARY_FILE exists we know that some tests failed, this
# file will contain information about failed tests. Build is considered
@ -11,173 +5,27 @@ FAIL_SUMMARY=""
END_MARKER="$BUILD_DIR/.tests_finished"
FAIL_SUMMARY_FILE="$BUILD_DIR/.test_errors"
ANSI_CLEAR="\033[0K"
travis_fold() {
local action="$1"
local name="$2"
name="$(echo -n "$name" | tr '\n\0' '--' | sed 's/[^A-Za-z0-9]\{1,\}/-/g')"
name="$(echo -n "$name" | sed 's/-$//')"
echo -en "travis_fold:${action}:${name}\r${ANSI_CLEAR}"
}
if test "$TRAVIS" != "true" ; then
travis_fold() {
return 0
}
fi
enter_suite() {
set +x
FAILED=0
rm -f "${END_MARKER}"
local suite_name="$1"
export NVIM_TEST_CURRENT_SUITE="${NVIM_TEST_CURRENT_SUITE}/$suite_name"
travis_fold start "${NVIM_TEST_CURRENT_SUITE}"
set -x
}
exit_suite() {
set +x
if test $FAILED -ne 0 ; then
echo "Suite ${NVIM_TEST_CURRENT_SUITE} failed, summary:"
echo "${FAIL_SUMMARY}"
else
travis_fold end "${NVIM_TEST_CURRENT_SUITE}"
fi
export NVIM_TEST_CURRENT_SUITE="${NVIM_TEST_CURRENT_SUITE%/*}"
if test "$1" != "--continue" ; then
exit $FAILED
else
local saved_failed=$FAILED
FAILED=0
return $saved_failed
fi
}
fail() {
local test_name="$1"
local fail_char="$2"
local message="$3"
local message="$2"
: ${fail_char:=F}
: ${message:=Test $test_name failed}
local full_msg="$fail_char $NVIM_TEST_CURRENT_SUITE|$test_name :: $message"
FAIL_SUMMARY="${FAIL_SUMMARY}${NL}${full_msg}"
local full_msg="$test_name :: $message"
echo "${full_msg}" >> "${FAIL_SUMMARY_FILE}"
echo "Failed: $full_msg"
FAILED=1
}
run_test() {
local cmd="$1"
test $# -gt 0 && shift
local test_name="$1"
: ${test_name:=$cmd}
test $# -gt 0 && shift
if ! eval "$cmd" ; then
fail "${test_name}" "$@"
fi
}
run_test_wd() {
local hang_ok=
if test "$1" = "--allow-hang" ; then
hang_ok=1
shift
fi
local timeout="$1"
test $# -gt 0 && shift
local cmd="$1"
test $# -gt 0 && shift
local restart_cmd="$1"
: ${restart_cmd:=true}
test $# -gt 0 && shift
local test_name="$1"
: ${test_name:=$cmd}
test $# -gt 0 && shift
local output_file="$(mktemp)"
local status_file="$(mktemp)"
local sid_file="$(mktemp)"
local restarts=5
local prev_tmpsize=-1
while test $restarts -gt 0 ; do
: > "$status_file"
: > "$sid_file"
setsid \
env \
output_file="$output_file" \
status_file="$status_file" \
sid_file="$sid_file" \
cmd="$cmd" \
CI_DIR="$CI_DIR" \
sh -c '
. "${CI_DIR}/common/test.sh"
ps -o sid= > "$sid_file"
(
ret=0
if ! eval "$cmd" 2>&1 ; then
ret=1
fi
echo "$ret" > "$status_file"
) | tee -a "$output_file"
'
while test "$(stat -c "%s" "$status_file")" -eq 0 ; do
prev_tmpsize=$tmpsize
sleep $timeout
tmpsize="$(stat -c "%s" "$output_file")"
if test $tempsize -eq $prev_temsize ; then
# no output, assuming either hang or exit
break
fi
done
restarts=$(( restarts - 1 ))
if test "$(stat -c "%s" "$status_file")" -eq 0 ; then
# Status file not updated, assuming hang
# SID not known, this should not ever happen
if test "$(stat -c "%s" "$sid_file")" -eq 0 ; then
fail "$test_name" E "Shell did not run"
break
fi
# Kill all processes which belong to one session: should get rid of test
# processes as well as sh itself.
pkill -KILL -s$(cat "$sid_file")
if test $restarts -eq 0 ; then
if test -z "$hang_ok" ; then
fail "$test_name" E "Test hang up"
fi
else
echo "Test ${test_name} hang up, restarting"
eval "$restart_cmd"
fi
else
local new_failed="$(cat "$status_file")"
if test "$new_failed" != "0" ; then
fail "$test_name" F "Test failed in run_test_wd"
fi
break
fi
done
rm -f "$output_file"
rm -f "$status_file"
rm -f "$sid_file"
}
ended_successfully() {
if test -f "${FAIL_SUMMARY_FILE}" ; then
echo 'Test failed, complete summary:'
cat "${FAIL_SUMMARY_FILE}"
if [[ "$GITHUB_ACTIONS" == "true" ]]; then
rm -f "$FAIL_SUMMARY_FILE"
fi
return 1
fi
if ! test -f "${END_MARKER}" ; then

View File

@ -15,7 +15,7 @@ print_core() {
return 0
fi
echo "======= Core file $core ======="
if test "${TRAVIS_OS_NAME}" = osx ; then
if test "${CI_OS_NAME}" = osx ; then
lldb -Q -o "bt all" -f "${app}" -c "${core}"
else
gdb -n -batch -ex 'thread apply all bt full' "${app}" -c "${core}"
@ -30,11 +30,11 @@ check_core_dumps() {
fi
local app="${1:-${BUILD_DIR}/bin/nvim}"
local cores
if test "${TRAVIS_OS_NAME}" = osx ; then
if test "${CI_OS_NAME}" = osx ; then
cores="$(find /cores/ -type f -print)"
local _sudo='sudo'
else
cores="$(find ./ -type f -name 'core.*' -print)"
cores="$(find ./ -type f \( -name 'core.*' -o -name core -o -name nvim.core \) -print)"
local _sudo=
fi
@ -51,7 +51,7 @@ check_core_dumps() {
fi
done
if test "$app" != quiet ; then
fail 'cores' E 'Core dumps found'
fail 'cores' 'Core dumps found'
fi
}
@ -72,7 +72,7 @@ check_logs() {
rm "${log}"
done
if test -n "${err}" ; then
fail 'logs' E 'Runtime errors detected.'
fail 'logs' 'Runtime errors detected.'
fi
}
@ -82,50 +82,43 @@ valgrind_check() {
check_sanitizer() {
if test -n "${CLANG_SANITIZER}"; then
check_logs "${1}" "*san.*"
check_logs "${1}" "*san.*" | ${SYMBOLIZER:-cat}
fi
}
run_unittests() {(
enter_suite unittests
unittests() {(
ulimit -c unlimited || true
if ! build_make unittest ; then
fail 'unittests' F 'Unit tests failed'
fail 'unittests' 'Unit tests failed'
fi
submit_coverage unittest
check_core_dumps "$(command -v luajit)"
exit_suite
)}
run_functionaltests() {(
enter_suite functionaltests
functionaltests() {(
ulimit -c unlimited || true
if ! build_make ${FUNCTIONALTEST}; then
fail 'functionaltests' F 'Functional tests failed'
fail 'functionaltests' 'Functional tests failed'
fi
submit_coverage functionaltest
check_sanitizer "${LOG_DIR}"
valgrind_check "${LOG_DIR}"
check_core_dumps
exit_suite
)}
run_oldtests() {(
enter_suite oldtests
oldtests() {(
ulimit -c unlimited || true
if ! make oldtest; then
reset
fail 'oldtests' F 'Legacy tests failed'
fail 'oldtests' 'Legacy tests failed'
fi
submit_coverage oldtest
check_sanitizer "${LOG_DIR}"
valgrind_check "${LOG_DIR}"
check_core_dumps
exit_suite
)}
check_runtime_files() {(
set +x
local test_name="$1" ; shift
local message="$1" ; shift
local tst="$1" ; shift
@ -136,27 +129,25 @@ check_runtime_files() {(
# Prefer failing the build over using more robust construct because files
# with IFS are not welcome.
if ! test -e "$file" ; then
fail "$test_name" E \
"It appears that $file is only a part of the file name"
fail "$test_name" "It appears that $file is only a part of the file name"
fi
if ! test "$tst" "$INSTALL_PREFIX/share/nvim/runtime/$file" ; then
fail "$test_name" F "$(printf "$message" "$file")"
fail "$test_name" "$(printf "$message" "$file")"
fi
done
)}
install_nvim() {(
enter_suite 'install_nvim'
if ! build_make install ; then
fail 'install' E 'make install failed'
exit_suite
fail 'install' 'make install failed'
exit 1
fi
"${INSTALL_PREFIX}/bin/nvim" --version
if ! "${INSTALL_PREFIX}/bin/nvim" -u NONE -e -c ':help' -c ':qall' ; then
echo "Running ':help' in the installed nvim failed."
echo "Maybe the helptags have not been generated properly."
fail 'help' F 'Failed running :help'
fail 'help' 'Failed running :help'
fi
# Check that all runtime files were installed
@ -177,13 +168,6 @@ install_nvim() {(
local genvimsynf=syntax/vim/generated.vim
local gpat='syn keyword vimFuncName .*eval'
if ! grep -q "$gpat" "${INSTALL_PREFIX}/share/nvim/runtime/$genvimsynf" ; then
fail 'funcnames' F "It appears that $genvimsynf does not contain $gpat."
fail 'funcnames' "It appears that $genvimsynf does not contain $gpat."
fi
exit_suite
)}
csi_clean() {
find "${BUILD_DIR}/bin" -name 'test-includes-*' -delete
find "${BUILD_DIR}" -name '*test-include*.o' -delete
}

View File

@ -3,24 +3,18 @@
set -e
set -o pipefail
if [[ "${CI_TARGET}" == lint ]]; then
python -m pip -q install --user --upgrade flake8
exit
fi
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
export PATH="/usr/local/opt/ccache/libexec:$PATH"
fi
# Use default CC to avoid compilation problems when installing Python modules.
echo "Install neovim module for Python 3."
CC=cc python3 -m pip -q install --upgrade pynvim
echo "Install neovim module for Python 2."
CC=cc python2 -m pip -q install --upgrade pynvim
echo "Install neovim module for Python."
CC=cc python -m pip -q install --user --upgrade pynvim
echo "Install neovim RubyGem."
gem install --no-document --version ">= 0.8.0" neovim
gem install --no-document --bindir "$HOME/.local/bin" --user-install --pre neovim
echo "Install neovim npm package"
npm install -g neovim
npm link neovim
if [[ $CI_OS_NAME != osx ]]; then
sudo cpanm -n Neovim::Ext || cat "$HOME/.cpanm/build.log"
perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION'
fi

View File

@ -8,25 +8,17 @@ CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${CI_DIR}/common/build.sh"
source "${CI_DIR}/common/suite.sh"
enter_suite 'clint'
run_test 'make clint-full' clint
exit_suite --continue
rm -f "$END_MARKER"
enter_suite 'lualint'
run_test 'make lualint' lualint
exit_suite --continue
# Run all tests if no input argument is given
if (($# == 0)); then
tests=('clint-full' 'lualint' 'pylint' 'shlint' 'check-single-includes')
else
tests=("$@")
fi
enter_suite 'pylint'
run_test 'make pylint' pylint
exit_suite --continue
enter_suite single-includes
CLICOLOR_FORCE=1 run_test_wd \
--allow-hang \
10s \
'make check-single-includes' \
'csi_clean' \
single-includes
exit_suite --continue
for i in "${tests[@]}"; do
make "$i" || fail "$i"
done
end_tests

View File

@ -8,29 +8,28 @@ source "${CI_DIR}/common/build.sh"
source "${CI_DIR}/common/test.sh"
source "${CI_DIR}/common/suite.sh"
enter_suite build
rm -f "$END_MARKER"
check_core_dumps --delete quiet
# Run all tests (with some caveats) if no input argument is given
if (($# == 0)); then
tests=('build_nvim')
prepare_build
build_nvim
exit_suite --continue
enter_suite tests
if test "$CLANG_SANITIZER" != "TSAN" ; then
# Additional threads are only created when the builtin UI starts, which
# doesn't happen in the unit/functional tests
if test "${FUNCTIONALTEST}" != "functionaltest-lua"; then
run_test run_unittests
if test "$CLANG_SANITIZER" != "TSAN"; then
# Additional threads are only created when the builtin UI starts, which
# doesn't happen in the unit/functional tests
if test "${FUNCTIONALTEST}" != "functionaltest-lua"; then
tests+=('unittests')
fi
tests+=('functionaltests')
fi
run_test run_functionaltests
tests+=('oldtests' 'install_nvim')
else
tests=("$@")
fi
run_test run_oldtests
run_test install_nvim
exit_suite --continue
for i in "${tests[@]}"; do
eval "$i" || fail "$i"
done
end_tests

View File

@ -3,14 +3,7 @@
set -e
set -o pipefail
# This will pass the environment variables down to a bash process which runs
# as $USER, while retaining the environment variables defined and belonging
# to secondary groups given above in usermod.
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
sudo -E su "${USER}" -c "ci/run_${CI_TARGET}.sh"
else
ci/run_${CI_TARGET}.sh
fi
ci/run_${CI_TARGET}.sh
if [[ -s "${GCOV_ERROR_FILE}" ]]; then
echo '=== Unexpected gcov errors: ==='

194
ci/snap/.snapcraft_payload Normal file
View File

@ -0,0 +1,194 @@
{
"ref": "refs/heads/master",
"before": "66b136c43c12df3dcf8f19ff48f206ad2e4f43fc",
"after": "1bf69c32217cc455603ce8aa2b5415d9717f0fa2",
"repository": {
"id": 292861950,
"node_id": "MDEwOlJlcG9zaXRvcnkyOTI4NjE5NTA=",
"name": "neovim-snap",
"full_name": "hurricanehrndz/neovim-snap",
"private": false,
"owner": {
"name": "hurricanehrndz",
"email": "hurricanehrndz@users.noreply.github.com",
"login": "hurricanehrndz",
"id": 5804237,
"node_id": "MDQ6VXNlcjU4MDQyMzc=",
"avatar_url": "https://avatars0.githubusercontent.com/u/5804237?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/hurricanehrndz",
"html_url": "https://github.com/hurricanehrndz",
"followers_url": "https://api.github.com/users/hurricanehrndz/followers",
"following_url": "https://api.github.com/users/hurricanehrndz/following{/other_user}",
"gists_url": "https://api.github.com/users/hurricanehrndz/gists{/gist_id}",
"starred_url": "https://api.github.com/users/hurricanehrndz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hurricanehrndz/subscriptions",
"organizations_url": "https://api.github.com/users/hurricanehrndz/orgs",
"repos_url": "https://api.github.com/users/hurricanehrndz/repos",
"events_url": "https://api.github.com/users/hurricanehrndz/events{/privacy}",
"received_events_url": "https://api.github.com/users/hurricanehrndz/received_events",
"type": "User",
"site_admin": false
},
"html_url": "https://github.com/hurricanehrndz/neovim-snap",
"description": "snap build for neovim",
"fork": false,
"url": "https://github.com/hurricanehrndz/neovim-snap",
"forks_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/forks",
"keys_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/teams",
"hooks_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/hooks",
"issue_events_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/issues/events{/number}",
"events_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/events",
"assignees_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/assignees{/user}",
"branches_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/branches{/branch}",
"tags_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/tags",
"blobs_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/statuses/{sha}",
"languages_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/languages",
"stargazers_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/stargazers",
"contributors_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/contributors",
"subscribers_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/subscribers",
"subscription_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/subscription",
"commits_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/contents/{+path}",
"compare_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/merges",
"archive_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/downloads",
"issues_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/issues{/number}",
"pulls_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/pulls{/number}",
"milestones_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/milestones{/number}",
"notifications_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/labels{/name}",
"releases_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/releases{/id}",
"deployments_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/deployments",
"created_at": 1599227980,
"updated_at": "2020-09-04T14:02:38Z",
"pushed_at": 1599228352,
"git_url": "git://github.com/hurricanehrndz/neovim-snap.git",
"ssh_url": "git@github.com:hurricanehrndz/neovim-snap.git",
"clone_url": "https://github.com/hurricanehrndz/neovim-snap.git",
"svn_url": "https://github.com/hurricanehrndz/neovim-snap",
"homepage": null,
"size": 0,
"stargazers_count": 0,
"watchers_count": 0,
"language": null,
"has_issues": true,
"has_projects": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 0,
"license": {
"key": "mit",
"name": "MIT License",
"spdx_id": "MIT",
"url": "https://api.github.com/licenses/mit",
"node_id": "MDc6TGljZW5zZTEz"
},
"forks": 0,
"open_issues": 0,
"watchers": 0,
"default_branch": "master",
"stargazers": 0,
"master_branch": "master"
},
"pusher": {
"name": "hurricanehrndz",
"email": "hurricanehrndz@users.noreply.github.com"
},
"sender": {
"login": "hurricanehrndz",
"id": 5804237,
"node_id": "MDQ6VXNlcjU4MDQyMzc=",
"avatar_url": "https://avatars0.githubusercontent.com/u/5804237?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/hurricanehrndz",
"html_url": "https://github.com/hurricanehrndz",
"followers_url": "https://api.github.com/users/hurricanehrndz/followers",
"following_url": "https://api.github.com/users/hurricanehrndz/following{/other_user}",
"gists_url": "https://api.github.com/users/hurricanehrndz/gists{/gist_id}",
"starred_url": "https://api.github.com/users/hurricanehrndz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hurricanehrndz/subscriptions",
"organizations_url": "https://api.github.com/users/hurricanehrndz/orgs",
"repos_url": "https://api.github.com/users/hurricanehrndz/repos",
"events_url": "https://api.github.com/users/hurricanehrndz/events{/privacy}",
"received_events_url": "https://api.github.com/users/hurricanehrndz/received_events",
"type": "User",
"site_admin": false
},
"created": false,
"deleted": false,
"forced": false,
"base_ref": null,
"compare": "https://github.com/hurricanehrndz/neovim-snap/compare/66b136c43c12...1bf69c32217c",
"commits": [
{
"id": "1bf69c32217cc455603ce8aa2b5415d9717f0fa2",
"tree_id": "62ea83a2349be8c930c45fdc199f71b08bf5927e",
"distinct": true,
"message": "Build of latest tag",
"timestamp": "2020-09-04T14:05:40Z",
"url": "https://github.com/hurricanehrndz/neovim-snap/commit/1bf69c32217cc455603ce8aa2b5415d9717f0fa2",
"author": {
"name": "Carlos Hernandez",
"email": "carlos@techbyte.ca",
"username": "hurricanehrndz"
},
"committer": {
"name": "Carlos Hernandez",
"email": "carlos@techbyte.ca",
"username": "hurricanehrndz"
},
"added": [
],
"removed": [
],
"modified": [
"snap/snapcraft.yaml"
]
}
],
"head_commit": {
"id": "1bf69c32217cc455603ce8aa2b5415d9717f0fa2",
"tree_id": "62ea83a2349be8c930c45fdc199f71b08bf5927e",
"distinct": true,
"message": "Build of latest tag",
"timestamp": "2020-09-04T14:05:40Z",
"url": "https://github.com/hurricanehrndz/neovim-snap/commit/1bf69c32217cc455603ce8aa2b5415d9717f0fa2",
"author": {
"name": "Carlos Hernandez",
"email": "carlos@techbyte.ca",
"username": "hurricanehrndz"
},
"committer": {
"name": "Carlos Hernandez",
"email": "carlos@techbyte.ca",
"username": "hurricanehrndz"
},
"added": [
],
"removed": [
],
"modified": [
"snap/snapcraft.yaml"
]
}
}

14
ci/snap/after_success.sh Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -e
set -o pipefail
RESULT_SNAP=$(find ./ -name "*.snap")
sudo snap install "$RESULT_SNAP" --dangerous --classic
/snap/bin/nvim --version
SHA256=$(sha256sum "$RESULT_SNAP")
echo "SHA256: ${SHA256} ."

39
ci/snap/deploy.sh Executable file
View File

@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -e
set -o pipefail
SNAP_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
WEBHOOK_PAYLOAD="$(cat "${SNAP_DIR}/.snapcraft_payload")"
PAYLOAD_SIG="${SECRET_SNAP_SIG}"
snap_release_needed() {
last_committed_tag="$(git tag -l --sort=refname|head -1)"
last_snap_release="$(snap info nvim | awk '$1 == "latest/edge:" { print $2 }' | perl -lpe 's/v\d.\d.\d-//g')"
git fetch -f --tags
git checkout "${last_committed_tag}" 2> /dev/null
last_git_release="$(git describe --first-parent 2> /dev/null | perl -lpe 's/v\d.\d.\d-//g')"
if [[ -z "$(echo $last_snap_release | perl -ne "print if /${last_git_release}.*/")" ]]; then
return 0
fi
return 1
}
trigger_snapcraft_webhook() {
[[ -n "${PAYLOAD_SIG}" ]] || exit
echo "Triggering new snap release via webhook..."
curl -X POST \
-H "Content-Type: application/json" \
-H "X-Hub-Signature: sha1=${PAYLOAD_SIG}" \
--data "${WEBHOOK_PAYLOAD}" \
https://snapcraft.io/nvim/webhook/notify
}
if $(snap_release_needed); then
echo "New snap release required"
trigger_snapcraft_webhook
fi

11
ci/snap/install.sh Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -e
set -o pipefail
sudo apt update
sudo usermod -aG lxd $USER
sudo /snap/bin/lxd.migrate -yes
sudo /snap/bin/lxd waitready
sudo /snap/bin/lxd init --auto

8
ci/snap/script.sh Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e
set -o pipefail
mkdir -p "$CI_BUILD_DIR/snaps-cache"
sg lxd -c snapcraft

Binary file not shown.

View File

@ -38,6 +38,9 @@ endif()
if (LibIntl_LIBRARY)
list(APPEND CMAKE_REQUIRED_LIBRARIES "${LibIntl_LIBRARY}")
endif()
if (MSVC)
list(APPEND CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY})
endif()
check_c_source_compiles("
#include <libintl.h>
@ -48,6 +51,9 @@ int main(int argc, char** argv) {
bind_textdomain_codeset(\"foo\", \"bar\");
textdomain(\"foo\");
}" HAVE_WORKING_LIBINTL)
if (MSVC)
list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY})
endif()
if (LibIntl_INCLUDE_DIR)
list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES "${LibIntl_INCLUDE_DIR}")
endif()

View File

@ -15,7 +15,7 @@ find_path(LIBLUV_INCLUDE_DIR luv/luv.h
PATHS ${PC_LIBLUV_INCLUDEDIR} ${PC_LIBLUV_INCLUDE_DIRS})
# Explicitly look for luv.so. #10407
list(APPEND LIBLUV_NAMES luv luv${CMAKE_SHARED_LIBRARY_SUFFIX})
list(APPEND LIBLUV_NAMES luv_a luv libluv_a luv${CMAKE_SHARED_LIBRARY_SUFFIX})
find_library(LIBLUV_LIBRARY NAMES ${LIBLUV_NAMES}
HINTS ${PC_LIBLUV_LIBDIR} ${PC_LIBLUV_LIBRARY_DIRS})

View File

@ -75,6 +75,14 @@ if(WIN32)
list(APPEND LIBUV_LIBRARIES ws2_32)
endif()
find_package(Threads)
if(Threads_FOUND)
# TODO: Fix the cmake file to properly handle static deps for bundled builds.
# Meanwhile just include the threads library if CMake tells us there's one to
# use.
list(APPEND LIBUV_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
endif()
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBUV_FOUND to TRUE

View File

@ -42,7 +42,7 @@ unset(_lua_append_versions)
# this is a function only to have all the variables inside go away automatically
function(_lua_set_version_vars)
set(LUA_VERSIONS5 5.3 5.2 5.1 5.0)
set(LUA_VERSIONS5 5.4 5.3 5.2 5.1 5.0)
if (Lua_FIND_VERSION_EXACT)
if (Lua_FIND_VERSION_COUNT GREATER 1)

View File

@ -0,0 +1,11 @@
# - Try to find tree-sitter
# Once done, this will define
#
# TreeSitter_FOUND - system has tree-sitter
# TreeSitter_INCLUDE_DIRS - the tree-sitter include directories
# TreeSitter_LIBRARIES - link these to use tree-sitter
include(LibFindMacros)
libfind_pkg_detect(TreeSitter tree-sitter FIND_PATH tree_sitter/api.h FIND_LIBRARY tree-sitter)
libfind_process(TreeSitter)

View File

@ -3,6 +3,13 @@ function(get_compile_flags _compile_flags)
set(compile_flags "<CMAKE_C_COMPILER> <CFLAGS> <BUILD_TYPE_CFLAGS> <COMPILE_OPTIONS><COMPILE_DEFINITIONS> <INCLUDES>")
# Get C compiler.
if(CMAKE_C_COMPILER_ARG1)
string(REPLACE
"<CMAKE_C_COMPILER>"
"<CMAKE_C_COMPILER> ${CMAKE_C_COMPILER_ARG1}"
compile_flags
"${compile_flags}")
endif()
string(REPLACE
"<CMAKE_C_COMPILER>"
"${CMAKE_C_COMPILER}"

View File

@ -1,180 +0,0 @@
# https://github.com/rpavlik/cmake-modules
#
# - Returns a version string from Git
#
# These functions force a re-configure on each git commit so that you can
# trust the values of the variables in your build system.
#
# get_git_head_revision(<refspecvar> <hashvar> [<additional arguments to git describe> ...])
#
# Returns the refspec and sha hash of the current head revision
#
# git_describe(<var> [<additional arguments to git describe> ...])
#
# Returns the results of git describe on the source tree, and adjusting
# the output so that it tests false if an error occurs.
#
# git_get_exact_tag(<var> [<additional arguments to git describe> ...])
#
# Returns the results of git describe --exact-match on the source tree,
# and adjusting the output so that it tests false if there was no exact
# matching tag.
#
# Requires CMake 2.6 or newer (uses the 'function' command)
#
# Original Author:
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2009-2010.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
if(__get_git_revision_description)
return()
endif()
set(__get_git_revision_description YES)
# We must run the following at "include" time, not at function call time,
# to find the path to this module rather than the path to a calling list file
get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)
function(get_git_dir _gitdir)
# check FORCED_GIT_DIR first
if(FORCED_GIT_DIR)
set(${_gitdir} ${FORCED_GIT_DIR} PARENT_SCOPE)
return()
endif()
# check GIT_DIR in environment
set(GIT_DIR $ENV{GIT_DIR})
if(NOT GIT_DIR)
set(GIT_PARENT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(GIT_DIR ${GIT_PARENT_DIR}/.git)
endif()
# .git dir not found, search parent directories
while(NOT EXISTS ${GIT_DIR})
set(GIT_PREVIOUS_PARENT ${GIT_PARENT_DIR})
get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH)
if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT)
return()
endif()
set(GIT_DIR ${GIT_PARENT_DIR}/.git)
endwhile()
# check if this is a submodule
if(NOT IS_DIRECTORY ${GIT_DIR})
file(READ ${GIT_DIR} submodule)
string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule})
get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH)
get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE)
endif()
set(${_gitdir} ${GIT_DIR} PARENT_SCOPE)
endfunction()
function(get_git_head_revision _refspecvar _hashvar)
get_git_dir(GIT_DIR)
if(NOT GIT_DIR)
return()
endif()
set(GIT_DATA ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data)
if(NOT EXISTS ${GIT_DATA})
file(MAKE_DIRECTORY ${GIT_DATA})
endif()
if(NOT EXISTS ${GIT_DIR}/HEAD)
return()
endif()
set(HEAD_FILE ${GIT_DATA}/HEAD)
configure_file(${GIT_DIR}/HEAD ${HEAD_FILE} COPYONLY)
configure_file(${_gitdescmoddir}/GetGitRevisionDescription.cmake.in
${GIT_DATA}/grabRef.cmake
@ONLY)
include(${GIT_DATA}/grabRef.cmake)
set(${_refspecvar} ${HEAD_REF} PARENT_SCOPE)
set(${_hashvar} ${HEAD_HASH} PARENT_SCOPE)
endfunction()
function(git_describe _var)
get_git_dir(GIT_DIR)
if(NOT GIT_DIR)
return()
endif()
if(NOT GIT_FOUND)
find_package(Git QUIET)
endif()
if(NOT GIT_FOUND)
set(${_var} "GIT-NOTFOUND" PARENT_SCOPE)
return()
endif()
get_git_head_revision(refspec hash)
if(NOT hash)
set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE)
return()
endif()
execute_process(COMMAND
${GIT_EXECUTABLE}
describe
${hash}
${ARGN}
WORKING_DIRECTORY
${GIT_DIR}
RESULT_VARIABLE
res
OUTPUT_VARIABLE
out
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT res EQUAL 0)
set(out "${out}-${res}-NOTFOUND")
endif()
set(${_var} ${out} PARENT_SCOPE)
endfunction()
function(git_timestamp _var)
get_git_dir(GIT_DIR)
if(NOT GIT_DIR)
return()
endif()
if(NOT GIT_FOUND)
find_package(Git QUIET)
endif()
if(NOT GIT_FOUND)
return()
endif()
get_git_head_revision(refspec hash)
if(NOT hash)
set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE)
return()
endif()
execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --format="%ci" ${hash} ${ARGN}
WORKING_DIRECTORY ${GIT_DIR}
RESULT_VARIABLE res
OUTPUT_VARIABLE out
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(res EQUAL 0)
string(REGEX REPLACE "[-\" :]" "" out ${out})
string(SUBSTRING ${out} 0 12 out)
else()
set(out "${out}-${res}-NOTFOUND")
endif()
set(${_var} ${out} PARENT_SCOPE)
endfunction()
function(git_get_exact_tag _var)
git_describe(out --exact-match ${ARGN})
set(${_var} ${out} PARENT_SCOPE)
endfunction()

View File

@ -1,38 +0,0 @@
#
# Internal file for GetGitRevisionDescription.cmake
#
# Requires CMake 2.6 or newer (uses the 'function' command)
#
# Original Author:
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2009-2010.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
set(HEAD_HASH)
file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)
string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
if(HEAD_CONTENTS MATCHES "ref")
# named branch
string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
if(EXISTS "@GIT_DIR@/${HEAD_REF}")
configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
elseif(EXISTS "@GIT_DIR@/logs/${HEAD_REF}")
configure_file("@GIT_DIR@/logs/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
set(HEAD_HASH "${HEAD_REF}")
endif()
else()
# detached HEAD
configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
endif()
if(NOT HEAD_HASH)
file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
string(STRIP "${HEAD_HASH}" HEAD_HASH)
endif()

View File

@ -154,3 +154,25 @@ function(install_helper)
${RENAME})
endif()
endfunction()
# Without CONFIGURE_DEPENDS globbing reuses cached file tree on rebuild.
# For example it will ignore new files.
# CONFIGURE_DEPENDS was introduced in 3.12
function(glob_wrapper outvar)
if(${CMAKE_VERSION} VERSION_LESS 3.12)
file(GLOB ${outvar} ${ARGN})
else()
file(GLOB ${outvar} CONFIGURE_DEPENDS ${ARGN})
endif()
set(${outvar} ${${outvar}} PARENT_SCOPE)
endfunction()
function(globrecurse_wrapper outvar root)
if(${CMAKE_VERSION} VERSION_LESS 3.12)
file(GLOB_RECURSE ${outvar} RELATIVE ${root} ${ARGN})
else()
file(GLOB_RECURSE ${outvar} CONFIGURE_DEPENDS RELATIVE ${root} ${ARGN})
endif()
set(${outvar} ${${outvar}} PARENT_SCOPE)
endfunction()

View File

@ -10,6 +10,7 @@ set(ENV{VIMRUNTIME} ${WORKING_DIR}/runtime)
set(ENV{NVIM_RPLUGIN_MANIFEST} ${BUILD_DIR}/Xtest_rplugin_manifest)
set(ENV{XDG_CONFIG_HOME} ${BUILD_DIR}/Xtest_xdg/config)
set(ENV{XDG_DATA_HOME} ${BUILD_DIR}/Xtest_xdg/share)
unset(ENV{XDG_DATA_DIRS})
if(NOT DEFINED ENV{NVIM_LOG_FILE})
set(ENV{NVIM_LOG_FILE} ${BUILD_DIR}/.nvimlog)
@ -45,10 +46,21 @@ if(DEFINED ENV{TEST_FILTER} AND NOT "$ENV{TEST_FILTER}" STREQUAL "")
list(APPEND BUSTED_ARGS --filter $ENV{TEST_FILTER})
endif()
if(DEFINED ENV{TEST_FILTER_OUT} AND NOT "$ENV{TEST_FILTER_OUT}" STREQUAL "")
list(APPEND BUSTED_ARGS --filter-out $ENV{TEST_FILTER_OUT})
endif()
# TMPDIR: use relative test path (for parallel test runs / isolation).
set(ENV{TMPDIR} "${BUILD_DIR}/Xtest_tmpdir/${TEST_PATH}")
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory $ENV{TMPDIR})
# HISTFILE: do not write into user's ~/.bash_history
set(ENV{HISTFILE} "/dev/null")
if(NOT DEFINED ENV{TEST_TIMEOUT} OR "$ENV{TEST_TIMEOUT}" STREQUAL "")
set(ENV{TEST_TIMEOUT} 1200)
endif()
set(ENV{SYSTEM_NAME} ${CMAKE_HOST_SYSTEM_NAME}) # used by test/helpers.lua.
execute_process(
COMMAND ${BUSTED_PRG} -v -o test.busted.outputHandlers.${BUSTED_OUTPUT_TYPE}
@ -58,6 +70,7 @@ execute_process(
--lpath=?.lua
${BUSTED_ARGS}
${TEST_PATH}
TIMEOUT $ENV{TEST_TIMEOUT}
WORKING_DIRECTORY ${WORKING_DIR}
ERROR_VARIABLE err
RESULT_VARIABLE res

View File

@ -0,0 +1,21 @@
if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
endif()
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
exec_program(
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
)
if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
endif()
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
endif()
endforeach()

View File

@ -12,11 +12,6 @@ check_type_size("size_t" SIZEOF_SIZE_T)
check_type_size("long long" SIZEOF_LONG_LONG)
check_type_size("void *" SIZEOF_VOID_PTR)
if (CMAKE_HOST_SYSTEM_VERSION MATCHES ".*-Microsoft")
# Windows Subsystem for Linux
set(HAVE_WSL 1)
endif()
check_symbol_exists(_NSGetEnviron crt_externs.h HAVE__NSGETENVIRON)
# Headers
@ -32,6 +27,7 @@ endif()
check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H)
check_include_files(termios.h HAVE_TERMIOS_H)
check_include_files(sys/uio.h HAVE_SYS_UIO_H)
check_include_files(sys/sdt.h HAVE_SYS_SDT_H)
# Functions
check_function_exists(fseeko HAVE_FSEEKO)
@ -49,8 +45,23 @@ check_function_exists(readlink HAVE_READLINK)
check_function_exists(setpgid HAVE_SETPGID)
check_function_exists(setsid HAVE_SETSID)
check_function_exists(sigaction HAVE_SIGACTION)
check_function_exists(strnlen HAVE_STRNLEN)
check_function_exists(strcasecmp HAVE_STRCASECMP)
check_function_exists(strncasecmp HAVE_STRNCASECMP)
check_function_exists(strptime HAVE_STRPTIME)
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
check_c_source_compiles("
#include <termios.h>
int
main(void)
{
return forkpty(0, NULL, NULL, NULL);
}
" HAVE_FORKPTY)
else()
set(HAVE_FORKPTY 1)
endif()
# Symbols
check_symbol_exists(FD_CLOEXEC "fcntl.h" HAVE_FD_CLOEXEC)
@ -95,7 +106,7 @@ if (NOT "${HAVE_BE64TOH}")
# any case and ORDER_BIG_ENDIAN will not be examined.
# - CMAKE_CROSSCOMPILING *and* HAVE_BE64TOH are both false. In this case
# be64toh function which uses cycle and arithmetic operations is used which
# will work regardless of endianess. Function is sub-optimal though.
# will work regardless of endianness. Function is sub-optimal though.
check_c_source_runs("
${SI}
${MS}

View File

@ -30,15 +30,18 @@
#cmakedefine HAVE_SETPGID
#cmakedefine HAVE_SETSID
#cmakedefine HAVE_SIGACTION
#cmakedefine HAVE_STRNLEN
#cmakedefine HAVE_STRCASECMP
#cmakedefine HAVE_STRINGS_H
#cmakedefine HAVE_STRNCASECMP
#cmakedefine HAVE_STRPTIME
#cmakedefine HAVE_SYS_SDT_H
#cmakedefine HAVE_SYS_UTSNAME_H
#cmakedefine HAVE_SYS_WAIT_H
#cmakedefine HAVE_TERMIOS_H
#cmakedefine HAVE_WORKING_LIBINTL
#cmakedefine HAVE_WSL
#cmakedefine UNIX
#cmakedefine CASE_INSENSITIVE_FILENAME
#cmakedefine USE_FNAME_CASE
#cmakedefine HAVE_SYS_UIO_H
#ifdef HAVE_SYS_UIO_H
@ -47,6 +50,7 @@
# undef HAVE_SYS_UIO_H
# endif
#endif
#cmakedefine HAVE_FORKPTY
#cmakedefine FEAT_TUI
@ -60,5 +64,6 @@
#cmakedefine HAVE_EXECINFO_BACKTRACE
#cmakedefine HAVE_BUILTIN_ADD_OVERFLOW
#cmakedefine HAVE_WIMPLICIT_FALLTHROUGH_FLAG
#endif // AUTO_CONFIG_H

View File

@ -3,5 +3,6 @@
#include "${PROJECT_SOURCE_DIR}/src/nvim/vim.h"
char *default_vim_dir = "${CMAKE_INSTALL_FULL_DATAROOTDIR}/nvim";
char *default_vimruntime_dir = "";
char *default_lib_dir = "${CMAKE_INSTALL_FULL_LIBDIR}/nvim";
char_u *compiled_user = (char_u *)"${USERNAME}";
char_u *compiled_sys = (char_u *)"${HOSTNAME}";

View File

@ -5,7 +5,11 @@
#define NVIM_VERSION_MINOR @NVIM_VERSION_MINOR@
#define NVIM_VERSION_PATCH @NVIM_VERSION_PATCH@
#define NVIM_VERSION_PRERELEASE "@NVIM_VERSION_PRERELEASE@"
#cmakedefine NVIM_VERSION_MEDIUM "@NVIM_VERSION_MEDIUM@"
#ifndef NVIM_VERSION_MEDIUM
# include "auto/versiondef_git.h"
#endif
#define NVIM_API_LEVEL @NVIM_API_LEVEL@
#define NVIM_API_LEVEL_COMPAT @NVIM_API_LEVEL_COMPAT@

43
contrib/flake.lock generated Normal file
View File

@ -0,0 +1,43 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1646254136,
"narHash": "sha256-8nQx02tTzgYO21BP/dy5BCRopE8OwE8Drsw98j+Qoaw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3e072546ea98db00c2364b81491b893673267827",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

133
contrib/flake.nix Normal file
View File

@ -0,0 +1,133 @@
{
description = "Neovim flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
{
overlay = final: prev:
let
pkgs = nixpkgs.legacyPackages.${prev.system};
in
rec {
neovim = pkgs.neovim-unwrapped.overrideAttrs (oa: {
version = "master";
src = ../.;
});
# a development binary to help debug issues
neovim-debug = let
stdenv = if pkgs.stdenv.isLinux then pkgs.llvmPackages_latest.stdenv else pkgs.stdenv;
in
((neovim.override {
lua = pkgs.luajit;
inherit stdenv;
}).overrideAttrs (oa: {
dontStrip = true;
NIX_CFLAGS_COMPILE = " -ggdb -Og";
cmakeBuildType = "Debug";
cmakeFlags = oa.cmakeFlags ++ [
"-DMIN_LOG_LEVEL=0"
];
disallowedReferences = [];
}));
# for neovim developers, beware of the slow binary
neovim-developer =
let
lib = nixpkgs.lib;
luacheck = pkgs.luaPackages.luacheck;
in
(neovim-debug.override ({ doCheck = pkgs.stdenv.isLinux; })).overrideAttrs (oa: {
cmakeFlags = oa.cmakeFlags ++ [
"-DLUACHECK_PRG=${luacheck}/bin/luacheck"
"-DMIN_LOG_LEVEL=0"
"-DENABLE_LTO=OFF"
] ++ pkgs.lib.optionals pkgs.stdenv.isLinux [
# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
# https://clang.llvm.org/docs/AddressSanitizer.html#symbolizing-the-reports
"-DCLANG_ASAN_UBSAN=ON"
];
});
};
} //
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
overlays = [ self.overlay ];
inherit system;
};
pythonEnv = pkgs.python3.withPackages(ps: [
ps.msgpack
ps.flake8 # for 'make pylint'
]);
in
rec {
packages = with pkgs; {
inherit neovim neovim-debug neovim-developer;
};
checks = {
pylint = pkgs.runCommandNoCC "pylint" {
nativeBuildInputs = [ pythonEnv ];
preferLocalBuild = true;
} "make -C ${./..} pylint > $out";
shlint = pkgs.runCommandNoCC "shlint" {
nativeBuildInputs = [ pkgs.shellcheck ];
preferLocalBuild = true;
} "make -C ${./..} shlint > $out";
};
defaultPackage = pkgs.neovim;
apps = {
nvim = flake-utils.lib.mkApp { drv = pkgs.neovim; name = "nvim"; };
nvim-debug = flake-utils.lib.mkApp { drv = pkgs.neovim-debug; name = "nvim"; };
};
defaultApp = apps.nvim;
devShell = let
in
pkgs.neovim-developer.overrideAttrs(oa: {
buildInputs = with pkgs; oa.buildInputs ++ [
cmake
pythonEnv
include-what-you-use # for scripts/check-includes.py
jq # jq for scripts/vim-patch.sh -r
shellcheck # for `make shlint`
doxygen # for script/gen_vimdoc.py
clang-tools # for clangd to find the correct headers
];
shellHook = oa.shellHook + ''
export NVIM_PYTHON_LOG_LEVEL=DEBUG
export NVIM_LOG_FILE=/tmp/nvim.log
export ASAN_SYMBOLIZER_PATH=${pkgs.llvm_11}/bin/llvm-symbolizer
# ASAN_OPTIONS=detect_leaks=1
export ASAN_OPTIONS="log_path=./test.log:abort_on_error=1"
export UBSAN_OPTIONS=print_stacktrace=1
mkdir -p build/runtime/parser
# nvim looks into CMAKE_INSTALL_DIR. Hack to avoid errors
# when running the functionaltests
mkdir -p outputs/out/share/nvim/syntax
touch outputs/out/share/nvim/syntax/syntax.vim
# for treesitter functionaltests
mkdir -p runtime/parser
cp -f ${pkgs.tree-sitter.builtGrammars.tree-sitter-c}/parser runtime/parser/c.so
'';
});
});
}

View File

@ -25,6 +25,12 @@
#
# CMAKE_BUILD_TYPE := Debug
# With non-Debug builds interprocedural optimization (IPO) (which includes
# link-time optimization (LTO)) is enabled by default, which causes the link
# step to take a significant amount of time, which is relevant when building
# often. You can disable it explicitly:
# CMAKE_EXTRA_FLAGS += -DENABLE_LTO=OFF
# Log levels: 0 (DEBUG), 1 (INFO), 2 (WARNING), 3 (ERROR)
# Default is 1 (INFO) unless CMAKE_BUILD_TYPE is Release or RelWithDebInfo.
# CMAKE_EXTRA_FLAGS += -DMIN_LOG_LEVEL=1
@ -42,6 +48,7 @@
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LUAROCKS=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_MSGPACK=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_UNIBILIUM=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_UTF8PROC=OFF
#
# Or disable all bundled dependencies at once.
#

23
contrib/luarc.json Normal file
View File

@ -0,0 +1,23 @@
{
"runtime.version": "LuaJIT",
"diagnostics": {
"enable": true,
"globals": [
"vim",
"describe",
"it",
"before_each",
"after_each",
"setup",
"teardown"
]
},
"workspace": {
"library": {
"runtime/lua": true
},
"maxPreload": 2000,
"preloadFileSize": 1000
},
"telemetry.enable": false
}

File diff suppressed because it is too large Load Diff

View File

@ -100,7 +100,7 @@ Useful for scripting because it does NOT start a UI, unlike
.Ic :help silent-mode
.It Fl d
Diff mode.
Show the difference between two to four files, similar to
Show the difference between two to eight files, similar to
.Xr sdiff 1 .
.Ic ":help diff"
.It Fl R
@ -113,9 +113,6 @@ associated with a file.
To overwrite a file, add an exclamation mark to the relevant Ex command, such as
.Ic :w! .
.Ic ":help 'readonly'"
.It Fl Z
Restricted mode.
Disable commands that make use of an external shell.
.It Fl m
Resets the 'write' option, to disable file modifications.
Writing to a file is disabled, but buffers can still be modified.
@ -180,8 +177,7 @@ If
.Ar vimrc
is
.Cm NORC ,
do not load any initialization files (except plugins),
and do not attempt to parse environment variables.
do not load any initialization files (except plugins).
If
.Ar vimrc
is
@ -204,7 +200,7 @@ Skip loading plugins.
Implied by
.Cm -u NONE .
.It Fl -clean
Skip loading plugins and shada (viminfo) file.
Mimic a fresh install of Nvim. Skip loading non-builtin plugins and shada (viminfo) file.
.It Fl o Ns Op Ar N
Open
.Ar N
@ -330,7 +326,7 @@ Print version information and exit.
.Sh ENVIRONMENT
.Bl -tag -width Fl
.It Ev NVIM_LOG_FILE
Low-level log file, usually found at ~/.local/share/nvim/log.
Low-level log file, usually found at ~/.cache/nvim/log.
:help $NVIM_LOG_FILE
.It Ev VIM
Used to locate user files, such as init.vim.
@ -378,7 +374,7 @@ See also
System-global
.Nm
configuration file.
.It Pa /usr/local/share/nvim
.It Pa $VIM
System-global
.Nm
runtime directory.

64
packaging/CMakeLists.txt Normal file
View File

@ -0,0 +1,64 @@
set(CPACK_PACKAGE_NAME "Neovim")
set(CPACK_PACKAGE_VENDOR "neovim.io")
set(CPACK_PACKAGE_FILE_NAME "nvim")
# From the GitHub About section
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Vim-fork focused on extensibility and usability.")
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME})
# Pull the versions defined with the top level CMakeLists.txt
set(CPACK_PACKAGE_VERSION_MAJOR ${NVIM_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${NVIM_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${NVIM_VERSION_PATCH})
# CPACK_VERBATIM_VARIABLES ensures that the variables prefixed with *CPACK_*
# are correctly passed to the cpack program.
# This should always be set to true.
set(CPACK_VERBATIM_VARIABLES TRUE)
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE.txt")
set(CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/README.md)
if(WIN32)
set(CPACK_PACKAGE_FILE_NAME "nvim-win64")
set(CPACK_GENERATOR ZIP WIX)
# WIX
# CPACK_WIX_UPGRADE_GUID should be set, but should never change.
# CPACK_WIX_PRODUCT_GUID should not be set (leave as default to auto-generate).
# The following guid is just a randomly generated guid that's been pasted here.
# It has no special meaning other than to supply it to WIX.
set(CPACK_WIX_UPGRADE_GUID "207A1A70-7B0C-418A-A153-CA6883E38F4D")
set(CPACK_WIX_PRODUCT_ICON ${CMAKE_CURRENT_LIST_DIR}/neovim.ico)
# We use a wix patch to add further options to the installer. At present, it's just to add neovim to the path
# on installation, however, it can be extended.
# See: https://cmake.org/cmake/help/v3.7/module/CPackWIX.html#variable:CPACK_WIX_PATCH_FILE
list(APPEND CPACK_WIX_EXTENSIONS WixUtilExtension)
list(APPEND CPACK_WIX_PATCH_FILE ${CMAKE_CURRENT_LIST_DIR}/WixPatch.xml)
elseif(APPLE)
set(CPACK_PACKAGE_FILE_NAME "nvim-macos")
set(CPACK_GENERATOR TGZ)
set(CPACK_PACKAGE_ICON ${CMAKE_CURRENT_LIST_DIR}/neovim.icns)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(CPACK_PACKAGE_FILE_NAME "nvim-linux64")
set(CPACK_GENERATOR TGZ DEB)
set(CPACK_DEBIAN_PACKAGE_NAME "Neovim") # required
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Neovim.io") # required
# Automatically compute required shared lib dependencies.
# Unfortunately, you "just need to know" that this has a hidden
# dependency on dpkg-shlibdeps whilst using a debian based host.
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE)
else()
set(CPACK_GENERATOR TGZ)
endif()
# CPack variables are loaded in on the call to include(CPack). If you set
# variables *after* the inclusion, they don't get updated within the CPack
# config. Note that some CPack commands should still be run after it, such
# as cpack_add_component().
include(CPack)

16
packaging/WixPatch.xml Normal file
View File

@ -0,0 +1,16 @@
<CPackWiXPatch>
<!-- Fragment ID is from: <your build dir>/_CPack_Packages/win64/WIX/files.wxs -->
<CPackWiXFragment Id="CM_CP_bin.nvim.exe">
<!-- Note: if we were to specify Value='[INSTALL_ROOT]\bin' - with a backslash, the installer will still
use a forward slash in the path. -->
<Environment
Id='UpdatePath'
Name='PATH'
Action='set'
Permanent='no'
System='yes'
Part='last'
Value='[INSTALL_ROOT]/bin'
/>
</CPackWiXFragment>
</CPackWiXPatch>

BIN
packaging/neovim.icns Normal file

Binary file not shown.

BIN
packaging/neovim.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

BIN
packaging/neovim.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

147
packaging/neovim.svg Normal file
View File

@ -0,0 +1,147 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="256"
height="256"
viewBox="0 0 256 256"
version="1.1"
id="svg4612"
sodipodi:docname="neovim.svg"
inkscape:version="0.92.4 5da689c313, 2019-01-14">
<metadata
id="metadata4616">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>neovim-mark@2x</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1333"
id="namedview4614"
showgrid="false"
inkscape:zoom="2.1945358"
inkscape:cx="132.84232"
inkscape:cy="196.34741"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:current-layer="svg4612" />
<title
id="title4587">neovim-mark@2x</title>
<description>Created with Sketch (http://www.bohemiancoding.com/sketch)</description>
<defs
id="defs4604">
<linearGradient
x1="167.95833"
y1="-0.46142399"
x2="167.95833"
y2="335.45523"
id="linearGradient-1"
gradientTransform="scale(0.46142398,2.1672042)"
gradientUnits="userSpaceOnUse">
<stop
stop-color="#16B0ED"
stop-opacity="0.800235524"
offset="0%"
id="stop4589" />
<stop
stop-color="#0F59B2"
stop-opacity="0.83700023"
offset="100%"
id="stop4591" />
</linearGradient>
<linearGradient
x1="1118.3427"
y1="-0.46586797"
x2="1118.3427"
y2="338.68604"
id="linearGradient-2"
gradientTransform="scale(0.46586797,2.1465309)"
gradientUnits="userSpaceOnUse">
<stop
stop-color="#7DB643"
offset="0%"
id="stop4594" />
<stop
stop-color="#367533"
offset="100%"
id="stop4596" />
</linearGradient>
<linearGradient
x1="356.33795"
y1="0"
x2="356.33795"
y2="612.90131"
id="linearGradient-3"
gradientTransform="scale(0.84189739,1.1877932)"
gradientUnits="userSpaceOnUse">
<stop
stop-color="#88C649"
stop-opacity="0.8"
offset="0%"
id="stop4599" />
<stop
stop-color="#439240"
stop-opacity="0.84"
offset="100%"
id="stop4601" />
</linearGradient>
</defs>
<g
id="Page-1"
sketch:type="MSPage"
style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:1"
transform="matrix(0.34367476,0,0,0.34367476,25.312651,1.7737533)">
<g
id="mark-copy"
sketch:type="MSLayerGroup"
transform="translate(2,3)">
<path
d="M 0,155.5704 155,-1 V 727 L 0,572.23792 Z"
id="Left---green"
sketch:type="MSShapeGroup"
inkscape:connector-curvature="0"
style="fill:url(#linearGradient-1)" />
<path
d="M 443.0604,156.9824 600,-1 596.81879,727 442,572.21994 Z"
id="Right---blue"
sketch:type="MSShapeGroup"
transform="matrix(-1,0,0,1,1042,0)"
inkscape:connector-curvature="0"
style="fill:url(#linearGradient-2)" />
<path
d="M 154.98629,0 558,615.1897 445.2246,728 42,114.17202 Z"
id="Cross---blue"
sketch:type="MSShapeGroup"
inkscape:connector-curvature="0"
style="fill:url(#linearGradient-3)" />
<path
d="M 155,283.83232 154.78675,308 31,124.71061 42.461949,113 Z"
id="Shadow"
sketch:type="MSShapeGroup"
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:0.12999998" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -21,12 +21,12 @@ add_custom_command(OUTPUT ${GENERATED_SYN_VIM}
${FUNCS_DATA}
)
file(GLOB PACKAGES ${PROJECT_SOURCE_DIR}/runtime/pack/dist/opt/*)
glob_wrapper(PACKAGES ${PROJECT_SOURCE_DIR}/runtime/pack/dist/opt/*)
set(GENERATED_PACKAGE_TAGS)
foreach(PACKAGE ${PACKAGES})
get_filename_component(PACKNAME ${PACKAGE} NAME)
file(GLOB "${PACKNAME}_DOC_FILES" ${PACKAGE}/doc/*.txt)
glob_wrapper("${PACKNAME}_DOC_FILES" ${PACKAGE}/doc/*.txt)
if(${PACKNAME}_DOC_FILES)
file(MAKE_DIRECTORY ${GENERATED_PACKAGE_DIR}/${PACKNAME})
add_custom_command(OUTPUT "${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags"
@ -54,7 +54,7 @@ foreach(PACKAGE ${PACKAGES})
endif()
endforeach()
file(GLOB DOCFILES ${PROJECT_SOURCE_DIR}/runtime/doc/*.txt)
glob_wrapper(DOCFILES ${PROJECT_SOURCE_DIR}/runtime/doc/*.txt)
set(BUILDDOCFILES)
foreach(DF ${DOCFILES})
@ -111,12 +111,10 @@ if(NOT APPLE)
install_helper(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/nvim.png
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps)
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/128x128/apps)
endif()
file(GLOB_RECURSE RUNTIME_PROGRAMS
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
*.awk *.sh *.bat)
globrecurse_wrapper(RUNTIME_PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR} *.awk *.sh *.bat)
foreach(PROG ${RUNTIME_PROGRAMS})
get_filename_component(BASEDIR ${PROG} PATH)
@ -124,9 +122,7 @@ foreach(PROG ${RUNTIME_PROGRAMS})
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/${BASEDIR})
endforeach()
file(GLOB_RECURSE RUNTIME_FILES
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
rgb.txt
globrecurse_wrapper(RUNTIME_FILES ${CMAKE_CURRENT_SOURCE_DIR}
*.vim *.lua *.dict *.py *.rb *.ps *.spl *.tutor *.tutor.json)
foreach(F ${RUNTIME_FILES})

View File

@ -67,13 +67,13 @@ if exists ('g:ada_with_gnat_project_files')
endfor
endif
" Section: add standart exception {{{2
" Section: add standard exception {{{2
"
for Item in ['Constraint_Error', 'Program_Error', 'Storage_Error', 'Tasking_Error', 'Status_Error', 'Mode_Error', 'Name_Error', 'Use_Error', 'Device_Error', 'End_Error', 'Data_Error', 'Layout_Error', 'Length_Error', 'Pattern_Error', 'Index_Error', 'Translation_Error', 'Time_Error', 'Argument_Error', 'Tag_Error', 'Picture_Error', 'Terminator_Error', 'Conversion_Error', 'Pointer_Error', 'Dereference_Error', 'Update_Error']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'exception',
\ 'info': 'Ada standart exception.',
\ 'info': 'Ada standard exception.',
\ 'kind': 'x',
\ 'icase': 1}]
endfor
@ -210,7 +210,7 @@ function ada#Word (...)
let l:Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' )
" Cope with tag searching for items in comments; if we are, don't loop
" backards looking for previous lines
" backwards looking for previous lines
if l:Column_Nr > strlen(l:Line)
" We were in a comment
let l:Line = getline(l:Line_Nr)

View File

@ -14,7 +14,7 @@
" 15.10.2006 MK Bram's suggestion for runtime integration
" 05.11.2006 MK Bram suggested not to use include protection for
" autoload
" 05.11.2006 MK Bram suggested agaist using setlocal omnifunc
" 05.11.2006 MK Bram suggested against using setlocal omnifunc
" 05.11.2006 MK Bram suggested to save on spaces
" Help Page: ft-ada-omni
"------------------------------------------------------------------------------

View File

@ -1,13 +1,13 @@
" Vim completion script
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2018 Aug 20
" Last Change: 2020 Nov 14
let s:cpo_save = &cpo
set cpo&vim
" This function is used for the 'omnifunc' option.
function! ccomplete#Complete(findstart, base)
func ccomplete#Complete(findstart, base)
if a:findstart
" Locate the start of the item, including ".", "->" and "[...]".
let line = getline('.')
@ -244,7 +244,7 @@ function! ccomplete#Complete(findstart, base)
return map(res, 's:Tagline2item(v:val, brackets)')
endfunc
function! s:GetAddition(line, match, memarg, bracket)
func s:GetAddition(line, match, memarg, bracket)
" Guess if the item is an array.
if a:bracket && match(a:line, a:match . '\s*\[') > 0
return '['
@ -260,13 +260,13 @@ function! s:GetAddition(line, match, memarg, bracket)
endif
endif
return ''
endfunction
endfunc
" Turn the tag info "val" into an item for completion.
" "val" is is an item in the list returned by taglist().
" If it is a variable we may add "." or "->". Don't do it for other types,
" such as a typedef, by not including the info that s:GetAddition() uses.
function! s:Tag2item(val)
func s:Tag2item(val)
let res = {'match': a:val['name']}
let res['extra'] = s:Tagcmd2extra(a:val['cmd'], a:val['name'], a:val['filename'])
@ -289,10 +289,10 @@ function! s:Tag2item(val)
endif
return res
endfunction
endfunc
" Use all the items in dictionary for the "info" entry.
function! s:Dict2info(dict)
func s:Dict2info(dict)
let info = ''
for k in sort(keys(a:dict))
let info .= k . repeat(' ', 10 - len(k))
@ -307,7 +307,7 @@ function! s:Dict2info(dict)
endfunc
" Parse a tag line and return a dictionary with items like taglist()
function! s:ParseTagline(line)
func s:ParseTagline(line)
let l = split(a:line, "\t")
let d = {}
if len(l) >= 3
@ -334,12 +334,12 @@ function! s:ParseTagline(line)
endif
return d
endfunction
endfunc
" Turn a match item "val" into an item for completion.
" "val['match']" is the matching item.
" "val['tagline']" is the tagline in which the last part was found.
function! s:Tagline2item(val, brackets)
func s:Tagline2item(val, brackets)
let line = a:val['tagline']
let add = s:GetAddition(line, a:val['match'], [a:val], a:brackets == '')
let res = {'word': a:val['match'] . a:brackets . add }
@ -377,10 +377,10 @@ function! s:Tagline2item(val, brackets)
let res['menu'] = s:Tagcmd2extra(s, a:val['match'], matchstr(line, '[^\t]*\t\zs[^\t]*\ze\t'))
endif
return res
endfunction
endfunc
" Turn a command from a tag line to something that is useful in the menu
function! s:Tagcmd2extra(cmd, name, fname)
func s:Tagcmd2extra(cmd, name, fname)
if a:cmd =~ '^/^'
" The command is a search command, useful to see what it is.
let x = matchstr(a:cmd, '^/^\s*\zs.*\ze$/')
@ -395,13 +395,13 @@ function! s:Tagcmd2extra(cmd, name, fname)
let x = a:cmd . ' - ' . a:fname
endif
return x
endfunction
endfunc
" Find composing type in "lead" and match items[0] with it.
" Repeat this recursively for items[1], if it's there.
" When resolving typedefs "depth" is used to avoid infinite recursion.
" Return the list of matches.
function! s:Nextitem(lead, items, depth, all)
func s:Nextitem(lead, items, depth, all)
" Use the text up to the variable name and split it in tokens.
let tokens = split(a:lead, '\s\+\|\<')
@ -485,7 +485,7 @@ function! s:Nextitem(lead, items, depth, all)
endfor
return res
endfunction
endfunc
" Search for members of structure "typename" in tags files.
@ -493,7 +493,7 @@ endfunction
" Each match is a dictionary with "match" and "tagline" entries.
" When "all" is non-zero find all, otherwise just return 1 if there is any
" member.
function! s:StructMembers(typename, items, all)
func s:StructMembers(typename, items, all)
" Todo: What about local structures?
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
if fnames == ''
@ -586,12 +586,12 @@ function! s:StructMembers(typename, items, all)
" Failed to find anything.
return []
endfunction
endfunc
" For matching members, find matches for following items.
" When "all" is non-zero find all, otherwise just return 1 if there is any
" member.
function! s:SearchMembers(matches, items, all)
func s:SearchMembers(matches, items, all)
let res = []
for i in range(len(a:matches))
let typename = ''
@ -635,3 +635,5 @@ endfunc
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: noet sw=2 sts=2

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
" plus CSS Speech Module <http://www.w3.org/TR/css3-speech/>
" Maintainer: Kao, Wei-Ko(othree) ( othree AT gmail DOT com )
" Original Author: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2018 Jul 02
" Last Change: 2021 Sep 21
let s:values = split("all additive-symbols align-content align-items align-self animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-repeat background-size block-size border border-block-end border-block-end-color border-block-end-style border-block-end-width border-block-start border-block-start-color border-block-start-style border-block-start-width border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-inline-end border-inline-end-color border-inline-end-style border-inline-end-width border-inline-start border-inline-start-color border-inline-start-style border-inline-start-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-decoration-break box-shadow box-sizing break-after break-before break-inside caption-side clear clip clip-path color columns column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width content counter-increment counter-reset cue cue-before cue-after cursor direction display empty-cells fallback filter flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float font font-family font-feature-settings font-kerning font-language-override font-size font-size-adjust font-stretch font-style font-synthesis font-variant font-variant-alternates font-variant-caps font-variant-east-asian font-variant-ligatures font-variant-numeric font-variant-position font-weight grid grid-area grid-auto-columns grid-auto-flow grid-auto-position grid-auto-rows grid-column grid-column-start grid-column-end grid-row grid-row-start grid-row-end grid-template grid-template-areas grid-template-rows grid-template-columns height hyphens image-rendering image-resolution image-orientation ime-mode inline-size isolation justify-content left letter-spacing line-break line-height list-style list-style-image list-style-position list-style-type margin margin-block-end margin-block-start margin-bottom margin-inline-end margin-inline-start margin-left margin-right margin-top marks mask mask-type max-block-size max-height max-inline-size max-width max-zoom min-block-size min-height min-inline-size min-width min-zoom mix-blend-mode negative object-fit object-position offset-block-end offset-block-start offset-inline-end offset-inline-start opacity order orientation orphans outline outline-color outline-offset outline-style outline-width overflow overflow-wrap overflow-x overflow-y pad padding padding-block-end padding-block-start padding-bottom padding-inline-end padding-inline-start padding-left padding-right padding-top page-break-after page-break-before page-break-inside pause-before pause-after pause perspective perspective-origin pointer-events position prefix quotes range resize rest rest-before rest-after right ruby-align ruby-merge ruby-position scroll-behavior scroll-snap-coordinate scroll-snap-destination scroll-snap-points-x scroll-snap-points-y scroll-snap-type scroll-snap-type-x scroll-snap-type-y shape-image-threshold shape-margin shape-outside speak speak-as suffix symbols system table-layout tab-size text-align text-align-last text-combine-upright text-decoration text-decoration-color text-decoration-line text-emphasis text-emphasis-color text-emphasis-position text-emphasis-style text-indent text-orientation text-overflow text-rendering text-shadow text-transform text-underline-position top touch-action transform transform-box transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function unicode-bidi unicode-range user-zoom vertical-align visibility voice-balance voice-duration voice-family voice-pitch voice-rate voice-range voice-stress voice-volume white-space widows width will-change word-break word-spacing word-wrap writing-mode z-index zoom")
@ -38,12 +38,12 @@ function! csscomplete#CompleteCSS(findstart, base)
if exists("b:compl_context")
let line = getline('.')
let compl_begin = col('.') - 2
let after = line[compl_begin:]
let b:after = line[compl_begin:]
let line = b:compl_context
unlet! b:compl_context
else
let line = a:base
let after = ''
let b:after = ''
endif
let res = []
@ -311,7 +311,7 @@ function! csscomplete#CompleteCSS(findstart, base)
let values = ["normal", "italic", "oblique", "small-caps", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller", "sans-serif", "serif", "monospace", "cursive", "fantasy", "caption", "icon", "menu", "message-box", "small-caption", "status-bar"]
elseif prop =~ '^\%(height\|width\)$'
let values = ["auto", "border-box", "content-box", "max-content", "min-content", "available", "fit-content"]
elseif prop =~ '^\%(left\|rigth\)$'
elseif prop =~ '^\%(left\|right\)$'
let values = ["auto"]
elseif prop == 'image-rendering'
let values = ["auto", "crisp-edges", "pixelated"]

View File

@ -23,9 +23,9 @@ endif
function decada#Unit_Name () dict " {{{1
" Convert filename into acs unit:
" 1: remove the file extenstion.
" 1: remove the file extension.
" 2: replace all double '_' or '-' with an dot (which denotes a separate)
" 3: remove a trailing '_' (wich denotes a specification)
" 3: remove a trailing '_' (which denotes a specification)
return substitute (substitute (expand ("%:t:r"), '__\|-', ".", "g"), '_$', "", '')
endfunction decada#Unit_Name " }}}1

View File

@ -1,7 +1,7 @@
" Vim functions for file type detection
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2019 Mar 08
" Last Change: 2022 Apr 06
" These functions are moved here from runtime/filetype.vim to make startup
" faster.
@ -67,13 +67,32 @@ func dist#ft#FTasmsyntax()
endif
endfunc
" Check if one of the first five lines contains "VB_Name". In that case it is
" probably a Visual Basic file. Otherwise it's assumed to be "alt" filetype.
func dist#ft#FTVB(alt)
if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'VB_Name\|Begin VB\.\(Form\|MDIForm\|UserControl\)'
let s:ft_visual_basic_content = '\cVB_Name\|Begin VB\.\(Form\|MDIForm\|UserControl\)'
" See FTfrm() for Visual Basic form file detection
func dist#ft#FTbas()
if exists("g:filetype_bas")
exe "setf " . g:filetype_bas
return
endif
" most frequent FreeBASIC-specific keywords in distro files
let fb_keywords = '\c^\s*\%(extern\|var\|enum\|private\|scope\|union\|byref\|operator\|constructor\|delete\|namespace\|public\|property\|with\|destructor\|using\)\>\%(\s*[:=(]\)\@!'
let fb_preproc = '\c^\s*\%(#\a\+\|option\s\+\%(byval\|dynamic\|escape\|\%(no\)\=gosub\|nokeyword\|private\|static\)\>\)'
let fb_comment = "^\\s*/'"
" OPTION EXPLICIT, without the leading underscore, is common to many dialects
let qb64_preproc = '\c^\s*\%($\a\+\|option\s\+\%(_explicit\|_\=explicitarray\)\>\)'
let lines = getline(1, min([line("$"), 100]))
if match(lines, fb_preproc) > -1 || match(lines, fb_comment) > -1 || match(lines, fb_keywords) > -1
setf freebasic
elseif match(lines, qb64_preproc) > -1
setf qb64
elseif match(lines, s:ft_visual_basic_content) > -1
setf vb
else
exe "setf " . a:alt
setf basic
endif
endfunc
@ -93,6 +112,25 @@ func dist#ft#BindzoneCheck(default)
endif
endfunc
" Returns true if file content looks like RAPID
func IsRapid(sChkExt = "")
if a:sChkExt == "cfg"
return getline(1) =~? '\v^%(EIO|MMC|MOC|PROC|SIO|SYS):CFG'
endif
" called from FTmod, FTprg or FTsys
return getline(nextnonblank(1)) =~? '\v^\s*%(\%{3}|module\s+\k+\s*%(\(|$))'
endfunc
func dist#ft#FTcfg()
if exists("g:filetype_cfg")
exe "setf " .. g:filetype_cfg
elseif IsRapid("cfg")
setf rapid
else
setf cfg
endif
endfunc
func dist#ft#FTlpc()
if exists("g:lpc_syntax_for_c")
let lnum = 1
@ -154,7 +192,7 @@ endfunc
func dist#ft#FTent()
" This function checks for valid cl syntax in the first five lines.
" Look for either an opening comment, '#', or a block start, '{".
" Look for either an opening comment, '#', or a block start, '{'.
" If not found, assume SGML.
let lnum = 1
while lnum < 6
@ -172,6 +210,17 @@ func dist#ft#FTent()
setf dtd
endfunc
func dist#ft#ExCheck()
let lines = getline(1, min([line("$"), 100]))
if exists('g:filetype_euphoria')
exe 'setf ' . g:filetype_euphoria
elseif match(lines, '^--\|^ifdef\>\|^include\>') > -1
setf euphoria3
else
setf elixir
endif
endfunc
func dist#ft#EuphoriaCheck()
if exists('g:filetype_euphoria')
exe 'setf ' . g:filetype_euphoria
@ -181,6 +230,10 @@ func dist#ft#EuphoriaCheck()
endfunc
func dist#ft#DtraceCheck()
if did_filetype()
" Filetype was already detected
return
endif
let lines = getline(1, min([line("$"), 100]))
if match(lines, '^module\>\|^import\>') > -1
" D files often start with a module and/or import statement.
@ -208,6 +261,38 @@ func dist#ft#FTe()
endif
endfunc
func dist#ft#FTfrm()
if exists("g:filetype_frm")
exe "setf " . g:filetype_frm
return
endif
let lines = getline(1, min([line("$"), 5]))
if match(lines, s:ft_visual_basic_content) > -1
setf vb
else
setf form
endif
endfunc
" Distinguish between Forth and F#.
" Provided by Doug Kearns.
func dist#ft#FTfs()
if exists("g:filetype_fs")
exe "setf " . g:filetype_fs
else
let line = getline(nextnonblank(1))
" comments and colon definitions
if line =~ '^\s*\.\=( ' || line =~ '^\s*\\G\= ' || line =~ '^\\$'
\ || line =~ '^\s*: \S'
setf forth
else
setf fsharp
endif
endif
endfunc
" Distinguish between HTML, XHTML and Django
func dist#ft#FThtml()
let n = 1
@ -253,6 +338,16 @@ func dist#ft#ProtoCheck(default)
endfunc
func dist#ft#FTm()
if exists("g:filetype_m")
exe "setf " . g:filetype_m
return
endif
" excluding end(for|function|if|switch|while) common to Murphi
let octave_block_terminators = '\<end\%(_try_catch\|classdef\|enumeration\|events\|methods\|parfor\|properties\)\>'
let objc_preprocessor = '^\s*#\s*\%(import\|include\|define\|if\|ifn\=def\|undef\|line\|error\|pragma\)\>'
let n = 1
let saw_comment = 0 " Whether we've seen a multiline comment leader.
while n < 100
@ -263,10 +358,16 @@ func dist#ft#FTm()
" anything more definitive.
let saw_comment = 1
endif
if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|//\)'
if line =~ '^\s*//' || line =~ '^\s*@import\>' || line =~ objc_preprocessor
setf objc
return
endif
if line =~ '^\s*\%(#\|%!\)' || line =~ '^\s*unwind_protect\>' ||
\ line =~ '\%(^\|;\)\s*' .. octave_block_terminators
setf octave
return
endif
" TODO: could be Matlab or Octave
if line =~ '^\s*%'
setf matlab
return
@ -287,18 +388,15 @@ func dist#ft#FTm()
" or Murphi based on the comment leader. Assume the former as it is more
" common.
setf objc
elseif exists("g:filetype_m")
" Use user specified default filetype for .m
exe "setf " . g:filetype_m
else
" Default is matlab
" Default is Matlab
setf matlab
endif
endfunc
func dist#ft#FTmms()
let n = 1
while n < 10
while n < 20
let line = getline(n)
if line =~ '^\s*\(%\|//\)' || line =~ '^\*'
setf mmix
@ -325,7 +423,7 @@ endfunc
func dist#ft#FTmm()
let n = 1
while n < 10
while n < 20
let line = getline(n)
if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\)'
setf objcpp
@ -336,6 +434,36 @@ func dist#ft#FTmm()
setf nroff
endfunc
" Returns true if file content looks like LambdaProlog
func IsLProlog()
" skip apparent comments and blank lines, what looks like
" LambdaProlog comment may be RAPID header
let l = nextnonblank(1)
while l > 0 && l < line('$') && getline(l) =~ '^\s*%' " LambdaProlog comment
let l = nextnonblank(l + 1)
endwhile
" this pattern must not catch a go.mod file
return getline(l) =~ '\<module\s\+\w\+\s*\.\s*\(%\|$\)'
endfunc
" Determine if *.mod is ABB RAPID, LambdaProlog, Modula-2, Modsim III or go.mod
func dist#ft#FTmod()
if exists("g:filetype_mod")
exe "setf " .. g:filetype_mod
elseif IsLProlog()
setf lprolog
elseif getline(nextnonblank(1)) =~ '\%(\<MODULE\s\+\w\+\s*;\|^\s*(\*\)'
setf modula2
elseif IsRapid()
setf rapid
elseif expand("<afile>") =~ '\<go.mod$'
setf gomod
else
" Nothing recognized, assume modsim3
setf modsim3
endif
endfunc
func dist#ft#FTpl()
if exists("g:filetype_pl")
exe "setf " . g:filetype_pl
@ -362,6 +490,10 @@ func dist#ft#FTinc()
setf aspvbs
elseif lines =~ "<?"
setf php
" Pascal supports // comments but they're vary rarely used for file
" headers so assume POV-Ray
elseif lines =~ '^\s*\%({\|(\*\)' || lines =~? s:ft_pascal_keywords
setf pascal
else
call dist#ft#FTasmsyntax()
if exists("b:asmsyntax")
@ -408,6 +540,9 @@ func dist#ft#FTprogress_asm()
setf progress
endfunc
let s:ft_pascal_comments = '^\s*\%({\|(\*\|//\)'
let s:ft_pascal_keywords = '^\s*\%(program\|unit\|library\|uses\|begin\|procedure\|function\|const\|type\|var\)\>'
func dist#ft#FTprogress_pascal()
if exists("g:filetype_p")
exe "setf " . g:filetype_p
@ -419,8 +554,7 @@ func dist#ft#FTprogress_pascal()
let lnum = 1
while lnum <= 10 && lnum < line('$')
let line = getline(lnum)
if line =~ '^\s*\(program\|unit\|procedure\|function\|const\|type\|var\)\>'
\ || line =~ '^\s*{' || line =~ '^\s*(\*'
if line =~ s:ft_pascal_comments || line =~? s:ft_pascal_keywords
setf pascal
return
elseif line !~ '^\s*$' || line =~ '^/\*'
@ -433,6 +567,31 @@ func dist#ft#FTprogress_pascal()
setf progress
endfunc
func dist#ft#FTpp()
if exists("g:filetype_pp")
exe "setf " . g:filetype_pp
else
let line = getline(nextnonblank(1))
if line =~ s:ft_pascal_comments || line =~? s:ft_pascal_keywords
setf pascal
else
setf puppet
endif
endif
endfunc
" Determine if *.prg is ABB RAPID. Can also be Clipper, FoxPro or eviews
func dist#ft#FTprg()
if exists("g:filetype_prg")
exe "setf " .. g:filetype_prg
elseif IsRapid()
setf rapid
else
" Nothing recognized, assume Clipper
setf clipper
endif
endfunc
func dist#ft#FTr()
let max = line("$") > 50 ? 50 : line("$")
@ -575,7 +734,7 @@ endfunc
let s:ft_rules_udev_rules_pattern = '^\s*\cudev_rules\s*=\s*"\([^"]\{-1,}\)/*".*'
func dist#ft#FTRules()
let path = expand('<amatch>:p')
if path =~ '^/\(etc/udev/\%(rules\.d/\)\=.*\.rules\|lib/udev/\%(rules\.d/\)\=.*\.rules\)$'
if path =~ '/\(etc/udev/\%(rules\.d/\)\=.*\.rules\|\%(usr/\)\=lib/udev/\%(rules\.d/\)\=.*\.rules\)$'
setf udevrules
return
endif
@ -614,6 +773,28 @@ func dist#ft#SQL()
endif
endfunc
" This function checks the first 25 lines of file extension "sc" to resolve
" detection between scala and SuperCollider
func dist#ft#FTsc()
for lnum in range(1, min([line("$"), 25]))
if getline(lnum) =~# '[A-Za-z0-9]*\s:\s[A-Za-z0-9]\|var\s<\|classvar\s<\|\^this.*\||\w*|\|+\s\w*\s{\|\*ar\s'
setf supercollider
return
endif
endfor
setf scala
endfunc
" This function checks the first line of file extension "scd" to resolve
" detection between scdoc and SuperCollider
func dist#ft#FTscd()
if getline(1) =~# '\%^\S\+(\d[0-9A-Za-z]*)\%(\s\+\"[^"]*\"\%(\s\+\"[^"]*\"\)\=\)\=$'
setf scdoc
else
setf supercollider
endif
endfunc
" If the file has an extension of 't' and is in a directory 't' or 'xt' then
" it is almost certainly a Perl test file.
" If the first line starts with '#' and contains 'perl' it's probably a Perl
@ -632,7 +813,7 @@ func dist#ft#FTperl()
endif
let save_cursor = getpos('.')
call cursor(1,1)
let has_use = search('^use\s\s*\k', 'c', 30)
let has_use = search('^use\s\s*\k', 'c', 30) > 0
call setpos('.', save_cursor)
if has_use
setf perl
@ -641,6 +822,16 @@ func dist#ft#FTperl()
return 0
endfunc
func dist#ft#FTsys()
if exists("g:filetype_sys")
exe "setf " .. g:filetype_sys
elseif IsRapid()
setf rapid
else
setf bat
endif
endfunc
" Choose context, plaintex, or tex (LaTeX) based on these rules:
" 1. Check the first line of the file for "%&<format>".
" 2. Check the first 1000 non-comment lines for LaTeX or ConTeXt keywords.
@ -664,7 +855,8 @@ func dist#ft#FTtex()
let save_cursor = getpos('.')
call cursor(1,1)
let firstNC = search('^\s*[^[:space:]%]', 'c', 1000)
if firstNC " Check the next thousand lines for a LaTeX or ConTeXt keyword.
if firstNC > 0
" Check the next thousand lines for a LaTeX or ConTeXt keyword.
let lpat = 'documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>'
let cpat = 'start\a\+\|setup\a\+\|usemodule\|enablemode\|enableregime\|setvariables\|useencoding\|usesymbols\|stelle\a\+\|verwende\a\+\|stel\a\+\|gebruik\a\+\|usa\a\+\|imposta\a\+\|regle\a\+\|utilisemodule\>'
let kwline = search('^\s*\\\%(' . lpat . '\)\|^\s*\\\(' . cpat . '\)',
@ -751,6 +943,72 @@ func dist#ft#Redif()
endwhile
endfunc
" This function is called for all files under */debian/patches/*, make sure not
" to non-dep3patch files, such as README and other text files.
func dist#ft#Dep3patch()
if expand('%:t') ==# 'series'
return
endif
for ln in getline(1, 100)
if ln =~# '^\%(Description\|Subject\|Origin\|Bug\|Forwarded\|Author\|From\|Reviewed-by\|Acked-by\|Last-Updated\|Applied-Upstream\):'
setf dep3patch
return
elseif ln =~# '^---'
" end of headers found. stop processing
return
endif
endfor
endfunc
" This function checks the first 15 lines for appearance of 'FoamFile'
" and then 'object' in a following line.
" In that case, it's probably an OpenFOAM file
func dist#ft#FTfoam()
let ffile = 0
let lnum = 1
while lnum <= 15
if getline(lnum) =~# '^FoamFile'
let ffile = 1
elseif ffile == 1 && getline(lnum) =~# '^\s*object'
setf foam
return
endif
let lnum = lnum + 1
endwhile
endfunc
" Determine if a *.tf file is TF mud client or terraform
func dist#ft#FTtf()
let numberOfLines = line('$')
for i in range(1, numberOfLines)
let currentLine = trim(getline(i))
let firstCharacter = currentLine[0]
if firstCharacter !=? ";" && firstCharacter !=? "/" && firstCharacter !=? ""
setf terraform
return
endif
endfor
setf tf
endfunc
" Determine if a *.src file is Kuka Robot Language
func dist#ft#FTsrc()
if exists("g:filetype_src")
exe "setf " .. g:filetype_src
elseif getline(nextnonblank(1)) =~? '^\s*\%(&\w\+\|\%(global\s\+\)\?def\>\)'
setf krl
endif
endfunc
" Determine if a *.dat file is Kuka Robot Language
func dist#ft#FTdat()
if exists("g:filetype_dat")
exe "setf " .. g:filetype_dat
elseif getline(nextnonblank(1)) =~? '^\s*\%(&\w\+\|defdat\>\)'
setf krl
endif
endfunc
" Restore 'cpoptions'
let &cpo = s:cpo_save

View File

@ -0,0 +1,41 @@
" Vim filetype plugin file
" Language: FreeBASIC
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 Mar 16
" Dialects can be one of fb, qb, fblite, or deprecated
" Precedence is forcelang > #lang > lang
function! freebasic#GetDialect() abort
if exists("g:freebasic_forcelang")
return g:freebasic_forcelang
endif
if exists("g:freebasic_lang")
let dialect = g:freebasic_lang
else
let dialect = "fb"
endif
" override with #lang directive or metacommand
let skip = "has('syntax_items') && synIDattr(synID(line('.'), col('.'), 1), 'name') =~ 'Comment$'"
let pat = '\c^\s*\%(#\s*lang\s\+\|''\s*$lang\s*:\s*\)"\([^"]*\)"'
let save_cursor = getcurpos()
call cursor(1, 1)
let lnum = search(pat, 'n', '', '', skip)
call setpos('.', save_cursor)
if lnum
let word = matchlist(getline(lnum), pat)[1]
if word =~? '\%(fb\|deprecated\|fblite\|qb\)'
let dialect = word
else
echomsg "freebasic#GetDialect: Invalid lang, found '" .. word .. "' at line " .. lnum .. " " .. getline(lnum)
endif
endif
return dialect
endfunction
" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:

View File

@ -2,7 +2,7 @@
" Language: Haskell
" Maintainer: Daniel Campoverde <alx@sillybytes.net>
" URL: https://github.com/alx741/haskellcomplete.vim
" Last Change: 2018 Aug 26
" Last Change: 2019 May 14
" Usage: setlocal omnifunc=haskellcomplete#Complete
@ -54,7 +54,7 @@ function! haskellcomplete#Complete(findstart, base)
if b:completingLangExtension
if a:base ==? ""
" Return all posible Lang extensions
" Return all possible Lang extensions
return s:langExtensions
else
let l:matches = []
@ -63,13 +63,14 @@ function! haskellcomplete#Complete(findstart, base)
call add(l:matches, extension)
endif
endfor
let b:completingLangExtension = 0
return l:matches
endif
elseif b:completingOptionsGHC
if a:base ==? ""
" Return all posible GHC options
" Return all possible GHC options
return s:optionsGHC
else
let l:matches = []
@ -78,13 +79,14 @@ function! haskellcomplete#Complete(findstart, base)
call add(l:matches, flag)
endif
endfor
let b:completingOptionsGHC = 0
return l:matches
endif
elseif b:completingModule
if a:base ==? ""
" Return all posible modules
" Return all possible modules
return s:commonModules
else
let l:matches = []
@ -93,6 +95,7 @@ function! haskellcomplete#Complete(findstart, base)
call add(l:matches, module)
endif
endfor
let b:completingModule = 0
return l:matches
endif

View File

@ -1,79 +1,64 @@
function! s:enhance_syntax() abort
syntax case match
syntax keyword healthError ERROR[:]
\ containedin=markdownCodeBlock,mkdListItemLine
highlight default link healthError Error
syntax keyword healthWarning WARNING[:]
\ containedin=markdownCodeBlock,mkdListItemLine
highlight default link healthWarning WarningMsg
syntax keyword healthSuccess OK[:]
\ containedin=markdownCodeBlock,mkdListItemLine
highlight default healthSuccess guibg=#5fff00 guifg=#080808 ctermbg=82 ctermfg=232
syntax match healthHelp "|.\{-}|" contains=healthBar
\ containedin=markdownCodeBlock,mkdListItemLine
syntax match healthBar "|" contained conceal
highlight default link healthHelp Identifier
" We do not care about markdown syntax errors in :checkhealth output.
highlight! link markdownError Normal
endfunction
" Runs the specified healthchecks.
" Runs all discovered healthchecks if a:plugin_names is empty.
function! health#check(plugin_names) abort
let healthchecks = empty(a:plugin_names)
\ ? s:discover_health_checks()
\ : s:to_fn_names(a:plugin_names)
\ ? s:discover_healthchecks()
\ : s:get_healthcheck(a:plugin_names)
tabnew
setlocal wrap breakindent linebreak
setlocal filetype=markdown
setlocal conceallevel=2 concealcursor=nc
setlocal keywordprg=:help
let &l:iskeyword='!-~,^*,^|,^",192-255'
call s:enhance_syntax()
" create scratch-buffer
execute 'tab sbuffer' nvim_create_buf(v:true, v:true)
setfiletype checkhealth
if empty(healthchecks)
call setline(1, 'ERROR: No healthchecks found.')
else
redraw|echo 'Running healthchecks...'
for c in healthchecks
let output = ''
call append('$', split(printf("\n%s\n%s", c, repeat('=',72)), "\n"))
for name in sort(keys(healthchecks))
let [func, type] = healthchecks[name]
let s:output = []
try
let output = "\n\n".execute('call '.c.'()')
if func == ''
throw 'healthcheck_not_found'
endif
eval type == 'v' ? call(func, []) : luaeval(func)
" in the event the healthcheck doesn't return anything
" (the plugin author should avoid this possibility)
if len(s:output) == 0
throw 'healthcheck_no_return_value'
endif
catch
if v:exception =~# '^Vim\%((\a\+)\)\=:E117.*\V'.c
let output = execute(
\ 'call health#report_error(''No healthcheck found for "'
\ .s:to_plugin_name(c)
\ .'" plugin.'')')
let s:output = [] " Clear the output
if v:exception =~# 'healthcheck_not_found'
call health#report_error('No healthcheck found for "'.name.'" plugin.')
elseif v:exception =~# 'healthcheck_no_return_value'
call health#report_error('The healthcheck report for "'.name.'" plugin is empty.')
else
let output = execute(
\ 'call health#report_error(''Failed to run healthcheck for "'
\ .s:to_plugin_name(c)
\ .'" plugin. Exception:''."\n".v:throwpoint."\n".v:exception)')
call health#report_error(printf(
\ "Failed to run healthcheck for \"%s\" plugin. Exception:\n%s\n%s",
\ name, v:throwpoint, v:exception))
endif
endtry
call append('$', split(output, "\n") + [''])
let header = [name. ': ' . func, repeat('=', 72)]
" remove empty line after header from report_start
let s:output = s:output[0] == '' ? s:output[1:] : s:output
let s:output = header + s:output + ['']
call append('$', s:output)
redraw
endfor
endif
" needed for plasticboy/vim-markdown, because it uses fdm=expr
normal! zR
setlocal nomodified
setlocal bufhidden=hide
redraw|echo ''
endfunction
function! s:collect_output(output)
let s:output += split(a:output, "\n", 1)
endfunction
" Starts a new report.
function! health#report_start(name) abort
echo "\n## " . a:name
call s:collect_output("\n## " . a:name)
endfunction
" Indents lines *except* line 1 of a string if it contains newlines.
@ -119,21 +104,21 @@ endfunction " }}}
" Use {msg} to report information in the current section
function! health#report_info(msg) abort " {{{
echo s:format_report_message('INFO', a:msg)
call s:collect_output(s:format_report_message('INFO', a:msg))
endfunction " }}}
" Reports a successful healthcheck.
function! health#report_ok(msg) abort " {{{
echo s:format_report_message('OK', a:msg)
call s:collect_output(s:format_report_message('OK', a:msg))
endfunction " }}}
" Reports a health warning.
" a:1: Optional advice (string or list)
function! health#report_warn(msg, ...) abort " {{{
if a:0 > 0
echo s:format_report_message('WARNING', a:msg, a:1)
call s:collect_output(s:format_report_message('WARNING', a:msg, a:1))
else
echo s:format_report_message('WARNING', a:msg)
call s:collect_output(s:format_report_message('WARNING', a:msg))
endif
endfunction " }}}
@ -141,37 +126,73 @@ endfunction " }}}
" a:1: Optional advice (string or list)
function! health#report_error(msg, ...) abort " {{{
if a:0 > 0
echo s:format_report_message('ERROR', a:msg, a:1)
call s:collect_output(s:format_report_message('ERROR', a:msg, a:1))
else
echo s:format_report_message('ERROR', a:msg)
call s:collect_output(s:format_report_message('ERROR', a:msg))
endif
endfunction " }}}
function! s:filepath_to_function(name) abort
return substitute(substitute(substitute(a:name, '.*autoload[\/]', '', ''),
\ '\.vim', '#check', ''), '[\/]', '#', 'g')
" From a path return a list [{name}, {func}, {type}] representing a healthcheck
function! s:filepath_to_healthcheck(path) abort
if a:path =~# 'vim$'
let name = matchstr(a:path, '\zs[^\/]*\ze\.vim$')
let func = 'health#'.name.'#check'
let type = 'v'
else
let base_path = substitute(a:path,
\ '.*lua[\/]\(.\{-}\)[\/]health\([\/]init\)\?\.lua$',
\ '\1', '')
let name = substitute(base_path, '[\/]', '.', 'g')
let func = 'require("'.name.'.health").check()'
let type = 'l'
endif
return [name, func, type]
endfunction
function! s:discover_health_checks() abort
let healthchecks = globpath(&runtimepath, 'autoload/health/*.vim', 1, 1)
let healthchecks = map(healthchecks, '<SID>filepath_to_function(v:val)')
return healthchecks
function! s:discover_healthchecks() abort
return s:get_healthcheck('*')
endfunction
" Translates a list of plugin names to healthcheck function names.
function! s:to_fn_names(plugin_names) abort
" Returns Dictionary {name: [func, type], ..} representing healthchecks
function! s:get_healthcheck(plugin_names) abort
let health_list = s:get_healthcheck_list(a:plugin_names)
let healthchecks = {}
for c in health_list
let normalized_name = substitute(c[0], '-', '_', 'g')
let existent = get(healthchecks, normalized_name, [])
" Prefer Lua over vim entries
if existent != [] && existent[2] == 'l'
continue
else
let healthchecks[normalized_name] = c
endif
endfor
let output = {}
for v in values(healthchecks)
let output[v[0]] = v[1:]
endfor
return output
endfunction
" Returns list of lists [ [{name}, {func}, {type}] ] representing healthchecks
function! s:get_healthcheck_list(plugin_names) abort
let healthchecks = []
let plugin_names = type('') ==# type(a:plugin_names)
\ ? split(a:plugin_names, '', v:false)
let plugin_names = type('') == type(a:plugin_names)
\ ? split(a:plugin_names, ' ', v:false)
\ : a:plugin_names
for p in plugin_names
call add(healthchecks, 'health#'.p.'#check')
" support vim/lsp/health{/init/}.lua as :checkhealth vim.lsp
let p = substitute(p, '\.', '/', 'g')
let p = substitute(p, '*$', '**', 'g') " find all submodule e.g vim*
let paths = nvim_get_runtime_file('autoload/health/'.p.'.vim', v:true)
\ + nvim_get_runtime_file('lua/**/'.p.'/health/init.lua', v:true)
\ + nvim_get_runtime_file('lua/**/'.p.'/health.lua', v:true)
if len(paths) == 0
let healthchecks += [[p, '', '']] " healthcheck not found
else
let healthchecks += map(uniq(sort(paths)),
\'<SID>filepath_to_healthcheck(v:val)')
end
endfor
return healthchecks
endfunction
" Extracts 'foo' from 'health#foo#check'.
function! s:to_plugin_name(fn_name) abort
return substitute(a:fn_name,
\ '\v.*health\#(.+)\#check.*', '\1', '')
endfunction

View File

@ -41,10 +41,27 @@ function! s:check_config() abort
\ 'Check `:verbose set paste?` to see if a plugin or script set the option.', ])
endif
let shadafile = (empty(&shadafile) || &shadafile ==# 'NONE') ? stdpath('data').'/shada/main.shada' : &shadafile
if !empty(shadafile) && (!filereadable(shadafile) || !filewritable(shadafile))
let writeable = v:true
let shadafile = empty(&shada) ? &shada : substitute(matchstr(
\ split(&shada, ',')[-1], '^n.\+'), '^n', '', '')
let shadafile = empty(&shadafile) ? empty(shadafile) ?
\ stdpath('data').'/shada/main.shada' : expand(shadafile)
\ : &shadafile ==# 'NONE' ? '' : &shadafile
if !empty(shadafile) && empty(glob(shadafile))
" Since this may be the first time neovim has been run, we will try to
" create a shada file
try
wshada
catch /.*/
let writeable = v:false
endtry
endif
if !writeable || (!empty(shadafile) &&
\ (!filereadable(shadafile) || !filewritable(shadafile)))
let ok = v:false
call health#report_error('shada file is not '.(filereadable(shadafile) ? 'writeable' : 'readable').":\n".shadafile)
call health#report_error('shada file is not '.
\ ((!writeable || filereadable(shadafile)) ?
\ 'writeable' : 'readable').":\n".shadafile)
endif
if ok
@ -87,8 +104,8 @@ function! s:check_rplugin_manifest() abort
if !has_key(existing_rplugins, script)
let msg = printf('"%s" is not registered.', fnamemodify(path, ':t'))
if python_version ==# 'pythonx'
if !has('python2') && !has('python3')
let msg .= ' (python2 and python3 not available)'
if !has('python3')
let msg .= ' (python3 not available)'
endif
elseif !has(python_version)
let msg .= printf(' (%s not available)', python_version)
@ -129,6 +146,25 @@ function! s:check_performance() abort
endif
endfunction
function! s:get_tmux_option(option) abort
let cmd = 'tmux show-option -qvg '.a:option " try global scope
let out = system(split(cmd))
let val = substitute(out, '\v(\s|\r|\n)', '', 'g')
if v:shell_error
call health#report_error('command failed: '.cmd."\n".out)
return 'error'
elseif empty(val)
let cmd = 'tmux show-option -qvgs '.a:option " try session scope
let out = system(split(cmd))
let val = substitute(out, '\v(\s|\r|\n)', '', 'g')
if v:shell_error
call health#report_error('command failed: '.cmd."\n".out)
return 'error'
endif
endif
return val
endfunction
function! s:check_tmux() abort
if empty($TMUX) || !executable('tmux')
return
@ -136,30 +172,41 @@ function! s:check_tmux() abort
call health#report_start('tmux')
" check escape-time
let suggestions = ["Set escape-time in ~/.tmux.conf:\nset-option -sg escape-time 10",
let suggestions = ["set escape-time in ~/.tmux.conf:\nset-option -sg escape-time 10",
\ s:suggest_faq]
let cmd = 'tmux show-option -qvgs escape-time'
let out = system(cmd)
let tmux_esc_time = substitute(out, '\v(\s|\r|\n)', '', 'g')
if v:shell_error
call health#report_error('command failed: '.cmd."\n".out)
elseif empty(tmux_esc_time)
call health#report_error('escape-time is not set', suggestions)
elseif tmux_esc_time > 300
call health#report_error(
\ 'escape-time ('.tmux_esc_time.') is higher than 300ms', suggestions)
else
call health#report_ok('escape-time: '.tmux_esc_time.'ms')
let tmux_esc_time = s:get_tmux_option('escape-time')
if tmux_esc_time !=# 'error'
if empty(tmux_esc_time)
call health#report_error('`escape-time` is not set', suggestions)
elseif tmux_esc_time > 300
call health#report_error(
\ '`escape-time` ('.tmux_esc_time.') is higher than 300ms', suggestions)
else
call health#report_ok('escape-time: '.tmux_esc_time)
endif
endif
" check focus-events
let suggestions = ["(tmux 1.9+ only) Set `focus-events` in ~/.tmux.conf:\nset-option -g focus-events on"]
let tmux_focus_events = s:get_tmux_option('focus-events')
call health#report_info('Checking stuff')
if tmux_focus_events !=# 'error'
if empty(tmux_focus_events) || tmux_focus_events !=# 'on'
call health#report_warn(
\ "`focus-events` is not enabled. |'autoread'| may not work.", suggestions)
else
call health#report_ok('focus-events: '.tmux_focus_events)
endif
endif
" check default-terminal and $TERM
call health#report_info('$TERM: '.$TERM)
let cmd = 'tmux show-option -qvg default-terminal'
let out = system(cmd)
let out = system(split(cmd))
let tmux_default_term = substitute(out, '\v(\s|\r|\n)', '', 'g')
if empty(tmux_default_term)
let cmd = 'tmux show-option -qvgs default-terminal'
let out = system(cmd)
let out = system(split(cmd))
let tmux_default_term = substitute(out, '\v(\s|\r|\n)', '', 'g')
endif
@ -178,7 +225,7 @@ function! s:check_tmux() abort
endif
" check for RGB capabilities
let info = system('tmux server-info')
let info = system(['tmux', 'server-info'])
let has_tc = stridx(info, " Tc: (flag) true") != -1
let has_rgb = stridx(info, " RGB: (flag) true") != -1
if !has_tc && !has_rgb
@ -195,17 +242,21 @@ function! s:check_terminal() abort
endif
call health#report_start('terminal')
let cmd = 'infocmp -L'
let out = system(cmd)
let out = system(split(cmd))
let kbs_entry = matchstr(out, 'key_backspace=[^,[:space:]]*')
let kdch1_entry = matchstr(out, 'key_dc=[^,[:space:]]*')
if v:shell_error
\ && (!has('win32')
\ || empty(matchstr(out,
\ 'infocmp: couldn''t open terminfo file .\+'
\ ..'\%(conemu\|vtpcon\|win32con\)')))
call health#report_error('command failed: '.cmd."\n".out)
else
call health#report_info('key_backspace (kbs) terminfo entry: '
\ .(empty(kbs_entry) ? '? (not found)' : kbs_entry))
\ .(empty(kbs_entry) ? '? (not found)' : kbs_entry))
call health#report_info('key_dc (kdch1) terminfo entry: '
\ .(empty(kbs_entry) ? '? (not found)' : kdch1_entry))
\ .(empty(kbs_entry) ? '? (not found)' : kdch1_entry))
endif
for env_var in ['XTERM_VERSION', 'VTE_VERSION', 'TERM_PROGRAM', 'COLORTERM', 'SSH_TTY']
if exists('$'.env_var)

Some files were not shown because too many files have changed in this diff Show More