Commit Graph

26125 Commits

Author SHA1 Message Date
zeertzjq
678548a2b4
fix(folds): show Folded highlight in Visual selection (#23741)
Note: CursorLine highlight is now combined with Folded.
2023-05-24 21:25:39 +08:00
Christian Clason
c855eee919
feat(term): enable reflow by default (#21124)
libvterm v0.3 supports reflow of terminal buffer when Nvim is resized
Since v0.3 is now a required dependency, enable it by default to find
(and fix) possible issues.

Note: Neovim's scrollback buffer does not support reflow (yet), so lines
vanishing into the buffer due to a too small window will be restored
without reflow.
2023-05-24 10:04:49 +02:00
zeertzjq
6661cdf2bd
vim-patch:9.0.1575: "file N of M" message is not translated (#23737)
Problem:    "file N of M" message is not translated.
Solution:   Make argument count message translatable. (close vim/vim#12429)

a8490a4952

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-24 07:09:31 +08:00
dundargoc
599cf6f60c
ci: remove api-docs-check workflow
Having a workflow that creates a PR with the necessary changes on master
is redundant as this check is enforced for each PR anyway.
2023-05-24 00:14:42 +02:00
dundargoc
d4dc884012
fix(deps): restore functionality of USE_EXISTING_SRC_DIR
fix(deps): restore functionality of USE_EXISTING_SRC_DIR
2023-05-24 00:13:03 +02:00
zeertzjq
677e02be4e
refactor: fix clang/PVS warnings (#23731) 2023-05-23 18:11:03 +08:00
bfredl
30c02781ca
Merge pull request #23730 from famiu/refactor/api/helpers
refactor(api): new helper macros for cstrings as objects
2023-05-23 12:01:20 +02:00
Famiu Haque
cfd4fdfea4 refactor(api): new helper macros
Adds new API helper macros `CSTR_AS_OBJ()`, `STATIC_CSTR_AS_OBJ()`, and `STATIC_CSTR_TO_OBJ()`, which cleans up a lot of the current code. These macros will also be used extensively in the upcoming option refactor PRs because then API Objects will be used to get/set options. This PR also modifies pre-existing code to use old API helper macros like `CSTR_TO_OBJ()` to make them cleaner.
2023-05-23 15:20:41 +06:00
zeertzjq
62e0e0349c
fix(colorscheme): try .lua files in 'rtp' before .vim files in 'pp' (#23727)
This ensures that colorschemes in 'rtp' are tried before ones in 'pp',
because some colorschemes in 'pp' may not work if not added to 'rtp'.

This also match the current documentation better.
2023-05-23 16:12:16 +08:00
James McCoy
8a6716682e
fix(deps): restore functionality of USE_EXISTING_SRC_DIR
30a0299bc removed the USE_EXISTING_SRC_DIR hack which broke building the
nightly PPA since ExternalProject tried to download the sources.
2023-05-22 19:24:36 -04:00
James McCoy
a1d885dbef
ci: add check to ensure USE_EXISTING_SRC_DIR=ON builds work 2023-05-22 19:21:05 -04:00
bfredl
07883940b2
Merge pull request #20130 from bfredl/inline
feat(ui): inline virtual text
2023-05-22 14:16:42 +02:00
bfredl
6eeb28845a refactor(drawline): move inline text code to its own function 2023-05-22 13:49:42 +02:00
bfredl
c5528e7fd8 fix(test): clean up inline virtual text tests a little 2023-05-22 13:49:42 +02:00
bfredl
a78fd18ed9 fix(extmark): fix cursor position with both left and right gravity inline text 2023-05-22 13:49:42 +02:00
tom-anders
29da1a9cf0 docs: update api.txt and add inline virtual text to news.txt 2023-05-22 13:49:42 +02:00
Ibby
584319cb03 vim-patch:9.0.0210: 'list' mode does not work properly with virtual text
Problem:    'list' mode does not work properly with virtual text.
Solution:   Show the "$" at the right position. (closes vim/vim#10913)

c3a483fc3c (diff-15009492c2b1d0a2629908b4618ad51c99d16746f238a0e6451dfe32355ed32fR1653)

This commit only contains the seemingly refactored portion (not entirely
sure what it does)

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-22 13:49:42 +02:00
Ibby
a37c990483 fix(ui): fix overflowing nowrap virtual text not displaying if tab follows 2023-05-22 13:49:42 +02:00
Ibby
34d862942c fix(ui): fix virtual text not displaying when two overlapping inlines (nowrap) 2023-05-22 13:49:42 +02:00
Ibby
5547b16c40 vim-patch:9.0.1067: in diff mode virtual text is highlighted incorrectly
Problem:    In diff mode virtual text is highlighted incorrectly. (Rick Howe)
Solution:   Do not use diff attributes for virtual text. (closes vim/vim#11714)

d097af7779

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-22 13:49:42 +02:00
Ibby
75f350aac6 fix(ui): fix incorrect highlighting when virtual text next to match 2023-05-22 13:49:42 +02:00
Ibby
332b70d2ed fix(ui): fix incorrect highlighting when virtual text wraps with number 2023-05-22 13:49:42 +02:00
Ibby
ecf225df57 vim-patch:9.0.0944: 'cursorline' causes virtual text highlight to continue
Problem:    'cursorline' causes virtual text highlight to continue.
Solution:   Save and restore line_attr. (closes vim/vim#11588)

6ac16f0c0f

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-22 13:49:42 +02:00
Ibby
5d7afb2e9f fix(ui): fix tabs not being spaced properly after virtual text with no wrap
also fixes incorrect skipping of multibyte characters
2023-05-22 13:49:42 +02:00
Ibby
7423d3479d vim-patch:9.0.0716: with 'nowrap' virtual text "after" does not scroll left
Problem:    With 'nowrap' virtual text "after" does not scroll left.
Solution:   Skip part of the virtual text that is left of the window.
            (closes vim/vim#11320)  Fix going beyond the last column of the window.

cd105417a5

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-22 13:49:42 +02:00
Ibby
1936285d98 fix(ui): fixes incorrect rendering when virtual text is not visable and nowrap 2023-05-22 13:49:42 +02:00
Ibby
be273c3a23 vim-patch:9.0.0205: cursor in wrong position when inserting after virtual text
Problem:    Cursor in wrong position when inserting after virtual text. (Ben
            Jackson)
Solution:   Put the cursor after the virtual text, where the text will be
            inserted. (closes vim/vim#10914)

28c9f89571

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-22 13:49:42 +02:00
Ibby
c5bf838f8a fix(ui): fix visual and search highlighting interfering with virtual text
vim-patch:9.0.0193: search and match highlgith interfere with virtual text

Problem:    Search and match highlgith interfere with virtual text highlight.
            (Ben Jackson)
Solution:   Check for match highlight after text properties.  Reset and
            restore search highlight when showing virtual text.
            (closes vim/vim#10892)

e38fc86180

vim-patch:9.0.0452: Visual highlighting extends into virtual text prop

Problem:    Visual highlighting extends into virtual text prop.
Solution:   Do not highlight what isn't actually selected.  Fix ordering of
            stored text props.

6eda17d881

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-22 13:49:42 +02:00
Ibby
e12b5882af vim-patch:9.0.0183: extra space after virtual text when 'linebreak' is set
Problem:    Extra space after virtual text when 'linebreak' is set.
Solution:   Do not count virtual text when getting linebreak value.
            (closes vim/vim#10884)

52de3a8d39

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-22 13:49:42 +02:00
Ibby
dee3af2122 vim-patch:9.0.0178: cursor position wrong with virtual text before Tab
Problem:    Cursor position wrong with virtual text before Tab.
Solution:   Use the byte length, not the cell with, to compare the column.
            Correct tab size after text prop. (closes vim/vim#10866)

e428fa04a7

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-22 13:49:42 +02:00
Ibby
43c2eaada2 vim-patch:9.0.0179: cursor pos wrong with wrapping virtual text in empty line
Problem:    Cursor position wrong with wrapping virtual text in empty line.
Solution:   Adjust handling of an empty line. (closes vim/vim#10875)

49a90792d9

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-22 13:49:42 +02:00
Ibby
8eaf3c4f8c vim-patch:9.0.0143: cursor positioned after virtual text in empty line
Problem:    Cursor positioned after virtual text in empty line.
Solution:   Keep cursor in the first column. (closes vim/vim#10786)

afd2aa79ed
2023-05-22 13:49:42 +02:00
Ibby
0c7fa3bdcc fix(ui): fix multi-byte characters highlight in virtual text
This also fixes insert cursor position around virtual text

vim-patch:9.0.0132: multi-byte characters in virtual text not handled correctly

Problem:    Multi-byte characters in virtual text not handled correctly.
Solution:   Count screen cells instead of bytes.

09ff4b54fb
2023-05-22 13:49:42 +02:00
Ibby
389f5ca39d fix(ui): adjust the cursor when inserting virtual text
Credit to: Jesse Bakker

https://github.com/neovim/neovim/pull/20130#issuecomment-1369652743

Co-authored-by: Jesse Bakker <github@jessebakker.com>
2023-05-22 13:49:42 +02:00
Ibby
0e1f3b5acf vim-patch:9.0.0130: cursor position wrong when inserting around virtual text
Problem:    Cursor position wrong when inserting around virtual text.
Solution:   Update the cursor position properly.

1f4ee19eef

Co-authored-by: tom-anders <13141438+tom-anders@users.noreply.github.com>
2023-05-22 13:49:42 +02:00
Ibby
a38d7f9984 fix(ui): fix cursor position with multiple inline virtual text
vim-patch9.0.0121: cannot put virtual text after or below a line

Problem:    Cannot put virtual text after or below a line.
Solution:   Add "text_align" and "text_wrap" arguments.

b7963df98f

This only patches the fix, not the whole thing.
2023-05-22 13:49:42 +02:00
Ibby
efa9b299a7 feat(ui): inline virtual text
vim-patch:9.0.0067: cannot show virtual text

Problem:    Cannot show virtual text.
Solution:   Initial changes for virtual text support, using text properties.

7f9969c559

vim-patch:9.0.0116: virtual text not displayed if 'signcolumn' is "yes"

Problem:    Virtual text not displayed if 'signcolumn' is "yes".
Solution:   Set c_extra and c_final to NUL.
711483cd13

Co-authored-by: bfredl <bjorn.linse@gmail.com>
2023-05-22 13:49:42 +02:00
zeertzjq
cb34d0ddd0
fix(redraw): overwrite double-width char with virt_text properly (#23708) 2023-05-22 18:22:47 +08:00
luukvbaal
b11a8c1b5d
fix(highlight): remove unnecessary assignment to char_attr for 'spell' (#23713) 2023-05-22 17:07:55 +08:00
Null Chilly
b7708eac24
fix(api): nvim_get_hl should return default flag 2023-05-22 09:49:01 +01:00
dundargoc
4f1d75daf8
ci: enable colors by default when testing
Test colors were disabled in be7290d214
due to color codes interfering with the logs. I believe the solution to
disable colors is too aggressive. Reading raw logs isn't common compared
to reading CI results from the github UI. We should optimize the most
common use case.

It is also possible to interpret the colors codes in logs from neovim
with a plugin that interprets ansi escape sequences.
2023-05-22 09:47:40 +01:00
Lewis Russell
01ea42c32a
refactor(vim.secure): move to lua/secure.c 2023-05-22 09:24:36 +01:00
bfredl
62a80c36c1
Merge pull request #23712 from famiu/refactor/test/buf0
test: don't unnecessarily specify win/buf for nvim_(get|set)_option_value
2023-05-22 10:19:47 +02:00
Famiu Haque
576dddb461 test: don't unnecessarily specify win/buf for nvim_(get|set)_option_value
`nvim_(get|set)_option_value` pick the current buffer / window by default for buffer-local/window-local (but not global-local) options. So specifying `buf = 0` or `win = 0` in opts is unnecessary for those options. This PR removes those to reduce code clutter.
2023-05-22 13:02:07 +06:00
dundargoc
8b8e607284
build: move luarocks and rocks installation to main build
This will ensure luacheck and busted are only installed when they're
actually needed. This cuts total build time by over 50%.

Closes https://github.com/neovim/neovim/issues/22797.
2023-05-21 20:57:39 +02:00
bfredl
384a3bc308
Merge pull request #23670 from famiu/refactor/deprecate_opt_api
refactor(options): deprecate nvim[_buf|_win]_[gs]et_option
2023-05-21 20:16:05 +02:00
Christian Clason
edf9a897f0
fix(treesitter): update highlights for query (#23699)
captures for `; extends` and `; inherits`
2023-05-21 19:22:28 +02:00
luukvbaal
60f69014a8
fix(redraw): multibyte characters are wrapped at the end of a line (#23696)
Problem:    Multibyte characters may be wrapped at the end of a line
            when 'statuscolumn' and 'spell' are set.
Solution:   Update line pointerdiff "v" before fetching the line pointer
            after evaluating 'statuscolumn'.
2023-05-21 19:00:37 +08:00
Christian Clason
387c8ceb28
Merge pull request #23697 from clason/bump-luv
build(deps): bump luv to HEAD - c1497c0
2023-05-21 12:06:35 +02:00
Christian Clason
3b66f92d0e docs(luv): update to HEAD 2023-05-21 11:29:47 +02:00