Commit Graph

14761 Commits

Author SHA1 Message Date
Jan Edmund Lazo
c2ceed4994
quickfix: fix dead assignment
Cherry-picked from vim patch 8.1.1489.
2019-11-13 19:25:40 -05:00
Jan Edmund Lazo
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
Jan Edmund Lazo
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
Ashkan Kiani
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
Justin M. Keyes
db436d5277
Merge #11376 'extmark: renames, docs' 2019-11-12 00:05:26 -08:00
Justin M. Keyes
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
Justin M. Keyes
2d7e1c32a8 extmark: rename ExtendedMark => Extmark 2019-11-11 22:12:59 -08:00
Justin M. Keyes
54473e9a67 doc [ci skip] 2019-11-11 22:12:59 -08:00
Justin M. Keyes
0190de9aab
Merge #11307 'Lua: vim.validate()' 2019-11-11 21:25:16 -08:00
Jan Edmund Lazo
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
Björn Linse
122426966e
Merge pull request #11356 from bfredl/extmark2
extmark API feature
2019-11-11 21:48:14 +01:00
Björn Linse
18a8b702c0 extmark: review changes 2019-11-11 20:18:15 +01:00
timeyyy
a9065a5051 nsmarks: initial commit 2019-11-11 19:43:15 +01:00
Timothy C Eichler
e757f4d536 namespace: add ns_initialized func 2019-11-11 19:43:15 +01:00
Marco Hinz
181486d7e6
api: fix typo in debug function name 2019-11-11 19:25:10 +01:00
Justin M. Keyes
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
Justin M. Keyes
7a3d3257db fix nvim__buf_stats
Accidentally renamed in 1cb4674547.
2019-11-10 23:43:49 -08:00
Justin M. Keyes
a0d992785f Lua: Use vim.validate() instead of assert() 2019-11-10 23:43:49 -08:00
Justin M. Keyes
7aa4042d3b Lua: vim.validate() 2019-11-10 23:43:49 -08:00
Hirokazu Hata
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
Justin M. Keyes
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
Björn Linse
06a020af09
Merge pull request #11366 from bfredl/flakycat
tests: vim.rpcnotify test is flaky
2019-11-10 19:26:40 +01:00
Björn Linse
d200a818a7 tests: vim.rpcnotify test is flaky 2019-11-10 17:13:53 +01:00
Marco Hinz
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
Björn Linse
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
Björn Linse
474d0bcbf7 lua: vim.rpcrequest, vim.rpcnotify, vim.NIL 2019-11-10 13:08:05 +01:00
Justin M. Keyes
ece3d19b02
Merge #11004 'test/Screen:expect: support "{MATCH:…}"' 2019-11-09 23:16:52 -08:00
Justin M. Keyes
4abb67c027 test/Screen:expect: replace "{IGNORE}" with "{MATCH:…}"
ref #11004
2019-11-09 22:26:01 -08:00
Daniel Hahler
c0abaf9ca6 tests: Screen:expect: support "{MATCH:…}" 2019-11-09 21:58:28 -08:00
Justin M. Keyes
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
Justin M. Keyes
7a23b67d35
paste: Select-mode, Visual-mode #11360
fix #11344
2019-11-09 21:18:51 -08:00
Jan Edmund Lazo
099c38efed
quickfix: fix pvs/v547 2019-11-09 10:11:56 -05:00
Jan Edmund Lazo
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
Jan Edmund Lazo
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
Jan Edmund Lazo
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
Jan Edmund Lazo
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
Jan Edmund Lazo
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
Jan Edmund Lazo
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
Jan Edmund Lazo
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
Jan Edmund Lazo
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
Jan Edmund Lazo
5689008060 build: add shlint target for shellcheck (#11350) 2019-11-09 13:39:01 +01:00
Marco Hinz
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
Marco Hinz
2ba212e8c2
vim-patch.sh: add missing argument
[skip ci]
2019-11-08 15:18:01 +01:00
Justin M. Keyes
f79369d420
Merge #11277 'doc [ci skip]' 2019-11-06 01:49:33 -08:00
Justin M. Keyes
9ef16a1628 doc: vim.fn, vim.call(), vim.api [ci skip] 2019-11-06 01:37:50 -08:00
Ashkan Kiani
c66297452c doc: file-change-detect [ci skip] 2019-11-05 21:50:48 -08:00
Justin M. Keyes
3e21d49836 Merge #11319 'inccommand: fix issues with modifiers and prompting' 2019-11-05 17:34:21 -08:00
Rob Pilling
4f124702c0 Simplify + inline/align comment 2019-11-05 18:56:54 +00:00
Marco Hinz
610755ff62
Merge PR #11291 from shanesmith/vim-8.1.1256-take2 2019-11-04 12:28:31 +01:00
lacygoill
e2b54fda72 autocmd: Fix event name casing #11332
Affects getcompletion()
2019-11-04 16:18:06 +09:00