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 {
2121
2222pub fn get_best_backend ( ) -> Option < Box < dyn ImageBackend > > {
2323 #[ 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 ( ) {
2527 Some ( Box :: new ( kitty:: KittyBackend :: new ( ) ) )
2628 } else if iterm:: ITermBackend :: supported ( ) {
2729 Some ( Box :: new ( iterm:: ITermBackend :: new ( ) ) )
28- } else if sixel:: SixelBackend :: supported ( ) {
29- Some ( Box :: new ( sixel:: SixelBackend :: new ( ) ) )
3030 } else {
3131 None
3232 }
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ impl super::ImageBackend for SixelBackend {
160160 }
161161 image_data. extend ( b"\x1B \\ " ) ;
162162
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
164164 image_data. extend ( format ! ( "\x1B [{}C" , image_columns as u32 + 1 ) . as_bytes ( ) ) ; // move cursor to top-right corner of image
165165 let mut i = 0 ;
166166 for line in & lines {
You can’t perform that action at this time.
0 commit comments