summaryrefslogtreecommitdiff
path: root/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'node.c')
-rw-r--r--node.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/node.c b/node.c
index 0eb529a..29f08b9 100644
--- a/node.c
+++ b/node.c
@@ -293,8 +293,7 @@ void node_frame(Ted *ted, Node *node, Rect r) {
for (u16 i = 0; i < ntabs; ++i) {
TextBuffer *buffer = &ted->buffers[node->tabs[i]];
char tab_title[256];
- const char *path = buffer->filename;
- const char *filename = path ? path_filename(path) : TED_UNTITLED;
+ const char *filename = buffer_display_filename(buffer);
Rect tab_rect = rect(Vec2(r.pos.x + tab_width * i, r.pos.y), Vec2(tab_width, tab_bar_height));
if (i > 0) {