Skip to content

eval_statusline behave in undefined way with empty string input #267

@Mouthless-Stoat

Description

@Mouthless-Stoat

The following code out unexpected result when neovim launch

#[nvim_oxi::plugin]
fn main() -> nvim_oxi::Result<()> {
    nvim_oxi::print!(
        "{:?}",
        nvim_oxi::api::eval_statusline("", &nvim_oxi::api::opts::EvalStatuslineOpts::default())?
    );
    Ok(())
}

Some output that I got

StatuslineInfos { highlights: [], str: "/c", width: 2 }
StatuslineInfos { highlights: [], str: "/s", width: 2 }
StatuslineInfos { highlights: [], str: "/c", width: 2 }
StatuslineInfos { highlights: [], str: "getcwd", width: 6 }
StatuslineInfos { highlights: [], str: "\u{e}", width: 2 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions