File tree 3 files changed +19
-6
lines changed
3 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -865,10 +865,10 @@ impl App {
865
865
}
866
866
}
867
867
Action :: StashDrop ( _) | Action :: StashPop ( _) => {
868
- if let Err ( e) = StashList :: action_confirmed (
869
- & self . repo . borrow ( ) ,
870
- & action ,
871
- ) {
868
+ if let Err ( e) = self
869
+ . stashlist_tab
870
+ . action_confirmed ( & self . repo . borrow ( ) , & action )
871
+ {
872
872
self . queue . push ( InternalEvent :: ShowErrorMsg (
873
873
e. to_string ( ) ,
874
874
) ) ;
Original file line number Diff line number Diff line change @@ -138,6 +138,11 @@ impl CommitList {
138
138
& self . marked
139
139
}
140
140
141
+ ///
142
+ pub fn clear_marked ( & mut self ) {
143
+ self . marked . clear ( ) ;
144
+ }
145
+
141
146
pub fn copy_entry_hash ( & self ) -> Result < ( ) > {
142
147
if let Some ( e) = self . items . iter ( ) . nth (
143
148
self . selection . saturating_sub ( self . items . index_offset ( ) ) ,
Original file line number Diff line number Diff line change @@ -107,23 +107,31 @@ impl StashList {
107
107
108
108
/// Called when a pending stash action has been confirmed
109
109
pub fn action_confirmed (
110
+ & mut self ,
110
111
repo : & RepoPath ,
111
112
action : & Action ,
112
113
) -> Result < ( ) > {
113
114
match action {
114
- Action :: StashDrop ( ids) => Self :: drop ( repo, ids) ?,
115
+ Action :: StashDrop ( ids) => self . drop ( repo, ids) ?,
115
116
Action :: StashPop ( id) => Self :: pop ( repo, * id) ?,
116
117
_ => ( ) ,
117
118
} ;
118
119
119
120
Ok ( ( ) )
120
121
}
121
122
122
- fn drop ( repo : & RepoPath , ids : & [ CommitId ] ) -> Result < ( ) > {
123
+ fn drop (
124
+ & mut self ,
125
+ repo : & RepoPath ,
126
+ ids : & [ CommitId ] ,
127
+ ) -> Result < ( ) > {
123
128
for id in ids {
124
129
sync:: stash_drop ( repo, * id) ?;
125
130
}
126
131
132
+ self . list . clear_marked ( ) ;
133
+ self . update ( ) ?;
134
+
127
135
Ok ( ( ) )
128
136
}
129
137
You can’t perform that action at this time.
0 commit comments