[PR #6429] [MERGED] feat: support copy/cut command when the selection is collapsed #7375

Closed
opened 2026-03-23 23:19:20 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/6429
Author: @LucasXu0
Created: 9/30/2024
Status: Merged
Merged: 9/30/2024
Merged by: @LucasXu0

Base: mainHead: fix_keyboard_gesture


📝 Commits (4)

  • 8966f56 feat: add delete line command
  • e8db72b test: add delete line test
  • a4ff9f5 test: add delete line command test
  • ee8b98b feat: support copy command when selection is collasped

📊 Changes

13 files changed (+366 additions, -144 deletions)

View changed files

frontend/appflowy_flutter/integration_test/desktop/document/document_shortcuts_test.dart (+140 -0)
📝 frontend/appflowy_flutter/integration_test/desktop/document/document_test_runner.dart (+3 -1)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart (+18 -119)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/custom_copy_command.dart (+32 -11)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/custom_cut_command.dart (+24 -1)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/plugins.dart (+2 -0)
frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/shortcuts/character_shortcuts.dart (+74 -0)
frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/shortcuts/command_shortcuts.dart (+61 -0)
📝 frontend/appflowy_flutter/lib/workspace/application/settings/shortcuts/settings_shortcuts_cubit.dart (+1 -1)
📝 frontend/appflowy_flutter/lib/workspace/application/settings/shortcuts/settings_shortcuts_service.dart (+1 -1)
📝 frontend/appflowy_flutter/pubspec.lock (+8 -8)
📝 frontend/appflowy_flutter/pubspec.yaml (+1 -1)
📝 frontend/appflowy_flutter/test/bloc_test/shortcuts_test/shortcuts_cubit_test.dart (+1 -1)

📄 Description

Feature Preview

closes https://github.com/AppFlowy-IO/AppFlowy/issues/6425

https://github.com/user-attachments/assets/94bde038-dc3a-4812-88a5-b1e44a1440b8


PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/6429 **Author:** [@LucasXu0](https://github.com/LucasXu0) **Created:** 9/30/2024 **Status:** ✅ Merged **Merged:** 9/30/2024 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `fix_keyboard_gesture` --- ### 📝 Commits (4) - [`8966f56`](https://github.com/AppFlowy-IO/AppFlowy/commit/8966f5604a7fe57f45c544b7f904a7aaa5439c76) feat: add delete line command - [`e8db72b`](https://github.com/AppFlowy-IO/AppFlowy/commit/e8db72b0f9269734f7f63b712e31f46c183bfdc4) test: add delete line test - [`a4ff9f5`](https://github.com/AppFlowy-IO/AppFlowy/commit/a4ff9f5ed7e77543cc29b3f478fa0399c3a47348) test: add delete line command test - [`ee8b98b`](https://github.com/AppFlowy-IO/AppFlowy/commit/ee8b98ba28554b2ff8062f058c46a8affe3a92b7) feat: support copy command when selection is collasped ### 📊 Changes **13 files changed** (+366 additions, -144 deletions) <details> <summary>View changed files</summary> ➕ `frontend/appflowy_flutter/integration_test/desktop/document/document_shortcuts_test.dart` (+140 -0) 📝 `frontend/appflowy_flutter/integration_test/desktop/document/document_test_runner.dart` (+3 -1) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart` (+18 -119) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/custom_copy_command.dart` (+32 -11) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/custom_cut_command.dart` (+24 -1) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/plugins.dart` (+2 -0) ➕ `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/shortcuts/character_shortcuts.dart` (+74 -0) ➕ `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/shortcuts/command_shortcuts.dart` (+61 -0) 📝 `frontend/appflowy_flutter/lib/workspace/application/settings/shortcuts/settings_shortcuts_cubit.dart` (+1 -1) 📝 `frontend/appflowy_flutter/lib/workspace/application/settings/shortcuts/settings_shortcuts_service.dart` (+1 -1) 📝 `frontend/appflowy_flutter/pubspec.lock` (+8 -8) 📝 `frontend/appflowy_flutter/pubspec.yaml` (+1 -1) 📝 `frontend/appflowy_flutter/test/bloc_test/shortcuts_test/shortcuts_cubit_test.dart` (+1 -1) </details> ### 📄 Description <!--- Thank you for submitting a pull request to AppFlowy. The team will dedicate their best efforts to reviewing and approving your pull request. If you have any questions about the project or feedback for us, please join our [Discord](https://discord.gg/wdjWUXXhtw). --> <!--- If your pull request adds a new feature, please drag and drop a video into this section to showcase what you've done! If not, you may delete this section. --> ### Feature Preview closes https://github.com/AppFlowy-IO/AppFlowy/issues/6425 - [x] added the delete line command https://github.com/AppFlowy-IO/appflowy-editor/commit/54edcadbb2796ea55240fd572a7eb7d302316d4d - [x] fix moving cursor issues https://github.com/AppFlowy-IO/appflowy-editor/commit/d0495847855a2f409c80b19b82d5025a5c9e980a https://github.com/user-attachments/assets/94bde038-dc3a-4812-88a5-b1e44a1440b8 <!--- List at least one issue here that this PR addresses. If it fixes the issue, please use the [fixes](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) keyword to close the issue. For example: fixes https://github.com/AppFlowy-IO/AppFlowy/pull/2106 --> --- <!--- Before you mark this PR ready for review, run through this checklist! --> #### PR Checklist - [x] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [x] I've listed at least one issue that this PR fixes in the description above. - [x] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [x] All existing tests are passing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 23:19:20 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#7375
No description provided.