summaryrefslogtreecommitdiff
path: root/ted.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-04 19:51:13 -0500
committerpommicket <pommicket@gmail.com>2023-01-04 19:51:13 -0500
commitd9cc57e9ff1725e6e63973705adbf218d6961d17 (patch)
tree4c2eaa1e0b39a3387793299c52062996ee7be3ae /ted.c
parent87b0da0d33d97abc0ba94ad18d988d370d09441b (diff)
fix command-line argument starting file if it doesn't exist
it used to open an untitled buffer. also, clarified buffer_load_file
Diffstat (limited to 'ted.c')
-rw-r--r--ted.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ted.c b/ted.c
index 13e01a8..ea585b9 100644
--- a/ted.c
+++ b/ted.c
@@ -459,7 +459,7 @@ bool ted_new_file(Ted *ted, const char *filename) {
strbuf_cpy(path, TED_UNTITLED);
if (ted_open_buffer(ted, &buffer_idx, &tab_idx)) {
TextBuffer *buffer = &ted->buffers[buffer_idx];
- buffer_new_file(buffer, TED_UNTITLED);
+ buffer_new_file(buffer, path);
if (!buffer_has_error(buffer)) {
return true;
} else {