Не подтверждена Коммит 83bdba53 создал по автору Osvaldo Ortega's avatar Osvaldo Ortega
Просмотр файлов

Small fix for keyword suggestions

владелец 3a28d8d2
......@@ -1962,22 +1962,24 @@ export class SearchView extends ViewPane {
const messageEl = this.clearMessage();
// Refresh icon
const icon = dom.append(messageEl, dom.$(''));
icon.ariaLabel = nls.localize('search.refresh', "Get new suggestion");
icon.role = 'button';
icon.tabIndex = 0;
icon.classList.add('codicon', 'codicon-refresh', 'keyword-refresh');
icon.onclick = () => {
// change the keyword to the next one
const nextKeyword = keywords.shift();
if (nextKeyword) {
currentKeyword = nextKeyword.keyword;
textButton.element.textContent = currentKeyword;
}
if (keywords.length === 1) {
icon.remove();
}
};
if (keywords.length !== 0) {
const icon = dom.append(messageEl, dom.$(''));
icon.ariaLabel = nls.localize('search.refresh', "Get new suggestion");
icon.role = 'button';
icon.tabIndex = 0;
icon.classList.add('codicon', 'codicon-refresh', 'keyword-refresh');
icon.onclick = () => {
// change the keyword to the next one
const nextKeyword = keywords.shift();
if (nextKeyword) {
currentKeyword = nextKeyword.keyword;
textButton.element.textContent = currentKeyword;
}
if (keywords.length === 0) {
icon.remove();
}
};
}
// Unclickable message
const resultMsg = nls.localize('keywordSuggestion.message', "Search instead for: ");
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать