File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -21,12 +21,12 @@ pub trait ImageBackend {
21
21
22
22
pub fn get_best_backend ( ) -> Option < Box < dyn ImageBackend > > {
23
23
#[ cfg( not( windows) ) ]
24
- if kitty:: KittyBackend :: supported ( ) {
24
+ if sixel:: SixelBackend :: supported ( ) {
25
+ Some ( Box :: new ( sixel:: SixelBackend :: new ( ) ) )
26
+ } else if kitty:: KittyBackend :: supported ( ) {
25
27
Some ( Box :: new ( kitty:: KittyBackend :: new ( ) ) )
26
28
} else if iterm:: ITermBackend :: supported ( ) {
27
29
Some ( Box :: new ( iterm:: ITermBackend :: new ( ) ) )
28
- } else if sixel:: SixelBackend :: supported ( ) {
29
- Some ( Box :: new ( sixel:: SixelBackend :: new ( ) ) )
30
30
} else {
31
31
None
32
32
}
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ impl super::ImageBackend for SixelBackend {
160
160
}
161
161
image_data. extend ( b"\x1B \\ " ) ;
162
162
163
- image_data. extend ( format ! ( "\x1B [{}A" , image_rows as u32 ) . as_bytes ( ) ) ; // move cursor to top-left corner
163
+ image_data. extend ( format ! ( "\x1B [{}A" , image_rows as u32 - 1 ) . as_bytes ( ) ) ; // move cursor to top-left corner
164
164
image_data. extend ( format ! ( "\x1B [{}C" , image_columns as u32 + 1 ) . as_bytes ( ) ) ; // move cursor to top-right corner of image
165
165
let mut i = 0 ;
166
166
for line in & lines {
You can’t perform that action at this time.
0 commit comments