You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
create textarea with line numbers enabled (or run the editor example)
type in the textarea until it reaches the right-most border of the textarea
keep typing and observe that chars are inserted but cursor is no longer visible
move cursor to the left 3-5 times and observe that the cursor is visible again
create textarea without line numbers (or run vim example)and observe that 2-5 do not happen
Expected Behavior
The cursor always stops before leaving the visible area or causes the visible area to scroll to keep the cursor visible.
Actual Behavior
The number of cells the cursor can move beyond the visible area corresponds to how much width is taken up by the line numbers (e.g. for single digit line numbers, the width of the line numbers section is 3, so the cursor can move 3 past the visible area; with double digit line numbers, the width is 4, so the cursor can move 4 beyond), so I'm guessing the calculations for the boundaries/scrolling just aren't taking the line numbers section's width into account.
Env
kitty on macOS
rust 1.79.0
tui-textarea 0.5.2
ratatui 0.27.0
The text was updated successfully, but these errors were encountered:
Repro
Expected Behavior
The cursor always stops before leaving the visible area or causes the visible area to scroll to keep the cursor visible.
Actual Behavior
The number of cells the cursor can move beyond the visible area corresponds to how much width is taken up by the line numbers (e.g. for single digit line numbers, the width of the line numbers section is 3, so the cursor can move 3 past the visible area; with double digit line numbers, the width is 4, so the cursor can move 4 beyond), so I'm guessing the calculations for the boundaries/scrolling just aren't taking the line numbers section's width into account.
Env
The text was updated successfully, but these errors were encountered: