mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-18 10:34:50 +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) {
|
||||
return;
|
||||
}
|
||||
const { focusText, focusOffset, document } = change.value;
|
||||
const { selection, focusText, focusOffset, document } = change.value;
|
||||
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();
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -26,15 +26,13 @@ parts:
|
|||
source: ./app/dist/mailspring-MAILSPRING_VERSION-amd64.deb
|
||||
source-type: deb
|
||||
# Correct path to icon.
|
||||
after:
|
||||
- desktop-gtk3
|
||||
override-build: |
|
||||
set -ex
|
||||
snapcraftctl build
|
||||
prepare: |
|
||||
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/icons
|
||||
mkdir -p $SNAPCRAFT_PART_INSTALL/share/sounds
|
||||
after:
|
||||
- desktop-gtk3
|
||||
stage:
|
||||
- share/icons
|
||||
- share/themes
|
||||
|
|
Loading…
Add table
Reference in a new issue