Skip to content

Restore multiselect state when line moves fail - #6017

Open
dajiaohuang wants to merge 1 commit into
ajaxorg:masterfrom
dajiaohuang:fix/5996-restore-virtual-selection-state
Open

dajiaohuang wants to merge 1 commit into
ajaxorg:masterfrom
dajiaohuang:fix/5996-restore-virtual-selection-state

Conversation

@dajiaohuang

@dajiaohuang dajiaohuang commented Oct 23, 2026 •

Copy link
Copy Markdown

Summary

  • Restore the selection range-list attachment and virtual-selection flag in a finally block when moving selected lines raises.
  • Add a regression test that injects a synthetic session-change listener error and verifies the editor state is restored.

Validation

  • npm test -- --reporter dot (1501 passing, 3 pending)
  • npx eslint src/editor.js src/multi_select_test.js
  • git diff --check

Addresses the state-corruption case described in #5996.

Open kitchen-sink @ 3b7c7e8dd6b77e4a2fe0f5cc8893e045ab7ed713

@codecov

codecov Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.90%. Comparing base (68d7fd1) to head (3b7c7e8).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6017      +/-   ##
==========================================
- Coverage   93.91%   93.90%   -0.02%     
==========================================
  Files         647      647              
  Lines      140868   140889      +21     
  Branches    14772    14777       +5     
==========================================
- Hits       132303   132295       -8     
- Misses       8565     8594      +29     
Flag Coverage Δ
unittests 93.90% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
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