use ctrl+alt+click for breakpoints

This commit is contained in:
LenAnderson 2024-06-25 16:56:19 -04:00
parent c988f6f762
commit 17e794b718
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@
<input type="checkbox" id="qr--modal-syntax">
<span>Syntax highlight</span>
</label>
<small>Ctrl+Click to set / remove breakpoints</small>
<small>Ctrl+Alt+Click to set / remove breakpoints</small>
</div>
<div id="qr--modal-messageHolder">
<pre id="qr--modal-messageSyntax"><code id="qr--modal-messageSyntaxInner" class="hljs language-stscript"></code></pre>

View File

@ -395,7 +395,7 @@ export class QuickReply {
message.dispatchEvent(new Event('input', { bubbles:true }));
};
message.addEventListener('pointerup', async(evt)=>{
if (!evt.ctrlKey) return;
if (!evt.ctrlKey || !evt.altKey || message.selectionStart != message.selectionEnd) return;
const parser = new SlashCommandParser();
parser.parse(message.value, false);
const cmdIdx = parser.commandIndex.findLastIndex(it=>it.start <= message.selectionStart && it.end >= message.selectionStart);