@@ -34,6 +34,11 @@ export interface IBaseUnifiedDiffOptions {
3434 * Whether to show accept/reject buttons
3535 */
3636 showActionButtons ?: boolean ;
37+
38+ /**
39+ * Whether to allow inline diffs
40+ */
41+ allowInlineDiffs ?: boolean ;
3742}
3843
3944/**
@@ -49,6 +54,7 @@ export abstract class BaseUnifiedDiffManager {
4954 this . _newSource = options . newSource ;
5055 this . trans = options . trans ;
5156 this . showActionButtons = options . showActionButtons ?? true ;
57+ this . allowInlineDiffs = options . allowInlineDiffs ?? false ;
5258 this . _isInitialized = false ;
5359 this . _isDisposed = false ;
5460 this . _diffCompartment = new Compartment ( ) ;
@@ -166,7 +172,8 @@ export abstract class BaseUnifiedDiffManager {
166172 newSource : this . _newSource ,
167173 isInitialized : this . _isInitialized ,
168174 sharedModel : this . getSharedModel ( ) ,
169- onChunkChange : ( ) => this . deactivate ( )
175+ onChunkChange : ( ) => this . deactivate ( ) ,
176+ allowInlineDiffs : this . allowInlineDiffs
170177 } ) ;
171178
172179 this . _isInitialized = true ;
@@ -182,6 +189,7 @@ export abstract class BaseUnifiedDiffManager {
182189 protected editor : CodeMirrorEditor ;
183190 protected trans : TranslationBundle ;
184191 protected showActionButtons : boolean ;
192+ protected allowInlineDiffs : boolean ;
185193 protected acceptAllButton : ToolbarButton | null = null ;
186194 protected rejectAllButton : ToolbarButton | null = null ;
187195 private _originalSource : string ;
0 commit comments