Skip to content

Add compare selection with clipboard functionality#121

Draft
Copilot wants to merge 3 commits into
masterfrom
copilot/fix-119
Draft

Add compare selection with clipboard functionality#121
Copilot wants to merge 3 commits into
masterfrom
copilot/fix-119

Conversation

Copilot AI commented Aug 10, 2025

Copy link
Copy Markdown

This PR implements the feature request to compare text selection with clipboard content, extending the existing diff & merge functionality with two new commands:

🎯 New Features

1. Compare Selection with Clipboard

  • Command: diffMerge.compareSelectionWithClipboard
  • Usage: Select text in any editor, then use the command to compare the selection with clipboard content
  • Access: Available via editor context menu, editor title context menu, and command palette (when text is selected)

2. Compare Current vs Previous Clipboard

  • Command: diffMerge.compareClipboardWithPrevious
  • Usage: Compares current clipboard content with previously saved clipboard content
  • Behavior: First run saves current clipboard as "previous", subsequent runs compare current vs saved
  • Access: Available via editor title context menu and command palette

🔧 Implementation Details

Both features follow the existing code patterns:

  • Use the same showDiff function as other comparison commands
  • Provide appropriate user feedback (e.g., when no text is selected)
  • Integrate seamlessly with existing menu structures
  • Follow the extension's naming conventions and UI patterns

Example usage:

1. Select some text in an editor
2. Right-click → "[Diff & Merge] Compare selection with Clipboard"
3. View diff between your selection and clipboard content

The implementation is minimal and surgical, adding only the necessary functionality without modifying existing features.

Fixes #119.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI commented Aug 10, 2025

Copy link
Copy Markdown
Author

@moshfeu 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

Copilot AI and others added 2 commits August 10, 2025 19:20
Co-authored-by: moshfeu <3723951+moshfeu@users.noreply.github.com>
Co-authored-by: moshfeu <3723951+moshfeu@users.noreply.github.com>
Copilot AI changed the title [WIP] FR: Compare selection with clipboard Add compare selection with clipboard functionality Aug 10, 2025
Copilot AI requested a review from moshfeu August 10, 2025 19:25
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.

FR: Compare selection with clipboard

2 participants