reformat comments

This commit is contained in:
Piotr Kocia 2025-06-14 02:02:12 +02:00
parent 94d773a262
commit fefe3c7d81
4 changed files with 13 additions and 19 deletions

View file

@ -88,7 +88,6 @@ enum key_binding_type {
typedef tll(char *) config_modifier_list_t; typedef tll(char *) config_modifier_list_t;
struct config_key_binding { struct config_key_binding {
// TODO (kociap): from wayland.h?
int action; /* One of the various bind_action_* enums from wayland.h */ int action; /* One of the various bind_action_* enums from wayland.h */
//struct config_key_modifiers modifiers; //struct config_key_modifiers modifiers;
config_modifier_list_t modifiers; config_modifier_list_t modifiers;
@ -365,17 +364,13 @@ struct config {
* Special modes * Special modes
*/ */
/*
* Bindings for vimode. // Bindings for vimode.
* Note: action to enter vimode is in the 'key' bindings // Actions to enter vimode is in the 'key' bindings above.
* above.
*/
struct config_key_binding_list vimode; struct config_key_binding_list vimode;
/* // Bindings for the search mode within vimode.
* Bindings for the search mode within vimode. // Actions to enter the search mode are in the 'key' and
* Actions to enter the search mode are in the 'key' and // 'vimode' bindings.
* 'vimode' bindings.
*/
struct config_key_binding_list vimode_search; struct config_key_binding_list vimode_search;
/* While showing URL jump labels */ /* While showing URL jump labels */

View file

@ -809,6 +809,7 @@ render_cell(struct terminal *term, pixman_image_t *pix,
const bool is_highlighted = const bool is_highlighted =
is_cell_highlighted(term, (struct coord){.row = row_no, .col = col}); is_cell_highlighted(term, (struct coord){.row = row_no, .col = col});
if(is_highlighted) { if(is_highlighted) {
// TODO (kociap): Do the same thing as for selection colors.
if(term->conf->colors.use_custom.highlights) { if(term->conf->colors.use_custom.highlights) {
_fg = term->conf->colors.highlights.fg; _fg = term->conf->colors.highlights.fg;
_bg = term->conf->colors.highlights.bg; _bg = term->conf->colors.highlights.bg;

View file

@ -657,10 +657,8 @@ struct terminal {
enum search_direction direction; enum search_direction direction;
} confirmed_search; } confirmed_search;
/* // Highlight ranges in absolute coordinates.
* Highlight ranges in absolute coordinates. // Sorted in ascending order by the start row and column.
* Sorted in ascending order by the start row and column.
*/
struct highlight_location { struct highlight_location {
struct highlight_location const* next; struct highlight_location const* next;
struct range range; struct range range;

View file

@ -17,10 +17,8 @@
#include "vimode.h" #include "vimode.h"
#include "xmalloc.h" #include "xmalloc.h"
// TODO (kociap): consider adding scrolloff. // TODO (kociap): consider not cancelling selection on lines being
// TODO (kociap): consider not cancelling selection on scroll. // scrolled out.
// TODO (kociap): jump list?
// TODO (kociap): WORD motions.
static bool is_mode_visual(enum vi_mode const mode) static bool is_mode_visual(enum vi_mode const mode)
{ {
@ -1357,6 +1355,8 @@ static void execute_vimode_binding(struct seat *seat, struct terminal *term,
mode = VI_MODE_VBLOCK; mode = VI_MODE_VBLOCK;
} }
// TODO (kociap): selection start is in view relative, so scrolling and
// changing mode will alter the start position.
enum selection_kind const selection = selection_kind_from_vi_mode(mode); enum selection_kind const selection = selection_kind_from_vi_mode(mode);
if (is_mode_visual(term->vimode.mode)) { if (is_mode_visual(term->vimode.mode)) {
// "Entering" the same mode exits it. Otherwise, we switch from // "Entering" the same mode exits it. Otherwise, we switch from