mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-10-09 04:44:32 +08:00
In the composer, allow the user to delete a selection from the first character forward
This commit is contained in:
parent
16ab68d895
commit
74d2b5a65a
2 changed files with 11 additions and 7 deletions
|
@ -401,9 +401,15 @@ export default [
|
||||||
if (event.key !== 'Backspace' || event.shiftKey || event.metaKey || event.optionKey) {
|
if (event.key !== 'Backspace' || event.shiftKey || event.metaKey || event.optionKey) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const { focusText, focusOffset, document } = change.value;
|
const { selection, focusText, focusOffset, document } = change.value;
|
||||||
const firstText = document.getFirstText();
|
const firstText = document.getFirstText();
|
||||||
if (focusOffset === 0 && focusText && firstText && firstText.key === focusText.key) {
|
if (
|
||||||
|
selection.isCollapsed &&
|
||||||
|
focusOffset === 0 &&
|
||||||
|
focusText &&
|
||||||
|
firstText &&
|
||||||
|
firstText.key === focusText.key
|
||||||
|
) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,13 @@ parts:
|
||||||
source: ./app/dist/mailspring-MAILSPRING_VERSION-amd64.deb
|
source: ./app/dist/mailspring-MAILSPRING_VERSION-amd64.deb
|
||||||
source-type: deb
|
source-type: deb
|
||||||
# Correct path to icon.
|
# Correct path to icon.
|
||||||
after:
|
prepare: |
|
||||||
- desktop-gtk3
|
|
||||||
override-build: |
|
|
||||||
set -ex
|
|
||||||
snapcraftctl build
|
|
||||||
sed -i 's|Icon=mailspring|Icon=/usr/share/pixmaps/mailspring\.png|' usr/share/applications/mailspring.desktop
|
sed -i 's|Icon=mailspring|Icon=/usr/share/pixmaps/mailspring\.png|' usr/share/applications/mailspring.desktop
|
||||||
mkdir -p $SNAPCRAFT_PART_INSTALL/share/themes
|
mkdir -p $SNAPCRAFT_PART_INSTALL/share/themes
|
||||||
mkdir -p $SNAPCRAFT_PART_INSTALL/share/icons
|
mkdir -p $SNAPCRAFT_PART_INSTALL/share/icons
|
||||||
mkdir -p $SNAPCRAFT_PART_INSTALL/share/sounds
|
mkdir -p $SNAPCRAFT_PART_INSTALL/share/sounds
|
||||||
|
after:
|
||||||
|
- desktop-gtk3
|
||||||
stage:
|
stage:
|
||||||
- share/icons
|
- share/icons
|
||||||
- share/themes
|
- share/themes
|
||||||
|
|
Loading…
Add table
Reference in a new issue