| Age | Commit message (Collapse) | Author | Files |
|
|
|
Problem:
- Builtin "Vimscript" functions (f_xx) are mostly implemented in C.
Partly that's because there is some boilerplate required to call out
to Lua.
- Calls to `vim.fn.foo()` always marshall over the Lua <=> Vimscript
("typval") bridge, even if `fn.foo()` is implemented entirely in Lua:
```
Lua => typval => Object => Lua => Object => typval => Lua.
```
Solution:
Functions declared in eval.lua with `func_lua` are implemented in
entirely in Lua (`_core/vimfn.lua`).
- `gen_eval.lua` wires `func_lua` entries to `lua_wrapper`, which handles
the typval conversion for Vimscript callers (slow path).
- `nlua_call()` detects `func_lua` functions and calls the Lua
implementation directly. This eliminates all conversion overhead for
Lua callers (fast path).
- Validate at build-time that `func`, `func_float`, and `func_lua` are
mutually exclusive.
- Migrate `hostname()` as a toy example, to show the idea.
|
|
Problem: Documentation based on patches is outdated.
Solution: Add changes to documentation in a patch.
https://github.com/vim/vim/commit/853886722c051ecaef6d818ce32a822e4f43dc2b
Trailing space was removed in later patches.
Also fix a few more misplaced error numbers from #8155.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
Close #38748
Close #38866
Co-authored-by: Mario Loriedo <mario.loriedo@gmail.com>
Co-authored-by: Anakin Childerhose <anakin@childerhose.ca>
|
|
|
|
Problem:
Currently, we recommend always inserting text above prompt-line in
prompt-buffer. This can be done using the `:` mark. However, although
we recommend it this way it can sometimes get confusing how to do it
best.
Solution:
Provide an api to append text to prompt buffer. This is a common
use-case for things using prompt-buffer.
|
|
|
|
|
|
Problem:
The 'android' and 'termux' feature flags have been shipped in the
downstream neovim/neovim-nightly package for 5+ years but were never
properly documented in the downstream patch.
Solution:
Upstream the 'android' and 'termux' feature flags into Neovim as
decoupled feature flags, this enables the 'android' feature in
particular to be available independently of the 'termux' feature
for builds of Neovim against the Android NDK, but not including
the Termux NDK patchset.
Co-authored-by: Lethal Lisa <43791059+lethal-lisa@users.noreply.github.com>
Co-authored-by: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com>
|
|
|
|
|
|
Close #37458
Close #37838
Close #37840
Close #37872
Close #37890
Close #38016
Close #38051
Close #38189
Close #38225
Close #38243
Close #38250
Co-authored-by: Colin Kennedy <colinvfx@gmail.com>
Co-authored-by: "Mike J. McGuirk" <mike.j.mcguirk@gmail.com>
Co-authored-by: Austin Rambo <ramboaustin13@gmail.com>
Co-authored-by: Jonathan Birk <1965620+cafce25@users.noreply.github.com>
Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Co-authored-by: Mike Smith <10135646+mikesmithgh@users.noreply.github.com>
Co-authored-by: Saad Nadeem <saadndm.sn@gmail.com>
Co-authored-by: brianhuster <phambinhanctb2004@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Yi Ming <ofseed@foxmail.com>
|
|
Problem:
TUI does not support several standard SGR text attributes:
- dim/faint (SGR 2)
- blink (SGR 5)
- conceal (SGR 8)
- overline (SGR 53)
This means that when a program running in the embedded terminal emits
one of these escape codes, we drop it and don't surface it to the
outer terminal.
Solution:
- Add support for those attributes.
- Also add corresponding flags to `nvim_set_hl` opts, so users can set
these attributes in highlight groups.
- refactor(highlight): widen `HlAttrFlags` from `int16_t` to `int32_t`
Widen the `rgb_ae_attr` and `cterm_ae_attr` fields in HlAttrs from
int16_t to int32_t to make room for new highlight attribute flags,
since there was only one spare bit left.
- The C flag is named HL_CONCEALED to avoid colliding with the
existing HL_CONCEAL in syntax.h (which is a syntax group flag, not
an SGR attribute).
- Also note that libvterm doesn't currently support the dim and overline
attributes, so e.g. `printf '\e[2mThis should be dim\n'` and `printf
'\e[53mThis should have an overline\n'` are still not rendered
correctly when run from the embedded terminal.
|
|
Problem: items() does not work for Blobs
Solution: Extend items() to support Blob
(Yegappan Lakshmanan).
closes: vim/vim#18080
https://github.com/vim/vim/commit/da34f84847d40dc5b1eaad477440e513968047dc
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
closes: vim/vim#18417
https://github.com/vim/vim/commit/3de73844afebe133ea7485cc9993bb8378a3717d
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
|
Problem: The following strchar functions have incorrect types:
strcharlen() - Currently any. Always returns an integer, including on
error
strcharpart() - The skipcc annotation does not specify that 0 and 1 are
valid. These inputs are required for vimscript usage. The current
return type is any, even though the function returns an empty string
on error
strchars() - The skipcc annotation does not specify that 0 and 1 are
valid
Solution: Update the problem types.
|
|
Problem: In eval.lua, setcharsearch() has an incorrect param type,
causing Lua_Ls to display an error when a valid table is passed.
While getcharsearch correctly states that it returns a table, the type
is non-specific about the contents.
Solution: Update eval.lua with the correct types.
|
|
closes: vim/vim#19286
https://github.com/vim/vim/commit/dd9f7e6cbbba6d8e63cca3b4c537dc9b8cc1837a
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
|
setpos() (#37223)
Add documentation notes explaining that visual marks '< and '> have
different behaviors in getpos() and setpos().
Also fix a small typo.
closes: vim/vim#19070
https://github.com/vim/vim/commit/93eb081eee92180a495d72a495542b24a873e2f3
Co-authored-by: Larson, Eric <numeric.larson@gmail.com>
|
|
tag (#36921)
- Add leading "$" to match other environment variable tags.
- Clarify :help $NoDefaultCurrentDirectoryInExePath.
closes: vim/vim#18895
https://github.com/vim/vim/commit/bfb9f5c40ea5dd07fc0747c5ffd44d5b32dbcf62
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
|
in printf() (#36919)
Problem: crash with invalid positional argument 0 in printf()
Solution: Reject positional arguments <= 0.
closes: vim/vim#18898
https://github.com/vim/vim/commit/98a0cbf05bd45fa6c4ede7b791fd21760bc587c8
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
fix https://github.com/neovim/neovim.github.io/issues/419
Co-authored-by: Rob Pilling <robpilling@gmail.com>
|
|
|
|
(#36828)
Problem: gewininfo() does not return if statusline is visible
Solution: Add status_height to the dict items returned by
getwininfo() (Hirohito Higashi)
closes: vim/vim#18841
https://github.com/vim/vim/commit/a04ab5f04c1a9e794ed45ff5f8f7e1f9c5e1a535
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
|
|
Problem: Windows: Vim always adds the current directory to search path.
This should only happen when using cmd.exe as 'shell'. For
example, powershell won't run binaries from the current
directory.
Solution: Only add current directory to system path, when using cmd.exe
as 'shell'.
related: vim/vim#10341
related: 083ec6d9a3b7
https://github.com/vim/vim/commit/4d87c9742a544a58c05cb34d4fbaac47e410b369
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
current directory
Problem: [security]: Windows: Vim may execute commands from current
directory (Simon Zuckerbraun)
Solution: Set the $NoDefaultCurrentDirectoryInExePath before running
external commands.
Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-g77q-xrww-p834
https://github.com/vim/vim/commit/083ec6d9a3b7b09006e0ce69ac802597d25856d6
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: completion: complete_match() Vim script function and
'isexpand' option are not that useful and confusing
(after v9.1.1341)
Solution: Remove function and option and clean up code and documentation
(Girish Palya).
complete_match() and 'isexpand' add no real functionality to Vim. They
duplicate what `strridx()` already does, yet pretend to be part of the
completion system. They have nothing to do with the completion mechanism.
* `f_complete_match()` in `insexpand.c` does not call any completion code.
It’s just a `STRNCMP()` wrapper with fluff logic.
* `'isexpand'` exists only as a proxy argument to that function.
It does nothing on its own and amounts to misuse of a new option.
The following Vim script function can be used to implement the same
functionality:
```vim
func CompleteMatch(triggers, sep=',')
let line = getline('.')->strpart(0, col('.') - 1)
let result = []
for trig in split(a:triggers, a:sep)
let idx = strridx(line, trig)
if l:idx >= 0
call add(result, [idx + 1, trig])
endif
endfor
return result
endfunc
```
related: vim/vim#16716
fixes: vim/vim#18563
closes: vim/vim#18790
https://github.com/vim/vim/commit/cbcbff871224115c45bbd14582749a487c6fad30
Co-authored-by: Girish Palya <girishji@gmail.com>
|
|
Error: .tests/neovim/runtime/doc/dev_test.txt
(MISSING "`" [420, 79] - [420, 79])
Error: .tests/neovim/runtime/doc/news.txt
(MISSING "`" [137, 80] - [137, 80])
Error: .tests/neovim/runtime/doc/nvim.txt
(MISSING "<" [106, 0] - [106, 0])
Error: .tests/neovim/runtime/doc/vimfn.txt
(MISSING "}" [2610, 26] - [2610, 26])
|
|
Close #36441
Close #36631
Close #36656
Co-authored-by: Maria José Solano <majosolano99@gmail.com>
Co-authored-by: glepnir <glephunter@gmail.com>
Co-authored-by: "Mike J. McGuirk" <mike.j.mcguirk@gmail.com>
|
|
|
|
closes: vim/vim#18698
https://github.com/vim/vim/commit/c28b73d34990e574ebd7542fe0adb789fc0bd674
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
|
Problem: pre-inserted text not exposed in complete_info()
Solution: Add the pre-inserted text to the complete_info() Vim script
function (Girish Palya)
closes: vim/vim#18571
Feat: expose preinserted text in complete_info()
https://github.com/vim/vim/commit/ef5bf58d8cb2c6332d4cbc89c1d352466772ecc3
Co-authored-by: Girish Palya <girishji@gmail.com>
|
|
|
|
descriptions (#36172)
- Column align tags
- Move tags to the same line as the function signature
- Move descriptions to the line below the function signature
- Add missing hyperlinks to builtins in the description text
closes: vim/vim#18478
https://github.com/vim/vim/commit/83eb1da19eedbd56fe6100d7e9017b8ebca0a35b
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
|
Use double sentence spacing and wrap lines at 'textwidth'. Code
examples and tables were not wrapped unless this had already been done
locally.
closes: vim/vim#18453
https://github.com/vim/vim/commit/c58f91c035db09358c282f2a908e2aea4287785e
Fix incorrect docs in :h ModeChanged.
Cherry-pick :h bufnr() changes from patch 8.1.2080.
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
|
The current description (especially the "unlimited width" part) is
inaccurate in several ways:
- The size of virtual text can depend on window width. In particular,
the size of "above" virtual text can be equal to window width.
- A double-width character that doesn't fit adds 1 to the virtual column
of the following characters.
- The size of 'showbreak' and 'breakindent' is counted.
related: vim/vim#5713
closes: vim/vim#18447
https://github.com/vim/vim/commit/014c731fa50c28c94d56545938b6a05a86234c30
|
|
Change the second "if" to "because", otherwise it may be misinterpreted
that preinserted() can return non-zero just because these options are
set.
closes: vim/vim#18409
https://github.com/vim/vim/commit/4edaf8923335504c31810dc4c5213eaba84e7898
|
|
Problem: completion: autocompletion can be improved
Solution: Add support for "longest" and "preinsert" in 'autocomplete';
add preinserted() (Girish Palya)
* Add support for "longest" in 'completeopt' when 'autocomplete'
is enabled. (Note: the cursor position does not change automatically
when 'autocomplete' is enabled.)
* Add support for "preinsert" when 'autocomplete' is enabled. Ensure
"preinsert" works the same with and without 'autocomplete'
* introduce the preinserted() Vim script function, useful for defining
custom key mappings.
fixes: vim/vim#18314
closes: vim/vim#18387
https://github.com/vim/vim/commit/c05335082adb21d99d96374779856444a3a0688f
Co-authored-by: Girish Palya <girishji@gmail.com>
|
|
(#35957)
fixes: vim/vim#18435
https://github.com/vim/vim/commit/992e30774f5ec81f53d5554c42137d3c85999081
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
Close #35926
Close #35818
Co-authored-by: skewb1k <skewb1kunix@gmail.com>
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
Problem: cannot calculate sha256() of a Blob
Solution: Change sha256() to accept a Blob or String argument
(thinca).
closes: vim/vim#18336
https://github.com/vim/vim/commit/4150283b837975152d36f87a2bb975e894bc965c
Co-authored-by: thinca <thinca@gmail.com>
|
|
Close #34938
Close #35030
Close #35233
Close #35259
Close #35290
Close #35433
Close #35541
Close #35766
Close #35792
Co-authored-by: huylg <45591413+huylg@users.noreply.github.com>
Co-authored-by: Jason Del Ponte <961963+jasdel@users.noreply.github.com>
Co-authored-by: sooriya <74165167+thuvasooriya@users.noreply.github.com>
Co-authored-by: Andrew Braxton <andrewcbraxton@gmail.com>
Co-authored-by: Enric Calabuig <enric.calabuig@gmail.com>
Co-authored-by: Augusto César Dias <augusto.c.dias@gmail.com>
Co-authored-by: David Sierra DiazGranados <davidsierradz@gmail.com>
Co-authored-by: Stepan Nikitin <90522882+vectravox@users.noreply.github.com>
Co-authored-by: Emilien Breton <bricktech2000@gmail.com>
|
|
- Address https://github.com/vim/vim/pull/18219#issuecomment-3264634710
- Make the cmdline-autocompletion help more user friendly
closes: vim/vim#18245
https://github.com/vim/vim/commit/d7d6a6f05a536b443188ff95a45bbd46485f11fb
Co-authored-by: Girish Palya <girishji@gmail.com>
|
|
The returned value is only in arbitrary order for a Dict.
closes: vim/vim#18050
https://github.com/vim/vim/commit/84a343a6ed34995adc67c062b64533c1b0bf7fb1
|
|
String type
related: vim/vim#18021
https://github.com/vim/vim/commit/44c8072ef64a7a218eb8cf4b72866921762633e4
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
closes: vim/vim#18021
https://github.com/vim/vim/commit/308a3130be89148cdaf83bfaf00e3e7c69ed2133
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
Problem: fuzzy-matching can be improved
Solution: Implement a better fuzzy matching algorithm
(Girish Palya)
Replace fuzzy matching algorithm with improved fzy-based implementation
The
[current](https://www.forrestthewoods.com/blog/reverse_engineering_sublime_texts_fuzzy_match/)
fuzzy matching algorithm has several accuracy issues:
* It struggles with CamelCase
* It fails to prioritize matches at the beginning of strings, often
ranking middle matches higher.
After evaluating alternatives (see my comments
[here](https://github.com/vim/vim/issues/17531#issuecomment-3112046897)
and
[here](https://github.com/vim/vim/issues/17531#issuecomment-3121593900)),
I chose to adopt the [fzy](https://github.com/jhawthorn/fzy) algorithm,
which:
* Resolves the aforementioned issues.
* Performs better.
Implementation details
This version is based on the original fzy
[algorithm](https://github.com/jhawthorn/fzy/blob/master/src/match.c),
with one key enhancement: **multibyte character support**.
* The original implementation supports only ASCII.
* This patch replaces ascii lookup tables with function calls, making it
compatible with multibyte character sets.
* Core logic (`match_row()` and `match_positions()`) remains faithful to
the original, but now operates on codepoints rather than single-byte
characters.
Performance
Tested against a dataset of **90,000 Linux kernel filenames**. Results
(in milliseconds) show a **\~2x performance improvement** over the
current fuzzy matching algorithm.
```
Search String Current Algo FZY Algo
-------------------------------------------------
init 131.759 66.916
main 83.688 40.861
sig 98.348 39.699
index 109.222 30.738
ab 72.222 44.357
cd 83.036 54.739
a 58.94 62.242
b 43.612 43.442
c 64.39 67.442
k 40.585 36.371
z 34.708 22.781
w 38.033 30.109
cpa 82.596 38.116
arz 84.251 23.964
zzzz 35.823 22.75
dimag 110.686 29.646
xa 43.188 29.199
nha 73.953 31.001
nedax 94.775 29.568
dbue 79.846 25.902
fp 46.826 31.641
tr 90.951 55.883
kw 38.875 23.194
rp 101.575 55.775
kkkkkkkkkkkkkkkkkkkkkkkkkkkkk 48.519 30.921
```
```vim
vim9script
var haystack = readfile('/Users/gp/linux.files')
var needles = ['init', 'main', 'sig', 'index', 'ab', 'cd', 'a', 'b',
'c', 'k',
'z', 'w', 'cpa', 'arz', 'zzzz', 'dimag', 'xa', 'nha', 'nedax',
'dbue',
'fp', 'tr', 'kw', 'rp', 'kkkkkkkkkkkkkkkkkkkkkkkkkkkkk']
for needle in needles
var start = reltime()
var tmp = matchfuzzy(haystack, needle)
echom $'{needle}' (start->reltime()->reltimefloat() * 1000)
endfor
```
Additional changes
* Removed the "camelcase" option from both matchfuzzy() and
matchfuzzypos(), as it's now obsolete with the improved algorithm.
related: neovim/neovim#34101
fixes vim/vim#17531
closes: vim/vim#17900
https://github.com/vim/vim/commit/7e0df5eee9eab872261fd5eb0068cec967a2ba77
Co-authored-by: Girish Palya <girishji@gmail.com>
|
|
Problem: Cannot specify scope for chdir()
Solution: Add optional scope argument (kuuote)
closes: vim/vim#17888
https://github.com/vim/vim/commit/8a65a49d509d5a9dd5759a4287969896e8941c10
Co-authored-by: kuuote <znmxodq1@gmail.com>
|
|
Maybe this was unnecessary, but saw this:
https://github.com/vim/vim/issues/17854
https://github.com/vim/vim/commit/d82c918e2f3e6af65c36fb14457968053dcc03a3
Co-authored-by: Girish Palya <girishji@gmail.com>
|