Skip to content

fix: resolve issues with async editor#2150

Open
jubalh wants to merge 1 commit intomasterfrom
fix/2148
Open

fix: resolve issues with async editor#2150
jubalh wants to merge 1 commit intomasterfrom
fix/2148

Conversation

@jubalh
Copy link
Copy Markdown
Member

@jubalh jubalh commented Apr 11, 2026

If we build Profanity without GTK we dont iterate the context so we will never know when the editor exited. Calling g_main_context_iteration() or finally switching to GMainLoop fixes this.
So far calling tray_update() does this for us in GTK builds. So this went unnoticed.

The editor will inherit ignored signal handlers (SIGINT, SIGTSTP, SIGPIPE) from us. Neovim uses libuv which seems to check SIGINT on startup to determine whether the environment is interactive or not. We now reset these signals to SIG_DFL in the child process before execvp.

Profanity uses readline which still competed for terminal input with the editor. We only took care about other Profanity UI processes in our previous commit. This led to misordered characters in the editor.

In my tests with vim everything worked fine and these bugs were discovered when a user used neovim.

Fixes: #2148
Ref: 36ec2b0

If we build Profanity without GTK we dont iterate the context so we will
never know when the editor exited. Calling `g_main_context_iteration()`
or finally switching to GMainLoop fixes this.
So far calling `tray_update()` does this for us in GTK builds.
So this went unnoticed.

The editor will inherit ignored signal handlers (SIGINT, SIGTSTP, SIGPIPE)
from us. Neovim uses libuv which seems to check SIGINT on startup to
determine whether the environment is interactive or not.
We now reset these signals to SIG_DFL in the child process before execvp.

Profanity uses readline which still competed for terminal input with the
editor. We only took care about other Profanity UI processes in our
previous commit. This led to misordered characters in the editor.

In my tests with vim everything worked fine and these bugs were
discovered when a user used neovim.

Fixes: #2148
Ref: 36ec2b0
Signed-off-by: Michael Vetter <jubalh@iodoru.org>
@jubalh jubalh added this to the next milestone Apr 11, 2026
@jubalh jubalh self-assigned this Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Neovim unusable as editor

1 participant