mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-05 15:41:39 +02:00
Dont call tcgetattr when no operations are specified
This commit is contained in:
@@ -179,6 +179,9 @@ func (self *Term) set_termios_attrs(when uintptr, modify func(*unix.Termios)) (e
|
||||
}
|
||||
|
||||
func (self *Term) ApplyOperations(when uintptr, operations ...TermiosOperation) (err error) {
|
||||
if len(operations) == 0 {
|
||||
return
|
||||
}
|
||||
return self.set_termios_attrs(when, func(t *unix.Termios) {
|
||||
for _, op := range operations {
|
||||
op(t)
|
||||
|
||||
Reference in New Issue
Block a user