<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/functional/lua/vim_spec.lua, branch master</title>
<subtitle>Neovim fork with Rahm's personal hacks.</subtitle>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/'/>
<entry>
<title>fix(lua): str_byteindex() can return an index past the end #41766</title>
<updated>2026-09-27T15:04:11+00:00</updated>
<author>
<name>Qatadaha Bin Matloob</name>
<email>79017227+qatcod@users.noreply.github.com</email>
</author>
<published>2026-09-27T15:04:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=c216c557fd76c762aa11486ed78e5897a96e6efc'/>
<id>c216c557fd76c762aa11486ed78e5897a96e6efc</id>
<content type='text'>
Problem:
For an incomplete sequence at the end of the string, utf_ptr2len_len()
reports more bytes than are there, and mb_utf_index_to_bytes() returns
that position unclamped:

    vim.str_byteindex('ab\xf0\x9f', 'utf-16', 3, false)  --&gt; 6

on a 4 byte string. LSP callers use the result as a column, so
nvim_buf_set_extmark() then fails with "Invalid 'col': out of range".

Solution:
Clamp the returned byte index to the length of the string.

AI-assisted</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
For an incomplete sequence at the end of the string, utf_ptr2len_len()
reports more bytes than are there, and mb_utf_index_to_bytes() returns
that position unclamped:

    vim.str_byteindex('ab\xf0\x9f', 'utf-16', 3, false)  --&gt; 6

on a 4 byte string. LSP callers use the result as a column, so
nvim_buf_set_extmark() then fails with "Invalid 'col': out of range".

Solution:
Clamp the returned byte index to the length of the string.

AI-assisted</pre>
</div>
</content>
</entry>
<entry>
<title>test: fix wrong order of args to eq(), neq() #41499</title>
<updated>2026-08-26T11:18:22+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2026-08-26T11:18:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=d393abad77c54ea84b1474d30e70517ff00ad334'/>
<id>d393abad77c54ea84b1474d30e70517ff00ad334</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(ui2): ui2 misinterprets getchar() input as pager_char (CR) #41465</title>
<updated>2026-08-24T14:18:47+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-08-24T14:18:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=8c440c469bb6f075fe26a1199ae6dcd2314394c9'/>
<id>8c440c469bb6f075fe26a1199ae6dcd2314394c9</id>
<content type='text'>
Problem:
`vim.on_key()` callbacks are invoked for keys that `getchar()` consumes,
which never reach the main loop, and there is no way to tell such a key
apart.  With ui2 the `on_key` handler activated after interactive
cmdline, handles it as `pager_char` (thus enters the ui2 pager).

Solution:
Skip `vim.on_key()` callbacks during `getchar()`/`getcharstr()`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
`vim.on_key()` callbacks are invoked for keys that `getchar()` consumes,
which never reach the main loop, and there is no way to tell such a key
apart.  With ui2 the `on_key` handler activated after interactive
cmdline, handles it as `pager_char` (thus enters the ui2 pager).

Solution:
Skip `vim.on_key()` callbacks during `getchar()`/`getcharstr()`.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(lua): don't limit indexed vim.cmd positional argument count (#41317)</title>
<updated>2026-08-15T23:25:04+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2026-08-15T23:25:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=2edb1c000958952c87edda596ed9ed53628084ed'/>
<id>2edb1c000958952c87edda596ed9ed53628084ed</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(lua): vim.regex():match_str abort in Luv callback #41008</title>
<updated>2026-07-27T11:01:54+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-07-27T11:01:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=80cd48257721cb4261495131ea806020a309b9c4'/>
<id>80cd48257721cb4261495131ea806020a309b9c4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(api): add `lhs` option for keymap deletion</title>
<updated>2026-07-25T17:36:56+00:00</updated>
<author>
<name>Barrett Ruth</name>
<email>br@barrettruth.com</email>
</author>
<published>2026-07-25T17:26:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=22d44ef8754448294833fcbc197defaca355f3b5'/>
<id>22d44ef8754448294833fcbc197defaca355f3b5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>test(harness): migrate away from magic globals</title>
<updated>2026-07-21T11:22:39+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-07-20T15:16:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=6d8c8b18d551d0be0490640c00fabb816727ec10'/>
<id>6d8c8b18d551d0be0490640c00fabb816727ec10</id>
<content type='text'>
Problem:
The magic globals `it`, `describe`, etc., are more trouble than they are
worth.

- Hooking into `after_each` requires `getfenv()` hacks.
- They confuse luals/emmylua, because the top-level `.luarc.json` isn't
  merged with `test/.luarc.json` (apparently a luals limitation?)
- They totally defeat discoverability because the user just has to
  "know" about the various magic symbols.

So they harm DX, which means they serve no purpose at all.

Solution:
- Expose the test API from `testutil`, so tests can call `t.it()`,
  `t.describe()`, etc., in the conventional way.
- Drop `getfenv()` hacks.
- Drop the `setfenv()` injection in `load_chunk`.
- Drop `test/_meta.lua`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
The magic globals `it`, `describe`, etc., are more trouble than they are
worth.

- Hooking into `after_each` requires `getfenv()` hacks.
- They confuse luals/emmylua, because the top-level `.luarc.json` isn't
  merged with `test/.luarc.json` (apparently a luals limitation?)
