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

Command + K can't kill buffer in OSX #281

Open
tlightsky opened this issue Apr 20, 2021 · 17 comments
Open

Command + K can't kill buffer in OSX #281

tlightsky opened this issue Apr 20, 2021 · 17 comments
Labels
compatibility Issues with VT/terminal compatibility darwin Darwin specific suspected bug

Comments

@tlightsky
Copy link

it will be cleared,
but get back when press enter to start a new line

@TheLostLambda
Copy link
Member

Thanks for giving Zellij a try! I'm personally a little unfamiliar with macos, that's more @qballer and @5c077m4n 's domain, but where are you expecting Command + K to kill a buffer? Are you using something like Emacs? Are you have this issue with a particular program?

@a-kenji
Copy link
Contributor

a-kenji commented Apr 20, 2021

I think its about the clear command on the terminal. Ctrl+L on Linux.

@tlightsky
This could also depend on your shell, can you please tell us what shell you are running?

@tlightsky
Copy link
Author

thanks for amazing fast reply,
I'm using iTerm2

@a-kenji
Copy link
Contributor

a-kenji commented Apr 20, 2021

Thank you! Can you also please check what output you get from:

echo $SHELL

@tlightsky
Copy link
Author

❯ echo $SHELL
/bin/zsh

@a-kenji
Copy link
Contributor

a-kenji commented Apr 20, 2021

Cheers!

@5c077m4n
Copy link
Contributor

Screen.Recording.2021-04-24.at.22.09.18.mov

@a-kenji I hope that the video here is clear, but I (with zsh in iTerm2 on macOS) had the same outputs both in "vanilla" zsh and in the zellij instance - in both I had to hit enter after the cmd+k to make the screen re-appear (and the cntl-L isn't affected)

@a-kenji
Copy link
Contributor

a-kenji commented Apr 25, 2021

@5c077m4n
So this might be an iTerm2 and zsh interaction?

@5c077m4n
Copy link
Contributor

@a-kenji Actually I think that it's a problem with iTerm2, as in Alacritty cmd+k works exactly like ctrl+l.
Plus in iTerm2 my 2 line prompt also disappears after cmd+k (even outside of zellij)

@a-kenji
Copy link
Contributor

a-kenji commented Apr 25, 2021

@5c077m4n
Thank you!

@tlightsky.
It seems that this is an iterm2 issue, can you confirm that?
Do you have a different terminal emulator, where you can try that out?

@tlightsky
Copy link
Author

try with osx native terminal:

❯ zellij --version                                                                                                                                      
zellij 0.5.0 

Kapture 2021-04-26 at 09 52 40

clear works fine,
Cmd+K can clear, but will appear when press any key

@a-kenji
Copy link
Contributor

a-kenji commented Apr 27, 2021

@tlightsky Is that still and issue on 0.5.1 ?

@tlightsky
Copy link
Author

@a-kenji
yes, just tried with 0.5.1

@a-kenji
Copy link
Contributor

a-kenji commented Apr 27, 2021

@tlightsky thanks!

@imsnif
Copy link
Member

imsnif commented May 14, 2021

@tlightsky - I made some input fixes in 0.10.0 as well as properly handling some reporting signals coming from the terminal. Could you give it a try?

If this did not fix it for you, I'd like to ask your help debugging this. It would be useful for me to get some log files so that I can reproduce this problem locally and get to the bottom of it. Could you follow the instructions here and attach the relevant files (especially the pane logs, eg. zellij-3.log): https://github.com/zellij-org/zellij/blob/main/.github/ISSUE_TEMPLATE/bug_report.md

Thanks!

@imsnif imsnif added the compatibility Issues with VT/terminal compatibility label May 14, 2021
@fcoury
Copy link

fcoury commented Oct 1, 2022

Just wanted to say that this still happens, both when using the native terminal and when using iTerm.

Is there an action that we could map to clear the buffer like Cmd+K on macOS does?

I opened a discussion item around it here:

#1767

And this issue seems to be related.

The expected behavior is moving the last line on the current buffer to the first and clear everything out below it.

@fcoury
Copy link

fcoury commented Oct 1, 2022

Alright, as I mentioned on the discussion thread, I have been able to implement something that behaves exactly like Cmd+K on iTerm and Terminal.app. I also added a configuration option to optimize the offset when clearing the panel. In this case I mapped it on my configuration file as Ctrl+P Ctrl+L.

    pane:
        - action: [SoftClear, SwitchToMode: Normal,]
          key: [Ctrl: 'l']
Screen.Recording.2022-10-01.at.08.16.02.PM.mp4

Would love to get some feedback on the PR #1768.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Issues with VT/terminal compatibility darwin Darwin specific suspected bug
Projects
None yet
Development

No branches or pull requests

6 participants