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

Error: selectionRange must be contained in fullRange #4962

Closed
yxw007 opened this issue Oct 30, 2024 · 1 comment
Closed

Error: selectionRange must be contained in fullRange #4962

yxw007 opened this issue Oct 30, 2024 · 1 comment
Labels
duplicate This issue or pull request already exists good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first

Comments

@yxw007
Copy link

yxw007 commented Oct 30, 2024

Vue - Official extension or vue-tsc version

v2.0.8

VSCode version

1.95.0

Vue version

3.5.12

TypeScript version

none

System Info

win10

package.json dependencies

{
"dependencies": {
    "@dcloudio/uni-app": "^3.0.0-alpha-4030120241009001",
    "@dcloudio/uni-app-plus": "^3.0.0-alpha-4030120241009001",
    "@dcloudio/uni-components": "^3.0.0-alpha-4030120241009001",
    "@dcloudio/uni-h5": "^3.0.0-alpha-4030120241009001",
    "@dcloudio/uni-mp-alipay": "^3.0.0-alpha-4030120241009001",
    "@dcloudio/uni-mp-baidu": "^3.0.0-alpha-4030120241009001",
    "@dcloudio/uni-mp-kuaishou": "^3.0.0-alpha-4030120241009001",
    "@dcloudio/uni-mp-lark": "^3.0.0-alpha-4030120241009001",
    "@dcloudio/uni-mp-qq": "^3.0.0-alpha-4030120241009001",
    "@dcloudio/uni-mp-toutiao": "^3.0.0-alpha-4030120241009001",
    "@dcloudio/uni-mp-weixin": "^3.0.0-alpha-4030120241009001",
    "@dcloudio/uni-quickapp-webview": "^3.0.0-alpha-4030120241009001",
    "@dcloudio/uni-ui": "^1.5.6",
    "lodash.clonedeep": "^4.5.0",
    "vue": "^3.5.12",
    "vue-i18n": "^9.1.9",
    "vuex": "^4.1.0"
  },
  "devDependencies": {
    "@dcloudio/types": "^3.4.12",
    "@dcloudio/uni-automator": "^3.0.0-alpha-4030120241009001",
    "@dcloudio/uni-cli-shared": "^3.0.0-alpha-4030120241009001",
    "@dcloudio/vite-plugin-uni": "^3.0.0-alpha-4030120241009001",
    "@uni-helper/unocss-preset-uni": "^0.2.10",
    "autoprefixer": "^10.4.20",
    "commitizen": "^4.3.1",
    "cross-env": "^7.0.3",
    "cz-conventional-changelog": "^3.3.0",
    "eslint": "^8.10.0",
    "eslint-config-prettier": "^8.5.0",
    "eslint-plugin-prettier": "^4.0.0",
    "eslint-plugin-vue": "^8.5.0",
    "husky": "^7.0.4",
    "json5": "^2.2.3",
    "less": "^4.1.2",
    "lint-staged": "^12.3.7",
    "postcss-comment": "^2.0.0",
    "prettier": "^2.5.1",
    "sass": "1.77.8",
    "standard-version": "^9.3.2",
    "unocss": "^0.63.4",
    "unocss-applet": "^0.8.4",
    "vite": "5.4.9"
  },
}

Steps to reproduce

  1. Make the style content empty, and </style> make the end tag and start tag on one line
  2. Feel free to delete a line of spaces and save to reproduce it

issue

What is expected?

Don’t pop up the box to report an error

What is actually happening?

image

[Error - 11:42:01 AM] Request textDocument/documentSymbol failed.
Error: selectionRange must be contained in fullRange
	at Hd.validate (file:///c:/Users/Administrator/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:108:33675)
	at new Hd (file:///c:/Users/Administrator/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:108:33883)
	at dn (c:\Users\Administrator\.vscode\extensions\vue.volar-2.1.8\dist\client.js:37:46612)
	at o (c:\Users\Administrator\.vscode\extensions\vue.volar-2.1.8\dist\client.js:37:21036)
	at Object.NS [as map] (c:\Users\Administrator\.vscode\extensions\vue.volar-2.1.8\dist\client.js:37:21122)
	at Object.pr [as asDocumentSymbols] (c:\Users\Administrator\.vscode\extensions\vue.volar-2.1.8\dist\client.js:37:46579)
	at c (c:\Users\Administrator\.vscode\extensions\vue.volar-2.1.8\dist\client.js:41:56059)
	at async OC.provideDocumentSymbols (file:///c:/Users/Administrator/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:137:125496)
[Error - 11:42:01 AM] Request textDocument/documentSymbol failed.
Error: selectionRange must be contained in fullRange
	at Hd.validate (file:///c:/Users/Administrator/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:108:33675)
	at new Hd (file:///c:/Users/Administrator/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:108:33883)
	at dn (c:\Users\Administrator\.vscode\extensions\vue.volar-2.1.8\dist\client.js:37:46612)
	at o (c:\Users\Administrator\.vscode\extensions\vue.volar-2.1.8\dist\client.js:37:21036)
	at Object.NS [as map] (c:\Users\Administrator\.vscode\extensions\vue.volar-2.1.8\dist\client.js:37:21122)
	at Object.pr [as asDocumentSymbols] (c:\Users\Administrator\.vscode\extensions\vue.volar-2.1.8\dist\client.js:37:46579)
	at c (c:\Users\Administrator\.vscode\extensions\vue.volar-2.1.8\dist\client.js:41:56059)
	at async OC.provideDocumentSymbols (file:///c:/Users/Administrator/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:137:125496)

Link to minimal reproduction

No response

Any additional comments?

Style does not fill in the content, and then keeps the start tag and end tag on one line, and then operates other codes at will, and an error will be reported when saving.

@KazariEX
Copy link
Member

Duplicate of #4959

@KazariEX KazariEX marked this as a duplicate of #4959 Oct 30, 2024
@KazariEX KazariEX closed this as not planned Won't fix, can't repro, duplicate, stale Oct 30, 2024
@KazariEX KazariEX added duplicate This issue or pull request already exists good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first and removed pending triage labels Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first
Projects
None yet
Development

No branches or pull requests

2 participants