Skip to content

Pressing <Tab> after only whitespce strips all whitespace before inputting the tab #205

@rabirabirara

Description

@rabirabirara

While investigating an earlier issue I submitted, I found what I believe is another bug (or I will look stupid if it's my own fault!).

In both gui and terminal Neovim, when pressing Tab after only whitespace characters, be they tabs or spaces, the press will erase all prior whitespace, then input the Tab. If vim detected that we were on some level of indentation before hand, then the whitespace will be stripped beyond that level of indentation.

If a single non-whitespace character comes before the input on the line, then the tab is correctly input, without any backspaces occurring.

EDIT: After further testing, it seems that pressing tab after only whitespace doesn't just strip all whitespace - if occurs in a line with no characters but whitespace, and there is a level of indentation assigned to this line, then the input will strip all whitespace, move the cursor to the indentation, and then input the Tab.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions