<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/functional/api/keymap_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>test: simplify functional test expectations</title>
<updated>2026-10-05T16:33:44+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2026-10-05T14:37:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=483815ab45cf8fc08804e0cfa95b126493a5dd1f'/>
<id>483815ab45cf8fc08804e0cfa95b126493a5dd1f</id>
<content type='text'>
Problem: Repeated default fields and field-by-field assertions obscure
the values that each functional test is meant to check.

Solution: Add eq_partial() to check selected record fields while
preserving list length and order. Use local helpers to fill fixed
expected defaults where tests need full equality. Keep explicit absence
checks and test-specific values at the call sites.

AI-assisted
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: Repeated default fields and field-by-field assertions obscure
the values that each functional test is meant to check.

Solution: Add eq_partial() to check selected record fields while
preserving list length and order. Use local helpers to fill fixed
expected defaults where tests need full equality. Keep explicit absence
checks and test-specific values at the call sites.

AI-assisted
</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>fix(api): LuaRef leak in nvim_set_keymap on LHS too long (&gt;=66 bytes) #39351</title>
<updated>2026-04-24T18:10:28+00:00</updated>
<author>
<name>Barrett Ruth</name>
<email>62671086+barrettruth@users.noreply.github.com</email>
</author>
<published>2026-04-24T18:10:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=58aad59e1cf89e2bee0fc2e02c42506d2b1feeaf'/>
<id>58aad59e1cf89e2bee0fc2e02c42506d2b1feeaf</id>
<content type='text'>
Problem: `nvim_set_keymap` leaks the `callback` `LuaRef` when the
LHS is too long.

Solution: Make `set_maparg_lhs_rhs` transfer `rhs_lua` to
`MapArguments` up front so the caller always owns the ref.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: `nvim_set_keymap` leaks the `callback` `LuaRef` when the
LHS is too long.

Solution: Make `set_maparg_lhs_rhs` transfer `rhs_lua` to
`MapArguments` up front so the caller always owns the ref.</pre>
</div>
</content>
</entry>
<entry>
<title>feat(api): rename buffer to buf in retval #38900</title>
<updated>2026-04-13T16:42:26+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-04-13T16:42:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=df8d98173cbc03d78da18fee7f31f130db2c9e44'/>
<id>df8d98173cbc03d78da18fee7f31f130db2c9e44</id>
<content type='text'>
In 3a4a66017b74192caaf9af9af172bdc08e0c1608, 4d3a67cd620152d11ab9b5f5bdd973f84cc2d44b
we renamed "buffer" to "buf" in dict parameters.

This commit also renames such keys in dict return-values.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In 3a4a66017b74192caaf9af9af172bdc08e0c1608, 4d3a67cd620152d11ab9b5f5bdd973f84cc2d44b
we renamed "buffer" to "buf" in dict parameters.

This commit also renames such keys in dict return-values.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(api): use standard error messages</title>
<updated>2026-03-16T13:52:04+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-03-14T16:56:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=680d25e5b3c1efba13bd8f5c0bd6bb5ab431361f'/>
<id>680d25e5b3c1efba13bd8f5c0bd6bb5ab431361f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(mappings): always include replace_keycodes in mapping dicts (#37272)</title>
<updated>2026-01-06T22:00:49+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2026-01-06T22:00:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=218ea9fff775f7ab9c0042bb993a3b89362cf0d2'/>
<id>218ea9fff775f7ab9c0042bb993a3b89362cf0d2</id>
<content type='text'>
Omitting replace_keycodes when it is false causes some confusion as its
default value is unclear. In nvim_set_keymap() it defaults to false, but
in vim.keymap.set() it defaults to true when it matters.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Omitting replace_keycodes when it is false causes some confusion as its
default value is unclear. In nvim_set_keymap() it defaults to false, but
in vim.keymap.set() it defaults to true when it matters.</pre>
</div>
</content>
</entry>
<entry>
<title>test(api): nvim_get_keymap returns correct lhsraw and lhsrawalt</title>
<updated>2025-07-07T22:40:07+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2025-07-07T22:38:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=0c973bf442d86b8b954d34df8cc7f5cb5167ad59'/>
<id>0c973bf442d86b8b954d34df8cc7f5cb5167ad59</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): nvim_set_keymap() throws error even in pcall() #33228</title>
<updated>2025-04-01T12:30:00+00:00</updated>
<author>
<name>tstsrt</name>
<email>41282711+tstsrt@users.noreply.github.com</email>
</author>
<published>2025-04-01T12:30:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=ec18ebcb417bb9f2afc81d247db6993eaa48701f'/>
<id>ec18ebcb417bb9f2afc81d247db6993eaa48701f</id>
<content type='text'>
Problem: When `nvim_set_keymap` tries to overwrite a `&lt;unique&gt;` mapping,
it throws an error even when called in `pcall`.

Solution: src/nvim/mapping.c:buf_do_map no longer calls `semsg`. Its
callers now decide whether to ignore the error, or use
`semsg` (not caught)/`api_set_error` (caught by `pcall`).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: When `nvim_set_keymap` tries to overwrite a `&lt;unique&gt;` mapping,
it throws an error even when called in `pcall`.

Solution: src/nvim/mapping.c:buf_do_map no longer calls `semsg`. Its
callers now decide whether to ignore the error, or use
`semsg` (not caught)/`api_set_error` (caught by `pcall`).</pre>
</div>
</content>
</entry>
<entry>
<title>fix(api): use E226 instead of E227 for duplicate abbreviation (#33159)</title>
<updated>2025-03-29T23:12:01+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2025-03-29T23:12:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=99529577cc9f5229cbb3dac8ab4782bd43094102'/>
<id>99529577cc9f5229cbb3dac8ab4782bd43094102</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
