Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/helpViewer/panel.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,7 @@ import * as vscode from 'vscode';
import * as cheerio from 'cheerio';

import { HelpFile, RHelp } from '.';
import { setContext, UriIcon } from '../util';
import { setContext, UriIcon, config } from '../util';

//// Declaration of interfaces used/implemented by the Help Panel class
// specified when creating a new help panel
Expand DownExpand Up@@ -117,10 +117,13 @@ export class HelpPanel {
}

// shows (internal) help file object in webview
public async showHelpFile(helpFile: HelpFile|Promise<HelpFile>, updateHistory = true, currentScrollY = 0, viewer?: string|any, preserveFocus: boolean = false): Promise<boolean>{
public async showHelpFile(helpFile: HelpFile | Promise<HelpFile>, updateHistory = true, currentScrollY = 0, viewer?: vscode.ViewColumn | string, preserveFocus: boolean = false): Promise<boolean>{
if (viewer === undefined) {
viewer = config().get<string>('session.viewers.viewColumn.helpPanel');
}

// update this.viewColumn if a valid viewer argument was supplied
if(typeof viewer === 'string'){
if(typeof viewer === 'string'){
this.viewColumn = <vscode.ViewColumn>vscode.ViewColumn[String(viewer)];
}

Expand Down