File tree 4 files changed +26
-8
lines changed
4 files changed +26
-8
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
24
24
* opening tags list without remotes ([ #1111 ] ( https://github.com/extrawurst/gitui/issues/1111 ) )
25
25
* tabs indentation in blame [[ @fersilva16 ] ( https://github.com/fersilva16 )] ([ #1111 ] ( https://github.com/extrawurst/gitui/issues/1117 ) )
26
26
* switch focus to index after staging last file ([ #1169 ] ( https://github.com/extrawurst/gitui/pull/1169 ) )
27
+ * fix stashlist multi marking not updated after dropping ([ #1207 ] ( https://github.com/extrawurst/gitui/pull/1207 ) )
27
28
28
29
## [ 0.20.1] - 2021-01-26
29
30
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,28 +107,40 @@ 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 :: StashPop ( id) => Self :: pop ( repo, * id) ?,
115
+ Action :: StashDrop ( ids) => self . drop ( repo, ids) ?,
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
130
- fn pop ( repo : & RepoPath , id : CommitId ) -> Result < ( ) > {
138
+ fn pop ( & mut self , repo : & RepoPath , id : CommitId ) -> Result < ( ) > {
131
139
sync:: stash_pop ( repo, id) ?;
140
+
141
+ self . list . clear_marked ( ) ;
142
+ self . update ( ) ?;
143
+
132
144
Ok ( ( ) )
133
145
}
134
146
}
You can’t perform that action at this time.
0 commit comments