diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-06-13 21:11:12 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-06-13 21:11:12 +0200 |
commit | b3be18a0bfb55135135c9769ac531c098ca4d26c (patch) | |
tree | b3c94db6f416c00b3cc53e58528432c4858eaed9 | |
parent | fix(yt/storage/migrate): Correct the two to three migration script (diff) | |
download | yt-b3be18a0bfb55135135c9769ac531c098ca4d26c.zip |
fix(yt/watch/playlist): Workaround terminals, that treat 0 as 1
Diffstat (limited to '')
-rw-r--r-- | yt/src/watch/playlist.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/yt/src/watch/playlist.rs b/yt/src/watch/playlist.rs index 6ac8b12..5be46ce 100644 --- a/yt/src/watch/playlist.rs +++ b/yt/src/watch/playlist.rs @@ -38,7 +38,11 @@ fn erase_in_display_from_cursor() { print!("{CSI}0J"); } fn cursor_up(number: usize) { - print!("{CSI}{number}A"); + // HACK(@bpeetz): The default is `1` and running this command with a + // number of `0` results in it using the default (i.e., `1`) <2025-03-25> + if number != 0 { + print!("{CSI}{number}A"); + } } // }}} |