Skip to content

Conversation

AndreasArvidsson
Copy link
Member

Fixes #1657

Checklist

  • [/] I have added tests
  • [/] I have updated the docs and cheatsheet
  • [/] I have not broken the cheatsheet

@AndreasArvidsson AndreasArvidsson requested a review from a team as a code owner January 28, 2025 08:40
sourceStyle: FlashStyle;
destinationStyle: FlashStyle;
getSourceRangeCallback: (target: Target) => Range;
getSourceRangeCallback?: (target: Target) => GeneralizedRange;
Copy link
Member Author

Choose a reason for hiding this comment

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

Made this optional. If you don't pass a callback into flashTargets() the content range is used by default.

decoration = {
sourceStyle: FlashStyle.referenced,
destinationStyle: FlashStyle.pendingModification0,
getSourceRangeCallback: getContentRange,
Copy link
Member Author

@AndreasArvidsson AndreasArvidsson Jan 28, 2025

Choose a reason for hiding this comment

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

Just use default content range implementation

ide(),
targets,
FlashStyle.referenced,
(target) => target.contentRange,
Copy link
Member Author

Choose a reason for hiding this comment

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

Use default content range implementation

.map((target) => {
const range = getRange(target);

if (range == null) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This optional behavior was never used. Better to have simpler code.

@phillco phillco enabled auto-merge January 28, 2025 19:43
@phillco phillco added this pull request to the merge queue Jan 28, 2025
Merged via the queue into main with commit 6b8cea8 Jan 28, 2025
15 checks passed
@phillco phillco deleted the removalGeneralizedRange branch January 28, 2025 20:05
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.

Change getRemovalHighlightRange to return a GeneralizedRange

2 participants