-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix: parse lf as newline separate from cr as enter #3233
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
base: dev
Are you sure you want to change the base?
Conversation
|
This works for the ghostty setup with Unfortunately I couldn't think of a straightforward way to handle the I've confirmed this is working on Linux with ghostty, appreciate anyone else's sanity check on Windows or Mac in particular. |
|
Also this is very closely modeled off of the existing implementation for CR vs ctrl+M Please correct all details I might have misunderstood and copied from that implementation! |
|
Going to test it |
|
So what terminal(s) does this work in that didn't before? just to be clear? |
|
In ghostty, with all operating systems (in theory), the Claude-modified config that people often have: would lead to OpenCode ignoring shift enter newlines. Now after this PR, when new users come to OpenCode with this config (or any other config for a line feed character), shift+enter newline still works EDIT: in theory, this could also be the case for WezTerm, VSCode terminal, or Sublime terminal (just going by the Claude docs — those are other terminals they try and modify keybinds for) |
|
@CSRessel hm if I put that in my ghostty config, restart ghostty, and run opencode, shift enter already works Could it be another terminal it is an issue for? I also tested in a few other teminals and I can't seem to see any difference from these changes and latest opencode, just wanna be sure I understand the change and what it solves Sorry for continuous reviewing I just wanna understand what is being solved & where |
|
also claude was doing the |
|
No you're spot on that OpenCode does work for shift+enter with the config I mentioned above; I just confirmed your result on my machine. I'm not sure if I was previously having this issue with an earlier version of OpenCode, or the different config of I can think some more about if it's possible to cleanly support the |
|
that'd be awesome thank u |
|
I revisited this last night, and figured out how I think Since the go TUI code is being deprecated anyway I'm inclined to close this, unless it's a very straightforward process to test out go parse changes? |
|
@CSRessel if you run Feel free to close if you prefer |
relates to: #1505