@ -984,14 +984,12 @@ mod cmd {
let style = match args . get ( 0 ) {
let style = match args . get ( 0 ) {
Some ( arg ) if "tabs" . starts_with ( & arg . to_lowercase ( ) ) = > Some ( Tabs ) ,
Some ( arg ) if "tabs" . starts_with ( & arg . to_lowercase ( ) ) = > Some ( Tabs ) ,
Some ( arg ) if arg . len ( ) = = 1 = > {
Some ( & "0" ) = > Some ( Tabs ) ,
let ch = arg . chars ( ) . next ( ) . unwrap ( ) ;
Some ( arg ) = > arg
if ( '1' ..= '8' ) . contains ( & ch ) {
. parse ::< u8 > ( )
Some ( Spaces ( ch . to_digit ( 10 ) . unwrap ( ) as u8 ) )
. ok ( )
} else {
. filter ( | n | ( 1 ..= 8 ) . contains ( n ) )
None
. map ( Spaces ) ,
}
}
_ = > None ,
_ = > None ,
} ;
} ;
@ -1166,7 +1164,7 @@ mod cmd {
completer : None ,
completer : None ,
} ,
} ,
Command {
Command {
name : "indent _ style",
name : "indent - style",
alias : None ,
alias : None ,
doc : "Set the indentation style for editing. ('t' for tabs or 1-8 for number of spaces.)" ,
doc : "Set the indentation style for editing. ('t' for tabs or 1-8 for number of spaces.)" ,
fun : set_indent_style ,
fun : set_indent_style ,