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

Tabbing on folded line in YAML deletes content #5856

Open
andrewmkeller opened this issue Jun 28, 2019 · 2 comments
Open

Tabbing on folded line in YAML deletes content #5856

andrewmkeller opened this issue Jun 28, 2019 · 2 comments

Comments

@andrewmkeller
Copy link

Description of the Issue

When you tab on a folded line in yaml language, all of the content associated with that line, except the first is removed. Tabbing when multiple lines are selected or when the collapsed line is selected works great, but tabbing without first selecting the line removed all subsequent lines withing the fold.

Steps to Reproduce the Issue

  1. set language to YAML
  2. type:
Test:
  - here is some content.
  1. Fold the line (click the minus on the left side of the first line).
  2. Place your cursor at the beginning of the first line and press Tab.
  3. Boom! Your content is gone!

Expected Behavior

When I tab a folded line, I expect all associated lines to be be tabbed as well not deleted. This would be useful for restructuring content stored in a yaml file.

Actual Behavior

Tabbing on folded yaml line deletes the content within the folded line.

Debug Information

Notepad++ v7.7.1 (64-bit)
Build time : Jun 16 2019 - 21:24:47
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS : Windows 10 (64-bit)
Plugins : DSpellCheck.dll mimeTools.dll NppConverter.dll

@sasumner
Copy link
Contributor

So when I try this as described, it appears that the folded content is gone...except the line numbers (1 and 3) give us a hint that it is NOT. Indeed, saving/closing/reloading the file show the content is still there.

However, after the initial set of steps, the content is not accessible for editing, with no simple way seemingly to restore it to such a state, so it is a problem. :)

@Ekopalypse
Copy link
Contributor

As @sasumner already pointed out, collapsed lines are NOT deleted but they are still hidden and folding mark has been removed as it doesn't fulfill lexer requirements in this case anymore.

Another way to make it visible again, is to press SHIFT+TAB to move the word back.

And the correct way to move multiple lines is to select those first. Folded lines are NOT selected lines, therefor folded lines are not taken into consideration when calculating the range of lines to be moved.

Obviously one could argue that, either npp should take care to make it visible again or the lexer, which removed the folding mark, personally, I think it is in the responsibility of the user to use the right actions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants