marlonrichert / zsh-autocomplete

🤖 Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.
MIT License
5.39k stars 150 forks source link

ZLE widget error when creating terminal splits while using Powerlevel10k #479

Closed kidonng closed 2 years ago

kidonng commented 2 years ago

Failure to do so can and will result in your issue being closed without warning.

Environment

apple darwin21.3.0 zsh zsh-5.9-0-g73d3173

4c363ff (grafted, HEAD -> main, origin/main, origin/HEAD) Let `^_` exit menu and remove last completion

Steps to reproduce

  1. Enter test environment
  2. git clone --depth 1 -- https://github.com/romkatv/powerlevel10k
  3. source ~/powerlevel10k/powerlevel10k.zsh-theme
  4. Quit Powerlevel10k config wizard
  5. Enter ls -
  6. Press Tab to show completion
  7. Press to select a candidate
  8. Create terminal split
  9. See ZLE widget error

https://user-images.githubusercontent.com/44045911/188602839-aa0a1ecd-d80c-4c28-aa0e-f33749e86e01.mov

marlonrichert commented 2 years ago

Create terminal split

Again, no idea what that is. Please be more specific.

kidonng commented 2 years ago

I assume "split terminal" is a common way to express the idea, but let me try to put it more specifically.

  1. Concepts:

    kitty is capable of running multiple programs organized into tabs and windows. The top level of organization is the OS window. Each OS window consists of one or more tabs. Each tab consists of one or more kitty windows.

  2. In the demo, I have one OS window, one tab in it (tab bar is hidden), and initially one kitty window.

  3. As recorded in the bottom left corner, I press Command + Enter, which is the default shortcut to open a new (kitty) window on macOS.

  4. A new kitty window appears, taking up the bottom half of the vertical space (the thin green line is the separator).

  5. This bug appeared due to changes of window size.

If this sounds more confusing, I would like to kindly ask you to try reproducing it, or at least get familiar with (a similar) concept of Terminal multiplexer (I'm not using tmux or anything, it's just I can't find a credible source about this particular feature of terminal doing split windows).

marlonrichert commented 2 years ago

I know what a terminal multiplexer is, I just wanted what exactly you meant in your case, what you were using to split your terminal, so I can use the same to reproduce the problem. Thanks for explaining! This is all useful info.

marlonrichert commented 2 years ago

Can you run functions -t .autocomplete.down-line-or-select.zle-widget just before your final step to reproduce the bug? Then share the output here.

marlonrichert commented 2 years ago

Closing, since I haven't heard back from @kidonng.