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

Folding provider inaccurate when token level=0, line!=0 #4

Closed
2 tasks done
zm-cttae opened this issue Jan 27, 2023 · 7 comments
Closed
2 tasks done

Folding provider inaccurate when token level=0, line!=0 #4

zm-cttae opened this issue Jan 27, 2023 · 7 comments
Assignees
Labels
type-bug Something isn't working
Milestone

Comments

@zm-cttae
Copy link
Member

zm-cttae commented Jan 27, 2023

🐛 Bug Report

  • I'm using the latest version of vscode-textmate-languageservice available.
  • I searched existing issues, open & closed. Yes, my issue is new.

Describe the bug

The adjustment to the folding provider fixed folds when level>0.
It put a +1 on all folds because the first fold is on line 0.

Reproduce the bug

  • Clone mpm.m@mobeets/mpm#v3.1.0
  • Go to the findAndSetupPackage outline symbol.
  • The fold is 1 line above where it should be.

Screenshots

image

Expected behavior

We need to not +1 to all tokens. We need to increment the edge conditionlevel=0&line!=0 and restore sanity to the output, while keeping folds level>0 working.

Additional context

  • VSC version: 1.74.3

  • Extensions:

    code --list-extensions
    aeschli.vscode-css-formatter
    AffenWiesel.matlab-formatter
    albymor.increment-selection
    alefragnani.Bookmarks
    alexdima.vscode-lcov
    amodio.tsl-problem-matcher
    apommel.matlab-interactive-terminal
    arcanis.vscode-zipfs
    arcticicestudio.nord-visual-studio-code
    austin.code-gnu-global
    be5invis.vscode-custom-css
    bierner.color-info
    bierner.github-markdown-preview
    bierner.markdown-checkbox
    bierner.markdown-emoji
    bierner.markdown-footnotes
    bierner.markdown-mermaid
    bierner.markdown-preview-github-styles
    bierner.markdown-yaml-preamble
    Blodwynn.soysyntaxchecker
    brendanfh.onyx
    brunnerh.file-properties-viewer
    camel-tooling.yo
    christian-kohler.npm-intellisense
    dan-c-underwood.arm
    DavidAnson.vscode-markdownlint
    dbaeumer.jshint
    dbaeumer.vscode-eslint
    debens.sort-js-object
    developer2006.svg-gallery
    donjayamanne.githistory
    DotJoshJohnson.xml
    dqisme.sync-scroll
    dt.ghlink
    dtsvet.vscode-wasm
    eamodio.gitlens
    EditorConfig.EditorConfig
    eg2.vscode-npm-script
    emilast.LogFileHighlighter
    enkia.tokyo-night
    Equinusocio.vsc-community-material-theme
    Equinusocio.vsc-material-theme
    equinusocio.vsc-material-theme-icons
    eriklynd.json-tools
    esbenp.prettier-vscode
    evgeniypeshkov.syntax-highlighter
    fabiospampinato.vscode-github-notifications-bell
    felipe-mendes.slack-theme
    file-icons.file-icons
    formulahendry.auto-close-tag
    formulahendry.auto-rename-tag
    freebroccolo.sml
    george-alisson.html-preview-vscode
    Gimly81.matlab
    GitHub.codespaces
    GitHub.github-vscode-theme
    GitHub.remotehub
    GitHub.vscode-codeql
    GitHub.vscode-pull-request-github
    GitLab.gitlab-workflow
    golang.go
    haskell.haskell
    hbenl.vscode-test-explorer
    HookyQR.minify
    humy2833.ftp-simple
    icrawl.discord-vscode
    iliazeus.vscode-ansi
    ivangabriele.vscode-heroku
    jasonnutter.vscode-codeowners
    jeblad-3.WMFsnippets
    jeff-hykin.better-shellscript-syntax
    jeffersonlicet.snipped
    jinsihou.diff-tool
    joaomoreno.github-sharp-theme
    jock.svg
    jprestidge.theme-material-theme
    justusadam.language-haskell
    kbysiec.vscode-go-to-mdn
    kenhowardpdx.vscode-gist
    KnisterPeter.vscode-github
    laktak.hjson
    marp-team.marp-vscode
    maziac.asm-code-lens
    mhutchie.git-graph
    mitchdenny.ecdc
    mrmlnc.vscode-apache
    mrmlnc.vscode-postcss-sorting
    mrmlnc.vscode-remark
    ms-azuretools.vscode-docker
    ms-dotnettools.csharp
    ms-python.isort
    ms-python.python
    ms-python.vscode-pylance
    ms-toolsai.jupyter
    ms-toolsai.jupyter-keymap
    ms-toolsai.jupyter-renderers
    ms-toolsai.vscode-jupyter-cell-tags
    ms-toolsai.vscode-jupyter-slideshow
    ms-vscode-remote.remote-containers
    ms-vscode-remote.remote-wsl
    ms-vscode.azure-repos
    ms-vscode.cpptools
    ms-vscode.hexeditor
    ms-vscode.live-server
    ms-vscode.powershell
    ms-vscode.remote-repositories
    ms-vscode.test-adapter-converter
    ms-vscode.Theme-MarkdownKit
    ms-vscode.vscode-github-issue-notebooks
    ms-vscode.vscode-js-profile-flame
    ms-vscode.vscode-typescript-tslint-plugin
    narsenico.vscode-progressive-increment
    nkokhelox.svg-font-previewer
    Northerntwig.magoon
    Orta.vscode-jest
    ozaki.markdown-github-dark
    pedro-w.tmlanguage
    PeggyJS.peggy-language
    PKief.material-icon-theme
    PKief.material-product-icons
    pnp.polacode
    qinjia.seti-icons
    rafaelmaiolla.diff
    ramyaraoa.show-offset
    RandomFractalsInc.vscode-data-preview
    redhat.fabric8-analytics
    redhat.java
    redhat.vscode-commons
    redhat.vscode-xml
    redhat.vscode-yaml
    richie5um2.vscode-sort-json
    RobbOwen.synthwave-vscode
    rogalmic.bash-debug
    RoweWilsonFrederiskHolme.wikitext
    ryanluker.vscode-coverage-gutters
    ryanmcalister.unotes
    SAPOSS.xml-toolkit
    SergeLamikhov.lcov-lang
    sjhuangx.vscode-scheme
    sleistner.vscode-fileutils
    slightc.pip-manager
    snakemake.snakemake-lang
    sndst00m.markdown-github-dark-pack
    sndst00m.markdown-github-light
    sndst00m.starfall-visual-studio-code
    sndst00m.vscode-native-svg-preview
    sodatea.velocity
    stateful.awesome-ux
    stylelint.vscode-stylelint
    sumneko.lua
    TakumiI.markdowntable
    tamasfe.even-better-toml
    tatsy.vscode-3d-preview
    tht13.rst-vscode
    Tobias-Faller.vt100-syntax-highlighting
    tomoki1207.selectline-statusbar
    tonsky.theme-alabaster
    tristanremy.mirage
    trond-snekvik.simple-rst
    trunk.io
    Tyriar.luna-paint
    VisualStudioExptTeam.intellicode-api-usage-examples
    VisualStudioExptTeam.vscodeintellicode
    vitaliymaz.vscode-svg-previewer
    vscjava.vscode-java-debug
    vscjava.vscode-java-dependency
    vscjava.vscode-java-pack
    vscjava.vscode-java-test
    vscjava.vscode-maven
    vscode-icons-team.vscode-icons
    XadillaX.viml
    yorkxin.coffeescript-support
    zhuangtongfa.material-theme
    
  • OS version: 21H2

@zm-cttae
Copy link
Member Author

zm-cttae commented Jan 27, 2023

changed due date to January 27, 2023

@zm-cttae
Copy link
Member Author

zm-cttae commented Jan 27, 2023

created branch 4-folding-provider-inaccurate-when-token-level-0 to address this issue

@zm-cttae
Copy link
Member Author

zm-cttae commented Jan 27, 2023

mentioned in commit 6524a3d

@zm-cttae
Copy link
Member Author

zm-cttae commented Jan 27, 2023

mentioned in commit ba51801

@zm-cttae
Copy link
Member Author

zm-cttae commented Jan 27, 2023

mentioned in commit 34be661

@zm-cttae
Copy link
Member Author

zm-cttae commented Jan 27, 2023

locked this issue

@zm-cttae
Copy link
Member Author

zm-cttae commented Jan 27, 2023

mentioned in commit 389a746

@zm-cttae zm-cttae self-assigned this Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant