Allow cursor to escape table when table is last block#125
Conversation
When a table is the last (or only) block in a document, the cursor could not move past it — ArrowDown, ArrowRight, and Tab from the last cell all silently failed. - Add Doc.ensureBlockAfter() helper that appends an empty paragraph when no block follows a given index. - insertTable now splits the current block at the cursor position so "as|df" becomes "as" [table] "df", and always ensures a trailing paragraph after the table. - ArrowDown from the last row and ArrowRight from the last cell use ensureBlockAfter() to create a paragraph on-demand. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
📝 WalkthroughWalkthroughThis pull request introduces a new utility method Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Verification: verify:selfResult: ✅ PASS in 115.0s
Verification: verify:integrationResult: ✅ PASS |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Summary
Doc.ensureBlockAfter()helper that appends an empty paragraph when no block follows a given indexinsertTablenow splits the current block at the cursor ("as|df" → "as" [table] "df") and ensures a trailing paragraphTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit