Open ricardoseriani opened 1 month ago
I made some fixes to the behavior of Ctrl-Z earlier in https://github.com/sxyazi/yazi/pull/1307, please give it a try
I tried applying the PR locally, but I'm not really sure if this is the correct way:
git pull origin pull/1307/head:ctrl-z
git switch ctrl-z
cargo build --release --target=x86_64-unknown-linux-musl
./target/x86_64-unknown-linux-musl/release/yazi
Apparently, the PR was applied.
If what I was made is correct, unfortunately, the problem still persists.
What does the yazi --debug
output look like? Does it include the hash of that commit? Can you record a gif so I can see your steps and what happens?
yazi --debug
outputVideo record of the problem
https://github.com/user-attachments/assets/307cd69d-b780-4d90-a69c-c4c1ded71b21
Hi, I made a new PR, please try https://github.com/sxyazi/yazi/pull/1310
I tried it, and the problem still persists.
But now, when this occurs, I can press ctrl-z
to stop yazi and then send it back to foreground with fg
and it's back working again.
That's so weird, with https://github.com/sxyazi/yazi/pull/1310/commits/fa297b31c04ee1c1b2f26b3b4ebca8d4b533899e, I can't reproduce it on my Linux VM anymore, no matter how many times I try, it works fine for me.
https://github.com/user-attachments/assets/b7ad3d9d-426f-4f73-b13b-9a7a1ed27f13
Are you sure you're using that commit right? Did I miss any details to reproduce it?
I tried again and recorded this time.
https://github.com/user-attachments/assets/cec276a8-1e38-4799-8676-2d41f1921c25
I tried with xfce4-terminal (xfce4-terminal 0.8.10 (Xfce 4.16)) and the problem occurs in it too.
I known it's hard to make sure that it's fixed, because it's not always reproducible.
Please apply these two patches separately on top of that PR and see what happens:
--- yazi/yazi-fm/src/app/commands/resume.rs
+++ yazi/yazi-fm/src/app/commands/resume_new.rs
@@ -4,7 +4,6 @@
impl App {
pub(crate) fn resume(&mut self, _: Cmd) {
- self.cx.manager.active_mut().preview.reset_image();
self.term = Some(Term::start().unwrap());
// While the app resumes, it's possible that the terminal size has changed.
--- yazi/yazi-fm/src/app/commands/resume.rs
+++ yazi/yazi-fm/src/app/commands/resume_new.rs
@@ -4,13 +4,12 @@
impl App {
pub(crate) fn resume(&mut self, _: Cmd) {
- self.cx.manager.active_mut().preview.reset_image();
+ self.signals.resume(None);
+
self.term = Some(Term::start().unwrap());
// While the app resumes, it's possible that the terminal size has changed.
// We need to trigger a resize, and render the UI based on the resized area.
self.resize(());
-
- self.signals.resume(None);
}
}
I tried both separately, but it still doesn't work.
I have no idea then. After applying that PR, the issue completely disappeared for me, and before applying that PR, I could reproduce it with the Linux + WezTerm combo (it couldn't be reproduced on non-Linux systems or without WezTerm).
I'll keep it open for a while to see if anyone else encounters it and can provide more clues and help debug it.
What system are you running Yazi on?
Linux X11
What terminal are you running Yazi in?
wezterm 20240203-110809-5046fc22
yazi --debug
outputDid you try the latest nightly build to see if the problem got fixed?
Yes, and I updated the debug information above (
yazi --debug
) to the nightly that I triedDescribe the bug
When I press ctrl-z to suspend yazi and then run fg to bring it back to foreground, the window is "freeze/broken". This sometimes occurs, but not always, so you may need a few tries to reproduce.
Expected Behavior
Yazi should be working when it's back to foreground.
To Reproduce
run
yazi
pressctrl-z
runfg
to bring it back to foreground try usingyazi
normallyConfiguration
no config
Anything else?