Learn keys: support Ctrl/Meta/Shift modifiers#5028
Closed
ilia-maslakov wants to merge 15 commits into
Closed
Conversation
Implement block folding for the internal editor with bracket-scope
detection ({, [, () and visual indicators in the line state area.
Features:
- Fold/unfold via gutter click, menu (Command > Fold / Unfold block),
or keyboard shortcut (Alt+Shift+F)
- Gutter indicators configurable via skin (fold-open-char, fold-close-char)
- Smart fold: unfolds if on folded line, folds selection if selected,
otherwise finds bracket scope and folds it
- Fold display preserves original line content with appended fold info
showing matching bracket and line count
- Only lines with unmatched opening brackets show the fold indicator,
avoiding noise from single-line constructs like for() or array[i]
Extract edit_fold_toggle() into fold.c for better modularity.
Prevent cursor from entering folded regions for arrow keys, End key,
and mouse clicks, similar to how tab characters prevent mid-tab cursor
placement. Right/Left arrows skip over the fold indicator ({...}) as
a single unit, respecting the cursor_beyond_eol setting.
Fix fold toggle to continue searching for multi-line brackets when
a single-line match like () is found first.
Simplify fold indicator from translated "...} (N lines)" to "...}"
for consistent width calculation.
Cover fold creation, lookup, removal, visibility checks, navigation, line insert/delete adjustments, sorted order, and indicator width.
…fold_block editor: Add code folding with bracket-scope detection and visual fold indicators
gh pr/issue edit --remove-label fails with exit code 1 when the label is not assigned. Add || true to prevent workflow failures.
…gins Panel Plugin Framework: dynamic loading and new panel plugins
Enabled blank issues and removed contact links.
Extend Learn keys to support modifier-aware sequence training and persistence. - add Ctrl / Meta (Alt) / Shift toggles in Learn keys - apply selected modifiers to the learned key code when defining sequences - store learned terminal mappings using modifier-prefixed key names (for example: shift-up, ctrl-f9, meta-right) - update key check logic so learned keys are validated with selected modifiers - adjust dialog layout to keep modifier controls and help text separate
Add unit tests for modifier-aware key name generation in learn module. - add tests/src/learn_modifiers.c - cover none/single/combined modifier combinations - register learn_modifiers test in tests/src/Makefile.am
Author
|
Closing to resubmit a cleaned branch. |
Member
|
Superseded by #5029. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Proposed changes
Checklist
👉 Our coding style can be found here: https://midnight-commander.org/coding-style/ 👈
git commit --amend -smake indent && make check)