From 86a89404be36fd0f6e9d60b6691217d8197eb4c4 Mon Sep 17 00:00:00 2001 From: ahkrr <44893716+ahkrr@users.noreply.github.com> Date: Thu, 11 Mar 2021 19:11:07 +0100 Subject: [PATCH] fix: unicode byte counting error #3150 (#3159) Co-authored-by: hk --- crates/nu-parser/src/parse.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/nu-parser/src/parse.rs b/crates/nu-parser/src/parse.rs index 8a465ae402..e83ec49ac9 100644 --- a/crates/nu-parser/src/parse.rs +++ b/crates/nu-parser/src/parse.rs @@ -388,7 +388,7 @@ fn parse_invocation( .item .chars() .skip(2) - .take(lite_arg.item.len() - 3) + .take(lite_arg.item.chars().count() - 3) .collect(); // We haven't done much with the inner string, so let's go ahead and work with it