mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 06:36:24 +00:00
Dont call tcgetattr when no operations are specified
This commit is contained in:
parent
fe4fdaefb9
commit
fc1331cfdc
1 changed files with 3 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue