scalameta / metals

Scala language server with rich IDE features 🚀
https://scalameta.org/metals/
Apache License 2.0
2.09k stars 330 forks source link

Multistring with `stripMargin` misaligned when pasting into last line #6798

Open soronpo opened 3 weeks ago

soronpo commented 3 weeks ago

Describe the bug

  1. Start with this code:
    val x =
    s"""|Hello
      |Good""".stripMargin
  2. Paste bye after Good. You will get
    val x =
    s"""|Hello
                |Goodbye""".stripMargin

Here is a recording of how it looks like on my machine: persistant

Expected behavior

Alignment should not change

Operating system

Windows

Editor/Extension

VS Code

Version of Metals

v1.3.5

Extra context or search terms

No response

tgodzik commented 3 weeks ago

Thanks for reporting! It's really tricky to get all the edge cases right :/