mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-13 04:27:47 -05:00
fix selection changing start on mode change
This commit is contained in:
parent
fa2b08846b
commit
6e38cb683a
2 changed files with 9 additions and 7 deletions
8
vimode.c
8
vimode.c
|
|
@ -458,17 +458,16 @@ void vimode_cancel(struct terminal *term)
|
|||
render_refresh(term);
|
||||
}
|
||||
|
||||
void vimode_view_up(struct terminal *term, int const delta)
|
||||
void vimode_view_up(struct terminal *const term, int const delta)
|
||||
{
|
||||
if (!term->vimode.active) {
|
||||
return;
|
||||
}
|
||||
|
||||
damage_cursor_cell(term);
|
||||
term->vimode.cursor.row += delta;
|
||||
clip_cursor_to_view(term);
|
||||
update_selection(term);
|
||||
update_highlights(term);
|
||||
term->vimode.selection.start.row += delta;
|
||||
}
|
||||
|
||||
void vimode_view_down(struct terminal *const term, int const delta)
|
||||
|
|
@ -477,11 +476,10 @@ void vimode_view_down(struct terminal *const term, int const delta)
|
|||
return;
|
||||
}
|
||||
|
||||
damage_cursor_cell(term);
|
||||
term->vimode.cursor.row -= delta;
|
||||
clip_cursor_to_view(term);
|
||||
update_selection(term);
|
||||
update_highlights(term);
|
||||
term->vimode.selection.start.row -= delta;
|
||||
}
|
||||
|
||||
static ssize_t matches_cell(const struct terminal *term,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue