diff options
| author | Albert Cervin <albert@acervin.com> | 2023-05-11 22:23:53 +0200 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2023-05-11 22:23:53 +0200 |
| commit | 74f4ec2a181a28a3b787cee0dc8e9ea74f50a8f8 (patch) | |
| tree | 2e6e4984b6104409fce3465e68cf76f65a09b801 /src | |
| parent | 870286d0efb8e39acfb674aa6a1e94d39ea38091 (diff) | |
| download | dged-74f4ec2a181a28a3b787cee0dc8e9ea74f50a8f8.tar.gz dged-74f4ec2a181a28a3b787cee0dc8e9ea74f50a8f8.tar.xz dged-74f4ec2a181a28a3b787cee0dc8e9ea74f50a8f8.zip | |
Fix write to file when no changes
A change of which file to write to was not considered a "change",
thus not actually writing the file to disk since it was already
"saved".
Diffstat (limited to 'src')
| -rw-r--r-- | src/dged/buffer.c | 1 | ||||
| -rw-r--r-- | src/main/main.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/dged/buffer.c b/src/dged/buffer.c index c34d314..7e9789a 100644 --- a/src/dged/buffer.c +++ b/src/dged/buffer.c @@ -606,6 +606,7 @@ void buffer_to_file(struct buffer *buffer) { void buffer_write_to(struct buffer *buffer, const char *filename) { buffer->filename = to_abspath(filename); + buffer->modified = true; buffer_to_file(buffer); } diff --git a/src/main/main.c b/src/main/main.c index 59a9a59..b14c6c0 100644 --- a/src/main/main.c +++ b/src/main/main.c @@ -20,7 +20,7 @@ #include "bindings.h" #include "cmds.h" -struct frame_allocator frame_allocator; +static struct frame_allocator frame_allocator; void *frame_alloc(size_t sz) { return frame_allocator_alloc(&frame_allocator, sz); |
