Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Copy paste of text aligned with spaces (e.g. asterisk-aligned PHPDoc) sometimes loses the alignment with soft tabs off #5642

@driskell

Description

@driskell

Easiest to reproduce with PHP grammar, and the "doc_f" snippet. Soft tabs needs to be off (it's fine with it on.)

Create a new PHP file and use doc_f snippet. You'll get a PHPDoc block which uses the recommended formatting - the asterisks are aligned vertically using an additional leading space.

When copy and pasting... this space is lost if you paste on an already indented line. ANIGIF below shows the reproduction, and shows that on an empty line it pastes OK, but on pasting with indentation the spaces aligning the asterisks are lost.

example

In case someone thinks aligning the asterisks is bad practice - it's actually customary for PHPDoc. See first glossary entry on the PHPDoc website:
http://www.phpdoc.org/docs/latest/glossary.html

Edit: Removed the root cause bit - I've put it in the PR

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions