File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -111,10 +111,16 @@ Workspace Root: ${workspaceRootPath}`;
111111function executeCommand1 ( commandName , fileUri , pullLines ) {
112112 try {
113113 const workspaceRootPath = vscode . workspace . rootPath ;
114- const lineInfo = pullLines ? {
115- start : editor . selection . start . line + 1 ,
116- end : editor . selection . end . line + 1 ,
117- } : null ;
114+ let lineInfo = null ;
115+ if ( pullLines ) {
116+ let editor = vscode . window . activeTextEditor ;
117+ if ( editor ) {
118+ lineInfo = {
119+ start : editor . selection . start . line + 1 ,
120+ end : editor . selection . end . line + 1 ,
121+ } ;
122+ }
123+ }
118124
119125 let filePath ;
120126 if ( fileUri && fileUri . fsPath ) {
Original file line number Diff line number Diff line change 11{
22 "name" : " vscode-github-file-folder-url" ,
3- "version" : " 1.1.6 " ,
3+ "version" : " 1.1.8 " ,
44 "publisher" : " cycloware" ,
55 "displayName" : " VsCode - Github-File-Folder-Url" ,
66 "description" : " VsCode Extension that gets a Github url with optional line selection for files and folders." ,
You can’t perform that action at this time.
0 commit comments