Closed sevagh closed 7 years ago
Same behavior observed in alacritty and gnome-terminal (with or without tmux).
any idea what
Nay, besides the fact that your term might not support ANSI truecolour escapes.
reset the terminal
I mean I don't use Linux much but reset
probably works right
Yeah, reset
works. The termimage
binary (cargo install termimage
) has the same behavior, so it's not me incorrectly using the library. I'll do some poking around regarding truecolor support, thanks.
Well I mean yeah the exec is just an iface to the library, it'd be weird if it didn't happen there. Oh and please do report back when you have some data about truecolourness.
So the image displays. Just mangles everything afterwards until I reset
.
Define "mangles"?
Everything I type subsequently, or that my program outputs to stdout, is hidden. Here I typed ls
and enter a few times and it magically "recovered" (but my program exit):
I just checked with a friend and it works fine for him. Closing this as a bug with my own setup.
Thanks for the help, cool library!
Cheers, mate
Actually figured it out. Adding this helps:
ops::write_ansi_truecolor(out, &resized);
writeln!(out, "\x1b[0m").expect("Couldn't write to stdout");
\x1b[0m
is Rust's equivalent of \033[0m
.
Reset ANSI attr printed in v0.3.2
.
Hello,
I'm trying to use this in a crate where I have my own shell, and I want to output text and images side by side.
After calling
write_ansi_truecolor
once, an image successfully displays (and I can print more images), my terminal goes all wonky and writing to stdout/typing input from my keyboard does nothing until I type reset or exit the terminal.Example:
=>
Any way to reset the terminal after outputting an image? Or any idea what's going on?
Thanks.