Scroll on text input
This commit is contained in:
parent
f9f7904117
commit
7f181d0e64
3 changed files with 27 additions and 22 deletions
|
|
@ -290,10 +290,15 @@ impl Terminal {
|
|||
self.with_buffer_mut(|buffer| buffer.set_redraw(redraw));
|
||||
}
|
||||
|
||||
pub fn input<I: Into<Cow<'static, [u8]>>>(&self, input: I) {
|
||||
pub fn input_no_scroll<I: Into<Cow<'static, [u8]>>>(&self, input: I) {
|
||||
self.notifier.notify(input);
|
||||
}
|
||||
|
||||
pub fn input_scroll<I: Into<Cow<'static, [u8]>>>(&self, input: I) {
|
||||
self.input_no_scroll(input);
|
||||
self.scroll(TerminalScroll::Bottom);
|
||||
}
|
||||
|
||||
pub fn resize(&mut self, width: u32, height: u32, scale_factor: f32) {
|
||||
//TODO: check scale factor
|
||||
if width != self.size.width || height != self.size.height {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue