Repository: zellij-org/zellij
File: zellij-server/src/panes/plugin_pane.rs (Rust)

Code before:
    }
    fn pull_left(&mut self, count: usize) {
        self.geom.x -= count;
        self.should_render = true;
    }
    fn pull_up(&mut self, count: usize) {
        self.geom.y -= count;
        self.should_render = true;
    }
    fn scroll_up(&mut self, count: usize) {
        self.send_plugin_instructions
            .send(PluginInstruction::Update(
                Some(self.pid),
                Event::Mouse(Mouse::ScrollUp(count)),
            ))
            .unwrap();
    }
    fn scroll_down(&mut self, count: usize) {
        self.send_plugin_instructions
            .send(PluginInstruction::Update(
                Some(self.pid),
                Event::Mouse(Mouse::ScrollDown(count)),
            ))
            .unwrap();
    }
    fn clear_scroll(&mut self) {
        self.send_plugin_instructions
            .send(PluginInstruction::Update(
                Some(self.pid),
                Event::Mouse(Mouse::ClearScroll),
            ))
            .unwrap();
    }
    fn start_selection(&mut self, start: &Position) {
        self.send_plugin_instructions
            .send(PluginInstruction::Update(
                Some(self.pid),
                Event::Mouse(Mouse::LeftClick(start.line.0, start.column.0)),
            ))
            .unwrap();
    }
    fn update_selection(&mut self, position: &Position) {
        self.send_plugin_instructions
            .send(PluginInstruction::Update(
                Some(self.pid),
                Event::Mouse(Mouse::MouseHold(position.line.0, position.column.0)),
            ))
            .unwrap();
    }
    fn end_selection(&mut self, end: Option<&Position>) {
        self.send_plugin_instructions

Review comment (suggestion):
Can you trigger a `clear_scroll` with the mouse? I suppose I assumed it was only really called by things like `reset` in the terminal. If `clear_scroll` isn't something that you can trigger with a mouse, then I'd like to leave this unimplemented for the time-being :)

Code after:
    }
    fn pull_left(&mut self, count: usize) {
        self.geom.x -= count;
        self.should_render = true;
    }
    fn pull_up(&mut self, count: usize) {
        self.geom.y -= count;
        self.should_render = true;
    }
    fn scroll_up(&mut self, count: usize) {
        self.send_plugin_instructions
            .send(PluginInstruction::Update(
                Some(self.pid),
                Event::Mouse(Mouse::ScrollUp(count)),
            ))
            .unwrap();
    }
    fn scroll_down(&mut self, count: usize) {
        self.send_plugin_instructions
            .send(PluginInstruction::Update(
                Some(self.pid),
                Event::Mouse(Mouse::ScrollDown(count)),
            ))
            .unwrap();
    }
    fn clear_scroll(&mut self) {
        unimplemented!();
    }
    fn start_selection(&mut self, start: &Position) {
        self.send_plugin_instructions
            .send(PluginInstruction::Update(
                Some(self.pid),
                Event::Mouse(Mouse::LeftClick(start.line.0, start.column.0)),
            ))
            .unwrap();
    }
    fn update_selection(&mut self, position: &Position) {
        self.send_plugin_instructions
            .send(PluginInstruction::Update(
                Some(self.pid),
                Event::Mouse(Mouse::MouseHold(position.line.0, position.column.0)),
            ))
            .unwrap();
    }
    fn end_selection(&mut self, end: Option<&Position>) {
        self.send_plugin_instructions
            .send(PluginInstruction::Update(
                Some(self.pid),
                Event::Mouse(Mouse::MouseRelease(
                    end.map(|Position { line, column }| (line.0, column.0)),
                )),