Skip to content

Commit

Permalink
fix: rebase menu opening after closing Neovim
Browse files Browse the repository at this point in the history
It seems Neovim would write terminal codes to stderr.
These were captured by Gitu and then printed back into the
terminal as part of the result, triggering a sequence of key-press
events to be read by Gitu, opening up the rebase menu.

Yikes.

relates to: #318
  • Loading branch information
altsem committed Feb 19, 2025
1 parent d75614e commit 656d4e0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
19 changes: 19 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ tree-sitter-ocaml = "=0.20.4"
tree-sitter-html = "=0.20.0"
tree-sitter-elixir = "=0.1.1"
regex = "1.11.1"
strip-ansi-escapes = "0.2.1"
2 changes: 1 addition & 1 deletion src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ impl State {
let child = cmd.spawn()?;

let out = child.wait_with_output()?;
let out_utf8 = String::from_utf8(out.stderr.clone())
let out_utf8 = String::from_utf8(strip_ansi_escapes::strip(out.stderr.clone()))
.expect("Error turning command output to String")
.into();

Expand Down

0 comments on commit 656d4e0

Please sign in to comment.