<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/functional/api/extmark_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>refactor(multicursor)!: drop nvim_mcursor #42156</title>
<updated>2026-09-30T11:11:40+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-09-30T11:11:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=a8062120ad8c144d5da853a611dc9d51708f2d83'/>
<id>a8062120ad8c144d5da853a611dc9d51708f2d83</id>
<content type='text'>
Problem:
`nvim_mcursor` is not fully baked, and not strongly motivated,
currently. The main programmatic interface for cursors is the
"nvim.multicursor" extmarks namespace.

Solution:
Drop `nvim_mcursor`. Add an internal hook so that multicursor can react
when extmarks are added to the "nvim.multicursor" namespace.

TODO:
If extmarks/namespaces are clumsy to work with, we should _fix that_
rather than adding wrappers.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
`nvim_mcursor` is not fully baked, and not strongly motivated,
currently. The main programmatic interface for cursors is the
"nvim.multicursor" extmarks namespace.

Solution:
Drop `nvim_mcursor`. Add an internal hook so that multicursor can react
when extmarks are added to the "nvim.multicursor" namespace.

TODO:
If extmarks/namespaces are clumsy to work with, we should _fix that_
rather than adding wrappers.</pre>
</div>
</content>
</entry>
<entry>
<title>feat(editor): undo restores cursor position #41520</title>
<updated>2026-08-27T20:12:11+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-08-27T20:12:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=7e2e3f8c255f7ae65bd9fdc3feba6b4efd21416f'/>
<id>7e2e3f8c255f7ae65bd9fdc3feba6b4efd21416f</id>
<content type='text'>
Problem:
Undo places the cursor wherever the cursor happened to sit at "save
time" (`uh_cursor` is sampled lazily on the first change).
Examples:
- `i` preserves, but `a` does not
- `diw`, `atest&lt;Esc&gt;`, `d^` abandon the original position
- `D`, `o` restore it (by accident).

Solution:
`composite` tracks the pending atom (and its `origin`) across frames.
A `stuffed` continuation frame inherits the `origin` + prepped redo.
Store `origin` info in the undo header, so undo can restore it.

- Not for a mid-command undo break (i_CTRL-G_u).
- Undoing a mapping restores where the mapping started (which
  technically may be different than where the "edit" started).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Undo places the cursor wherever the cursor happened to sit at "save
time" (`uh_cursor` is sampled lazily on the first change).
Examples:
- `i` preserves, but `a` does not
- `diw`, `atest&lt;Esc&gt;`, `d^` abandon the original position
- `D`, `o` restore it (by accident).

Solution:
`composite` tracks the pending atom (and its `origin`) across frames.
A `stuffed` continuation frame inherits the `origin` + prepped redo.
Store `origin` info in the undo header, so undo can restore it.

- Not for a mid-command undo break (i_CTRL-G_u).
- Undoing a mapping restores where the mapping started (which
  technically may be different than where the "edit" started).</pre>
</div>
</content>
</entry>
<entry>
<title>fix(extmarks): redo of a mark created during an edit #41324</title>
<updated>2026-08-15T14:13:32+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-08-15T14:13:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=9cca923ab4f9ddca4b817e989eba546ddba675e1'/>
<id>9cca923ab4f9ddca4b817e989eba546ddba675e1</id>
<content type='text'>
Problem:
A mark created by `nvim_buf_set_extmark()` while an undo block is open
never comes back on redo.

Analysis:
Undo deletes the text it covers and collapses the range; redo replays
the splices, which re-insert the text but cannot re-expand the mark.
`extmark_set()` records a position only for a mark it moves, not for one
it creates.

Solution:
Record the created position for redo; undo leaves the mark to the splice
replay, since it did not exist before the edit. Each side of a paired
mark gets its own entry. Redo also revives a mark that undo invalidated,
else its position returns but its highlight does not.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
A mark created by `nvim_buf_set_extmark()` while an undo block is open
never comes back on redo.

Analysis:
Undo deletes the text it covers and collapses the range; redo replays
the splices, which re-insert the text but cannot re-expand the mark.
`extmark_set()` records a position only for a mark it moves, not for one
it creates.

Solution:
Record the created position for redo; undo leaves the mark to the splice
replay, since it did not exist before the edit. Each side of a paired
mark gets its own entry. Redo also revives a mark that undo invalidated,
else its position returns but its highlight does not.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(extmarks): undo-redo of a mark explicitly moved during an edit #41252</title>
<updated>2026-08-10T08:21:31+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-08-10T08:21:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=2546741d1b36feb7a2e438428992ff26089da184'/>
<id>2546741d1b36feb7a2e438428992ff26089da184</id>
<content type='text'>
Problem:
A mark moved by nvim_buf_set_extmark() during an edit is misplaced by
undo and redo. Only splices ("edits") are recorded, and replaying them
reproduces the shifts they caused, never the explicit set: the mark ends
up wherever the text pushed it.

