mirror of
https://github.com/salexdv/bsl_console.git
synced 2024-12-10 10:40:07 +02:00
Включение постоянного вывода описания в списке подсказок #119
This commit is contained in:
parent
6ae145a860
commit
18bee1e9d6
@ -21,3 +21,10 @@
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
|
||||
.suggest-widget .monaco-list .monaco-list-row .inactive-detail {
|
||||
|
||||
display: inline !important;
|
||||
color: #b3b3b3;
|
||||
|
||||
}
|
@ -807,7 +807,9 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
|
||||
|
||||
}
|
||||
|
||||
enableSuggestActivationEvent = function(enabled) {
|
||||
enableSuggestActivationEvent = function(enabled, alwaysDisplayDetails = false) {
|
||||
|
||||
editor.alwaysDisplaySuggestDetails = alwaysDisplayDetails;
|
||||
|
||||
if (suggestObserver != null) {
|
||||
suggestObserver.disconnect();
|
||||
@ -825,8 +827,17 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
|
||||
let element = mutation.addedNodes[0];
|
||||
|
||||
if (element.classList.contains('monaco-list-row') && element.classList.contains('focused')) {
|
||||
|
||||
let rows = getSuggestWidgetRows(element);
|
||||
genarateEventWithSuggestData('EVENT_ON_ACTIVATE_SUGGEST_ROW', rows, 'focus', element.getAttribute('aria-label'));
|
||||
|
||||
if (editor.alwaysDisplaySuggestDetails) {
|
||||
document.querySelectorAll('.monaco-list-rows .details-label').forEach(function (node) {
|
||||
node.classList.add('inactive-detail');
|
||||
});
|
||||
document.querySelector('.monaco-list-rows .focused .details-label').classList.remove('inactive-detail');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user