- They totally defeat discoverability because the user just has to
  "know" about the various magic symbols.

So they harm DX, which means they serve no purpose at all.

Solution:
- Expose the test API from `testutil`, so tests can call `t.it()`,
  `t.describe()`, etc., in the conventional way.
- Drop `getfenv()` hacks.
- Drop the `setfenv()` injection in `load_chunk`.
- Drop `test/_meta.lua`.
</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:9.2.0769 conversion to utf-16be using iconv is inconsistent #40567</title>
<updated>2026-07-04T11:50:38+00:00</updated>
<author>
<name>Manoj Panda</name>
<email>151429040+ManojPanda3@users.noreply.github.com</email>
</author>
<published>2026-07-04T11:50:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=9456cec7f942c1f98fc3b495a7f90ad603bc631a'/>
<id>9456cec7f942c1f98fc3b495a7f90ad603bc631a</id>
<content type='text'>
fix(iconv): conversion to utf-16be using iconv is inconsistent

vim-patch:9.2.0769

Problem:  enc_canonize function changes utf-16be to utf-16 but in linux
          type utf-16 defaults to utf-16le.

Solution: Creating a separate entry for utf-16be in enc_canon_table.
          Note: the effect is only visible on iconv implementations that
          treat "utf-16" and "utf-16be" differently, so the test does
          not necessarily fail on an unpatched Vim. But the bug is
          visible in vim.iconv. (Manoj Panda)

from: vim/vim@2a63f74
closes: neovim#40262

Signed-off-by: Manoj Panda &lt;manojpandawork@gmail.com&gt;
Signed-off-by: Christian Brabandt &lt;cb@256bit.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fix(iconv): conversion to utf-16be using iconv is inconsistent

vim-patch:9.2.0769

Problem:  enc_canonize function changes utf-16be to utf-16 but in linux
          type utf-16 defaults to utf-16le.

Solution: Creating a separate entry for utf-16be in enc_canon_table.
          Note: the effect is only visible on iconv implementations that
          treat "utf-16" and "utf-16be" differently, so the test does
          not necessarily fail on an unpatched Vim. But the bug is
          visible in vim.iconv. (Manoj Panda)

from: vim/vim@2a63f74
closes: neovim#40262

Signed-off-by: Manoj Panda &lt;manojpandawork@gmail.com&gt;
Signed-off-by: Christian Brabandt &lt;cb@256bit.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>feat(lua): support table `lhs` in vim.keymap.set()/del() #39948</title>
<updated>2026-05-29T18:45:33+00:00</updated>
<author>
<name>Olivia Kinnear</name>
<email>git@superatomic.dev</email>
</author>
<published>2026-05-29T18:45:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=e728c100b5bd4b0c6671d8eb524e15d67cacb42a'/>
<id>e728c100b5bd4b0c6671d8eb524e15d67cacb42a</id>
<content type='text'>
Problem:
It is repetitive to map multiple keymaps to do the same thing. Here are some
cases where being able to do this would be useful:

    -- Visual movement for both j/k and down/up:
    vim.keymap.set({ 'n', 'x' }, { 'j', '&lt;Down&gt;' }, 'v:count == 0 ? "gj" : "j"', { expr = true })
    vim.keymap.set({ 'n', 'x' }, { 'k', '&lt;Up&gt;' }, 'v:count == 0 ? "gk" : "k"', { expr = true })
    -- Map multiple keys to `&lt;Nop&gt;` concisely:
    vim.keymap.set({ 'n', 'x' }, { '&lt;Leader&gt;', '&lt;Localleader&gt;', '&lt;CR&gt;' }, '&lt;Nop&gt;')
    -- Remove multiple keymaps at once:
    vim.keymap.del('n', { 'gri', 'grn', 'grr' })

Solution:
Support the `lhs` of `vim.keymap.set()` and `vim.keymap.del()` being a table, in
the same way that `modes` can be.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
It is repetitive to map multiple keymaps to do the same thing. Here are some
cases where being able to do this would be useful:

    -- Visual movement for both j/k and down/up:
    vim.keymap.set({ 'n', 'x' }, { 'j', '&lt;Down&gt;' }, 'v:count == 0 ? "gj" : "j"', { expr = true })
    vim.keymap.set({ 'n', 'x' }, { 'k', '&lt;Up&gt;' }, 'v:count == 0 ? "gk" : "k"', { expr = true })
    -- Map multiple keys to `&lt;Nop&gt;` concisely:
    vim.keymap.set({ 'n', 'x' }, { '&lt;Leader&gt;', '&lt;Localleader&gt;', '&lt;CR&gt;' }, '&lt;Nop&gt;')
    -- Remove multiple keymaps at once:
    vim.keymap.del('n', { 'gri', 'grn', 'grr' })

Solution:
Support the `lhs` of `vim.keymap.set()` and `vim.keymap.del()` being a table, in
the same way that `modes` can be.</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: group nvim_buf_call, nvim_win_call tests #39828</title>
<updated>2026-05-17T15:20:54+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-05-17T15:20:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=846b8b2420f074cc4c61ab57291b510b92ec0300'/>
<id>846b8b2420f074cc4c61ab57291b510b92ec0300</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
