mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-08 10:06:22 -05:00
minor cleanup
This commit is contained in:
parent
2d8e1d7295
commit
23c95f1dea
2 changed files with 5 additions and 5 deletions
2
input.c
2
input.c
|
|
@ -3212,6 +3212,8 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer,
|
|||
break;
|
||||
|
||||
case TERM_SURF_GRID: {
|
||||
// TODO (kociap): unsure whether mouse should cancel vimode
|
||||
// or work in tandem.
|
||||
vimode_cancel(term);
|
||||
urls_reset(term);
|
||||
|
||||
|
|
|
|||
8
vimode.c
8
vimode.c
|
|
@ -48,10 +48,9 @@ static struct coord cursor_to_view_relative(struct terminal *const term,
|
|||
cursor.row -= term->grid->view;
|
||||
return cursor;
|
||||
}
|
||||
}
|
||||
|
||||
static struct coord view_to_offset_relative(struct terminal *const term,
|
||||
struct coord coord) {
|
||||
static struct coord cursor_from_view_relative(struct terminal *const term,
|
||||
struct coord coord) {
|
||||
coord.row += term->grid->view;
|
||||
coord.row -= term->grid->offset;
|
||||
return coord;
|
||||
|
|
@ -319,7 +318,6 @@ static void start_search(struct terminal *term,
|
|||
}
|
||||
|
||||
static void restore_pre_search_state(struct terminal *const term) {
|
||||
// TODO (kociap): update selection.
|
||||
damage_cursor_cell(term);
|
||||
term->vimode.cursor = term->vimode.search.original_cursor;
|
||||
damage_cursor_cell(term);
|
||||
|
|
@ -828,7 +826,7 @@ static void move_cursor_delta(struct terminal *const term,
|
|||
cursor.col = term->cols - 1;
|
||||
}
|
||||
|
||||
term->vimode.cursor = view_to_offset_relative(term, cursor);
|
||||
term->vimode.cursor = cursor_from_view_relative(term, cursor);
|
||||
printf("CURSOR MOVED (%d, %d) [delta=(%d, %d)]\n", term->vimode.cursor.row,
|
||||
term->vimode.cursor.col, delta.row, delta.col);
|
||||
damage_cursor_cell(term);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue