File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -106,19 +106,19 @@ impl Runtime {
106
106
eprintln ! ( "{}" , serde_json:: to_string( & diag) . unwrap( ) ) ;
107
107
}
108
108
}
109
- // Autofix use history.
110
- if let Some ( & last) = context. history . get ( & icon. codepoint ) {
111
- cprintln ! ( "# Auto fix it using last input '{}'" . green, last) ;
112
- ch = last;
113
- // Autofix use replacing.
114
- } else if let Some ( new) = self . try_replace ( context, icon) {
115
- cprintln ! ( "# Auto replace it with '{}'" . green, new) ;
116
- ch = new;
117
- } else {
109
+ if does_fix {
110
+ // Push all non-patched content.
111
+ let res = result. get_or_insert_with ( || content[ ..start] . to_owned ( ) ) ;
112
+ // Autofix use history.
113
+ if let Some ( & last) = context. history . get ( & icon. codepoint ) {
114
+ cprintln ! ( "# Auto fix it using last input '{}'" . green, last) ;
115
+ ch = last;
116
+ // Autofix use replacing.
117
+ } else if let Some ( new) = self . try_replace ( context, icon) {
118
+ cprintln ! ( "# Auto replace it with '{}'" . green, new) ;
119
+ ch = new;
118
120
// Input a new icon
119
- if does_fix {
120
- // Push all non-patched content.
121
- let res = result. get_or_insert_with ( || content[ ..start] . to_owned ( ) ) ;
121
+ } else {
122
122
match self . prompt_input_icon ( Some ( candidates. get ( ) ?) ) {
123
123
Ok ( Some ( new) ) => {
124
124
context. history . insert ( icon. codepoint , new) ;
You can’t perform that action at this time.
0 commit comments