Allow jumping between words on the input line #71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow jumping between words on the input line when the focus is on it, with key combinations 'Command + Left' and 'Command + Right', instead of collapsing or expanding the channel list for the current server.
The later bindings were taking precedence even when the focus was on the input line (the BTextView to type IRC messages the user wants to send).
With the changes on this commit, when the focus is on the input line, these key combinations correctly move to the start of the current word or the previous word, or to the end of the current word or the next word. And when the focus is anywhere else, the behavior before this commit is replicated.
And the combinations 'Command + Shift + Left' and 'Command + Shift + Right' were also done to work correctly, moving the selection on the input line between words.
As the operation of expanding the channel list is harmless to the user (it will keep showing the server messages), and the collapse operation opens the server messages screen; changes the focus to the input line and moves its cursor to its end, 'Command + Right' will also expand the channel list if the cursor is at the end of the input line. This way the operation of collapsing the channel list can be intuitively undone by pressing 'Command + Right' right afterwards.
The opposite WAS NOT implemented, i.e. collapsing the channel list with 'Command + Left' when the cursor is at the start of the input line, because the collapsing operation hides the current channel messages (it's not harmless to the user's workflow).