<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/functional/terminal, branch userregs_2</title>
<subtitle>Neovim fork with Rahm's personal hacks.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/'/>
<entry>
<title>fix: update osc52 termfeatures flag on UIEnter/UILeave (#32756)</title>
<updated>2025-03-12T13:11:19+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>greg@gpanders.com</email>
</author>
<published>2025-03-12T13:11:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=04181070746a51d2f11ce5fc96d2696ea267ff70'/>
<id>04181070746a51d2f11ce5fc96d2696ea267ff70</id>
<content type='text'>
Problem:

Nvim tries to use OSC 52 even when no TUIs are attached.

Solution:

On each UIEnter/UILeave event, check that there is a TUI client connected to Nvim's stdout.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:

Nvim tries to use OSC 52 even when no TUIs are attached.

Solution:

On each UIEnter/UILeave event, check that there is a TUI client connected to Nvim's stdout.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(events): always allow some events to be nested (#32706)</title>
<updated>2025-03-07T23:29:45+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2025-03-07T23:29:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=f05a6666cfcb2cd95d860620748cb0fa58b23aba'/>
<id>f05a6666cfcb2cd95d860620748cb0fa58b23aba</id>
<content type='text'>
Always allow the following four events to be nested, as they may contain
important information, and are triggered on the event loop, which may be
processed by a blocking call inside another autocommand.

- ChanInfo
- ChanOpen
- TermRequest
- TermResponse

There are some other events that are triggered on the event loop, but
they are mostly triggered by user actions in a UI client, and therefore
not very likely to happen during another autocommand, so leave them
unchanged for now.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Always allow the following four events to be nested, as they may contain
important information, and are triggered on the event loop, which may be
processed by a blocking call inside another autocommand.

- ChanInfo
- ChanOpen
- TermRequest
- TermResponse

There are some other events that are triggered on the event loop, but
they are mostly triggered by user actions in a UI client, and therefore
not very likely to happen during another autocommand, so leave them
unchanged for now.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(terminal): avoid rescheduling events onto the same queue (#32755)</title>
<updated>2025-03-07T18:16:39+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>greg@gpanders.com</email>
</author>
<published>2025-03-07T18:16:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=3d49c55d3c33a243f4236cf57b179608c288b145'/>
<id>3d49c55d3c33a243f4236cf57b179608c288b145</id>
<content type='text'>
Problem:

When a function like vim.wait() is used, we continuously drain the main
event queue until it is empty, never stopping for user input. This means
the libuv timer never runs and the terminal never gets refreshed, so
emit_termrequest continously reschedules itself onto the same event
queue, causing an infinite loop.

Solution:

Use a separate "pending" event queue, where events that require a
terminal refresh are temporarily placed. Drain this queue after a
terminal refresh and events are copied back onto the main queue. This
prevents infinite loops since the main event queue will always be able
to properly drain.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:

When a function like vim.wait() is used, we continuously drain the main
event queue until it is empty, never stopping for user input. This means
the libuv timer never runs and the terminal never gets refreshed, so
emit_termrequest continously reschedules itself onto the same event
queue, causing an infinite loop.

Solution:

Use a separate "pending" event queue, where events that require a
terminal refresh are temporarily placed. Drain this queue after a
terminal refresh and events are copied back onto the main queue. This
prevents infinite loops since the main event queue will always be able
to properly drain.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(terminal): improve cursor refresh handling (#32596)</title>
<updated>2025-03-06T08:31:50+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>6256228+seandewar@users.noreply.github.com</email>
</author>
<published>2025-03-06T08:31:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=fa46441264b28e9272973ead7bea65f27868e94c'/>
<id>fa46441264b28e9272973ead7bea65f27868e94c</id>
<content type='text'>
Problem: terminal mode cursor refresh logic has too many edge cases where it
fails when events change curbuf.

Solution: change the logic. Introduce cursor_visible to TerminalState to more
reliably track if terminal mode has changed busy. Move visibility handling to
refresh_cursor and move its call in refresh_terminal to terminal_check to avoid
temporarily changed curbufs from influencing cursor state.

This has the effect of "debouncing" shape/visibility updates to once per
terminal state tick (with the final attributes taking effect, as expected). I
think this is OK, but as a result it may also be warranted to update when
redrawing during the same state tick (e.g: from events executing :redraw); this
can be added later, if wanted.

Also move previous tests to a more appropriate place.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: terminal mode cursor refresh logic has too many edge cases where it
fails when events change curbuf.

Solution: change the logic. Introduce cursor_visible to TerminalState to more
reliably track if terminal mode has changed busy. Move visibility handling to
refresh_cursor and move its call in refresh_terminal to terminal_check to avoid
temporarily changed curbufs from influencing cursor state.

This has the effect of "debouncing" shape/visibility updates to once per
terminal state tick (with the final attributes taking effect, as expected). I
think this is OK, but as a result it may also be warranted to update when
redrawing during the same state tick (e.g: from events executing :redraw); this
can be added later, if wanted.

Also move previous tests to a more appropriate place.</pre>
</div>
</content>
</entry>
<entry>
<title>feat(terminal)!: include cursor position in TermRequest event data (#31609)</title>
<updated>2025-03-05T15:45:22+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>greg@gpanders.com</email>
</author>
<published>2025-03-05T15:45:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=35e5307af25785ac90bd00f913fc0df5cf962db3'/>
<id>35e5307af25785ac90bd00f913fc0df5cf962db3</id>
<content type='text'>
When a plugin registers a TermRequest handler there is currently no way
for the handler to know where the terminal's cursor position was when
the sequence was received. This is often useful information, e.g. for
OSC 133 sequences which are used to annotate shell prompts.

Modify the event data for the TermRequest autocommand to be a table
instead of just a string. The "sequence" field of the table contains the
sequence string and the "cursor" field contains the cursor
position when the sequence was received.

To maintain consistency between TermRequest and TermResponse (and to
future proof the latter), TermResponse's event data is also updated to
be a table with a "sequence" field.

BREAKING CHANGE: event data for TermRequest and TermResponse is now a
table</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a plugin registers a TermRequest handler there is currently no way
for the handler to know where the terminal's cursor position was when
the sequence was received. This is often useful information, e.g. for
OSC 133 sequences which are used to annotate shell prompts.

Modify the event data for the TermRequest autocommand to be a table
instead of just a string. The "sequence" field of the table contains the
sequence string and the "cursor" field contains the cursor
position when the sequence was received.

To maintain consistency between TermRequest and TermResponse (and to
future proof the latter), TermResponse's event data is also updated to
be a table with a "sequence" field.

BREAKING CHANGE: event data for TermRequest and TermResponse is now a
table</pre>
</div>
</content>
</entry>
<entry>
<title>fix(terminal): avoid more `busy_start` lacking `busy_stop` (#32509)</title>
<updated>2025-02-19T10:47:44+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>6256228+seandewar@users.noreply.github.com</email>
</author>
<published>2025-02-19T10:47:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=f3ce67549c946815e64845f27f6f46f1aaeb5ec6'/>
<id>f3ce67549c946815e64845f27f6f46f1aaeb5ec6</id>
<content type='text'>
Problem: after #32458, it may still be possible for `busy_start` UI events to be
emitted without matching `busy_stop`s in the terminal.

Solution: do `terminal_enter`'s cursor visibility check immediately after
setting/restoring State so it occurs before events. This ensures that if pending
escape sequences are processed while in `terminal_enter`, the cursor's initial
visibility is set before `is_focused` is checked by `term_settermprop`.

As a result, we can move the call to `showmode` back to where it was originally.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: after #32458, it may still be possible for `busy_start` UI events to be
emitted without matching `busy_stop`s in the terminal.

Solution: do `terminal_enter`'s cursor visibility check immediately after
setting/restoring State so it occurs before events. This ensures that if pending
escape sequences are processed while in `terminal_enter`, the cursor's initial
visibility is set before `is_focused` is checked by `term_settermprop`.

As a result, we can move the call to `showmode` back to where it was originally.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(terminal): avoid mismatched `busy_start` without `busy_stop` (#32458)</title>
<updated>2025-02-15T17:25:48+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>6256228+seandewar@users.noreply.github.com</email>
</author>
<published>2025-02-15T17:25:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=a49f95d887a2425f11cb4a9b38f7b0039e4d837f'/>
<id>a49f95d887a2425f11cb4a9b38f7b0039e4d837f</id>
<content type='text'>
Problem: `showmode` in `terminal_enter` may cause `vpeekc` to process events,
which may handle pending escape sequences. If `CSI ? 25 l` is handled to hide
the cursor, it may remain hidden even after leaving terminal mode if both
`terminal_enter` and (indirectly) `showmode` call `ui_busy_start`, as there is
only one matching call to `ui_busy_stop` after leaving terminal mode.

Solution: let `terminal_enter` handle setting the initial visibility of the
cursor before calling `showmode`.

Closes #32456.

This simple solution assumes it isn't possible for e.g. `os_breakcheck` to be
called indirectly by something else before `terminal_enter` initially handles
cursor visibility and after it restores it, which I think is true.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: `showmode` in `terminal_enter` may cause `vpeekc` to process events,
which may handle pending escape sequences. If `CSI ? 25 l` is handled to hide
the cursor, it may remain hidden even after leaving terminal mode if both
`terminal_enter` and (indirectly) `showmode` call `ui_busy_start`, as there is
only one matching call to `ui_busy_stop` after leaving terminal mode.

Solution: let `terminal_enter` handle setting the initial visibility of the
cursor before calling `showmode`.

Closes #32456.

This simple solution assumes it isn't possible for e.g. `os_breakcheck` to be
called indirectly by something else before `terminal_enter` initially handles
cursor visibility and after it restores it, which I think is true.</pre>
</div>
</content>
</entry>
<entry>
<title>feat(term): trigger TermRequest for APC (#32407)</title>
<updated>2025-02-13T14:24:01+00:00</updated>
<author>
<name>Till Bungert</name>
<email>tillbungert@gmail.com</email>
</author>
<published>2025-02-13T14:24:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=93480f7fbaa5b4e5418d95dd35005daa6142dbb9'/>
<id>93480f7fbaa5b4e5418d95dd35005daa6142dbb9</id>
<content type='text'>
Co-authored-by: Gregory Anders &lt;greg@gpanders.com&gt;
Co-authored-by: zeertzjq &lt;zeertzjq@outlook.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Gregory Anders &lt;greg@gpanders.com&gt;
Co-authored-by: zeertzjq &lt;zeertzjq@outlook.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>fix(ui): Windows :detach is opt-in</title>
<updated>2025-02-10T17:56:11+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2025-02-10T10:55:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=a1906c23ddab6fa4d15bc5ceddee97df8034d8cb'/>
<id>a1906c23ddab6fa4d15bc5ceddee97df8034d8cb</id>
<content type='text'>
Problem:
On Windows, spawning the `nvim --embed` server with `detach=true` breaks
various `tt.setup_child_nvim` tests.

Solution:
Make this behavior opt-in with an env var, temporarily.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
On Windows, spawning the `nvim --embed` server with `detach=true` breaks
various `tt.setup_child_nvim` tests.

Solution:
Make this behavior opt-in with an env var, temporarily.
</pre>
</div>
</content>
</entry>
<entry>
<title>test: use --clean</title>
<updated>2025-02-10T17:56:11+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2025-02-10T10:36:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=69abeaad1d10a1f27b8d693c4204048bad4310f4'/>
<id>69abeaad1d10a1f27b8d693c4204048bad4310f4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
