fn handle_cursor_move(&mut self, ctx: &RpcCtx, body: &Value) {
        #[derive(Deserialize, Debug)]
        struct Event {
            view_id: String,
            col: u32,
            line: u32,
        }

        let event: Event = serde_json::from_value(body.clone()).unwrap();

        self.create_view_if_required(ctx, &event.view_id);
        self.views
            .get_mut(&event.view_id)
            .unwrap()
            .move_cursor(ctx, event.line, event.col);
    }
/// Handle the "scroll_to" event.
///
/// It move the cursor into the given position. If the position is not
/// within the screen, it will scroll all the view content by modifying
/// the `self.screen_start` value.
Handle the "scroll_to" event.
It move the cursor into the given position. If the position is not
within the screen, it will scroll all the view content by modifying
the `self.screen_start` value.
Handle the " scroll_to " event . It move the cursor into the given position . If the position is not within the screen it will scroll all the view content by modifying the ` self . screen_start ` value .
fn handle_cursor_move(&mut self, ctx: &RpcCtx, body: &Value) {
        #[derive(Deserialize, Debug)]
        struct Event {
            view_id: String,
            col: u32,
            line: u32,
        }
        let event: Event = serde_json::from_value(body.clone()).unwrap();
        self.create_view_if_required(ctx, &event.view_id);
        self.views
            .get_mut(&event.view_id)
            .unwrap()
            .move_cursor(ctx, event.line, event.col);
    }
fn handle_cursor_move ( & mut self , ctx : & RpcCtx , body : & Value ) { # [ derive ( Deserialize Debug ) ] struct Event { view_id : String , col : u32 , line : u32 , } let event : Event = serde_json :: from_value ( body . clone ( ) ) . unwrap ( ) ; self . create_view_if_required ( ctx , & event . view_id ) ; self . views . get_mut ( & event . view_id ) . unwrap ( ) . move_cursor ( ctx , event . line , event . col ) ; }
Handle the "scroll_to" event.
Handle the " scroll_to " event .
&mut self
ctx
&RpcCtx
body
&Value
&mut self
ctx
&RpcCtx
body
&Value