diff options
-rw-r--r-- | cli/tools/repl/editor.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cli/tools/repl/editor.rs b/cli/tools/repl/editor.rs index e518a8735..1024ef201 100644 --- a/cli/tools/repl/editor.rs +++ b/cli/tools/repl/editor.rs @@ -423,7 +423,13 @@ impl ConditionalEventHandler for TabEventHandler { .filter(|c| c.is_whitespace()) .is_some() { - Some(Cmd::Insert(n, "\t".into())) + if cfg!(target_os = "windows") { + // Inserting a tab is broken in windows with rustyline + // use 4 spaces as a workaround for now + Some(Cmd::Insert(n, " ".into())) + } else { + Some(Cmd::Insert(n, "\t".into())) + } } else { None // default complete } |