Skip to content

Commit

Permalink
Fix after upgrade of crossterm
Browse files Browse the repository at this point in the history
Summary:
[Bugreport](https://fb.workplace.com/groups/buck2users/posts/3477532612503095). Caused by crossterm upgrade D48118707.

Crossterm version 0.24.0 includes [strange change](crossterm-rs/crossterm@0a435e6#diff-d652bc172cf95622c9c34f43bd6ed9a6c27f042945f710cb9025cae7b12dd579L179-L185):

They say: "Most terminals default 0 argument to 1". OK. Then why revert cross-terminal behavior to terminal-specific?

This diff applies reverses this this crossterm change in superconsole.

Reviewed By: ndmitchell, JakobDegen

Differential Revision: D48165006

fbshipit-source-id: 3569c5947809f1908c35415922ef9640750bfdff
  • Loading branch information
stepancheg authored and facebook-github-bot committed Aug 8, 2023
1 parent 3558c0a commit d7c93ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/canvas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ impl Canvas {
/// This is used to clear the scratch area so that any possibly emitted messages can write over it.
pub(crate) fn move_up(&self, writer: &mut Vec<u8>) -> anyhow::Result<()> {
let len = self.last_lines.take();
writer.queue(MoveUp(len))?;
if len != 0 {
writer.queue(MoveUp(len))?;
}
writer.queue(MoveToColumn(0))?;

Ok(())
Expand Down

0 comments on commit d7c93ad

Please sign in to comment.