de-jcup / eclipse-yaml-editor

Eclipse YAML editor
https://marketplace.eclipse.org/content/yaml-editor
Apache License 2.0
35 stars 10 forks source link

Multi line indenting (Windows) #67

Open jodastephen opened 5 years ago

jodastephen commented 5 years ago

Thanks for the plugin. I'm using v1.4.2 on Windows with an indent of 2. I see the following problem:

  init_maven:
    description: "Initializing Maven"
    steps:
      - run:
          name: Initializing Maven
          command: |
            mkdir -p ./.mvn
  maven_install:
    description: "Maven install"

I imagine that the Windows/Unix line endings issue is related to the visual disappearance of the last character, given how the original 2 character line endings change to 1 character ones.

This get even messier is you use Ctrl-Z after Shift-Tab. What you get then is an extra blank line in the view after the section that was indented. This extra blank line doesn't exist in the underlying document, so as you scroll up and down, each line is redrawn and jumps up. Again, I think solving the line ending issue would probably solve this too.

de-jcup commented 5 years ago

Could you please link or upload an example file here (with your endings) ?

jodastephen commented 4 years ago

An example file is as above - just use Windows line endings \r\n on a machine running Windows. (ie. any example yaml file has the issue)

elonderin commented 4 years ago

i can confirm this issue, but only after i switched to \r\n line endings in the file menu (my default is to use just \n even on windows)