BetterCommands: Remove Very Broken Newlines

This commit is contained in:
thororen 2026-09-02 13:40:38 -04:00
parent 27f647a167
commit 183920dd37
No known key found for this signature in database

View file

@ -15,12 +15,7 @@ const settings = definePluginSettings({
description: "Automatically fill command with all arguments instead of just required ones.",
type: OptionType.BOOLEAN,
default: true,
},
allowNewlinesInCommands: {
description: "Allow newlines in command inputs (CTRL + Shift + Enter)",
type: OptionType.BOOLEAN,
default: true,
}
}, a
});
function fetchIndex(target: object) {
@ -48,26 +43,6 @@ export default definePlugin({
},
]
},
{
find: '"italics"),!0;',
predicate: () => settings.store.allowNewlinesInCommands,
replacement: [
{
match: /case (\i\.\i)\.TAB:if\(null!=(\i).selection&&\i\((\i)(?=.{0,300}(\i\.\i\.insertText))/,
replace: (orig, keys, editor, event, insertText) => {
return `case ${keys}.ENTER:
if(${event}.shiftKey && ${event}.ctrlKey){
${event}.preventDefault();
${event}.stopPropagation();
${insertText}(${editor},'\\n');
return true;
}
break;
${orig}`;
}
}
]
}
],
commands: [
{