Solution:
When an open undo block moves an existing mark, record both positions.
Undo restores the pre-set position, redo re-applies the set.

Partially reverts 18334a4a0cd9 ; ExtmarkSavePos.row/col were unused
because nothing recorded an explicit move, but now `extmark_set()` does.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
A mark moved by nvim_buf_set_extmark() during an edit is misplaced by
undo and redo. Only splices ("edits") are recorded, and replaying them
reproduces the shifts they caused, never the explicit set: the mark ends
up wherever the text pushed it.

Solution:
When an open undo block moves an existing mark, record both positions.
Undo restores the pre-set position, redo re-applies the set.

Partially reverts 18334a4a0cd9 ; ExtmarkSavePos.row/col were unused
because nothing recorded an explicit move, but now `extmark_set()` does.</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>refactor(insert): rename edit.c =&gt; insert.c #40705</title>
<updated>2026-07-12T15:57:17+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-07-12T15:57:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=81c4c295ac78c2baa1b905d9bc75c9bcdc3fd54b'/>
<id>81c4c295ac78c2baa1b905d9bc75c9bcdc3fd54b</id>
<content type='text'>
Problem:
- `edit.c` is an unnecessarily misleading and less-discoverable name
  than `insert.c`.
- Numerous insert-mode related things are named with a `ins_` prefix.
- There is already a `insexpand.c` module...

Solution:
Rename `edit.c` =&gt; `insert.c`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
- `edit.c` is an unnecessarily misleading and less-discoverable name
  than `insert.c`.
- Numerous insert-mode related things are named with a `ins_` prefix.
- There is already a `insexpand.c` module...

Solution:
Rename `edit.c` =&gt; `insert.c`.</pre>
</div>
</content>
</entry>
<entry>
<title>feat(extmark): virt_lines_overflow "wrap" and "auto"</title>
<updated>2026-06-08T14:19:25+00:00</updated>
<author>
<name>jreidx</name>
<email>jreidx29@gmail.com</email>
</author>
<published>2026-06-02T22:05:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=d9aa06eed8e38f45f6f60158a0dc5d25717a91dd'/>
<id>d9aa06eed8e38f45f6f60158a0dc5d25717a91dd</id>
<content type='text'>
Problem: Extmark has support for horizontal scrolling and truncating, but not wrapping.

Solution: Extend virt_lines_overflow flags to support "wrap" and "auto" based on proposed changes in #18282.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: Extmark has support for horizontal scrolling and truncating, but not wrapping.

Solution: Extend virt_lines_overflow flags to support "wrap" and "auto" based on proposed changes in #18282.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(marks): adjust marks when unloading "nofile" buffer #39118</title>
<updated>2026-04-18T10:53:00+00:00</updated>
<author>
<name>luukvbaal</name>
<email>luukvbaal@gmail.com</email>
</author>
<published>2026-04-18T10:53:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=68f7acaaae662b7511cc71a20901066174e03538'/>
<id>68f7acaaae662b7511cc71a20901066174e03538</id>
<content type='text'>
Problem:  Marks are not adjusted unloading a buffer that doesn't exist
          on disk. E.g. extmarks are still valid (and will be beyond the
          end of the buffer if the buffer is reloaded), even though the
          text is lost.
Solution: Adjust marks for a cleared buffer when unloading a buffer that
          doesn't exist on disk.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  Marks are not adjusted unloading a buffer that doesn't exist
          on disk. E.g. extmarks are still valid (and will be beyond the
          end of the buffer if the buffer is reloaded), even though the
          text is lost.
Solution: Adjust marks for a cleared buffer when unloading a buffer that
          doesn't exist on disk.</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>feat(extmark): support end_col=-1 if strict=false #28169</title>
<updated>2026-03-09T23:20:25+00:00</updated>
<author>
<name>Stefan Novaković</name>
<email>100767853+NStefan002@users.noreply.github.com</email>
</author>
<published>2026-03-09T23:20:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=bffca6e26bf383bf6360da5827ef1f55f1ac7a67'/>
<id>bffca6e26bf383bf6360da5827ef1f55f1ac7a67</id>
<content type='text'>
Problem:
There is an inconsistency between extmarks/highlights regarding the
`end_col` param.

Solution:
Allow end_col=-1 to mean "end of line" (if strict=false).

Co-authored-by: Justin M. Keyes &lt;justinkz@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
There is an inconsistency between extmarks/highlights regarding the
`end_col` param.

Solution:
Allow end_col=-1 to mean "end of line" (if strict=false).

Co-authored-by: Justin M. Keyes &lt;justinkz@gmail.com&gt;</pre>
</div>
</content>
</entry>
</feed>
