Björn Linse
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
erw7
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
Will Eccles
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
https://github.com/vim/vim/commit/375e3390078e740d3c83b0c118c50d9a920036c7
2020-03-17 20:05:34 +01:00
Matthieu Coudron
d22fd58629
Merge pull request #11716 from teto/folds_auto_backup
...
[RFC] foldcolumn autowidth
2020-03-02 13:56:27 +01:00
Hirokazu Hata
e35ff7371f
lua: add vim.tbl_len() #11889
2020-03-01 23:38:43 -08:00
Jan Edmund Lazo
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 )
https://github.com/vim/vim/commit/80dad48c5095d30873a42ec82628bdb213125d8e
2020-03-01 03:57:58 -05:00
Justin M. Keyes
1b0a770340
Merge #11805 'vim-patch:8.1.0619'
2020-02-29 17:37:15 -08:00
Hirokazu Hata
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
Jan Edmund Lazo
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.
https://github.com/vim/vim/commit/461a7fcfce3cd6414f990037e6468af3b5ccf119
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
Matthieu Coudron
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
Björn Linse
9c00fea585
lua: add regex support, and @match support in treesitter queries
2020-02-26 19:39:02 +01:00
Björn Linse
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
Hirokazu Hata
e2ed8053bf
lua: move test helper function, map and filter, to vim.shared module
2020-02-18 17:43:10 +09:00
Justin M. Keyes
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
Justin M. Keyes
6e13b9d261
test/LSP: assert contents of log file
2020-02-16 22:09:28 -08:00
Justin M. Keyes
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
Justin M. Keyes
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
Justin M. Keyes
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
Justin M. Keyes
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
Justin M. Keyes
b04165859d
test: style
2020-02-16 17:24:21 -08:00
Björn Linse
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
Matthieu Coudron
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
Hirokazu Hata
cdb729b746
lua: add vim.tbl_extend and vim.deepcopy test
2020-02-14 22:36:21 +09:00
Hirokazu Hata
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
Hirokazu Hata
032ede0203
test: add json_encode test for vim.empty_dict()
2020-02-12 21:08:12 +09:00
erw7
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
https://github.com/vim/vim/commit/71ef1ba5e996f34d3e0acbe1d89c4c6bfa5e98ba
2020-02-12 16:03:54 +09:00
erw7
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.
https://github.com/vim/vim/commit/891e1fd894720d0b99a9daefa41e8181844f819a
2020-02-12 15:16:32 +09:00
erw7
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.
https://github.com/vim/vim/commit/6b810d92a9cd9378ab46ea0db07079cb789f9faa
2020-02-12 15:16:32 +09:00
erw7
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.
https://github.com/vim/vim/commit/f273245f6433d5d43a5671306b520a3230c35787
2020-02-12 15:16:32 +09:00
Björn Linse
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.
https://github.com/vim/vim/commit/dbe5d361feb65137099644329cf0ecfd4a945a14
2020-02-09 09:42:26 +01:00
Björn Linse
ef2e6522c5
tests: bail out on libdir just like $VIMRUNTIME, it cannot be calculated
2020-02-07 09:32:25 +01:00
Björn Linse
00c57c98df
treesitter: add standard &rtp/parser/ search path for parsers
2020-02-07 09:22:55 +01:00
Björn Linse
c5b812c9ea
env: try find library dir (like /usr[/local]/lib/nvim) and add it to &rtp
2020-02-07 09:22:55 +01:00
Björn Linse
7ce9a5c7da
api: add nvim_get_runtime_file for finding runtime files
2020-02-07 09:22:55 +01:00
Björn Linse
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
Hye Sung Jung
14a8b3b98c
doc: fix typos [ci skip] #11787
2020-01-30 22:56:34 -08:00
Axel Forsman
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
Björn Linse
bfe84adb5a
options: winhighlight: fix incorrect string equality test
2020-01-28 19:10:41 +01:00
Justin M. Keyes
1c3ca4f18f
mksession: always unix slashes "/" for filepaths
2020-01-26 17:30:47 -08:00
Justin M. Keyes
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
Alexandre Dubray
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
Jan Edmund Lazo
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.
https://github.com/vim/vim/commit/8f130eda4747e4a4d68353cdb650f359fd01469b
2020-01-26 17:38:30 -05:00
Björn Linse
6f073ccbf4
Merge pull request #11755 from bfredl/qf_msg
...
screen: add missing redraws after a message
2020-01-26 15:38:04 +01:00
Björn Linse
687fc527de
screen: add missing redraws after a message
2020-01-26 13:45:20 +01:00
Chris LaRose and Justin M. Keyes
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
Björn Linse
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
Billy Su
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
akovaski
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
Jan Edmund Lazo
7853b61786
provider/perl: test older versions
2020-01-20 19:44:00 -05:00
Jan Edmund Lazo
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