Skip to content

Add support selection to EOL commands #12702

@ArkadiuszMichalski

Description

@ArkadiuszMichalski

Would be nice to have selection support for these two commands: EOL to Space and Remove Unnecessary Blank and EOL. Same as we have for trim operations #12655.

image

@donho I have a few questions before starting this. In EOL case it's a bit simpler, because here it's only important to select EOL, so what we select will be taken into account. So for EOL to Space:

image
Will replace EOL in 1 line.

image
Will replace EOL in 1 and 2 line.

image
Will replace EOL in 1 line.

In this case it doesn't make sense to extend the selection to the whole data? For example:
image
Expanding will not affect the process because the selected EOL will not change. Well, but I'm not sure to not expand anyway, because the Trim operations make expanding and this one EOL to Space should not do it? Also Remove Unnecessary Blank and EOL firstly run doTrim() so expanding will be done here anyway.
These two commands should be considered in the context of whole lines or just according to the exactly selection made? A similar question will appear later for the last 3 commands Tab to Space, Space to Tab (all/leading).

I have one more question about this command Remove Unnecessary Blank and EOL. Actually for such example:
image
we get this:
image

We get last 3 space because last 3 EOL was change to it. But this spaces are also not unnecessary, as command name suggest? Should not be removed?

One more example:
image
After all once space left. If we assume that for Remove Unnecessary Blank and EOL, actions for EOL always mean replacing them with a space, this might be correct.

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