mirror of
https://github.com/salexdv/bsl_console.git
synced 2024-11-24 08:33:29 +02:00
Доработка перехода к определению
This commit is contained in:
parent
f69558aca3
commit
45f9f0ac31
@ -5962,14 +5962,15 @@ class bslHelper {
|
||||
if (exp_arr.length == 1) {
|
||||
|
||||
let pattern = this.word + '\\s*=\\s*.*';
|
||||
let is_function = this.isItFunction()
|
||||
|
||||
if (this.isItFunction())
|
||||
if (is_function)
|
||||
pattern = '(процедура|procedure|функция|function)\\s*' + this.word + '\\(';
|
||||
|
||||
let position = new monaco.Position(this.lineNumber, 1);
|
||||
let match = this.model.findPreviousMatch(pattern, position, true);
|
||||
|
||||
if (match && match.range.startLineNumber < this.lineNumber) {
|
||||
if (match && (is_function || match.range.startLineNumber < this.lineNumber)) {
|
||||
location = [{
|
||||
uri: this.model.uri,
|
||||
range: match.range
|
||||
|
Loading…
Reference in New Issue
Block a user