diff options
| -rw-r--r-- | rsnix/src/tty.rs | 3 | ||||
| -rw-r--r-- | rsnix/src/vt.rs | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/rsnix/src/tty.rs b/rsnix/src/tty.rs index c44dca8..ad33cb3 100644 --- a/rsnix/src/tty.rs +++ b/rsnix/src/tty.rs | |||
| @@ -201,6 +201,9 @@ pub fn read_line_from_queue(term: &mut crate::vt::Terminal) -> Option<LineInput> | |||
| 201 | crate::sched::TaskMsg::Focus(gained) => { | 201 | crate::sched::TaskMsg::Focus(gained) => { |
| 202 | if gained { | 202 | if gained { |
| 203 | crate::vt::set_active(term as *mut crate::vt::Terminal); | 203 | crate::vt::set_active(term as *mut crate::vt::Terminal); |
| 204 | // Re-composite the full window so content is visible | ||
| 205 | // immediately (focus() only redraws the title bar). | ||
| 206 | term.flush(); | ||
| 204 | } else { | 207 | } else { |
| 205 | crate::vt::set_active(core::ptr::null_mut()); | 208 | crate::vt::set_active(core::ptr::null_mut()); |
| 206 | } | 209 | } |
diff --git a/rsnix/src/vt.rs b/rsnix/src/vt.rs index 0d7cf9b..d02cefa 100644 --- a/rsnix/src/vt.rs +++ b/rsnix/src/vt.rs | |||
| @@ -552,7 +552,7 @@ impl Terminal { | |||
| 552 | } | 552 | } |
| 553 | } | 553 | } |
| 554 | 554 | ||
| 555 | fn flush(&mut self) { | 555 | pub fn flush(&mut self) { |
| 556 | if self.pending_scrolls > 0 { | 556 | if self.pending_scrolls > 0 { |
| 557 | return; | 557 | return; |
| 558 | } | 558 | } |
