Skip to content

fix: preserve active cursor position during reflow#12598

Open
noib3 wants to merge 1 commit intoghostty-org:mainfrom
noib3:fix-cursor-reflow
Open

fix: preserve active cursor position during reflow#12598
noib3 wants to merge 1 commit intoghostty-org:mainfrom
noib3:fix-cursor-reflow

Conversation

@noib3
Copy link
Copy Markdown
Contributor

@noib3 noib3 commented May 6, 2026

This PR fixes an issue where reflowing could leave the active cursor attached to a clipped trailing blank cell instead of following the current write position.

This PR fixes an issue where reflowing could leave the active cursor
attached to a clipped trailing blank cell instead of following the
current write position.
@noib3 noib3 requested a review from a team as a code owner May 6, 2026 13:00
@mitchellh
Copy link
Copy Markdown
Contributor

This makes sense, but I wonder if we could utilize the original x/y to do this without tracked pin? Plus, since the cursor has to be in the active area I feel like there are some optimizations to be made here.

@noib3
Copy link
Copy Markdown
Contributor Author

noib3 commented May 6, 2026

I considered using simple modulo/integer division ops to get the right coordinates, but I don't think that would handle wide cells correctly.

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