Commit Graph

15858 Commits

Author SHA1 Message Date
Ville Hakulinen
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
TJ DeVries
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
TJ DeVries
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
TJ DeVries
971a191c4d lua: Add ability to pass lua functions directly to vimL 2020-07-10 16:17:33 -04:00
TJ DeVries
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
Thomas Vigouroux
341e139992 treesitter: add parser on_lines callbacks 2020-07-10 17:16:24 +02:00
Thomas Vigouroux
0f7eaa3555 treesitter: cache the capture hl relation 2020-07-10 17:16:24 +02:00
Thomas Vigouroux
d19132ffd1 treesitter: update test to show overlapping works 2020-07-10 17:16:24 +02:00
Thomas Vigouroux
c5119dbad6 treesitter: use change calbacks on redraw 2020-07-10 17:16:23 +02:00
Thomas Vigouroux
529251d5e4
treesitter: call bufload before parsing (#12603) 2020-07-10 09:33:27 -04:00
TJ DeVries
b39edb5b60
doc: Add information about lua function calls (#12574) 2020-07-08 10:42:34 -04:00
Christian Clason
91572ddad1
doc: mention that defer_fn applies schedule_wrap (#12601) 2020-07-07 10:55:40 +02:00
Matthieu Coudron
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
Christian Clason
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
Christian Clason
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
Jan Edmund Lazo
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
Jan Edmund Lazo
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
Jan Edmund Lazo
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
Jan Edmund Lazo
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
Jan Edmund Lazo
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
Jan Edmund Lazo
610c4d2b83
'clang/Logic error': use enums to avoid undefined array subscript 2020-07-04 10:05:34 -04:00
Jan Edmund Lazo
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
Jan Edmund Lazo
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
Matthieu Coudron
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
BK1603
bab77d122f removed test file 2020-07-04 18:18:41 +05:30
Marvim the Paranoid Android
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
BK1603
435344034d removed whitespace 2020-07-03 14:14:08 +05:30
BK1603
8a819d44d2 removed retry 2020-07-03 00:55:14 +05:30
BK1603
ae183990ee clarified the reason for wait 2020-07-02 23:56:55 +05:30
BK1603
a2370a5df0 replaced sleep with a changed mtime for the test file 2020-07-02 23:56:12 +05:30
BK1603
4da0530b00 removed unnecessary feed calls 2020-07-02 23:54:54 +05:30
TJ DeVries
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
Anmol Sethi
2844cd54da
docs: Describe how to escape keycodes with nvim_feedkeys (#12484)
Closes #12297
2020-07-01 21:57:03 -04:00
BK1603
3bcc27e16a Added test 2020-07-02 04:40:42 +05:30
BK1603
8bee2ff19d Update file on focus gained 2020-07-02 04:40:42 +05:30
BK1603
22828f59bb Added healt check for tmux focus events 2020-07-02 04:40:35 +05:30
Marvim the Paranoid Android
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
Mathias Fußenegger
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
Matthieu Coudron
1920ba4b55
Merge pull request #12491 from vigoux/treesitter-set-ranges
[RDY] Treesitter set ranges
2020-06-30 00:02:46 +02:00
Thomas Vigouroux
69816f5e13 treesitter: use single nodes in set_ranges
fixup! treesitter: fix lint
2020-06-29 23:32:49 +02:00
Thomas Vigouroux
66af35fc85 treesitter: separate tests into smaller pieces 2020-06-29 22:21:06 +02:00
Thomas Vigouroux
35cc8b6e83 treesitter: fix lint 2020-06-29 22:21:06 +02:00
Thomas Vigouroux
b652f74ca3 treesitter: use nodes to mark ranges 2020-06-29 22:21:06 +02:00
Thomas Vigouroux
558893b1b9 treesitter: add some documentation for parsers 2020-06-29 22:21:06 +02:00
Thomas Vigouroux
75a1239eb5 treesitter: fix some clint errors
Also fixes some mismatches on the name of the function
2020-06-29 22:21:06 +02:00
Thomas Vigouroux
ac18403d6e treesitter: test newly added set_included_ranges 2020-06-29 22:21:06 +02:00
Thomas Vigouroux
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
James McCoy
fd545d46fa
Merge pull request #12567 from teto/wordcount_doc_fix
doc: fix wordcount description

Closes #12566
2020-06-29 13:33:03 -04:00
Matthieu Coudron
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
cbarrete
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