Skip to content

Commit 1bec742

Browse files
committed
Fix assigning values in settings
1 parent 0292622 commit 1bec742

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,12 @@ class HeaderDisplayTextSettingTab extends PluginSettingTab {
9292
containerEl.createEl('h2', {text: 'Link display text'})
9393
new Setting(containerEl)
9494
.setName('Include note name')
95-
.setName('Include the title of the note in the display text.')
95+
.setDesc('Include the title of the note in the display text.')
9696
.addDropdown(dropdown => {
9797
dropdown.addOption('headersOnly', 'Don\'t include note name');
9898
dropdown.addOption('noteNameFirst', 'Note name and then heading(s)');
9999
dropdown.addOption('noteNameLast', 'Heading(s) and then note name');
100+
dropdown.setValue(this.plugin.settings.includeNoteName);
100101
dropdown.onChange(value => {
101102
this.plugin.settings.includeNoteName = value;
102103
this.plugin.saveSettings();
@@ -109,6 +110,7 @@ class HeaderDisplayTextSettingTab extends PluginSettingTab {
109110
dropdown.addOption('allHeaders', 'All linked headings');
110111
dropdown.addOption('lastHeader', 'Last heading only');
111112
dropdown.addOption('firstHeader', 'First heading only');
113+
dropdown.setValue(this.plugin.settings.whichHeadings);
112114
dropdown.onChange(value => {
113115
this.plugin.settings.whichHeadings = value;
114116
this.plugin.saveSettings();

0 commit comments

Comments
 (0)