Simplify timer removal

This commit is contained in:
Kovid Goyal
2022-08-31 21:37:43 +05:30
parent dcec926590
commit 457aab7c41
2 changed files with 6 additions and 14 deletions

View File

@@ -41,7 +41,7 @@ type Loop struct {
keep_going bool
death_signal unix.Signal
exit_code int
timers []*timer
timers, timers_temp []*timer
timer_id_counter, write_msg_id_counter IdType
wakeup_channel chan byte
pending_writes []*write_msg
@@ -72,7 +72,7 @@ type Loop struct {
}
func New() (*Loop, error) {
l := Loop{controlling_term: nil}
l := Loop{controlling_term: nil, timers_temp: make([]*timer, 4)}
l.terminal_options.alternate_screen = true
l.escape_code_parser.HandleCSI = l.handle_csi
l.escape_code_parser.HandleOSC = l.handle_osc