Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multistring with stripMargin misaligned when pasting into last line #6798

Closed
soronpo opened this issue Sep 25, 2024 · 1 comment · Fixed by #6897
Closed

Multistring with stripMargin misaligned when pasting into last line #6798

soronpo opened this issue Sep 25, 2024 · 1 comment · Fixed by #6897
Assignees
Labels
bug Something that is making a piece of functionality unusable
Milestone

Comments

@soronpo
Copy link

soronpo commented Sep 25, 2024

Describe the bug

  1. Start with this code:
val x =
  s"""|Hello
      |Good""".stripMargin
  1. 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
Copy link
Contributor

tgodzik commented Sep 25, 2024

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

@tgodzik tgodzik moved this from Triage to To do in Metals Issue Board Sep 25, 2024
@soronpo soronpo changed the title Multistring with stripMarging misaligned when pasting into last line Multistring with stripMargine misaligned when pasting into last line Sep 25, 2024
@soronpo soronpo changed the title Multistring with stripMargine misaligned when pasting into last line Multistring with stripMargin misaligned when pasting into last line Sep 25, 2024
@tgodzik tgodzik added the bug Something that is making a piece of functionality unusable label Oct 19, 2024
@tgodzik tgodzik self-assigned this Oct 30, 2024
tgodzik added a commit to tgodzik/metals that referenced this issue Oct 30, 2024
@github-project-automation github-project-automation bot moved this from In progress to Done in Metals Issue Board Oct 30, 2024
@tgodzik tgodzik added this to the Metals v1.4.1 milestone Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is making a piece of functionality unusable
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants