Instruct "Bind to context" is now an option

This commit is contained in:
Cohee
2023-12-21 15:12:30 +02:00
parent ee75adbd2d
commit dd661cf879
4 changed files with 25 additions and 11 deletions

View File

@ -205,6 +205,7 @@ let power_user = {
names: false,
names_force_groups: true,
activation_regex: '',
bind_to_context: false,
},
default_context: 'Default',
@ -1718,17 +1719,18 @@ function loadContextSettings() {
}
});
// Select matching instruct preset
for (const instruct_preset of instruct_presets) {
// If instruct preset matches the context template
if (instruct_preset.name === name) {
selectInstructPreset(instruct_preset.name);
break;
if (power_user.instruct.bind_to_context) {
// Select matching instruct preset
for (const instruct_preset of instruct_presets) {
// If instruct preset matches the context template
if (instruct_preset.name === name) {
selectInstructPreset(instruct_preset.name);
break;
}
}
}
highlightDefaultContext();
saveSettingsDebounced();
});