Skip to content

Commit

Permalink
always clamp cursor in memory view
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanfleury committed Jan 20, 2024
1 parent f11b128 commit 862ae81
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/df/gfx/df_views.c
Original file line number Diff line number Diff line change
Expand Up @@ -7478,6 +7478,15 @@ DF_VIEW_UI_FUNCTION_DEF(Memory)
mv->mark = next_mark;
}

//////////////////////////////
//- rjf: clamp cursor
//
{
Rng1U64 cursor_valid_rng = r1u64(0, 0x7FFFFFFFFFFFull);
mv->cursor = clamp_1u64(cursor_valid_rng, mv->cursor);
mv->mark = clamp_1u64(cursor_valid_rng, mv->mark);
}

//////////////////////////////
//- rjf: center cursor
//
Expand Down

0 comments on commit 862ae81

Please sign in to comment.