Skip to content

fix code review suggestions - #240

Merged
maxistar merged 1 commit into
fix/add_tests_for_latest_updates_testfrom
fix/add_tests_for_latest_updates_pr_fix
Sep 15, 2026
Merged

maxistar merged 1 commit into
fix/add_tests_for_latest_updates_testfrom
fix/add_tests_for_latest_updates_pr_fix

Conversation

@maxistar

Copy link
Copy Markdown
Owner

No description provided.

@maxistar
maxistar merged commit 9f16e92 into fix/add_tests_for_latest_updates_test Sep 15, 2026
1 of 3 checks passed

@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: 5be28d9d5f

ℹ️ 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".


private void startPanning(View view, MotionEvent event) {
panningActive = true;
panGestureOwned = true;

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 Cancel EditText touch handling when owning a pan

When the second finger makes the listener own the gesture, EditText.onTouchEvent has already received the initial ACTION_DOWN, but this listener now consumes every remaining event, including the final ACTION_UP or ACTION_CANCEL. The editor therefore never clears its pending tap/long-press and pressed state, so a quick two-finger pan can trigger a delayed long-click or selection at the first touch location after both fingers are released. Send the editor a cancellation event when taking ownership before swallowing the rest of the stream.

Useful? React with 👍 / 👎.

Comment on lines +2117 to +2120
if (horizontalScrollBoundsDirty || cachedHorizontalScrollEditorWidth != editorWidth) {
cachedMaxHorizontalScroll = calculateMaxHorizontalScroll(layout, editorWidth);
cachedHorizontalScrollEditorWidth = editorWidth;
horizontalScrollBoundsDirty = false;

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 Invalidate cached bounds after background reloads

When an unchanged open document is modified externally while the activity is paused, onResume calls validateOpenDocumentOnForeground() before reattaching textWatcher, so the resulting setEditorText() never invokes the new invalidation in onTextChanged. If the replacement changes the longest line without changing the editor's dimensions, this condition reuses the old maximum and horizontal panning either cannot reach the new text or scrolls beyond shorter text until another edit, preference change, or resize invalidates the cache.

Useful? React with 👍 / 👎.

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