1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-23 13:21:38 +03:00

fix: changed the criteria to calculate the sunset / sunrise progression

This commit is contained in:
mikyk10 2024-01-19 22:33:58 +09:00 committed by Wez Furlong
parent 9181d010ff
commit 24115049f3

View File

@ -240,7 +240,7 @@ impl UserData for Time {
// Sun hasn't yet risen
progression = (night_duration - (rise - this.utc)).num_minutes() as f64
/ night_duration.num_minutes() as f64;
} else if this.utc >= rise {
} else if up {
// Sun is up
progression = (this.utc - rise).num_minutes() as f64
/ day_duration.num_minutes() as f64;