Current behavior
As shown in the picture, sometimes when tab is pressed, the shell duplicates the first two character of the command and is not possible to delete them.
I follow an issue that advice to remove non-ascii character as SPACESHIP_CHAR_SYMBOL (I used to put a lambda there), so I put "~> ", the problem seems to be solved, but it is clearly not.
Expected behavior
Not to happen
.zshrc)# Spaceship prompt customizzation
SPACESHIP_EXEC_TIME_SHOW=true
SPACESHIP_CHAR_SYMBOL="~> "
#SPACESHIP_CHAR_SYMBOL="λ"
SPACESHIP_USER_COLOR=blue
SPACESHIP_USER_SHOW=always
SPACESHIP_HOST_SHOW=always
SPACESHIP_HOST_COLOR=green
SPACESHIP_EXIT_CODE_SHOW=true
SPACESHIP_EXIT_CODE_SYMBOL="✘ "
SPACESHIP_DIR_TRUNC=5 # all
SPACESHIP_GIT_BRANCH_COLOR=red
SPACESHIP_GIT_STATUS_COLOR=red
SPACESHIP_PROMPT_ORDER=(
time # Time stamps section
user # Username section
host # Hostname section
dir # Current directory section
git # Git section (git_branch + git_status)
hg # Mercurial section (hg_branch + hg_status)
package # Package version
node # Node.js section
ruby # Ruby section
elixir # Elixir section
xcode # Xcode section
swift # Swift section
golang # Go section
php # PHP section
rust # Rust section
haskell # Haskell Stack section
julia # Julia section
docker # Docker section
aws # Amazon Web Services section
venv # virtualenv section
conda # conda virtualenv section
pyenv # Pyenv section
dotnet # .NET section
ember # Ember.js section
kubecontext # Kubectl context section
terraform # Terraform workspace section
exec_time # Execution time
line_sep # Line break
battery # Battery level and status
vi_mode # Vi-mode indicator
jobs # Background jobs indicator
exit_code # Exit code section
char # Prompt character
)
Spaceship version: 3.11.1 (use echo $SPACESHIP_VERSION)
Zsh version: zsh 5.7.1 (x86_64-pc-linux-gnu)
Zsh framework: None
Zsh plugin manager: None
Terminal emulator: Deepin Terminal
Operating system: Arch Linux

Possible solution
Hi found out that the issue appear only when the previous command fails, so when there is ✘ 130 ~> at the start of the line .
Seems to be fixed removing the ✘ character. There is a way to use this type of character?
I think this is an issue with zsh itself, this issue solved the problem for me by setting export LC_CTYPE=en_US.UTF-8 in my zshrc.
@SkonTeam thanks... this was driving me nuts and couldn't find a solution until your posted this.
Most helpful comment
I think this is an issue with zsh itself, this issue solved the problem for me by setting
export LC_CTYPE=en_US.UTF-8in my zshrc.