Add setting to open/create files in new pane by default (#241)

* Manifest 1.14.1-beta.1

* 1.14.1-beta.2 manifest

* Add setting to open/create files in new pane by default

* Fix typo with key labels

* Address review comments

---------

Co-authored-by: Simon Cambier <simon.cambier@protonmail.com>
This commit is contained in:
Ian Fisher
2023-05-19 03:53:31 -04:00
committed by GitHub
parent b5c1d31e85
commit 027c9e3bc9
5 changed files with 59 additions and 10 deletions

View File

@@ -47,6 +47,7 @@ export interface OmnisearchSettings extends WeightingSettings {
simpleSearch: boolean
highlight: boolean
splitCamelCase: boolean
openInNewPane: boolean
verboseLogging: boolean
}
@@ -246,6 +247,18 @@ export class SettingsTab extends PluginSettingTab {
})
)
new Setting(containerEl)
.setName('Open in new pane')
.setDesc(
'Open and create files in a new pane instead of the current pane.'
)
.addToggle(toggle =>
toggle.setValue(settings.openInNewPane).onChange(async v => {
settings.openInNewPane = v
await saveSettings(this.plugin)
})
)
//#endregion Behavior
//#region User Interface
@@ -445,6 +458,7 @@ export const DEFAULT_SETTINGS: OmnisearchSettings = {
PDFIndexing: false,
imagesIndexing: false,
splitCamelCase: false,
openInNewPane: false,
ribbonIcon: true,
showExcerpt: true,