@@ -182,6 +182,10 @@ import {
182182 defaultShowBranchNameInRepoListSetting ,
183183 ShowBranchNameInRepoListSetting ,
184184} from '../../models/show-branch-name-in-repo-list'
185+ import {
186+ CopyPathNormalization ,
187+ defaultCopyPathNormalization ,
188+ } from '../../models/copy-path-normalization'
185189import {
186190 BranchSortOrder ,
187191 DEFAULT_BRANCH_SORT_ORDER ,
@@ -504,6 +508,7 @@ export const showDiffCheckMarksDefault = true
504508export const showDiffCheckMarksKey = 'diff-check-marks-visible'
505509
506510export const showBranchNameInRepoListKey = 'show-branch-name-in-repo-list'
511+ const copyPathNormalizationKey = 'copy-path-normalization'
507512const branchSortOrderKey = 'branch-sort-order'
508513const commitDateDisplayKey = 'commit-date-display'
509514
@@ -676,6 +681,9 @@ export class AppStore extends TypedBaseStore<IAppState> {
676681 private showBranchNameInRepoList : ShowBranchNameInRepoListSetting =
677682 defaultShowBranchNameInRepoListSetting
678683
684+ private copyPathNormalization : CopyPathNormalization =
685+ defaultCopyPathNormalization
686+
679687 private branchSortOrder : BranchSortOrder = DEFAULT_BRANCH_SORT_ORDER
680688
681689 private commitDateDisplay : CommitDateDisplay = defaultCommitDateDisplay
@@ -1231,6 +1239,7 @@ export class AppStore extends TypedBaseStore<IAppState> {
12311239 underlineLinks : this . underlineLinks ,
12321240 showDiffCheckMarks : this . showDiffCheckMarks ,
12331241 showBranchNameInRepoList : this . showBranchNameInRepoList ,
1242+ copyPathNormalization : this . copyPathNormalization ,
12341243 branchSortOrder : this . branchSortOrder ,
12351244 commitDateDisplay : this . commitDateDisplay ,
12361245 updateState : updateStore . state ,
@@ -2643,6 +2652,10 @@ export class AppStore extends TypedBaseStore<IAppState> {
26432652 getEnum ( showBranchNameInRepoListKey , ShowBranchNameInRepoListSetting ) ??
26442653 defaultShowBranchNameInRepoListSetting
26452654
2655+ this . copyPathNormalization =
2656+ getEnum ( copyPathNormalizationKey , CopyPathNormalization ) ??
2657+ defaultCopyPathNormalization
2658+
26462659 this . branchSortOrder =
26472660 getEnum ( branchSortOrderKey , BranchSortOrder ) ?? DEFAULT_BRANCH_SORT_ORDER
26482661
@@ -9253,6 +9266,14 @@ export class AppStore extends TypedBaseStore<IAppState> {
92539266 }
92549267 }
92559268
9269+ public _setCopyPathNormalization ( value : CopyPathNormalization ) {
9270+ if ( value !== this . copyPathNormalization ) {
9271+ this . copyPathNormalization = value
9272+ localStorage . setItem ( copyPathNormalizationKey , value )
9273+ this . emitUpdate ( )
9274+ }
9275+ }
9276+
92569277 public _updateBranchSortOrder ( branchSortOrder : BranchSortOrder ) {
92579278 if ( branchSortOrder !== this . branchSortOrder ) {
92589279 this . branchSortOrder = branchSortOrder
0 commit comments