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

Editor Focus and Enter Key Behaviour #412

Merged
merged 3 commits into from Aug 16, 2020
Merged

Editor Focus and Enter Key Behaviour #412

merged 3 commits into from Aug 16, 2020

Conversation

vkbo
Copy link
Owner

@vkbo vkbo commented Aug 16, 2020

This PR fixes a few clumsy issues with how the tab and enter keys work in the editor panel.

Main Fix

The Qt widget itself disables the tab key as a focus changing key, which makes sense since you want to be able to type tabs. However, since the search box sits on top of the editor, the tab key would still write to the text editor even if the search box had focus.

Previously, this was solved by blocking the tab key entirely when the search box was in focus, but not the replace box. This has now been changed to block the focus change event itself when the editor is in focus, and alternate between focus and replace when it's not.

The return AND enter keys are now properly captured to move the search forward, and only those keys are blocked.

Additional Fixes

  • The alternative key sequence Ctrl+Shift+Z to redo last undo has been re-activated. The standard sequence is still Ctrl+Y.
  • Adding a hyphen to two existing hyphens now also produces a long dash. Previously, this was only the case if a hyphen was added to a short dash. You sort of have to do this on purpose to even see the issue, like typing hyphen-space-hyphen, then remove the space and add a hyphen. Previously, that would result in a hyphen + short dash.

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.

None yet

1 participant