diff --git a/README.md b/README.md index 4a57a7d..1aca867 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ magic-enter =========== -A fork of the magic enter feature from [subnixr's minimal] prompt theme. -Shown when there is no command and user presses ENTER. +A fork of the magic enter feature from [subnixr's minimal] prompt theme. Shown +when there is no command at the start of a command line and user presses ENTER. What does it show? ------------------ diff --git a/init.zsh b/init.zsh index 4e3f1e8..bb8d2be 100644 --- a/init.zsh +++ b/init.zsh @@ -6,7 +6,7 @@ _prompt_mnml_precmd() { } _prompt_mnml_buffer-empty() { - if [[ -z ${BUFFER} ]]; then + if [[ -z ${BUFFER} && ${CONTEXT} == start ]]; then # draw infoline if (( MNML_LAST_ERR )) print -Pn '%F{${MNML_ERR_COLOR}}${MNML_LAST_ERR} ' print -Pn '%(1j.%F{244}%j%f& .)%F{244}%n%f@%F{244}%m%f:'