mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge vscode source through 1.62 release (#19981)
* Build breaks 1 * Build breaks * Build breaks * Build breaks * More build breaks * Build breaks (#2512) * Runtime breaks * Build breaks * Fix dialog location break * Update typescript * Fix ASAR break issue * Unit test breaks * Update distro * Fix breaks in ADO builds (#2513) * Bump to node 16 * Fix hygiene errors * Bump distro * Remove reference to node type * Delete vscode specific extension * Bump to node 16 in CI yaml * Skip integration tests in CI builds (while fixing) * yarn.lock update * Bump moment dependency in remote yarn * Fix drop-down chevron style * Bump to node 16 * Remove playwrite from ci.yaml * Skip building build scripts in hygine check
This commit is contained in:
BIN
extensions/search-result/images/icon.png
Normal file
BIN
extensions/search-result/images/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
@@ -6,6 +6,7 @@
|
||||
"enableProposedApi": true,
|
||||
"publisher": "vscode",
|
||||
"license": "MIT",
|
||||
"icon": "images/icon.png",
|
||||
"engines": {
|
||||
"vscode": "^1.39.0"
|
||||
},
|
||||
|
||||
@@ -7,7 +7,7 @@ import * as vscode from 'vscode';
|
||||
import * as pathUtils from 'path';
|
||||
|
||||
const FILE_LINE_REGEX = /^(\S.*):$/;
|
||||
const RESULT_LINE_REGEX = /^(\s+)(\d+)(:| )(\s+)(.*)$/;
|
||||
const RESULT_LINE_REGEX = /^(\s+)(\d+)(: | )(\s*)(.*)$/;
|
||||
const ELISION_REGEX = /⟪ ([0-9]+) characters skipped ⟫/g;
|
||||
const SEARCH_RESULT_SELECTOR = { language: 'search-result', exclusive: true };
|
||||
const DIRECTIVES = ['# Query:', '# Flags:', '# Including:', '# Excluding:', '# ContextLines:'];
|
||||
@@ -220,10 +220,9 @@ function parseSearchResults(document: vscode.TextDocument, token?: vscode.Cancel
|
||||
|
||||
const resultLine = RESULT_LINE_REGEX.exec(line);
|
||||
if (resultLine) {
|
||||
const [, indentation, _lineNumber, seperator, resultIndentation] = resultLine;
|
||||
const [, indentation, _lineNumber, separator] = resultLine;
|
||||
const lineNumber = +_lineNumber - 1;
|
||||
const resultStart = (indentation + _lineNumber + seperator + resultIndentation).length;
|
||||
const metadataOffset = (indentation + _lineNumber + seperator).length;
|
||||
const metadataOffset = (indentation + _lineNumber + separator).length;
|
||||
const targetRange = new vscode.Range(Math.max(lineNumber - 3, 0), 0, lineNumber + 3, line.length);
|
||||
|
||||
let locations: Required<vscode.LocationLink>[] = [];
|
||||
@@ -233,12 +232,12 @@ function parseSearchResults(document: vscode.TextDocument, token?: vscode.Cancel
|
||||
targetRange,
|
||||
targetSelectionRange: new vscode.Range(lineNumber, 0, lineNumber, 1),
|
||||
targetUri: currentTarget,
|
||||
originSelectionRange: new vscode.Range(i, 0, i, resultStart),
|
||||
originSelectionRange: new vscode.Range(i, 0, i, metadataOffset - 1),
|
||||
});
|
||||
|
||||
let lastEnd = resultStart;
|
||||
let lastEnd = metadataOffset;
|
||||
let offset = 0;
|
||||
ELISION_REGEX.lastIndex = resultStart;
|
||||
ELISION_REGEX.lastIndex = metadataOffset;
|
||||
for (let match: RegExpExecArray | null; (match = ELISION_REGEX.exec(line));) {
|
||||
locations.push({
|
||||
targetRange,
|
||||
@@ -261,7 +260,7 @@ function parseSearchResults(document: vscode.TextDocument, token?: vscode.Cancel
|
||||
}
|
||||
|
||||
currentTargetLocations?.push(...locations);
|
||||
links[i] = { type: 'result', locations, isContext: seperator === ' ', prefixRange: new vscode.Range(i, 0, i, metadataOffset) };
|
||||
links[i] = { type: 'result', locations, isContext: separator === ' ', prefixRange: new vscode.Range(i, 0, i, metadataOffset) };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user