A simple CPU rendered GUI IDE experience.
| -rw-r--r-- | src/edi.rs | 2 | ||||
| -rw-r--r-- | src/edi/input_handlers/cursor.rs | 4 | ||||
| -rw-r--r-- | src/edi/st.rs | 2 | ||||
| -rw-r--r-- | src/lsp/communication.rs | 2 |
4 files changed, 6 insertions, 4 deletions
@@ -17,6 +17,7 @@ use lsp_types::*; use regex::Regex; use rootcause::report; use ropey::Rope; +use rust_fsm::StateMachine; use tokio::sync::oneshot::Sender; use winit::keyboard::NamedKey; use winit::window::Window; @@ -467,6 +468,7 @@ impl Editor { let rows = rows.floor() as usize; *vo = vo.saturating_sub(rows); } + _ = self.state.consume(Action::Scrolled); inlay!(self); } diff --git a/src/edi/input_handlers/cursor.rs b/src/edi/input_handlers/cursor.rs index bb0e0f6..092bc5d 100644 --- a/src/edi/input_handlers/cursor.rs +++ b/src/edi/input_handlers/cursor.rs @@ -110,7 +110,7 @@ impl Editor { } Some(Do::Hover) => { self.state.consume(Action::HOnNothing).unwrap(); - // w.request_redraw(); + w.request_redraw(); } None => {} x => unreachable!("{x:?}"), @@ -314,7 +314,7 @@ impl Editor { }) { x = format!("```cpp\n{x}\n```").into(); } - println!("{x}"); + // println!("{x}"); let x = hov::p(&x).expect("markdown parsing"); let m = hov::l(&x) .into_iter() diff --git a/src/edi/st.rs b/src/edi/st.rs index 01a3474..3fe6b31 100644 --- a/src/edi/st.rs +++ b/src/edi/st.rs @@ -92,7 +92,7 @@ Hovering(x) => { >, ((usize, usize), TextDocumentPositionParams)) => (v, h, d)) => Hovering({ let mut x = x; x.result = v; x.request_d(h, d); x }), C(_) => _ [Hover], MovedOut => Default, - + Scrolled => Default, // reconsidering K(Key::Character("s") if ctrl()) => Save [Save], K(Key::Character("q") if ctrl()) => Dead [Quit], diff --git a/src/lsp/communication.rs b/src/lsp/communication.rs index 0013ad1..7bc6b7c 100644 --- a/src/lsp/communication.rs +++ b/src/lsp/communication.rs @@ -81,7 +81,7 @@ pub fn handler( } } else if let Some((s, took, t)) = map.remove(&x.id.i32()) { - log::info!("request {} took {:?}", x.id, took.elapsed()); + log::debug!("request {} took {:?}", x.id, took.elapsed()); match s.send(x) { Ok(()) => {} Err(e) => { |