diff options
author | Mark Andrus Roberts <mroberts@twilio.com> | 2017-02-20 12:22:26 -0800 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-02-22 20:57:00 -0800 |
commit | f1ea49b75d81955faebd2e922975bcc58e8634ef (patch) | |
tree | 64bb70c75106893f27aef23dfbd273824afcaee0 /src/window.rs | |
parent | 604cc6b25ebbd906b9a132ffc31c16993e553f84 (diff) | |
download | alacritty-f1ea49b75d81955faebd2e922975bcc58e8634ef.tar.gz alacritty-f1ea49b75d81955faebd2e922975bcc58e8634ef.zip |
Lazily reset `start_time` in VisualBell's `completed` method
Fixes #416. Here's what I think is happening: at short `duration`s, the
VisualBell's [`completed` check](https://github.com/jwilm/alacritty/blob/3ce6e1e4b2924b0d432cbb3e62b4bbef88dd38ff/src/term/mod.rs#L377)
is returning `true` before we've actually had a chance to draw the "normal"
background color. I thought about driving this condition off of whether or not
`intensity` returns 0.0, but we may still miss a draw, I think. Perhaps the best
way to tackle this is to let `completed` lazily reset the VisualBell's
`start_time` (something @jwilm asked about when this feature originally landed),
and to only return `true` when the VisualBell's `start_time` is `None`. This
should effectively delay the final draw until after the VisualBell completes.
Diffstat (limited to 'src/window.rs')
0 files changed, 0 insertions, 0 deletions