Открыть боковую панель
code
vscode
Коммиты
83bdba53
Не подтверждена
Коммит
83bdba53
создал
Апр 16, 2025
по автору
Osvaldo Ortega
Просмотр файлов
Small fix for keyword suggestions
владелец
3a28d8d2
Изменения
1
Скрыть пробелы
Построчно
Рядом
src/vs/workbench/contrib/search/browser/searchView.ts
Просмотр файла @
83bdba53
...
...
@@ -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.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать