<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/functional/lua/range_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(range): preserve single-character intersections #41881</title>
<updated>2026-09-12T14:28:54+00:00</updated>
<author>
<name>Volodymyr Chernetskyi</name>
<email>volodymyr_chernetskyi@goodyear.com</email>
</author>
<published>2026-09-12T14:28:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=4836954b120c2dff67fe8a11322af866c0ab8504'/>
<id>4836954b120c2dff67fe8a11322af866c0ab8504</id>
<content type='text'>
Problem:
Intersection rejects ranges whose inclusive end equals the other start,
discarding a shared character and even a one-character self-intersection.

Solution:
Use strict comparisons when checking inclusive ends for non-overlap.
Cover two ranges that share a single character.

AI-assisted</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Intersection rejects ranges whose inclusive end equals the other start,
discarding a shared character and even a one-character self-intersection.

Solution:
Use strict comparisons when checking inclusive ends for non-overlap.
Cover two ranges that share a single character.

AI-assisted</pre>
</div>
</content>
</entry>
<entry>
<title>fix(range): use the preceding line for inclusive end marks #41880</title>
<updated>2026-09-12T14:27:08+00:00</updated>
<author>
<name>Volodymyr Chernetskyi</name>
<email>volodymyr_chernetskyi@goodyear.com</email>
</author>
<published>2026-09-12T14:27:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=4ec474ed795527e96f889fc93e77714e9ed9e392'/>
<id>4ec474ed795527e96f889fc93e77714e9ed9e392</id>
<content type='text'>
Problem:
Converting an exclusive end at column zero moves to the preceding row
but calculates the inclusive column from the original row's text.

Solution:
Read the preceding line after decrementing the row. Cover adjacent lines
with unequal lengths.

AI-assisted</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Converting an exclusive end at column zero moves to the preceding row
but calculates the inclusive column from the original row's text.

Solution:
Read the preceding line after decrementing the row. Cover adjacent lines
with unequal lengths.

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>feat(pos): mutable vim.Pos, vim.Range fields #41318</title>
<updated>2026-08-23T11:13:41+00:00</updated>
<author>
<name>Olivia Kinnear</name>
<email>git@superatomic.dev</email>
</author>
<published>2026-08-23T11:13:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=8ce1aac477a33ab1fe2a0b590ff278518dc0e473'/>
<id>8ce1aac477a33ab1fe2a0b590ff278518dc0e473</id>
<content type='text'>
Allow plugins to set the human-readable fields.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allow plugins to set the human-readable fields.</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(pos,range): extract `vim.pos._util`</title>
<updated>2026-05-20T08:23:03+00:00</updated>
<author>
<name>Yi Ming</name>
<email>ofseed@foxmail.com</email>
</author>
<published>2026-05-20T08:02:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=b1c1f320890a4577a5edebfe267d2c5f6f8dd130'/>
<id>b1c1f320890a4577a5edebfe267d2c5f6f8dd130</id>
<content type='text'>
Problem:
- To share logic, creating a `vim.Range` currently creates two `vim.Pos` values
  as intermediates, which causes unnecessary table allocations.
- `pos.lua` and `range.lua` contain some overlapping logic.

Solution:
Add `vim.pos._util`, a module for handling
positions represented directly by `row` and `col`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
- To share logic, creating a `vim.Range` currently creates two `vim.Pos` values
  as intermediates, which causes unnecessary table allocations.
- `pos.lua` and `range.lua` contain some overlapping logic.

Solution:
Add `vim.pos._util`, a module for handling
positions represented directly by `row` and `col`.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(range): handle inclusive/exclusive positions on multibyte characters</title>
<updated>2026-05-18T14:19:07+00:00</updated>
<author>
<name>Yi Ming</name>
<email>ofseed@foxmail.com</email>
</author>
<published>2026-05-17T08:39:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=856bc6d284f6c9f31f21d01e69b44457502a773f'/>
<id>856bc6d284f6c9f31f21d01e69b44457502a773f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(vim.range): empty ranges semantics vs regular ranges #39474</title>
<updated>2026-05-08T09:17:00+00:00</updated>
<author>
<name>Luis Calle</name>
<email>53507599+TheLeoP@users.noreply.github.com</email>
</author>
<published>2026-05-08T09:17:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=416f3482e7f183b039dfe56e158ac42ea42abb3a'/>
<id>416f3482e7f183b039dfe56e158ac42ea42abb3a</id>
<content type='text'>
Problem:
- Empty ranges have different `&lt;`, `&lt;=`, `has` and `intersect` semantics compared to regular ranges.
- `to_inclusive_pos` assumes that the end position of a range is exclusive, which is not true for empty ranges

Solution:
Special case empty ranges in these operations.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
- Empty ranges have different `&lt;`, `&lt;=`, `has` and `intersect` semantics compared to regular ranges.
- `to_inclusive_pos` assumes that the end position of a range is exclusive, which is not true for empty ranges

Solution:
Special case empty ranges in these operations.</pre>
</div>
</content>
</entry>
<entry>
<title>feat(vim.pos): accept buf=0 for current buf #39414</title>
<updated>2026-04-26T10:34:18+00:00</updated>
<author>
<name>Luis Calle</name>
<email>53507599+TheLeoP@users.noreply.github.com</email>
</author>
<published>2026-04-26T10:34:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=0b7a2912386ef9aaf9d79e50dc0de3456386efc4'/>
<id>0b7a2912386ef9aaf9d79e50dc0de3456386efc4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(vim.pos)!: require `buf` param on vim.pos, vim.range #38665</title>
<updated>2026-04-06T15:51:36+00:00</updated>
<author>
<name>Luis Calle</name>
<email>53507599+TheLeoP@users.noreply.github.com</email>
</author>
<published>2026-04-06T15:51:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=01be30f638151a5654b5bc899080c49a63c2d9eb'/>
<id>01be30f638151a5654b5bc899080c49a63c2d9eb</id>
<content type='text'>
Problem: `buf` is optional even though its needed to perform conversions
and the ordering of `(buf, row, col)` is not consistent.

Solution: make `buf` mandatory on `vim.range` and `vim.pos` and enforce
the `buf, row, col` ordering</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: `buf` is optional even though its needed to perform conversions
and the ordering of `(buf, row, col)` is not consistent.

Solution: make `buf` mandatory on `vim.range` and `vim.pos` and enforce
the `buf, row, col` ordering</pre>
</div>
</content>
</entry>
</feed>
