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

[Vscode Pulgin / Slint auto format] Chinese characters can cause long line formatting errors #7223

Open
mcitem opened this issue Dec 27, 2024 · 0 comments
Labels
bug Something isn't working need triaging Issue that the owner of the area still need to triage

Comments

@mcitem
Copy link

mcitem commented Dec 27, 2024

Bug Description

When a line is too long and contains Chinese characters, the extension formats incorrectly.

export component ExportedComponent {
    property <[{}]> items:[
        { icon: @image-url("1111111111111111111111111111111111111.svg"), text: @tr("账本"), modify: 0px },
    ];
}

export component ExportedComponent {
    property <[{}]> items:[
        { icon: @image-url("1111111111111111111111111111111111111.svg"), text: "账本", modify: 0px },
    ];
}

I don't quite understand why using the VSCode extension's auto-format on save results in errors. The screenshot is the result of automatic formatting after pressing Ctrl+S, while using the slint-lsp format command allows for normal formatting.

image
image
image
image

Reproducible Code (if applicable)

No response

Environment Details

  • Slint Version: 1.9.1
  • Platform/OS: win11 24h2
  • Programming Language: rust
  • Backend/Renderer: skia
    image

Product Impact

No response

@mcitem mcitem added bug Something isn't working need triaging Issue that the owner of the area still need to triage labels Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need triaging Issue that the owner of the area still need to triage
Projects
None yet
Development

No branches or pull requests

1 participant