Skip to content

Commit

Permalink
Fix whitespace insertion rendered as deletion bug (#238677)
Browse files Browse the repository at this point in the history
whitespace insertion rendered as deletion bug fix
  • Loading branch information
benibenj authored Jan 24, 2025
1 parent b9cbfa4 commit 1384466
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export class InlineEditsView extends Disposable {
return 'ghostText';
}

if (inner.every(m => newText.getValueOfRange(m.modifiedRange).trim() === '')) {
if (inner.every(m => newText.getValueOfRange(m.modifiedRange).trim() === '' && edit.originalText.getValueOfRange(m.originalRange).trim() !== '')) {
return 'deletion';
}

Expand Down

0 comments on commit 1384466

Please sign in to comment.