zsh-autocomplete icon indicating copy to clipboard operation
zsh-autocomplete copied to clipboard

ZLE widget error when creating terminal splits while using Powerlevel10k

Open kidonng opened this issue 1 year ago • 4 comments

  • [x] I have carefully read all of the instructions in this issue template.
  • [x] I have carried them out to the letter.

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
  • Operating system: macOS
  • Terminal emulator: kitty
  • [x] I have filled out the fields above.
  • [x] I have ran the commands in the code block above.
  • [x] I have pasted their output into the same block.

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

  • [x] I have run the code block above to create a test environment.
  • [x] I have reproduced my problem in this environment in the most minimal way possible.
  • [x] I have copy-pasted my entire test session into the same code block.

kidonng avatar Sep 06 '22 09:09 kidonng

Create terminal split

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

marlonrichert avatar Sep 08 '22 04:09 marlonrichert

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).

kidonng avatar Sep 08 '22 05:09 kidonng

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 avatar Sep 08 '22 05:09 marlonrichert

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 avatar Sep 08 '22 05:09 marlonrichert

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

marlonrichert avatar Oct 24 '22 14:10 marlonrichert