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

formatonsave moves cursor at end of file and unfolds every section #112

@t-fritsch

Description

@t-fritsch

Environment

  • VSCode Version: 1.24.1
  • OS Version: Win 10

Actual behavior

When formatonsave is activated, saving the file places the cursor at the very end of the file, forcing the user to manually move the cursor back to its initial position.
The folded sections also gets unfolded, which makes it even more difficult to go back to initial position when working on large css files

Expected behavior

when formatonsave is activated, saving the file should not change the cursor position, it should remain on the line that it was on.

Steps to reproduce

  1. configure vscode csscomb to formatonsave
  2. create a css file and type css code into it
  3. save file
    issue-vscode-csscomb

Config

"csscomb.formatOnSave": true,

Note:
this issue is there because a previous issue was closed by the reporter but never worked on : #110

Edit : this issue doesn't occur when formatOnSave is false and you run command "CSSComb: Format styles" from command palette (CTRL+SHIFT+p).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions