diff --git a/src/df/gfx/df_views.c b/src/df/gfx/df_views.c index badd313d..3e3c7ec8 100644 --- a/src/df/gfx/df_views.c +++ b/src/df/gfx/df_views.c @@ -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 //