multigrid: various cleanup (types, unused parameters)

Handle the rare case of full highlight table properly
This commit is contained in:
Björn Linse
2018-12-23 14:12:56 +01:00
parent 44b8e58f33
commit 820c81e638
6 changed files with 33 additions and 26 deletions

View File

@@ -98,7 +98,7 @@ static int get_attr_entry(HlEntry entry)
return id;
}
/// When a UI connects, we need to send it the table of higlights used so far.
/// When a UI connects, we need to send it the table of highlights used so far.
void ui_send_all_hls(UI *ui)
{
for (size_t i = 1; i < kv_size(attr_entries); i++) {
@@ -212,13 +212,7 @@ void clear_hl_tables(bool reinit)
map_clear(int, int)(combine_attr_entries);
highlight_attr_set_all();
highlight_changed();
redraw_all_later(NOT_VALID);
if (default_grid.ScreenAttrs) {
// the meaning of 0 doesn't change anyway
// but the rest must be retransmitted
memset(default_grid.ScreenAttrs, 0, sizeof(*default_grid.ScreenAttrs)
* (size_t)(default_grid.Rows * default_grid.Columns));
}
screen_invalidate_highlights();
} else {
kv_destroy(attr_entries);
map_free(HlEntry, int)(attr_entry_ids);