-
-
Notifications
You must be signed in to change notification settings - Fork 593
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
Add word motions to text input #1256
Conversation
this does not work on macos |
I have tested this on Windows and Linux (WSL). Unfortunately I don't have access to a macOS to test this. Can you tell me how exactly this is not working? The only platform dependent code I think might not be working is the |
can you please record how this should look like? |
@extrawurst I recorded it inside visual studio code for the keystrokes overlay. I notice that gitui.mp4 |
it breaks on unicode text with multibyte content, try some emojis. it will run into some endless loop. edit: try this commit message |
106118f
to
803f4d1
Compare
@extrawurst the infinite loop is fixed. |
} | ||
return Ok(EventState::Consumed); | ||
} | ||
KeyCode::Backspace | KeyCode::Char('w') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am on the fence about the special case of ctrl+w
. I am probably going to remove it for now. its hard to customize this way and I am not aware this being some standard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know, Ctrl-W is the standart shortcut for "delete word" in a linux terminal (Ctrl-Delete don't work).
Because gitui is a terminal app, I tought this shortcut would be pertinent.
Vim, for example, has the same shortcut (it is where I learned about it).
also the changelog entry is still missing |
CHANGELOG.md
Outdated
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
* submodules support ([#1087](https://github.com/extrawurst/gitui/issues/1087)) | |||
* customizable `cmdbar_bg` theme color & screen spanning selected line bg [[@gigitsu](https://github.com/gigitsu)] ([#1299](https://github.com/extrawurst/gitui/pull/1299)) | |||
* use filewatcher instead of polling updates ([#1](https://github.com/extrawurst/gitui/issues/1)) | |||
* word motions to text input ([#1256](https://github.com/extrawurst/gitui/issues/1256)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see the format of other contributions please - your handle is missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not much left to do. could you record a nice gif we can put in the changelog of the new functionality?
I don't have a easy recording workflow setup. |
Thanks for implementing this! |
It changes the following:
Ctrl-Left
,Ctrl-Right
,Ctrl-Backspace
/Ctrl-W
andCtrl-Delete
. A word motion move/delete until the next/previous start of a word. A word is being defined as a continuous sequence of alphanumeric characters.I followed the checklist:
make check
without errors