eclipse-yaml-editor
eclipse-yaml-editor copied to clipboard
Multi line indenting (Windows)
Thanks for the plugin. I'm using v1.4.2 on Windows with an indent of 2. I see the following problem:
- Using some yaml like this on Windows with Windows line endings:
init_maven:
description: "Initializing Maven"
steps:
- run:
name: Initializing Maven
command: |
mkdir -p ./.mvn
maven_install:
description: "Maven install"
- Select multiple lines by placing the cursor at the very start of a line and holding Shift down as you press the down arrow. (eg select the 5 lines from "steps" to the very start of the "maven_install" line).
- Press Shift-Tab (to move the section one tab space to the left)
- The last character of the shifted section disappears from view, but it is still in the actual document - if you close the document and reopen it, the character is shown again
- The line ending of all the selected lines will be changed from Windows-style to Unix-style
- The same happens when pressing Tab instead of Shift-Tab
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.
Could you please link or upload an example file here (with your endings) ?
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)
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)