`Format selection` too picky about selection?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 446
- Forks
- 32
- Avg merge
- 16h 48m
- Merged PRs (30d)
- 1
Description
I noticed that Format selection only works when the selection includes just the code and nothing else as shown in the first image:
However, I sometimes select code that I would like to reformat by repeatedly tapping Cmd+L (select line) in which case the selection will include the line end and the cursor will be in the line underneath the selection. In this case, Format selection does not do anything.
I would like to suggest making Air less "picky" about the selected area if this does not lead to any conflicts I'm not thinking about.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file, test, or entry point is named in the issue. First reproduce the behavior by selecting code with Cmd+L and invoking Format selection; investigate the selection handling, then confirm that selections including line ends and the following cursor position are formatted without breaking existing cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100