mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 20:08:17 +00:00
perf(ui): remove spurious allocations from mode_style_array()
This commit is contained in:
@@ -507,10 +507,12 @@ void ui_flush(void)
|
||||
pending_cursor_update = false;
|
||||
}
|
||||
if (pending_mode_info_update) {
|
||||
Array style = mode_style_array();
|
||||
Arena arena = ARENA_EMPTY;
|
||||
arena_start(&arena, &ui_ext_fixblk);
|
||||
Array style = mode_style_array(&arena);
|
||||
bool enabled = (*p_guicursor != NUL);
|
||||
ui_call_mode_info_set(enabled, style);
|
||||
api_free_array(style);
|
||||
arena_mem_free(arena_finish(&arena), &ui_ext_fixblk);
|
||||
pending_mode_info_update = false;
|
||||
}
|
||||
if (pending_mode_update && !starting) {
|
||||
|
Reference in New Issue
Block a user