Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

output messed up when programatically opening kitty window #11876

Open
k4lizen opened this issue Oct 13, 2024 · 0 comments
Open

output messed up when programatically opening kitty window #11876

k4lizen opened this issue Oct 13, 2024 · 0 comments
Labels
C-bug Category: This is a bug

Comments

@k4lizen
Copy link

k4lizen commented Oct 13, 2024

Summary

I'm trying to work around the fact that helix doesn't support a tree file picker and I'm looking at what people are doing here #8314, https://yazi-rs.github.io/docs/tips/#helix-with-zellij and have set it up with kitty terminal, but am getting really weird bugs.

helix_messedup.mp4

The two bugs are:

  1. when a new window opens next to helix the lines are wrong width (?)
  2. when I close the yazi window (without selecting file/folder) (with ctrl+c) helix scrolls up for some reason

If I move my mouse or focus the helix window when these bugs occur, they get fixed by themselves.

The relevant line in my config is:

[keys.normal.space]
e = ":sh kitten @ launch --cwd=current --no-response --location=before --bias=25 bash ~/.config/helix/yazi-picker.sh open"

and the runner file (yazi-picker.sh) is:

#!/usr/bin/env bash

# run yazi and get the selected file/folder
paths=$(yazi --chooser-file=/dev/stdout | while read -r; do printf "%q " "$REPLY"; done)

# find the helix window (that spawned yazi) in kitty 
win_id=$(kitten @ ls --match neighbor:right | jq '.[0].tabs[0].windows[0].id')

if [[ -n "$paths" ]]; then
  # if a file/folder was actually selected without quiting yazi
  kitten @ send-key --match id:$win_id escape
  kitten @ send-text --match id:$win_id ":$1 $paths"
  kitten @ send-key --match id:$win_id enter
  # kitten @ close-window
fi

Reproduction Steps

Repro:
Use the config line and file provided with kitty terminal and helix. allow_remote_control yes might be needed in the kitty.conf.

I expected this to happen:
No buggyness.
Instead, this happened:
Lots of buggyness.

Helix log

No response

Platform

Linux

Terminal Emulator

kitty

Installation Method

source

Helix Version

helix 24.3 (8a549b7)

@k4lizen k4lizen added the C-bug Category: This is a bug label Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

1 participant