]> git.mdlowis.com Git - projs/tide.git/commitdiff
fixed a bug in setting title of unnamed buffer
authorMichael D. Lowis <mike.lowis@gentex.com>
Fri, 14 Sep 2018 13:31:46 +0000 (09:31 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Fri, 14 Sep 2018 13:31:46 +0000 (09:31 -0400)
tide.c

diff --git a/tide.c b/tide.c
index d765281ee67b82e7b6a19efa1065215728c4f958..3762814f8f611f00494c87a8c058811ba7f7265f 100644 (file)
--- a/tide.c
+++ b/tide.c
@@ -273,8 +273,9 @@ static void put(char* arg) {
         buf_setpath(buf, path);
         free(path);
     }
-    win_title(buf->path);
-    win_prop_set("TIDE_FILE", "file", buf->path);
+    char* path = (buf->path ? buf->path : "*scratch*");
+    win_title(path);
+    win_prop_set("TIDE_FILE", "file", path);
 }
 
 static void get(char* arg) {