Commit Graph

19886 Commits

Author SHA1 Message Date
James McCoy
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
James McCoy
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
James McCoy
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
James McCoy
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
Björn Linse
a59589ca01 refactor(misc1): move preserve_exit() to related functions in main.c 2021-12-09 23:46:37 +01:00
Björn Linse
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
dm1try
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
Christian Clason
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
Björn Linse
51822f0655 refactor(misc1): move out autocmd related functions 2021-12-09 21:10:58 +01:00
Björn Linse
2ec0e0a868 refactor(misc1): move line_breakcheck family of functions to os/input.c 2021-12-09 21:00:04 +01:00
James McCoy
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
Gregory Anders
6063e07a0f
fix(diagnostic): set effective buffer number in autocmd (again) (#16589)
Follow up to #16474.
2021-12-08 21:13:47 -07:00
James McCoy
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
Gregory Anders
ed35e20640
test(fold): add test for CursorLineFold 2021-12-08 21:47:59 -05:00
Gregory Anders
931f499d9a
test(sign): add test for culhl option 2021-12-08 21:47:59 -05:00
James McCoy
e9051d965e
vim-patch:partial 6304be625ce4
Update runtime files.
6304be625c

Remaining changes left out of 03d250eb45
2021-12-08 21:47:59 -05:00
James McCoy
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
James McCoy
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
James McCoy
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
James McCoy
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
James McCoy
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
Gregory Anders
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
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