Fix old name prepopulate, run formatter
| @@ -739,7 +739,8 @@ async function waitForConnection() { | ||
| 739 | 739 | export async function initPresetManager() { |
| 740 | 740 | eventSource.on(event_types.CHAT_CHANGED, autoSelectPreset); |
| 741 | 741 | registerPresetManagers(); |
| 742 | 742 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'preset', |
| 743 | + name: 'preset', | |
| 743 | 744 | callback: presetCommandCallback, |
| 744 | 745 | returns: 'current preset', |
| 745 | 746 | unnamedArgumentList: [ |
| @@ -802,9 +803,9 @@ export async function initPresetManager() { | ||
| 802 | 803 | } |
| 803 | 804 | |
| 804 | 805 | const popupHeader = !presetManager.isAdvancedFormatting() ? t`Rename preset` : t`Rename template`; |
| 805 | 806 | const oldName = namepresetManager.getSelectedPresetName(); |
| 806 | 807 | const newName = await Popup.show.input(popupHeader, t`Enter a new name:`, oldName); |
| 807 | 808 | if (!newName || oldName === newName || !newName) { |
| 808 | 809 | console.debug(!presetManager.isAdvancedFormatting() ? 'Preset rename cancelled' : 'Template rename cancelled'); |
| 809 | 810 | return; |
| 810 | 811 | } |