Skip to content

Trailing spaces highlighted on all lines but the first #111

Closed
@hsandt

Description

@hsandt

When highlighting trailing spaces, they are ignored on the current line as expected, but when using multi-caret / multiple selection, trailing spaces on lines beyond the first one (from top to bottom, not by selection order) are still highlighted.

The error comes from trailing_spaces.py, in find_trailing_spaces:
sel = view.sel()[0]
only refers to the top-most selection. I think we should iterate on all selected regions instead, as Whitespace does in https://github.com/randy3k/Whitespace/blob/master/Whitespace.py

Note: I use TrailingSpaces for highlighting and Whitespace for trimming.

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