diff --git a/src/helpViewer/panel.ts b/src/helpViewer/panel.ts index a345f035d..0a6489a22 100644 --- a/src/helpViewer/panel.ts +++ b/src/helpViewer/panel.ts @@ -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 @@ -117,10 +117,13 @@ export class HelpPanel { } // shows (internal) help file object in webview - public async showHelpFile(helpFile: HelpFile|Promise, updateHistory = true, currentScrollY = 0, viewer?: string|any, preserveFocus: boolean = false): Promise{ + public async showHelpFile(helpFile: HelpFile | Promise, updateHistory = true, currentScrollY = 0, viewer?: vscode.ViewColumn | string, preserveFocus: boolean = false): Promise{ + if (viewer === undefined) { + viewer = config().get('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[String(viewer)]; }