@@ -1644,7 +1644,7 @@ export class ModifiedElement extends AbstractElementRenderer {
1644
1644
{
1645
1645
updateInfoRendering : ( ) => renderSourceEditor ( ) ,
1646
1646
checkIfModified : ( cell ) => {
1647
- return cell . modified ?. textModel . getValue ( ) !== cell . original ?. textModel . getValue ( ) ? { reason : undefined } : false ;
1647
+ return cell . modified ?. textModel . getTextBufferHash ( ) !== cell . original ?. textModel . getTextBufferHash ( ) ? { reason : undefined } : false ;
1648
1648
} ,
1649
1649
getFoldingState : ( cell ) => cell . cellFoldingState ,
1650
1650
updateFoldingState : ( cell , state ) => cell . cellFoldingState = state ,
@@ -1660,7 +1660,7 @@ export class ModifiedElement extends AbstractElementRenderer {
1660
1660
const scopedContextKeyService = this . contextKeyService . createScoped ( this . templateData . inputToolbarContainer ) ;
1661
1661
this . _register ( scopedContextKeyService ) ;
1662
1662
const inputChanged = NOTEBOOK_DIFF_CELL_INPUT . bindTo ( scopedContextKeyService ) ;
1663
- inputChanged . set ( this . cell . modified . textModel . getValue ( ) !== this . cell . original . textModel . getValue ( ) ) ;
1663
+ inputChanged . set ( this . cell . modified . textModel . getTextBufferHash ( ) !== this . cell . original . textModel . getTextBufferHash ( ) ) ;
1664
1664
1665
1665
const ignoreWhitespace = NOTEBOOK_DIFF_CELL_IGNORE_WHITESPACE . bindTo ( scopedContextKeyService ) ;
1666
1666
const ignore = this . textConfigurationService . getValue < boolean > ( this . cell . modified . uri , 'diffEditor.ignoreTrimWhitespace' ) ;
@@ -1675,7 +1675,7 @@ export class ModifiedElement extends AbstractElementRenderer {
1675
1675
const refreshToolbar = ( ) => {
1676
1676
const ignore = this . textConfigurationService . getValue < boolean > ( this . cell . modified . uri , 'diffEditor.ignoreTrimWhitespace' ) ;
1677
1677
ignoreWhitespace . set ( ignore ) ;
1678
- const hasChanges = this . cell . modified . textModel . getValue ( ) !== this . cell . original . textModel . getValue ( ) ;
1678
+ const hasChanges = this . cell . modified . textModel . getTextBufferHash ( ) !== this . cell . original . textModel . getTextBufferHash ( ) ;
1679
1679
inputChanged . set ( hasChanges ) ;
1680
1680
1681
1681
if ( hasChanges ) {
0 commit comments