Skip to content

Fix an incorrect debug assert#774

Merged
lhecker merged 2 commits intomainfrom
dev/lhecker/debug-assert
Mar 19, 2026
Merged

Fix an incorrect debug assert#774
lhecker merged 2 commits intomainfrom
dev/lhecker/debug-assert

Conversation

@lhecker
Copy link
Member

@lhecker lhecker commented Mar 19, 2026

No description provided.

Comment on lines +1710 to +1717
debug_assert!(cursor.offset <= self.text_length());
debug_assert!(cursor.logical_pos.x >= 0);
debug_assert!(cursor.logical_pos.y >= 0);
debug_assert!(cursor.logical_pos.y <= self.stats.logical_lines);
debug_assert!(cursor.visual_pos.x >= 0);
debug_assert!(self.word_wrap_column <= 0 || cursor.visual_pos.x <= self.word_wrap_column);
debug_assert!(cursor.visual_pos.y >= 0);
debug_assert!(cursor.visual_pos.y <= self.stats.visual_lines);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed these to track down the issue. I kept it this way since it seems better.

@lhecker lhecker enabled auto-merge (squash) March 19, 2026 22:51
@lhecker lhecker merged commit 017c0ba into main Mar 19, 2026
6 checks passed
@lhecker lhecker deleted the dev/lhecker/debug-assert branch March 19, 2026 22:52
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.

2 participants