mirror of
https://github.com/salexdv/bsl_console.git
synced 2024-11-28 08:48:48 +02:00
Признак CTRL/ALT/SHIFT в событии BEFORE_HOVER closes #98
This commit is contained in:
parent
d85fce88f8
commit
19c2532391
@ -4737,7 +4737,10 @@ class bslHelper {
|
||||
word: this.model.getWordAtPosition(this.position),
|
||||
token: token,
|
||||
line: this.lineNumber,
|
||||
column: this.column
|
||||
column: this.column,
|
||||
altKey: altPressed,
|
||||
ctrlKey: ctrlPressed,
|
||||
shiftKey: shiftPressed
|
||||
}
|
||||
sendEvent('EVENT_BEFORE_HOVER', params);
|
||||
}
|
||||
|
@ -445,9 +445,9 @@ define([], function () {
|
||||
},
|
||||
hoverProvider: {
|
||||
provideHover: function (model, position) {
|
||||
if (!ctrlPressed) {
|
||||
let bsl = new bslHelper(model, position);
|
||||
bsl.onProvideHover();
|
||||
let bsl = new bslHelper(model, position);
|
||||
bsl.onProvideHover();
|
||||
if (!ctrlPressed) {
|
||||
return bsl.getHover();
|
||||
}
|
||||
else {
|
||||
@ -498,9 +498,9 @@ define([], function () {
|
||||
},
|
||||
hoverProvider: {
|
||||
provideHover: function (model, position) {
|
||||
if (!ctrlPressed) {
|
||||
let bsl = new bslHelper(model, position);
|
||||
bsl.onProvideHover();
|
||||
let bsl = new bslHelper(model, position);
|
||||
bsl.onProvideHover();
|
||||
if (!ctrlPressed) {
|
||||
return bsl.getCustomHover();
|
||||
}
|
||||
else {
|
||||
@ -544,9 +544,9 @@ define([], function () {
|
||||
},
|
||||
hoverProvider: {
|
||||
provideHover: function (model, position) {
|
||||
if (!ctrlPressed) {
|
||||
let bsl = new bslHelper(model, position);
|
||||
bsl.onProvideHover();
|
||||
let bsl = new bslHelper(model, position);
|
||||
bsl.onProvideHover();
|
||||
if (!ctrlPressed) {
|
||||
return bsl.getCustomHover();
|
||||
}
|
||||
else {
|
||||
|
@ -26,6 +26,8 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
|
||||
generateBeforeSignatureEvent = false;
|
||||
statusBarWidget = null;
|
||||
ctrlPressed = false;
|
||||
altPressed = false;
|
||||
shiftPressed = false;
|
||||
|
||||
reserMark = function() {
|
||||
|
||||
@ -1061,14 +1063,26 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
|
||||
}
|
||||
|
||||
if (e.ctrlKey)
|
||||
ctrlPressed = true;
|
||||
ctrlPressed = true;
|
||||
|
||||
if (e.altKey)
|
||||
altPressed = true;
|
||||
|
||||
if (e.shiftKey)
|
||||
shiftPressed = true;
|
||||
|
||||
});
|
||||
|
||||
editor.onKeyUp(e => {
|
||||
|
||||
if (e.ctrlKey)
|
||||
ctrlPressed = false;
|
||||
ctrlPressed = false;
|
||||
|
||||
if (e.altKey)
|
||||
altPressed = false;
|
||||
|
||||
if (e.shiftKey)
|
||||
shiftPressed = false;
|
||||
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user