Avoid unnecessary copy and sort of timers

This commit is contained in:
Kovid Goyal
2023-07-24 12:01:00 +05:30
parent 2baff2fccc
commit ce35532aa5
2 changed files with 2 additions and 6 deletions

View File

@@ -20,7 +20,7 @@ import (
var SIGNULL unix.Signal
func new_loop() *Loop {
l := Loop{controlling_term: nil, timers_temp: make([]*timer, 4)}
l := Loop{controlling_term: nil, timers_temp: make([]*timer, 0, 8), timers: make([]*timer, 0, 8)}
l.terminal_options.alternate_screen = true
l.terminal_options.restore_colors = true
l.terminal_options.kitty_keyboard_mode = DISAMBIGUATE_KEYS | REPORT_ALTERNATE_KEYS | REPORT_ALL_KEYS_AS_ESCAPE_CODES | REPORT_TEXT_WITH_KEYS