Skip to content

Commit

Permalink
Register buffer when saving-as a new file (#1939)
Browse files Browse the repository at this point in the history
  • Loading branch information
MinusGix committed Jan 8, 2023
1 parent a49e354 commit 45c78e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

### Bug Fixes
- [#1911](https://github.com/lapce/lapce/pull/1911): Fix movement on selections with left/right arrow keys
- [#1939](https://github.com/lapce/lapce/pull/1939): Fix saving/editing newly saved-as files

## 0.2.5

Expand Down
3 changes: 2 additions & 1 deletion lapce-proxy/src/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ impl ProxyHandler for Dispatcher {
rev,
content,
} => {
let mut buffer = Buffer::new(buffer_id, path);
let mut buffer = Buffer::new(buffer_id, path.clone());
buffer.rope = Rope::from(content);
buffer.rev = rev;
let result = buffer
Expand All @@ -719,6 +719,7 @@ impl ProxyHandler for Dispatcher {
code: 0,
message: e.to_string(),
});
self.buffers.insert(path, buffer);
self.respond_rpc(id, result);
}
CreateFile { path } => {
Expand Down

0 comments on commit 45c78e8

Please sign in to comment.