Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improves cursor left word delete #88

Merged

Conversation

MayurSMahajan
Copy link
Contributor

@MayurSMahajan MayurSMahajan commented Apr 19, 2023

Solves: #87
This PR makes sure that by pressing ctrl+backspace in the editor, now also deletes the whitespace that it encounters before a word.

For given sentence: an apple |
the actual behavior is an apple|
but the expected behavior should be: an |

This PR achieves the expected behavior.

Note:

  1. This PR moves the cursorLeftWordDelete and cursorLeftSentenceDelete handlers in a new file (previously stored in arrow_keys_handler.dart ).
  2. This PR moves the extension methods written in arrow_keys_handler.dart file to a new file.
  3. Selection Range enum is now made public.

@codecov
Copy link

codecov bot commented Apr 21, 2023

Codecov Report

Merging #88 (86f1edc) into main (0f303cb) will increase coverage by 0.07%.
The diff coverage is 96.34%.

@@            Coverage Diff             @@
##             main      #88      +/-   ##
==========================================
+ Coverage   86.79%   86.86%   +0.07%     
==========================================
  Files         124      127       +3     
  Lines        7322     7369      +47     
==========================================
+ Hits         6355     6401      +46     
- Misses        967      968       +1     
Impacted Files Coverage Δ
...rvice/shortcut_event/built_in_shortcut_events.dart 98.19% <ø> (+0.03%) ⬆️
...nternal_key_event_handlers/arrow_keys_handler.dart 99.40% <92.30%> (+1.06%) ⬆️
lib/src/extensions/position_extension.dart 94.59% <94.59%> (ø)
...key_event_handlers/cursor_left_delete_handler.dart 100.00% <100.00%> (ø)

... and 8 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@Xazin Xazin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@LucasXu0 LucasXu0 merged commit 58ea6b0 into AppFlowy-IO:main Apr 24, 2023
@MayurSMahajan MayurSMahajan deleted the fix_removes_space_with_word_1985 branch April 24, 2023 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants