Fix file reloading not populating the history (#20156)

Closes https://github.com/zed-industries/zed/issues/20111
Closes https://github.com/zed-industries/zed/issues/20153

cc @mikayla-maki and @ConradIrwin 

Release Notes:

- Fixed undo stack corruption on external file changes
([#20111](https://github.com/zed-industries/zed/issues/20111))
([#20153](https://github.com/zed-industries/zed/issues/20153))

Co-authored-by: Antonio Scandurra <antonio@zed.dev>
This commit is contained in:
Kirill Bulatov 2024-11-04 11:30:15 +02:00 committed by GitHub
parent 25443a91ca
commit c41a8e33a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2214,7 +2214,7 @@ impl Project {
match event {
BufferEvent::ReloadNeeded => {
if !self.is_via_collab() {
self.reload_buffers([buffer.clone()].into_iter().collect(), false, cx)
self.reload_buffers([buffer.clone()].into_iter().collect(), true, cx)
.detach_and_log_err(cx);
}
}