fix: delay shell command indicator to avoid flashes
This commit is contained in:
+5
-2
@@ -1782,9 +1782,12 @@ impl EditorSession {
|
||||
self.editor.show_command_output(command, result);
|
||||
return true;
|
||||
}
|
||||
let elapsed = now.saturating_duration_since(*started);
|
||||
if elapsed < Duration::from_millis(200) {
|
||||
return false;
|
||||
}
|
||||
const FRAMES: [char; 4] = ['|', '/', '-', '\\'];
|
||||
let frame =
|
||||
FRAMES[((now.saturating_duration_since(*started).as_millis() / 100) % 4) as usize];
|
||||
let frame = FRAMES[((elapsed.as_millis() / 100) % 4) as usize];
|
||||
if self.editor.shell_label().ends_with(frame) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user