From f889add815249564ebe6a641d0220a5a6f5d987c Mon Sep 17 00:00:00 2001 From: jfh Date: Tue, 24 Aug 2021 08:39:55 +0300 Subject: [PATCH] Fix panic (debug), no indend (release) in REPL. --- src/shell/helper.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shell/helper.rs b/src/shell/helper.rs index ade828ee1..82f71bb9b 100644 --- a/src/shell/helper.rs +++ b/src/shell/helper.rs @@ -161,7 +161,7 @@ cfg_if::cfg_if! { .complete_opt(&line[0..pos]) // as far as I can tell, there's no better way to do both completion // and indentation (or even just indentation) - .unwrap_or_else(|| (line.len(), vec!["\t".to_owned()]))) + .unwrap_or_else(|| (pos, vec!["\t".to_owned()]))) } }