jeffreytse / zsh-vi-mode

💻 A better and friendly vi(vim) mode plugin for ZSH.
MIT License
2.99k stars 103 forks source link

"maximum nested function level reached" when with minimal prompt plugin #162

Open hissssst opened 2 years ago

hissssst commented 2 years ago

General information

Basic examination

Problem description

My prompt plugin works with some errors when with zsh-vi-mode

Reproduction steps

I've got it down to minimal config able to reproduce this

source <(antibody init)

antibody bundle subnixr/minimal
antibody bundle jeffreytse/zsh-vi-mode

Just open a shell with this config and call any command (like ls) and see something like

_mnml_zle-line-init:11: maximum nested function level reached; increase FUNCNEST?
mnml_ssh:1: maximum nested function level reached; increase FUNCNEST?
mnml_pyenv:1: maximum nested function level reached; increase FUNCNEST?
mnml_status:1: maximum nested function level reached; increase FUNCNEST?
mnml_keymap:1: maximum nested function level reached; increase FUNCNEST?
mnml_cwd:1: maximum nested function level reached; increase FUNCNEST?

Expected behavior

No errors

Comments

I am not sure whether it is zsh-vi-mode's or mininal's issue, but they work correctly when called independently from each other and this issue appears only when they're plugged in together.

Perhaps, you might have a clue where about where this bug resides

augustdolan commented 2 months ago

I experience this on oh-my-zsh with the imported theme, dracula

averagejoey2000 commented 3 weeks ago

I do not have the minimal prompt plugin installed. kitty issue screenshot I have the dracula theme as @augustdolan has mentioned This issue exists when the terminal is below 90 columns wide, including in tmux splits. This issue exists in and out of tmux and in multiple terminals, I tested with kitty and console. The issue also causes an extra line to be put in, as if I had hit enter twice, every time I execute a command.

Issue exists in this commit https://github.com/averagejoey2000/joeysdotfiles/commit/3a4ae2687d122883f2f6b284f787fc0cbe8eb6d1

Issue does not exist in this commit https://github.com/averagejoey2000/joeysdotfiles/commit/1c50fe4884b5f745a60363cb212567e264ca92d3

But then, of course, I don't get the improved vi mode. Old school vi mode still works, but with none of the improvements from the plugin, obviously.

image Issue is now fixed on my machine. I commented out the dracula/zsh plugin but not the oh my posh init line that calls the dracula config. I still get full dracula colors full oh-my-posh features, and full zsh-vi-mode features. Commit where everything is perfect: https://github.com/averagejoey2000/joeysdotfiles/commit/572d7058144c1be6c64441d3e69df98f00a13e67