mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-06 08:01:58 +02:00
More linter fixes
This commit is contained in:
@@ -426,10 +426,10 @@ type DefaultColor int
|
||||
|
||||
const (
|
||||
BACKGROUND DefaultColor = 11
|
||||
FOREGROUND = 10
|
||||
CURSOR = 12
|
||||
SELECTION_BG = 17
|
||||
SELECTION_FG = 19
|
||||
FOREGROUND DefaultColor = 10
|
||||
CURSOR DefaultColor = 12
|
||||
SELECTION_BG DefaultColor = 17
|
||||
SELECTION_FG DefaultColor = 19
|
||||
)
|
||||
|
||||
func (self *Loop) SetDefaultColor(which DefaultColor, val style.RGBA) {
|
||||
|
||||
@@ -13,6 +13,7 @@ import (
|
||||
)
|
||||
|
||||
var debugprintln = tty.DebugPrintln
|
||||
var _ = debugprintln
|
||||
|
||||
type timer struct {
|
||||
interval time.Duration
|
||||
@@ -27,7 +28,7 @@ func (self *timer) update_deadline(now time.Time) {
|
||||
}
|
||||
|
||||
func (self timer) String() string {
|
||||
return fmt.Sprintf("Timer(id=%d, callback=%s, deadline=%s, repeats=%v)", self.id, utils.FunctionName(self.callback), self.deadline.Sub(time.Now()), self.repeats)
|
||||
return fmt.Sprintf("Timer(id=%d, callback=%s, deadline=%s, repeats=%v)", self.id, utils.FunctionName(self.callback), time.Until(self.deadline), self.repeats)
|
||||
}
|
||||
|
||||
func (self *Loop) add_timer(interval time.Duration, repeats bool, callback TimerCallback) (IdType, error) {
|
||||
|
||||
@@ -79,7 +79,7 @@ func (self *Loop) wait_for_write_to_complete(sentinel IdType, tty_write_channel
|
||||
|
||||
end_time := time.Now().Add(timeout)
|
||||
for num_sent < len(self.pending_writes) {
|
||||
timeout = end_time.Sub(time.Now())
|
||||
timeout = time.Until(end_time)
|
||||
if timeout <= 0 {
|
||||
return os.ErrDeadlineExceeded
|
||||
}
|
||||
@@ -104,7 +104,7 @@ func (self *Loop) wait_for_write_to_complete(sentinel IdType, tty_write_channel
|
||||
}
|
||||
}
|
||||
for {
|
||||
timeout = end_time.Sub(time.Now())
|
||||
timeout = time.Until(end_time)
|
||||
if timeout <= 0 {
|
||||
return os.ErrDeadlineExceeded
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user