summaryrefslogtreecommitdiff
path: root/ted.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-27 19:30:07 -0400
committerpommicket <pommicket@gmail.com>2023-08-27 19:30:07 -0400
commit8cfcfb6309c0399c3e5e491695086d4723bfbc72 (patch)
tree3e5b60381abae2fb3704ce37e34d8e1ca85cf096 /ted.h
parentf999900e3a1cf54b57fe051f248dae56f31f8b7c (diff)
disambiguate between files with the same name
Diffstat (limited to 'ted.h')
-rw-r--r--ted.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/ted.h b/ted.h
index 77f556b..d35fd74 100644
--- a/ted.h
+++ b/ted.h
@@ -386,8 +386,11 @@ u32 buffer_last_line_on_screen(TextBuffer *buffer);
Rect buffer_rect(TextBuffer *buffer);
/// is this buffer empty?
bool buffer_empty(TextBuffer *buffer);
-/// returns the buffer's filename (not full path), or "Untitled" if this buffer is untitled.
-const char *buffer_display_filename(TextBuffer *buffer);
+/// returns the buffer's display filename (not full path) into `filename`
+///
+/// if the buffer is an untitled buffer, returns "Untitled".
+/// `filename` is guaranteed to be null-terminated after calling this.
+void buffer_display_filename(TextBuffer *buffer, char *filename, size_t filename_size);
/// does this buffer contained a named file (i.e. not a line buffer, not the build buffer, not untitled)
bool buffer_is_named_file(TextBuffer *buffer);
/// does this buffer have unsaved changes?