Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor to use columnRanges and improve column cursor movement #695

Merged
merged 2 commits into from
Feb 5, 2025

Conversation

noborus
Copy link
Owner

@noborus noborus commented Feb 5, 2025

Refactor to use columnRanges and improve column cursor movement

- Refactored code to utilize `columnRanges` for better cursor movement.
- Updated column cursor movement logic to first determine if only scrolling is needed without moving the cursor.
- Removed `columnStart` from `Document` struct.
- Added `determineColumnStart` function to determine the start index of columns.
- Updated `moveBeginLeft` and `moveEndRight` functions to use screen information.
- Improved `optimalCursor` and `optimalX` functions for better cursor positioning.
- Added `isValidCursor`, `rightEdge`, and `targetLineWithColumns` helper functions.
- Updated `prepareDraw` and `prepareLines` functions to handle column ranges.
- Modified related tests to reflect the changes in column handling.
- Added support for header column using `columnRanges`.
- Unified variable name `LineC` to `lineC`.
- Added support for wide characters to ensure proper display and handling.
- Modified relevant files to reflect these changes.
Updated the logic to check if a column fits within the screen
to consider the vertical header.
@noborus noborus merged commit 4ba3881 into master Feb 5, 2025
8 checks passed
@noborus noborus deleted the use-columnRanges branch February 10, 2025 23:45
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