Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Format multiple lines doesn't always respect selection #9

Closed
huguesv opened this issue Sep 10, 2015 · 2 comments
Closed

Format multiple lines doesn't always respect selection #9

huguesv opened this issue Sep 10, 2015 · 2 comments

Comments

@huguesv
Copy link
Contributor

huguesv commented Sep 10, 2015

It's easiest to see this issue if you have 4 lines or more of unformatted code, and select the 2 middle lines by clicking in the margin like this:

format-multi-line-before

Note that line 14 and 15 are selected and the caret is at the start of line 16.

Edit->Advanced->Format Selection

Result is that both lines that were selected are formatted, in addition to the following line, which shouldn't have been formatted.

format-multi-line-after

For comparison, use "Edit->Advanced->Make Uppercase", which correctly only applies formatting to the 2 selected lines.

While it's correct behavior to format the line that the caret is on when there is no selected range, it should not be done when there is a selected range.

@huguesv
Copy link
Contributor Author

huguesv commented Sep 10, 2015

Same for the Comment Selection and Uncomment Selection commands.

@MikhailArkhipov
Copy link
Contributor

Because margin click actually places end of selected at the next line.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants