Skip to content

Add PREV_PAGE/NEXT_PAGE cursor nagivation to BW text fields - #28

Merged
jurgelenas merged 2 commits into
unified-lua-lspfrom
text-edit-improvements
Sep 20, 2026
Merged

jurgelenas merged 2 commits into
unified-lua-lspfrom
text-edit-improvements

Conversation

@jurgelenas

Copy link
Copy Markdown
Member

No description provided.

killEvents() refuses to mask KEY_ENTER for Lua scripts
(api_general.cpp:1699), so a long ENTER is always followed by a break
when the key is released. The editor acted on EVT_VIRTUAL_ENTER_LONG and
that break then leaked: a long press on a space committed and the break
reached the caller's row handler, which reopened the editor, and a case
toggle also advanced the cursor.

Record the long press instead and run its action on the following break,
which consumes it. Case toggling moves into _toggleCase().
@jurgelenas
jurgelenas requested a review from CapnBry September 17, 2026 17:49
@jurgelenas

Copy link
Copy Markdown
Member Author

@CapnBry little side quest EdgeTX/edgetx#7802...

Our Lua text edit must work the same as the native one!

@CapnBry CapnBry left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like we got some extra fixes on this that I didn't consider when I suggested code, looks good! Thanks

@jurgelenas
jurgelenas merged commit fc8fff5 into unified-lua-lsp Sep 20, 2026
@jurgelenas
jurgelenas deleted the text-edit-improvements branch September 20, 2026 19:32
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.

2 participants