Metals: Range formatting issue within a multiline string

Created on 17 Mar 2020  路  3Comments  路  Source: scalameta/metals

Describe the bug
When selecting part of a multiline string that needs to be formatted, the formatting only works when you select after the | to start the formatting. This was pointed out in #1505 by @kpbochenek .

To Reproduce
Steps to reproduce the behavior:

  1. Go to multiline string that isn't formatted correctly
  2. Select portion of string to format including the first |
  3. Try to format selection
  4. Doesn't format as expected unless you don't include the |

Expected behavior
Expect this to align the | like it should.

Screenshots

image

Installation:

  • Operating system: macOS
  • Editor: Visual Studio Code
  • Metals version: v0.8.1

Search terms
Range formatting, formatting, multiline strings

bug

Most helpful comment

I am currently working on this issue.

All 3 comments

Attaching gif:

formatselection

Attaching gif:

Whoops, I thought I did attach the gif, but I only did the image 馃槵

I am currently working on this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

olafurpg picture olafurpg  路  4Comments

gabro picture gabro  路  3Comments

kiviok picture kiviok  路  5Comments

iokacha picture iokacha  路  4Comments

romanowski picture romanowski  路  4Comments