Introduction
Introduction Statistics Contact Development Disclaimer Help
tUpdate stored modification time when writing file - ledit - Text editor (WIP)
git clone git://lumidify.org/ledit.git (fast, but not encrypted)
git clone https://lumidify.org/git/ledit.git (encrypted, but very slow)
Log
Files
Refs
README
LICENSE
---
commit a6b0d8d09433aa8cb97c9fbe03e6fae5f7877bf6
parent 320bd075762fe538d0e997bc2573bea19385c3a8
Author: lumidify <[email protected]>
Date: Sun, 16 Jan 2022 19:46:21 +0100
Update stored modification time when writing file
Diffstat:
M keys_command.c | 6 ++++++
1 file changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/keys_command.c b/keys_command.c
t@@ -159,6 +159,12 @@ handle_write(ledit_view *view, char *cmd, size_t l1, size…
} else {
/* FIXME: better message */
window_show_message_fmt(view->window, "Wrote file %s",…
+ /* update modification time */
+ if ((ret = stat(filename, &sb))) {
+ /* FIXME: what should be done here? */
+ } else {
+ view->buffer->file_mtime = sb.st_mtim;
+ }
}
} else {
window_show_message(view->window, "No file name", -1);
You are viewing proxied material from lumidify.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.