diff options
author | Megan Rogge <merogge@microsoft.com> | 2022-04-27 02:39:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-27 02:39:20 +0300 |
commit | 410fe0fc7890ef563830bb86cbcd763995bfc65f (patch) | |
tree | 2c34ba2e289218c38d5d977d068eb0435b71e2f9 | |
parent | ac3e081e0ecbee16961053cc2713489e70332650 (diff) |
fix terminal find bugs (#148222)
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | remote/package.json | 2 | ||||
-rw-r--r-- | remote/web/package.json | 2 | ||||
-rw-r--r-- | remote/web/yarn.lock | 8 | ||||
-rw-r--r-- | remote/yarn.lock | 8 | ||||
-rw-r--r-- | src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.ts | 15 | ||||
-rw-r--r-- | yarn.lock | 8 |
7 files changed, 24 insertions, 21 deletions
diff --git a/package.json b/package.json index a1737a8df38..099e728b16b 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "vscode-regexpp": "^3.1.0", "vscode-textmate": "7.0.1", "xterm": "4.19.0-beta.25", - "xterm-addon-search": "0.9.0-beta.22", + "xterm-addon-search": "0.9.0-beta.23", "xterm-addon-serialize": "0.7.0-beta.12", "xterm-addon-unicode11": "0.4.0-beta.3", "xterm-addon-webgl": "0.12.0-beta.29", diff --git a/remote/package.json b/remote/package.json index 8be2005cde1..c7597143182 100644 --- a/remote/package.json +++ b/remote/package.json @@ -25,7 +25,7 @@ "vscode-regexpp": "^3.1.0", "vscode-textmate": "7.0.1", "xterm": "4.19.0-beta.25", - "xterm-addon-search": "0.9.0-beta.22", + "xterm-addon-search": "0.9.0-beta.23", "xterm-addon-serialize": "0.7.0-beta.12", "xterm-addon-unicode11": "0.4.0-beta.3", "xterm-addon-webgl": "0.12.0-beta.29", diff --git a/remote/web/package.json b/remote/web/package.json index d3dad3b383a..e87f1302a59 100644 --- a/remote/web/package.json +++ b/remote/web/package.json @@ -11,7 +11,7 @@ "vscode-oniguruma": "1.6.1", "vscode-textmate": "7.0.1", "xterm": "4.19.0-beta.25", - "xterm-addon-search": "0.9.0-beta.22", + "xterm-addon-search": "0.9.0-beta.23", "xterm-addon-unicode11": "0.4.0-beta.3", "xterm-addon-webgl": "0.12.0-beta.29" } diff --git a/remote/web/yarn.lock b/remote/web/yarn.lock index e15a4cf241a..ddcbcae0c98 100644 --- a/remote/web/yarn.lock +++ b/remote/web/yarn.lock @@ -113,10 +113,10 @@ vscode-textmate@7.0.1: resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-7.0.1.tgz#8118a32b02735dccd14f893b495fa5389ad7de79" integrity sha512-zQ5U/nuXAAMsh691FtV0wPz89nSkHbs+IQV8FDk+wew9BlSDhf4UmWGlWJfTR2Ti6xZv87Tj5fENzKf6Qk7aLw== -xterm-addon-search@0.9.0-beta.22: - version "0.9.0-beta.22" - resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.22.tgz#18f2eabda82709cdd64dee003879b586869e28a3" - integrity sha512-1I8W0bwjg6bUoNaESKHSkS9BN3Z9Xe44/zbUb6Un+pbb5Nun4LQvFwSLkAIdRrslxcbcHYIU/2Q7F1wCOWLbaA== +xterm-addon-search@0.9.0-beta.23: + version "0.9.0-beta.23" + resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.23.tgz#3f568afaddbb2cb9bb13a80deada6a3715a10172" + integrity sha512-kKOyOf+9ERam6IGjV5LTQJTIL6HaiecZkMcrckMY9fUyH53+kknNMfGoBmMgDXWTe8WjBdyTtiqr120koDUKVQ== xterm-addon-unicode11@0.4.0-beta.3: version "0.4.0-beta.3" diff --git a/remote/yarn.lock b/remote/yarn.lock index ac114377345..df434612983 100644 --- a/remote/yarn.lock +++ b/remote/yarn.lock @@ -914,10 +914,10 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -xterm-addon-search@0.9.0-beta.22: - version "0.9.0-beta.22" - resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.22.tgz#18f2eabda82709cdd64dee003879b586869e28a3" - integrity sha512-1I8W0bwjg6bUoNaESKHSkS9BN3Z9Xe44/zbUb6Un+pbb5Nun4LQvFwSLkAIdRrslxcbcHYIU/2Q7F1wCOWLbaA== +xterm-addon-search@0.9.0-beta.23: + version "0.9.0-beta.23" + resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.23.tgz#3f568afaddbb2cb9bb13a80deada6a3715a10172" + integrity sha512-kKOyOf+9ERam6IGjV5LTQJTIL6HaiecZkMcrckMY9fUyH53+kknNMfGoBmMgDXWTe8WjBdyTtiqr120koDUKVQ== xterm-addon-serialize@0.7.0-beta.12: version "0.7.0-beta.12" diff --git a/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.ts b/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.ts index f49139355d7..02f42a4e844 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.ts @@ -308,14 +308,17 @@ export abstract class SimpleFindWidget extends Widget { this._matchesCount.className = 'matchesCount'; } this._matchesCount.innerText = ''; - let label; - if (count?.resultCount === -1) { - label = ''; - } else { - label = count === undefined || count.resultCount === 0 ? NLS_NO_RESULTS : strings.format(NLS_MATCHES_LOCATION, count.resultIndex + 1, count?.resultCount); + let label = ''; + this._matchesCount.classList.toggle('no-results', false); + if (count?.resultCount && count?.resultCount <= 0) { + label = NLS_NO_RESULTS; + if (!!this.inputValue) { + this._matchesCount.classList.toggle('no-results', true); + } + } else if (count?.resultCount) { + label = strings.format(NLS_MATCHES_LOCATION, count.resultIndex + 1, count?.resultCount); } this._matchesCount.appendChild(document.createTextNode(label)); - this._matchesCount.classList.toggle('no-results', !count || count.resultCount === 0); this._findInput?.domNode.insertAdjacentElement('afterend', this._matchesCount); this._foundMatch = !!count && count.resultCount > 0; } diff --git a/yarn.lock b/yarn.lock index 63afc242b61..b486000bdbe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12204,10 +12204,10 @@ xtend@~2.1.1: dependencies: object-keys "~0.4.0" -xterm-addon-search@0.9.0-beta.22: - version "0.9.0-beta.22" - resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.22.tgz#18f2eabda82709cdd64dee003879b586869e28a3" - integrity sha512-1I8W0bwjg6bUoNaESKHSkS9BN3Z9Xe44/zbUb6Un+pbb5Nun4LQvFwSLkAIdRrslxcbcHYIU/2Q7F1wCOWLbaA== +xterm-addon-search@0.9.0-beta.23: + version "0.9.0-beta.23" + resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.23.tgz#3f568afaddbb2cb9bb13a80deada6a3715a10172" + integrity sha512-kKOyOf+9ERam6IGjV5LTQJTIL6HaiecZkMcrckMY9fUyH53+kknNMfGoBmMgDXWTe8WjBdyTtiqr120koDUKVQ== xterm-addon-serialize@0.7.0-beta.12: version "0.7.0-beta.12" |