Add commit shortcut

This commit is contained in:
Alabhya Jindal 2024-02-27 12:58:57 +05:30 committed by Mattias Granlund
parent feab3be9b1
commit c07192f81e

View File

@ -134,6 +134,17 @@
on:input={useAutoHeight}
on:focus={useAutoHeight}
on:change={() => currentCommitMessage.set(commitMessage)}
on:keydown={(e) => {
if ((e.ctrlKey || e.metaKey) && e.key === 'Enter') {
if ($expanded) {
if (commitMessage) {
commit();
}
} else {
$expanded = true;
}
}
}}
spellcheck={false}
class="text-input text-base-body-13 commit-box__textarea"
rows="1"