mirror of
https://github.com/James-Yu/LaTeX-Workshop.git
synced 2024-10-04 23:27:20 +03:00
Fix three DeepScan complaints
This commit is contained in:
parent
96b6bcd900
commit
177bf3e186
@ -191,7 +191,6 @@ export class MathPreviewPanel {
|
||||
if (!texMath) {
|
||||
this.clearCache()
|
||||
return this.panel.webview.postMessage({type: 'mathImage', src: '' })
|
||||
return
|
||||
}
|
||||
let cachedCommands: string | undefined
|
||||
if ( position.line === this.prevCursorPosition?.line && documentUri === this.prevDocumentUri ) {
|
||||
|
@ -202,32 +202,26 @@ export class SelectionRangeProvider implements vscode.SelectionRangeProvider {
|
||||
itemNodes = itemNodes.filter((node) => node.name === 'item')
|
||||
newInnerContent = this.findInnerContentIncludingPos(lupos, innerContent, itemNodes, innerContentLuRange)
|
||||
if (newInnerContent) {
|
||||
if (newInnerContent.startSep?.location) {
|
||||
const start = LuPos.from(newInnerContent.startSep.location.start)
|
||||
innerContent = newInnerContent.content
|
||||
innerContentLuRange = newInnerContent.contentLuRange
|
||||
const newContentRange = toVscodeRange({start, end:innerContentLuRange.end})
|
||||
curSelectionRange = new vscode.SelectionRange(newContentRange, curSelectionRange)
|
||||
}
|
||||
innerContent = newInnerContent.content
|
||||
innerContentLuRange = newInnerContent.contentLuRange
|
||||
const newContentRange = toVscodeRange(innerContentLuRange)
|
||||
let newContentRange = toVscodeRange(innerContentLuRange)
|
||||
if (newInnerContent.startSep?.location) {
|
||||
const start = LuPos.from(newInnerContent.startSep.location.start)
|
||||
newContentRange = toVscodeRange({start, end:innerContentLuRange.end})
|
||||
}
|
||||
curSelectionRange = new vscode.SelectionRange(newContentRange, curSelectionRange)
|
||||
}
|
||||
}
|
||||
const linebreaksNodes = innerContent.filter(latexParser.isLinebreak)
|
||||
newInnerContent = this.findInnerContentIncludingPos(lupos, innerContent, linebreaksNodes, innerContentLuRange)
|
||||
if (newInnerContent) {
|
||||
if (newInnerContent.endSep?.location) {
|
||||
const end = LuPos.from(newInnerContent.endSep.location.end)
|
||||
innerContent = newInnerContent.content
|
||||
innerContentLuRange = newInnerContent.contentLuRange
|
||||
const newContentRange = toVscodeRange({start: innerContentLuRange.start, end})
|
||||
curSelectionRange = new vscode.SelectionRange(newContentRange, curSelectionRange)
|
||||
}
|
||||
innerContent = newInnerContent.content
|
||||
innerContentLuRange = newInnerContent.contentLuRange
|
||||
const newContentRange = toVscodeRange(innerContentLuRange)
|
||||
let newContentRange = toVscodeRange(innerContentLuRange)
|
||||
if (newInnerContent.endSep?.location) {
|
||||
const end = LuPos.from(newInnerContent.endSep.location.end)
|
||||
newContentRange = toVscodeRange({start: innerContentLuRange.start, end})
|
||||
}
|
||||
curSelectionRange = new vscode.SelectionRange(newContentRange, curSelectionRange)
|
||||
}
|
||||
const alignmentTabNodes = innerContent.filter(latexParser.isAlignmentTab)
|
||||
|
Loading…
Reference in New Issue
Block a user