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

Code before:
        frame_params: FrameParams,
        input_mode: InputMode,
    ) -> Result<Option<(Vec<CharacterChunk>, Option<String>)>> {
        // FIXME: This is a hack that assumes all fixed-size panes are borderless. This
        // will eventually need fixing!
        let res = if self.frame && !(self.geom.rows.is_fixed() || self.geom.cols.is_fixed()) {
            let pane_title = if self.pane_name.is_empty()
                && input_mode == InputMode::RenamePane
                && frame_params.is_main_client
            {
                String::from("Enter name...")
            } else if self.pane_name.is_empty() {
                self.pane_title.clone()
            } else {
                self.pane_name.clone()
            };
            let frame = PaneFrame::new(
                self.current_geom().into(),
                (0, 0), // scroll position
                pane_title,
                frame_params,
            );
            Some(
                frame
                    .render()
                    .with_context(|| format!("failed to render frame form client {_client_id}"))?,
            )
        } else {
            None
        };
        Ok(res)
    }
    fn render_fake_cursor(
        &mut self,
        _cursor_color: PaletteColor,
        _text_color: PaletteColor,
    ) -> Option<String> {
        None
    }
    fn render_terminal_title(&mut self, input_mode: InputMode) -> String {
        let pane_title = if self.pane_name.is_empty() && input_mode == InputMode::RenamePane {
            "Enter name..."
        } else if self.pane_name.is_empty() {
            &self.pane_title
        } else {
            &self.pane_name
        };
        make_terminal_title(pane_title)
    }
    fn update_name(&mut self, name: &str) {
        match name {

Review comment (bug):
There's a little typo here:
```suggestion
                    .with_context(|| format!("failed to render frame for client {_client_id}"))?,
```

Code after:
        frame_params: FrameParams,
        input_mode: InputMode,
    ) -> Result<Option<(Vec<CharacterChunk>, Option<String>)>> {
        // FIXME: This is a hack that assumes all fixed-size panes are borderless. This
        // will eventually need fixing!
        let res = if self.frame && !(self.geom.rows.is_fixed() || self.geom.cols.is_fixed()) {
            let pane_title = if self.pane_name.is_empty()
                && input_mode == InputMode::RenamePane
                && frame_params.is_main_client
            {
                String::from("Enter name...")
            } else if self.pane_name.is_empty() {
                self.pane_title.clone()
            } else {
                self.pane_name.clone()
            };
            let frame = PaneFrame::new(
                self.current_geom().into(),
                (0, 0), // scroll position
                pane_title,
                frame_params,
            );
            Some(
                frame
                    .render()
                    .with_context(|| format!("failed to render frame for client {_client_id}"))?,
            )
        } else {
            None
        };
        Ok(res)
    }
    fn render_fake_cursor(
        &mut self,
        _cursor_color: PaletteColor,
        _text_color: PaletteColor,
    ) -> Option<String> {
        None
    }
    fn render_terminal_title(&mut self, input_mode: InputMode) -> String {
        let pane_title = if self.pane_name.is_empty() && input_mode == InputMode::RenamePane {
            "Enter name..."
        } else if self.pane_name.is_empty() {
            &self.pane_title
        } else {
            &self.pane_name
        };
        make_terminal_title(pane_title)
    }
    fn update_name(&mut self, name: &str) {
        match name {