Commit Graph

19864 Commits

Author SHA1 Message Date
Dundar Göc
fb0399aacc docs: remove redundant help files 2021-12-08 19:48:51 +01:00
Gregory Anders
c096561041
docs(lsp): fix resolve_capabilities docstring (#16577) 2021-12-08 11:01:07 -07:00
dundargoc
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
ii14
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
dundargoc
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
glacambre
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
dundargoc
c4d70dae80
refactor(diagnostic): add warning to deprecated functions (#16536) 2021-12-08 08:47:19 -07:00
Gregory Anders
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
Jan Edmund Lazo
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
zeertzjq
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
zeertzjq
2784a5d3d2 fix(terminal): use coladvance() to calculate buffer cursor position 2021-12-08 08:11:27 +08:00
Björn Linse
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
Björn Linse
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
Gregory Anders
a2db756206
refactor(lsp): remove usage of deprecated function (#16539) 2021-12-07 10:25:21 -07:00
Anshuman Medhi
f99f3d9052
feat(lsp): use vim.ui.select for selecting lsp client (#16531) 2021-12-07 18:09:43 +01:00
zeertzjq
b326bf5f41 fix(screen): do not draw filler lines post eof if already at last row 2021-12-07 23:19:56 +08:00
zeertzjq
23dcef9269 fix(highlight): always update window highlight if highlight changed 2021-12-07 20:48:39 +08:00
Sean Dewar
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
Sean Dewar
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
Sean Dewar
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
Sean Dewar
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
Sean Dewar
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
Sean Dewar
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
Sean Dewar
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
Sean Dewar
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
Sean Dewar
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
Sean Dewar
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
Claes Nästén
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
Claes Nästén
435dd04bdb fix: don't include pty.h on SunOS 2021-12-07 09:56:02 +01:00
Jan Edmund Lazo
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
Jan Edmund Lazo
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
Jan Edmund Lazo
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
Volodymyr Kot
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
zeertzjq
afdd9c19aa
refactor: fix indent in decode.c (#16543) 2021-12-06 21:23:52 -05:00
zeertzjq
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
zeertzjq
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
Claes Nästén
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
Christian Clason
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
Claes Nästén
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
Claes Nästén
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
Jan Edmund Lazo
523f03b506
lint (#16526) 2021-12-05 23:33:22 -05:00
Gregory Anders
4306b395de
refactor: format diagnostic.lua (#16540) 2021-12-05 19:42:31 -07:00
Matthew Toohey
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
dundargoc
24f9463dd0
refactor: remove unused runtime lua functions (#16535) 2021-12-05 19:11:20 +01:00
Anshuman Medhi
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
Dundar Göc
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
Gregory Anders
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
Dmytro Meleshko
222ef0c00d
feat(lsp,diagnostic): open folds in jump-related functions (#16520) 2021-12-04 22:14:38 +01:00
Gregory Anders
71ac00ccb5 feat(api): add nvim_get_option_value 2021-12-04 14:04:23 -07:00
Gregory Anders
7b910a1716 chore: bump API version 2021-12-04 14:04:23 -07:00