Skip to content

refactor: extract cursor handling into a module#101

Merged
kibi2 merged 1 commit into
mainfrom
refactor/cursor-management
Jul 12, 2026
Merged

refactor: extract cursor handling into a module#101
kibi2 merged 1 commit into
mainfrom
refactor/cursor-management

Conversation

@kibi2

@kibi2 kibi2 commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

Refactor cursor handling by extracting cursor-related logic into a dedicated module.

Changes

  • Move cursor position handling into a cursor module
  • Centralize cursor state management
  • Separate cursor information (buffer position, logical position, block/cell location) from other editor logic
  • Prepare the code structure for future cursor restoration and movement improvements

Motivation

Cursor handling has become spread across multiple parts of Tirenvi as logical table positions and rendered buffer positions need to be synchronized.

This refactoring makes cursor-related state and operations easier to maintain and provides a clearer foundation for future features such as logical cursor restoration and structured table editing improvements.

Testing

  • Existing test suite passes
  • Verified cursor movement and restoration behavior

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.26562% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lua/tirenvi/width/op.lua 66.66% 4 Missing ⚠️
lua/tirenvi/core/dirty_range.lua 83.33% 1 Missing ⚠️
lua/tirenvi/editor/autocmd.lua 83.33% 1 Missing ⚠️
lua/tirenvi/io/buffer.lua 95.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@kibi2
kibi2 force-pushed the refactor/cursor-management branch 4 times, most recently from 6fccf13 to 462902b Compare July 12, 2026 08:14
@kibi2
kibi2 force-pushed the refactor/cursor-management branch from 462902b to 81e935a Compare July 12, 2026 21:55
@kibi2
kibi2 merged commit 1a250c8 into main Jul 12, 2026
4 checks passed
@kibi2
kibi2 deleted the refactor/cursor-management branch July 12, 2026 22:10
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