Skip to content

A separate function to return the value of restart_edit #8967

@zeertzjq

Description

@zeertzjq

Is your feature request about something that is currently impossible or hard to do? Please describe the problem.

Currently mode(1) only includes restart_edit if in Normal mode (niI, niR, niV), but the value of restart_edit may also be useful when not in Normal mode (e.g to determine which mode <Esc> goes to in Visual mode, or to simulate showmode messages like -- (insert) VISUAL -- in statusline).

Appending restart_edit to every mode where restart_edit can be non-empty in the return value of mode(1) may make the return value of mode(1) harder to parse, make the addition of new modes in the future more difficult, and make the documentation of mode() very long.

Describe the solution you'd like

Instead, there can be a separate function to return the value of restart_edit. IDK how it should be named though.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions