File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " zellij-sessionizer"
3- version = " 0.2.0 "
3+ version = " 0.2.1 "
44edition = " 2021"
55description = " Zellij plugin to create sessions based on folder names"
66license = " MIT"
Original file line number Diff line number Diff line change @@ -38,13 +38,13 @@ impl DirList {
3838 }
3939
4040 pub fn handle_down ( & mut self ) {
41- if self . cursor < self . dirs . len ( ) . saturating_sub ( 1 ) {
41+ if self . cursor < self . filtered_dirs . len ( ) . saturating_sub ( 1 ) {
4242 self . cursor += 1 ;
4343 }
4444 }
4545
4646 pub fn get_selected ( & self ) -> Option < String > {
47- if self . cursor < self . dirs . len ( ) {
47+ if self . cursor < self . filtered_dirs . len ( ) {
4848 Some ( self . filtered_dirs [ self . cursor ] . clone ( ) )
4949 } else {
5050 None
Original file line number Diff line number Diff line change @@ -130,12 +130,13 @@ impl ZellijPlugin for State {
130130
131131 fn render ( & mut self , rows : usize , cols : usize ) {
132132 println ! ( ) ;
133- self . dirlist . render ( rows. saturating_sub ( 5 ) , cols) ;
134- println ! ( ) ;
133+ self . dirlist . render ( rows. saturating_sub ( 4 ) , cols) ;
135134 println ! ( ) ;
136135 self . textinput . render ( rows, cols) ;
137- println ! ( ) ;
138- println ! ( "{}" , self . debug) ;
136+ if !self . debug . is_empty ( ) {
137+ println ! ( ) ;
138+ println ! ( "{}" , self . debug) ;
139+ }
139140 }
140141}
141142
You can’t perform that action at this time.
0 commit comments