Commit Graph

4970 Commits

Author SHA1 Message Date
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
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
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
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
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
Lewis Russell
1fe1bb084d refactor(options): deprecate nvim[_buf|_win]_[gs]et_option
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: famiu <famiuhaque@protonmail.com>
2023-05-21 15:14:01 +06:00
Christian Clason
e3e6fadfd8
feat(fs): expose join_paths as vim.fs.joinpath (#23685)
This is a small function but used a lot in some plugins.
2023-05-20 17:30:48 +02:00
Jon Huhn
073035a030
fix(lsp): don't register didChangeWatchedFiles when capability not set (#23689)
Some LSP servers (tailwindcss, rome) are known to request registration
for `workspace/didChangeWatchedFiles` even when the corresponding client
capability does not advertise support. This change adds an extra check
in the `client/registerCapability` handler not to start a watch unless
the client capability is set appropriately.
2023-05-20 07:45:39 +02:00
Luuk van Baal
cf0f83ebf0 vim-patch:9.0.1568: with 'smoothscroll' cursor may move below botline
Problem:    With 'smoothscroll' cursor may move below botline.
Solution:   Call redraw_later() if needed,  Compute cursor row with adjusted
            condition. (Luuk van Baal, closes vim/vim#12415)

d49f646bf5
2023-05-19 19:28:01 +02:00
Luuk van Baal
02ef104d5b vim-patch:9.0.1564: display moves up and down with 'incsearch' and 'smoothscroll'
Problem:    Display moves up and down with 'incsearch' and 'smoothscroll'.
Solution:   Do not check if w_skipcol changed. (Luuk van Baal, closes vim/vim#12410,
            closes vim/vim#12409)

0222c2d103
2023-05-19 18:42:23 +02:00
dundargoc
826b95203a
build: bundle uncrustify
Uncrustify is sensitive to version changes, which causes friction for
contributors that doesn't have that exact version. It's also simpler to
download and install the correct version than to have bespoke version
checking.
2023-05-18 16:27:47 +02:00
zeertzjq
c9f47fca8b
fix(messages): ensure msg_grid is at top at more prompt (#23584) 2023-05-17 21:06:27 +08:00
Lewis Russell
6b19170d44
fix(treesitter): correctly calculate bytes for text sources (#23655)
Fixes #20419
2023-05-16 16:41:47 +01:00
luukvbaal
5887ecab6d
vim-patch:9.0.1561: display wrong when moving cursor to above the top line (#23644)
Problem:    Display wrong when moving cursor to above the top line and
            'smoothscroll' is set.
Solution:   Call adjust_skipcol() in more places and make it work better.
            (Luuk van Baal, closes vim/vim#12395)

798fa76dbf
2023-05-16 07:56:06 +08:00
Christian Clason
9ff59517cb fix(treesitter): update c queries 2023-05-15 14:13:42 +02:00
dundargoc
ecd6d679a0
test: skip flaky test on Windows 2023-05-14 14:29:18 +02:00
luukvbaal
5825d2f6ca
test(scroll_opt): fix typo in porting oldtest (#23593) 2023-05-12 08:17:38 +08:00
zeertzjq
d6e898b44f
Merge pull request #23558 from luukvbaal/smoothscroll
vim-patch:9.0.{1530,1533,1542,1543}
2023-05-12 07:24:13 +08:00
Luuk van Baal
6f41eaa2b5 vim-patch:9.0.1543: display errors when making topline shorter
Problem:    Display errors when making topline shorter and 'smoothscroll' is
            set.
Solution:   Reset w_skipcol when the topline becomes shorter than its current
            value. (Luuk van Baal, closes vim/vim#12367)

5d01f86d99
2023-05-11 20:57:36 +02:00
Luuk van Baal
15c684b358 vim-patch:9.0.1542: line not fully displayed if it doesn't fit in the screen
Problem:    Line not fully displayed if it doesn't fit in the screen.
Solution:   Do not reset s_skipcol if not needed. (Luuk van Baal,
            closes vim/vim#12376)

6c018680be
2023-05-11 20:57:31 +02:00
zeertzjq
03ca36d1f8
fix(highlight): apply 'winblend' to NormalNC (#23555) 2023-05-10 23:46:50 +08:00
zeertzjq
5ac2e47acc
fix(redo): make redo of Lua mappings in op-pending mode work (#23566) 2023-05-10 17:42:14 +08:00
Luuk van Baal
d5780e133a vim-patch:9.0.1533: test for 'smoothscroll' is ineffective
Problem:    Test for 'smoothscroll' is ineffective.
Solution:   Change the order of testing "zb" and "zt". (Luuk van Baal,
            closes vim/vim#12366)

6f37e530d3
2023-05-09 22:53:08 +02:00
Luuk van Baal
1caad791b4 vim-patch:9.0.1530: cursor moves to wrong line when 'foldmethod' is "diff"
Problem:    Cursor moves to wrong line when 'foldmethod' is "diff". (Rick
            Howe)
Solution:   Adjust logic for scrolling. (Luuk van Baal, closes vim/vim#12364,
            closes vim/vim#12218)

aa6ba308a1
2023-05-09 22:40:24 +02:00
zeertzjq
36baaf7c1a
test: move most title tests to a separate file (#23557)
This avoids running title tests twice unnecessarily.
2023-05-10 00:14:54 +08:00
Jon Huhn
075a72d5ff
fix(lsp): fix relative patterns for workspace/didChangeWatchedFiles (#23548) 2023-05-09 18:12:54 +02:00
luukvbaal
44fc2a6d7e
vim-patch:9.0.1525: 'smoothscroll' does not always work properly (#23544)
Problem:    'smoothscroll' does not always work properly.
Solution:   Do not reset w_skipcol after it was intentionally set.  (Luuk van
            Baal, closes vim/vim#12360, closes vim/vim#12199, closes vim/vim#12323)

3ce8c38915
2023-05-09 07:44:31 +08:00
zeertzjq
4ecf6fdfd8
fix(statusline): bail out properly on negative row (#23535) 2023-05-08 16:25:03 +08:00
zeertzjq
a961bb7101
Merge pull request #23486 from msva/patch-1
fix(man.lua): return support of all sections
2023-05-08 16:09:33 +08:00
zeertzjq
3001d86aea test: add more tests for :Man section extraction 2023-05-08 15:46:21 +08:00
zeertzjq
29c228dc10 vim-patch:8.2.3887: E1135 is used for two different errors
Problem:    E1135 is used for two different errors.
Solution:   Renumber one error.

806da5176e

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-08 01:12:09 +08:00
zeertzjq
a2b9117ca8 vim-patch:8.2.1978: making a mapping work in all modes is complicated
Problem:    Making a mapping work in all modes is complicated.
Solution:   Add the <Cmd> special key. (Yegappan Lakshmanan, closes vim/vim#7282,
            closes 4784, based on patch by Bjorn Linse)

957cf67d50

Change docs to match Vim if it's wording is better.
Change error numbers to match Vim.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-08 01:12:08 +08:00
zeertzjq
9e34aa76c1
vim-patch:9.0.1518: search stats not always visible when searching backwards (#23517)
Problem:    Search stats not always visible when searching backwards.
Solution:   Do not display the top/bot message on top of the search stats.
            (Christian Brabandt, closes vim/vim#12322, closes vim/vim#12222)

34a6a3617b

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-05-07 07:57:29 +08:00
Luuk van Baal
8e74569d7e vim-patch:9.0.1513: text scrolls unnecessarily when splitting
Problem:    Text scrolls unnecessarily when splitting and 'splitkeep' is not
            "cursor".
Solution:   Avoid resetting w_skipcol. (Luuk van Baal, closes vim/vim#12334)

b926bf47d6
2023-05-07 00:38:45 +02:00
Luuk van Baal
3b2bd8d69e vim-patch:9.0.1512: inserting lines when scrolling with 'smoothscroll' set
Problem:    Inserting lines when scrolling with 'smoothscroll' set.
Solution:   Adjust line height computation for w_skipcol. (Luuk van Baal,
            closes vim/vim#12350)

c8502f9b88
2023-05-07 00:38:40 +02:00
bfredl
d94db80227
Merge pull request #23415 from zeertzjq/sigwinch-redraw
fix(tui): redraw on SIGWINCH even if size didn't change
2023-05-06 11:48:33 +02:00
zeertzjq
22205f36a6
fix(api): don't change title when setting buffer in a window (#23492) 2023-05-06 07:46:07 +08:00
Christian Clason
c8ebb04e92
fix(health): replace healthFoo with DiagnosticFoo (#23475)
This replaces the custom `health{Error,Warning,Success}` highlight
groups with `Diagnostic{Error,Warning,Ok}`, which are defined by
default. Removes the link for `healthHelp`, which was no longer
actually used after #20879.
2023-05-05 18:15:44 +02:00
zeertzjq
3a1e17e3a1 test: add tests for executing commands with backwards range 2023-05-05 19:07:56 +08:00
zeertzjq
4a098b97e5 fix(excmd): append original command to error message
Revert the change to do_cmdline_cmd() from #5226.

This function is used in many places, so making it different from Vim
leads to small differences from Vim in the behavior of some functions
like execute() and assert_fails(). If DOCMD_VERBOSE really needs to be
removed somewhere, a do_cmdline() call without DOCMD_VERBOSE is also
shorter than a do_cmdline() call with DOCMD_VERBOSE.
2023-05-05 10:43:28 +08:00
zeertzjq
bdaaf2e8e1 vim-patch:9.0.0250: slightly inconsistent error messages
Problem:    Slightly inconsistent error messages.
Solution:   Make it "Using a Float". (closes vim/vim#10959)

dde77a7c4d

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 09:20:30 +08:00
zeertzjq
88cfb49bee vim-patch:8.2.4890: inconsistent capitalization in error messages
Problem:    Inconsistent capitalization in error messages.
Solution:   Make capitalization consistent. (Doug Kearns)

cf030578b2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 09:20:30 +08:00
zeertzjq
b8d5586d5b refactor: using a different error number for 'mousescroll'
Because E548 is linked to 'guicursor' in help.
2023-05-05 09:19:06 +08:00
zeertzjq
75119fcc86 vim-patch:8.2.3135: Vim9: builtin function arguments not checked at compile time
Problem:    Vim9: builtin function arguments not checked at compile time.
Solution:   Add more type checks. (Yegappan Lakshmanan, closes vim/vim#8539)

5b73992d8f

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-05-05 09:19:05 +08:00
bfredl
39caf86e8a
Merge pull request #23428 from luukvbaal/gridclear
fix(tui): grid_clear properly clears the screen
2023-05-03 15:49:25 +02:00
Luuk van Baal
197827321a fix(tui): grid_clear properly clears the screen
Problem:    When setting a shell size smaller than the containing
            terminal window through `:winsize` or `:set lines/columns`
            the screen is not properly cleared.
Solution:   Clear the tui dimensions rather than the grid dimensions.
2023-05-03 14:58:25 +02:00
zeertzjq
dc394b9641
fix(mouse): fix popup menu position check with winbar (#23456) 2023-05-03 10:29:19 +08:00
zeertzjq
1975062d3c
vim-patch:9.0.0662: concealed characters do not work correctly (#23454)
Problem:    Concealed characters do not work correctly.
Solution:   Subtract boguscols instead of adding them. (closes vim/vim#11273)

7500866182

Code change is N/A as Nvim has a draw_col variable instead.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-03 07:54:17 +08:00