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

tui textarea #2051

Merged
merged 8 commits into from
Feb 18, 2024
Merged

tui textarea #2051

merged 8 commits into from
Feb 18, 2024

Conversation

pm100
Copy link
Contributor

@pm100 pm100 commented Feb 15, 2024

new PR for #1662 - the old one was getting cluttered

OK. we are close :-)

I did everything you said.

Notes:

Should stash msg dialog be multi or single? I made it (and I see you did too) single but I think it should be multiple. Not sure tho - isnt it another commit style message? If multiple I need to change the plumbing around it too.

The defaults are Enter = commit, ctrl-r = newline.

I have tested both these key configs

(
commit: Some((code:Char('o') , modifiers:"CONTROL")),
newline: Some((code:Enter, modifiers:"NONE")),
)

which is the one you asked for at the start

and

(
commit: Some((code:Enter , modifiers:"NONE")),
newline: Some((code:Enter, modifiers:"SHIFT")),
)

Which is what I originally had but doesnt work on a mac - as you found out.

@pm100
Copy link
Contributor Author

pm100 commented Feb 15, 2024

One topic not discussed is the cut and paste behavior.

  • tta today does not support clipboard. Long, long debate about how it should work is still open there. add os clipboard support rhysd/tui-textarea#50
  • tta supports its own yank buffer. Which is probably not very useful here (we are not vim). So none of those key strokes are wired up at the moment in gitui
  • paste from OS clipboard works in most cases - in fact its hard to get ctrl-v not to work - ie to get it passed to the app. The terminal just dumb types the keystrokes, tta does not see it as a paste.
  • I know the internals of tta and they expose enough bits so that I can make cut and copy copy to the clipboard
  • you intercept ctrl-c to mean shutdown now. It might be better to suspend that while tta is shown in order to allow 'copy'

For now, lets wrap this up as is. I will raise a new issue for this

@extrawurst
Copy link
Owner

@pm100 thanks for keeping on this one! its good to go. i might change the default, I still feel enter should be default-newline. but now everything can be configured however you like it

@extrawurst extrawurst merged commit b9a2e13 into extrawurst:master Feb 18, 2024
18 checks passed
@pm100 pm100 deleted the tta4 branch February 18, 2024 23:06
extrawurst pushed a commit that referenced this pull request Feb 20, 2024
IndianBoy42 pushed a commit to IndianBoy42/gitui that referenced this pull request Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants