summaryrefslogtreecommitdiffstats
path: root/src/history.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-12-12 23:53:01 -0500
committerJesse Luehrs <doy@tozt.net>2021-12-12 23:53:01 -0500
commit009171812efa815ae6e445178689a08400905c04 (patch)
treef2de72bca3de0af4a57b0097ff11692c22eab06e /src/history.rs
parent8177f123ffb5d312ab664936a22f3e04317c0568 (diff)
downloadnbsh-009171812efa815ae6e445178689a08400905c04.tar.gz
nbsh-009171812efa815ae6e445178689a08400905c04.zip
more event loop refactoring
Diffstat (limited to 'src/history.rs')
-rw-r--r--src/history.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/history.rs b/src/history.rs
index 59cf822..048c1c7 100644
--- a/src/history.rs
+++ b/src/history.rs
@@ -2,7 +2,6 @@ use async_std::io::{ReadExt as _, WriteExt as _};
use futures_lite::future::FutureExt as _;
use pty_process::Command as _;
use std::os::unix::process::ExitStatusExt as _;
-use textmode::Textmode as _;
pub struct History {
size: (u16, u16),
@@ -21,7 +20,7 @@ impl History {
pub async fn render(
&self,
- out: &mut textmode::Output,
+ out: &mut impl textmode::Textmode,
repl_lines: usize,
focus: Option<usize>,
scrolling: bool,
@@ -63,7 +62,7 @@ impl History {
pub async fn render_fullscreen(
&self,
- out: &mut textmode::Output,
+ out: &mut impl textmode::Textmode,
idx: usize,
) {
let mut entry = self.entries[idx].lock_arc().await;
@@ -271,7 +270,7 @@ impl Entry {
fn render(
&mut self,
- out: &mut textmode::Output,
+ out: &mut impl textmode::Textmode,
idx: usize,
entry_count: usize,
width: u16,
@@ -386,7 +385,7 @@ impl Entry {
out.reset_attributes();
}
- fn render_fullscreen(&mut self, out: &mut textmode::Output) {
+ fn render_fullscreen(&mut self, out: &mut impl textmode::Textmode) {
let screen = self.vt.screen();
let new_audible_bell_state = screen.audible_bell_count();
let new_visual_bell_state = screen.visual_bell_count();
@@ -406,7 +405,7 @@ impl Entry {
out.reset_attributes();
}
- fn set_bgcolor(&self, out: &mut textmode::Output, focus: bool) {
+ fn set_bgcolor(&self, out: &mut impl textmode::Textmode, focus: bool) {
if focus {
out.set_bgcolor(textmode::Color::Rgb(32, 32, 64));
} else {