Skip to content

update tests - #239

Merged
maxistar merged 3 commits into
devfrom
fix/add_tests_for_latest_updates_test
Sep 15, 2026
Merged

maxistar merged 3 commits into
devfrom
fix/add_tests_for_latest_updates_test

Conversation

@maxistar

Copy link
Copy Markdown
Owner
  • fix unit tests
  • improve UI for navigation

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e479301275

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +2014 to +2015
case MotionEvent.ACTION_POINTER_UP:
if (panningActive) {
view.getParent().requestDisallowInterceptTouchEvent(false);
}
return panningActive;
return stopPanning(view);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep consuming events after ending a two-finger pan

When either finger is released, stopPanning() clears panningActive, so the remaining ACTION_UP is returned as unhandled and reaches EditText.onTouchEvent(). Because the editor already received the original ACTION_DOWN but not the consumed pan movements, lifting the last finger after a two-finger scroll can be interpreted as a tap and unexpectedly move the caret or alter the selection. Stop scrolling on ACTION_POINTER_UP, but keep consuming the gesture until its final ACTION_UP or ACTION_CANCEL.

Useful? React with 👍 / 👎.

Comment on lines +2086 to +2088
float maxLineWidth = 0;
for (int line = 0; line < layout.getLineCount(); line++) {
maxLineWidth = Math.max(maxLineWidth, layout.getLineWidth(line));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid scanning every line when a pan begins

For large documents, placing the second finger now iterates through every layout line on the UI thread before any panning can occur. Since this scan runs at the start of every two-finger gesture, files with hundreds of thousands of lines can visibly freeze the editor whenever the user begins scrolling; cache the maximum width and invalidate it when the text or layout changes instead of recomputing it per gesture.

Useful? React with 👍 / 👎.

@maxistar
maxistar merged commit 0d6cca1 into dev Sep 15, 2026
1 of 3 checks passed
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.

1 participant