|
|
@ -698,8 +698,8 @@ impl Component for EditorView {
|
|
|
|
fn handle_event(&mut self, event: Event, cx: &mut Context) -> EventResult {
|
|
|
|
fn handle_event(&mut self, event: Event, cx: &mut Context) -> EventResult {
|
|
|
|
match event {
|
|
|
|
match event {
|
|
|
|
Event::Resize(width, height) => {
|
|
|
|
Event::Resize(width, height) => {
|
|
|
|
// HAXX: offset the render area height by 1 to account for prompt/commandline
|
|
|
|
// Ignore this event, we handle resizing just before rendering to screen.
|
|
|
|
cx.editor.resize(Rect::new(0, 0, width, height - 1));
|
|
|
|
// Handling it here but not re-rendering will cause flashing
|
|
|
|
EventResult::Consumed(None)
|
|
|
|
EventResult::Consumed(None)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Event::Key(key) => {
|
|
|
|
Event::Key(key) => {
|
|
|
|