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

bindable control characters Ctrl-C, Ctrl-V, Ctrl-S, Ctrl-@, hardcode readline Ctrl-C #619

Merged
merged 1 commit into from
Jun 28, 2017

Conversation

rolandwalker
Copy link
Contributor

@rolandwalker rolandwalker commented Jun 26, 2017

  • Ctrl-C, Ctrl-V, Ctrl-S would previously have been bindable in the main UI only if the user did some unusual things with stty before executing tig
  • switching to raw() mode requires a special case to preserve prior Ctrl-Z behavior
  • C-@ (NUL) is a valid key as far as ncurses is concerned, and useful as a translation of Ctrl-<Space>
  • bindings at the readline prompt are affected by this PR in that eg Ctrl-S becomes available, but the user still must configure those keys separately in ~/.inputrc: doc that
  • Ctrl-C at the readline prompt is a special case and cannot be bound in ~/.inputrc; however we can absorb the SIGINT to get intuitive "abort input" behavior.
  • bind Ctrl-C to quit by default in the main UI, to emulate previous behavior

The Ctrl-C in readline behavior has a more natural look after #618.
Fixes #583

@rolandwalker rolandwalker force-pushed the more-control-character-bindings branch from 1a9d547 to da99e4a Compare June 26, 2017 20:49
* Ctrl-C/V/S would previously have been bindable in the main UI only if
  the user did some unusual things with stty before execution
* raw() mode requires a special case to preserve Ctrl-Z behavior
* C-@ (NUL) is a valid key, and useful as a translation of Ctrl-<Space>
* bindings at the readline prompt are affected by this in that eg Ctrl-S
  becomes available, but the user still must configure those keys
  separately in ~/.inputrc: doc that
* Ctrl-C at the readline prompt is a special case and cannot be bound;
  however we can absorb the SIGINT to get intuitive "abort input"
  behavior
* bind Ctrl-C to quit by default
@rolandwalker rolandwalker force-pushed the more-control-character-bindings branch from da99e4a to 167d59e Compare June 27, 2017 01:13
@@ -545,6 +545,9 @@ the keybindings for the *generic* keymap, and last the default keybindings.
Thus, the view keybindings override the generic keybindings which override the
built-in keybindings.

Keybindings at the line-entry prompt are typically governed by the readline
library, and are configured separately in `~/.inputrc`. See 'readline(1)'.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jonas
Copy link
Owner

jonas commented Jun 28, 2017

Thank you for the detailed commit message. My personal setup and usage of the terminal is too basic to ever have noticed these limitations. It makes sense to use raw and the impact in added complexity is limited.

@jonas jonas merged commit 60fd253 into jonas:master Jun 28, 2017
@rolandwalker rolandwalker deleted the more-control-character-bindings branch June 28, 2017 02:37
@jonas jonas modified the milestone: tig-2.3 Jul 8, 2017
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.

3 participants