Description
In normal mode, the custom cursor (red dot) disappears after using
scroll_up/scroll_down and never reappears, even after scrolling stops. The
pointer still functions (clicking, movement via keyboard all work), but the
visual cursor overlay is gone for the remainder of the session.
Steps to reproduce
- Enter normal mode (activation key)
- Move cursor with h/j/k/l — cursor (red dot) tracks correctly
- Press scroll_down or scroll_up key
- Release the key and wait for scrolling to decelerate to stop
- Expected: cursor reappears at current position
- Actual: cursor is gone permanently; only way to recover is to exit and
re-enter normal mode
Cause
In src/normal.c, the scroll handlers call redraw(scr, mx, my, 1) with a
hardcoded hide_cursor = 1 to hide the cursor during active scrolling. After
the scroll key is released and scroll_decelerate() brings the velocity to
zero, nothing triggers a redraw to restore the cursor.
Suggested fix
Add a scroll_active() function to scroll.c that exposes whether velocity > 0,
and check for the scroll-to-idle transition in the main loop:
// scroll.c
int scroll_active()
{
return v > 0;
}
// normal.c — in the main loop, before mouse_process_key:
int was_scrolling = scroll_active();
scroll_tick();
if (was_scrolling && !scroll_active())
redraw(scr, mx, my, !show_cursor);
Environment
- Linux (X11), Ubuntu
- warpd v1.3.5, commit 01650ea
Description
In normal mode, the custom cursor (red dot) disappears after using
scroll_up/scroll_down and never reappears, even after scrolling stops. The
pointer still functions (clicking, movement via keyboard all work), but the
visual cursor overlay is gone for the remainder of the session.
Steps to reproduce
re-enter normal mode
Cause
In src/normal.c, the scroll handlers call redraw(scr, mx, my, 1) with a
hardcoded hide_cursor = 1 to hide the cursor during active scrolling. After
the scroll key is released and scroll_decelerate() brings the velocity to
zero, nothing triggers a redraw to restore the cursor.
Suggested fix
Add a scroll_active() function to scroll.c that exposes whether velocity > 0,
and check for the scroll-to-idle transition in the main loop:
// scroll.c
int scroll_active()
{
return v > 0;
}
// normal.c — in the main loop, before mouse_process_key:
int was_scrolling = scroll_active();
scroll_tick();
if (was_scrolling && !scroll_active())
redraw(scr, mx, my, !show_cursor);
Environment