Skip to content

Conversation

@rishan-girish
Copy link

@rishan-girish rishan-girish commented Nov 13, 2025

What changed?

Changed the offset in first() to reflect that we are moving back by the rendered text length.

Why?

In the rendering code, cursorOffset is used after rendering the text to move the cursor into the desired position. On first() we were incorrectly using a offset of 0 which would not move the caret. This resulted in the caret being stuck where it was (at the end of the line).

Used the script in the draft PR above to test:

prompts_testing.mov (uploaded via Graphite)

@rishan-girish
Copy link
Author

rishan-girish commented Nov 13, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@rishan-girish rishan-girish changed the title fix first()'s cursorOffset fix: use negative offset for first() Nov 13, 2025
@rishan-girish rishan-girish changed the title fix: use negative offset for first() fix: [CLI-273] use negative offset for first() Nov 13, 2025
@linear
Copy link

linear bot commented Nov 13, 2025

@rishan-girish rishan-girish marked this pull request as ready for review November 13, 2025 23:38
@rishan-girish rishan-girish force-pushed the 11-13-fix_first_s_cursoroffset branch from 019fd7b to 66205f7 Compare November 13, 2025 23:38
@rishan-girish rishan-girish mentioned this pull request Nov 13, 2025
@rishan-girish
Copy link
Author

rishan-girish commented Nov 14, 2025

Merge activity

  • Nov 14, 12:03 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Nov 14, 12:03 AM UTC: @rishan-girish merged this pull request with Graphite.

@rishan-girish rishan-girish merged commit eaa66a9 into master Nov 14, 2025
10 checks passed
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