File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ impl<'vm> RustylineReadline<'vm> {
106106 let mut repl = Editor :: with_config (
107107 Config :: builder ( )
108108 . completion_type ( CompletionType :: List )
109+ . tab_stop ( 4 )
109110 . build ( ) ,
110111 ) ;
111112 repl. set_helper ( Some ( ShellHelper :: new ( vm, scope) ) ) ;
Original file line number Diff line number Diff line change @@ -155,7 +155,11 @@ impl Completer for ShellHelper<'_> {
155155 if pos != line. len ( ) {
156156 return Ok ( ( 0 , vec ! [ ] ) ) ;
157157 }
158- Ok ( self . complete_opt ( line) . unwrap_or ( ( 0 , vec ! [ ] ) ) )
158+ Ok ( self
159+ . complete_opt ( line)
160+ // as far as I can tell, there's no better way to do both completion
161+ // and indentation (or even just indentation)
162+ . unwrap_or_else ( || ( line. len ( ) , vec ! [ " " . to_string( ) ] ) ) )
159163 }
160164}
161165
You can’t perform that action at this time.
0 commit comments