on master help sign in
Make `r<tab>` and `f<tab>` work (#4817)
0e23e4fLennard Hofmann
helix-term/src/commands.rs+7
@@ -1131,6 +1131,10 @@ where
1131 doc!(cx.editor).line_ending.as_str().chars().next().unwrap()
1131 doc!(cx.editor).line_ending.as_str().chars().next().unwrap()
1132 }
1132 }
1133
1133
1134+ KeyEvent {
1135+ code: KeyCode::Tab, ..
1136+ } => '\t',
1137+
1134 KeyEvent {
1138 KeyEvent {
1135 code: KeyCode::Char(ch),
1139 code: KeyCode::Char(ch),
1136 ..
1140 ..
@@ -1277,6 +1281,9 @@ fn replace(cx: &mut Context) {
1277 code: KeyCode::Enter,
1281 code: KeyCode::Enter,
1278 ..
1282 ..
1279 } => Some(doc.line_ending.as_str()),
1283 } => Some(doc.line_ending.as_str()),
1284+ KeyEvent {
1285+ code: KeyCode::Tab, ..
1286+ } => Some("\t"),
1280 _ => None,
1287 _ => None,
1281 };
1288 };
1282
1289