|
6 | 6 | import * as vscode from 'vscode';
|
7 | 7 | import { EditorHighlights } from './editorHighlights';
|
8 | 8 | import { History, HistoryItem } from './history';
|
9 |
| -import { CallItem, CallsDirection, CallsModel, FileItem, getPreviewChunks, ItemSource, ReferenceItem, ReferencesModel, RichCallsDirection } from './models'; |
| 9 | +import { CallItem, CallsDirection, CallsModel, FileItem, getPreviewChunks, getRequestRange, ItemSource, ReferenceItem, ReferencesModel, RichCallsDirection } from './models'; |
10 | 10 | import { TreeDataProviderWrapper, TreeItem } from './provider';
|
11 | 11 |
|
12 | 12 | export function activate(context: vscode.ExtensionContext) {
|
@@ -135,7 +135,7 @@ export function activate(context: vscode.ExtensionContext) {
|
135 | 135 | } else if (vscode.window.activeTextEditor) {
|
136 | 136 | // take args from active editor
|
137 | 137 | let editor = vscode.window.activeTextEditor;
|
138 |
| - if (editor.document.getWordRangeAtPosition(editor.selection.active)) { |
| 138 | + if (getRequestRange(editor.document, editor.selection.active)) { |
139 | 139 | model = ReferencesModel.create(editor.document.uri, editor.selection.active, source);
|
140 | 140 | }
|
141 | 141 | }
|
@@ -166,7 +166,7 @@ export function activate(context: vscode.ExtensionContext) {
|
166 | 166 | } else if (vscode.window.activeTextEditor) {
|
167 | 167 | // take args from active editor
|
168 | 168 | let editor = vscode.window.activeTextEditor;
|
169 |
| - if (editor.document.getWordRangeAtPosition(editor.selection.active)) { |
| 169 | + if (getRequestRange(editor.document, editor.selection.active)) { |
170 | 170 | model = new CallsModel(editor.document.uri, editor.selection.active, direction);
|
171 | 171 | }
|
172 | 172 | }
|
|
0 commit comments