commit 7102f5d94d510ebd2af6b36c075d3c338a7dc338 from: Omar Polo date: Wed Jul 21 14:45:08 2021 UTC recompute help only when needed commit - 54ee0a94b6caabb0346274480b28c8dd0920deed commit + 7102f5d94d510ebd2af6b36c075d3c338a7dc338 blob - 3678f6a8d826dcfd4cca64216876d8285deb85ca blob + feff40f2d0a90f9370a0a962f0aebd390490ef54 --- help.c +++ help.c @@ -78,9 +78,14 @@ rec_compute_help(struct kmap *keymap, char *prfx, size void recompute_help(void) { + static struct kmap *last_active_map = NULL; char p[32] = { 0 }; - erase_buffer(&helpwin); - rec_compute_help(current_map, p, sizeof(p)); - wrap_page(&helpwin, help_cols); + if (last_active_map != current_map) { + last_active_map = current_map; + + erase_buffer(&helpwin); + rec_compute_help(current_map, p, sizeof(p)); + wrap_page(&helpwin, help_cols); + } }