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

Indentation incorrect when text copied #287

Open
6 tasks
JamesRandom opened this issue Mar 14, 2021 · 3 comments
Open
6 tasks

Indentation incorrect when text copied #287

JamesRandom opened this issue Mar 14, 2021 · 3 comments

Comments

@JamesRandom
Copy link

Environment

  • Extension version: 146.0.0
  • Visual Studio Code version: 1.54.2
  • Operating System version: macOS 10.15.7
  • Python version: 3.6
  • sphinx version: 3.4.3
  • A sample of conf.py or its important fragments:

Expected behavior

When text is copied and pasted, I expect the indentation to remain the same.

Actual behavior

The indentation is incorrectly changed to the indentation of a previous line.

Detailed Steps to reproduce the problem

I have a file with the following text:

Heading 1
=========

* Bullet 1
    * Bullet 2
    * Bullet 3

If I copy that text and paste it at the end of the file, then the result is:

Heading 1
=========

* Bullet 1
    * Bullet 2
    * Bullet 3

    Heading 1
    =========
    
    * Bullet 1
        * Bullet 2
        * Bullet 3

This creates invalid and incorrect rst source.

The expected results is:

Heading 1
=========

* Bullet 1
    * Bullet 2
    * Bullet 3

Heading 1
=========

* Bullet 1
    * Bullet 2
    * Bullet 3
@lextm
Copy link
Member

lextm commented Apr 18, 2021

Related to #265 . The implementation comes from a Markdown extension without almost no modification.

There is no plan to change anything here in this extension unless the upstream is changed. The workaround is also simple, to select the block and press Tab + Shift.

@JamesRandom
Copy link
Author

Is there any chance of a setting to disable the list handling features? I have stopped using this extension because I find it too intrusive

@lextm
Copy link
Member

lextm commented Apr 23, 2021

The new option does not seem to resolve the issue once and for all.

But there seems to be a quicker workaround. After pasting the block of lines, you can press the Undo shortcut to get rid of the unwanted indentation.

Further investigation is required.

@lextm lextm reopened this Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants