<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/functional/lua/ui_event_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>feat(multicursor): MC HAMMER #41587</title>
<updated>2026-09-01T15:17:22+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-09-01T15:17:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=9a29622b545fc76c8b44d0e2b90f318a599eef39'/>
<id>9a29622b545fc76c8b44d0e2b90f318a599eef39</id>
<content type='text'>
Other (squashed) commits:

fix(tui): emit ui_send output atomically with the frame

Problem:
tui_ui_send() writes directly to the TTY, bypassing the output buffer.
Sequences sent via nvim_ui_send() (e.g. kitty multiple-cursors, or
visual-dot-repeat) always arrive in a separate TTY write from the frame
they were computed for. This manifests as "tearing", or e.g. in the case
of multicursor the terminal renders text with stale cursor overlays.

Solution:
- tui_ui_send(): while a frame is being assembled (pending invalid
  regions or buffered output), buffer instead of writing directly.
  - Out-of-frame sends (tty queries, clear-on-disable) still write
    immediately.
- mcursor.lua: emit the terminal-cursor update at the end of the redraw
  cycle (`on_end`, when screen positions are final) instead of
  vim.schedule().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Other (squashed) commits:

fix(tui): emit ui_send output atomically with the frame

Problem:
tui_ui_send() writes directly to the TTY, bypassing the output buffer.
Sequences sent via nvim_ui_send() (e.g. kitty multiple-cursors, or
visual-dot-repeat) always arrive in a separate TTY write from the frame
they were computed for. This manifests as "tearing", or e.g. in the case
of multicursor the terminal renders text with stale cursor overlays.

Solution:
- tui_ui_send(): while a frame is being assembled (pending invalid
  regions or buffered output), buffer instead of writing directly.
  - Out-of-frame sends (tty queries, clear-on-disable) still write
    immediately.
- mcursor.lua: emit the terminal-cursor update at the end of the redraw
  cycle (`on_end`, when screen positions are final) instead of
  vim.schedule().</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(normal): crash using :norm from vim.ui_attach shell message event #38283</title>
<updated>2026-03-13T13:36:44+00:00</updated>
<author>
<name>luukvbaal</name>
<email>luukvbaal@gmail.com</email>
</author>
<published>2026-03-13T13:36:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=911337eb3c4cdb4b5747109d078b1e4a13f3b53b'/>
<id>911337eb3c4cdb4b5747109d078b1e4a13f3b53b</id>
<content type='text'>
Problem:  'showcmd' buffer is being populated for :norm commands, which
          can result in a recursive uv_run() when called from a msg_show
          vim.ui_attach callback for a shell message.

Solution: The 'showcmd' buffer is never displayed while executing a
          :normal command so prevent unnecessary work, avoiding the crash.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  'showcmd' buffer is being populated for :norm commands, which
          can result in a recursive uv_run() when called from a msg_show
          vim.ui_attach callback for a shell message.

Solution: The 'showcmd' buffer is never displayed while executing a
          :normal command so prevent unnecessary work, avoiding the crash.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(api): merge split window config only on success</title>
<updated>2026-03-08T19:41:33+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>6256228+seandewar@users.noreply.github.com</email>
</author>
<published>2026-03-07T12:12:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=137d5ab01dfaa65ee69384bf4890983540aa3b6b'/>
<id>137d5ab01dfaa65ee69384bf4890983540aa3b6b</id>
<content type='text'>
Problem: nvim_win_set_config may merge configs despite failing to configure a
split, and without applying necessary side-effects (like setting style=minimal
options). Plus, autocommands may apply a different config after the merge,
causing side-effects to apply for an outdated config.

Solution: merge configs last, only on success. Include fields only relevant to
splits. Properly set _cmdline_offset for splits.

Maybe better to disallow _cmdline_offset for splits instead, as the pum is
relative to cmdline_row anyway? (I didn't want to change behaviour too much)

Also use expect_unchanged in an unrelated test to quash a warning.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: nvim_win_set_config may merge configs despite failing to configure a
split, and without applying necessary side-effects (like setting style=minimal
options). Plus, autocommands may apply a different config after the merge,
causing side-effects to apply for an outdated config.

Solution: merge configs last, only on success. Include fields only relevant to
splits. Properly set _cmdline_offset for splits.

Maybe better to disallow _cmdline_offset for splits instead, as the pum is
relative to cmdline_row anyway? (I didn't want to change behaviour too much)

Also use expect_unchanged in an unrelated test to quash a warning.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(messages): unwanted ext_messages newlines for confirm() #38045</title>
<updated>2026-02-24T18:01:31+00:00</updated>
<author>
<name>luukvbaal</name>
<email>luukvbaal@gmail.com</email>
</author>
<published>2026-02-24T18:01:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=39c4e0f33667e8f4eae3229eb807694aad15347e'/>
<id>39c4e0f33667e8f4eae3229eb807694aad15347e</id>
<content type='text'>
Problem:  Newlines emitted with ext_messages intended to position
          the message/prompt on the message grid.
Solution: Don't emit these newlines with ext_messages, followup to 4260f73e.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  Newlines emitted with ext_messages intended to position
          the message/prompt on the message grid.
Solution: Don't emit these newlines with ext_messages, followup to 4260f73e.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(messages): message not flushed at end of command #37904</title>
<updated>2026-02-16T16:51:43+00:00</updated>
<author>
<name>luukvbaal</name>
<email>luukvbaal@gmail.com</email>
</author>
<published>2026-02-16T16:51:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=49c19a1fe3cb0f525f457170e6988f60cc5ec73f'/>
<id>49c19a1fe3cb0f525f457170e6988f60cc5ec73f</id>
<content type='text'>
Problem:  Logic determining messages belonging to the last command to
          show with "g&lt;" does not flush pending messages. This can
          result in clearing the temporary message history before a
          message still belonging to the previous command was emitted.
Solution: Flush pending messages when marking the end of messages
          belonging to previous command.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  Logic determining messages belonging to the last command to
          show with "g&lt;" does not flush pending messages. This can
          result in clearing the temporary message history before a
          message still belonging to the previous command was emitted.
Solution: Flush pending messages when marking the end of messages
          belonging to previous command.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(ui): only internal messages are unsafe #37462</title>
<updated>2026-01-26T23:18:51+00:00</updated>
<author>
<name>luukvbaal</name>
<email>luukvbaal@gmail.com</email>
</author>
<published>2026-01-26T23:18:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=d30d91f3a49e19e61473b74e42adf68e9215220d'/>
<id>d30d91f3a49e19e61473b74e42adf68e9215220d</id>
<content type='text'>
Problem:  Fast context for msg_show event inhibits vim.ui_attach from
          displaying a stream of messages from a single command.

Solution: Remove fast context from msg_show events emitted as a result
          of explicit API/command calls. The fast context was originally
          introduced to prevent issues with internal messages.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  Fast context for msg_show event inhibits vim.ui_attach from
          displaying a stream of messages from a single command.

Solution: Remove fast context from msg_show events emitted as a result
          of explicit API/command calls. The fast context was originally
          introduced to prevent issues with internal messages.</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:9.1.1817: popup: there are some position logic bugs (#36075)</title>
<updated>2025-10-08T05:47:50+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2025-10-08T05:47:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=c881bc537eac722c0c61aba3fe15f3f4c9e3c138'/>
<id>c881bc537eac722c0c61aba3fe15f3f4c9e3c138</id>
<content type='text'>
Problem:  popup: there are some position logic bugs
Solution: Refactor position logic and fix a few bugs
          (Girish Palya).

This change does the following:

- Simplified and rewrote horizontal positioning logic (was overly
  complex).
- Split horizontal and vertical positioning into separate functions.
- Fixed missing truncation marker (e.g. `&gt;`) when items were truncated
  and `pummaxwidth` was not set.
- Fixed occasional extra space being added to menu items.
- Update tests

closes: vim/vim#18441

https://github.com/vim/vim/commit/e3ed5584ed7fad7070d49ddfba4f41bc2b22ca97

Cherry-pick pum_display_{rtl,ltr}_text() changes from patch 9.1.1835.

Co-authored-by: Girish Palya &lt;girishji@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  popup: there are some position logic bugs
Solution: Refactor position logic and fix a few bugs
          (Girish Palya).

This change does the following:

- Simplified and rewrote horizontal positioning logic (was overly
  complex).
- Split horizontal and vertical positioning into separate functions.
- Fixed missing truncation marker (e.g. `&gt;`) when items were truncated
  and `pummaxwidth` was not set.
- Fixed occasional extra space being added to menu items.
- Update tests

closes: vim/vim#18441

https://github.com/vim/vim/commit/e3ed5584ed7fad7070d49ddfba4f41bc2b22ca97

Cherry-pick pum_display_{rtl,ltr}_text() changes from patch 9.1.1835.

Co-authored-by: Girish Palya &lt;girishji@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>fix(window): avoid referencing cmdline_win after it is closed #35617</title>
<updated>2025-09-03T23:28:23+00:00</updated>
<author>
<name>luukvbaal</name>
<email>luukvbaal@gmail.com</email>
</author>
<published>2025-09-03T23:28:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=de950f827236e2c7447bd776c2509faa39c27b63'/>
<id>de950f827236e2c7447bd776c2509faa39c27b63</id>
<content type='text'>
Solution:  A window marked for ext_cmdline usage is still referenced
           after it is already closed and freed.
Solution:  Unset cmdline_win when the window is closed.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Solution:  A window marked for ext_cmdline usage is still referenced
           after it is already closed and freed.
Solution:  Unset cmdline_win when the window is closed.</pre>
</div>
</content>
</entry>
<entry>
<title>test(messages/cmdline_spec): convert highlight IDs to name and format (#34845)</title>
<updated>2025-07-09T09:33:19+00:00</updated>
<author>
<name>luukvbaal</name>
<email>luukvbaal@gmail.com</email>
</author>
<published>2025-07-09T09:33:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=3a3484be2991beb977a18bead293d5933250798a'/>
<id>3a3484be2991beb977a18bead293d5933250798a</id>
<content type='text'>
Problem:  Hardcoded highlight IDs for ext_messages/cmdline output need
          to be adjusted everytime a builtin highlight group is added.
Solution: Store a global map of default highlights through nvim_get_hl()
          and fetch missing (custom) highlight groups through synIDattr().
          Use more compact formatting for screen:expect().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  Hardcoded highlight IDs for ext_messages/cmdline output need
          to be adjusted everytime a builtin highlight group is added.
Solution: Store a global map of default highlights through nvim_get_hl()
          and fetch missing (custom) highlight groups through synIDattr().
          Use more compact formatting for screen:expect().</pre>
</div>
</content>
</entry>
</feed>
