altsem / altsem/gitu

After returning from EDITOR alternate screen is not used

Open
#398 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2.9k
Forks
164
PR merge metrics
No merged PRs in 30d

Description

Thanks for maintaining gitu!

When I run gitu and hit q, everything works as expected, i.e. gitu opens the alternate screen and then runs the TUI, and on hitting q returns back to the original screen.

However, when I open vim for any reason in gitu, and then return to gitu and then exit, it seems to remain in the alternate screen.

This is easier to see what is going on with a demo:

https://github.com/user-attachments/assets/cc51aac7-e326-4325-8e79-34f045840390

The first time I exit gitu, it works as expected. The second time I exit gitu (after opening nvim), the cursor is at the bottom of the screen with a % printed.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the sequence described: run gitu, exit, open vim or nvim inside gitu, return, and exit again. Trace the terminal alternate-screen lifecycle around those transitions and compare it with the first exit. Done means both exit paths restore the original screen and cursor without leaving a % prompt marker.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.