Skip to content

Cursor disappears after scrolling in normal mode and never reappears #334

@Olinkai

Description

@Olinkai

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

  1. Enter normal mode (activation key)
  2. Move cursor with h/j/k/l — cursor (red dot) tracks correctly
  3. Press scroll_down or scroll_up key
  4. Release the key and wait for scrolling to decelerate to stop
  5. Expected: cursor reappears at current position
  6. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions