@@ -5,7 +5,7 @@ use ratatui::layout::Rect;
5
5
use tracing:: warn;
6
6
use yazi_shared:: env_exists;
7
7
8
- use crate :: { Brand , Emulator , SHOWN , TMUX , WSL , drivers} ;
8
+ use crate :: { Brand , Emulator , Offset , SHOWN , TMUX , WSL , drivers} ;
9
9
10
10
#[ derive( Clone , Copy , PartialEq , Eq , Debug ) ]
11
11
pub enum Adapter {
@@ -35,18 +35,18 @@ impl Display for Adapter {
35
35
}
36
36
37
37
impl Adapter {
38
- pub async fn image_show ( self , path : & Path , max : Rect ) -> Result < Rect > {
38
+ pub async fn image_show ( self , path : & Path , max : Rect , offset : Option < Offset > ) -> Result < Rect > {
39
39
if max. is_empty ( ) {
40
40
return Ok ( Rect :: default ( ) ) ;
41
41
}
42
42
43
43
match self {
44
- Self :: Kgp => drivers:: Kgp :: image_show ( path, max) . await ,
45
- Self :: KgpOld => drivers:: KgpOld :: image_show ( path, max) . await ,
46
- Self :: Iip => drivers:: Iip :: image_show ( path, max) . await ,
47
- Self :: Sixel => drivers:: Sixel :: image_show ( path, max) . await ,
48
- Self :: X11 | Self :: Wayland => drivers:: Ueberzug :: image_show ( path, max) . await ,
49
- Self :: Chafa => drivers:: Chafa :: image_show ( path, max) . await ,
44
+ Self :: Kgp => drivers:: Kgp :: image_show ( path, max, offset ) . await ,
45
+ Self :: KgpOld => drivers:: KgpOld :: image_show ( path, max, offset ) . await ,
46
+ Self :: Iip => drivers:: Iip :: image_show ( path, max, offset ) . await ,
47
+ Self :: Sixel => drivers:: Sixel :: image_show ( path, max, offset ) . await ,
48
+ Self :: X11 | Self :: Wayland => drivers:: Ueberzug :: image_show ( path, max, offset ) . await ,
49
+ Self :: Chafa => drivers:: Chafa :: image_show ( path, max, offset ) . await ,
50
50
}
51
51
}
52
52
0 commit comments