Implement focus tracking in kitten infrastructure

This commit is contained in:
Kovid Goyal
2025-05-16 12:48:21 +05:30
parent ce59ef8c6e
commit e015ebefab
3 changed files with 11 additions and 2 deletions

View File

@@ -113,6 +113,12 @@ func (self *Loop) handle_csi(raw []byte) (err error) {
return nil
}
}
} else if csi == "I" || csi == "O" {
if self.OnFocusChange != nil {
return self.OnFocusChange(csi == "I")
}
return nil
}
ke := KeyEventFromCSI(csi)
if ke != nil {