Expand description
Pure helpers for marks (m<x> / '<x>) and previous-position swap (^X^X).
Marks are session-local: a HashMap<char, (usize, usize)> owned by app::run.
Previous-position is a single Option<(usize, usize)> slot also owned by app::run.
Enums§
- Mark
Target - Result of a mark jump or previous-position swap. The caller (app
dispatch) handles
OtherFileby switching files before applying the line jump.
Functions§
- is_
valid_ mark_ name - True iff
cis a valid mark name (ASCII lowercase letter or ASCII digit). - jump_
previous - Swap current position with the previous-position slot. Returns the previous
position as a
MarkTarget, orNoneif no previous position has been recorded. - mark_
jump - Jump to mark
name. Returns aMarkTargetdescribing the destination, orNoneif the mark is unknown / name is invalid. On a successful jump, records(current_file_index, current_top)intoprevious_position. - mark_
set - Set mark
nameto(file_index, top_line). Silently no-ops on invalid mark names. - update_
prev_ position - Helper for big-jump dispatch sites: record the current position as the previous position before performing a discontinuous move.