>From 1fc4303a47b84421f41bfde9ac03cc0af96396a2 Mon Sep 17 00:00:00 2001 From: Brand Huntsman Date: Thu, 19 Oct 2017 03:15:36 -0600 Subject: [PATCH] set the terminal emulator's titlebar Signed-off-by: Brand Huntsman --- src/winio.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/winio.c b/src/winio.c index dd717b4c..0409e7ee 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2133,6 +2133,13 @@ void titlebar(const char *path) pluglen = 0; } + /* Set the terminal emulator's titlebar. */ + printf("\033]0;nano: "); + if (prefixlen > 0) + printf("%s ", prefix); + printf("%s\007", path); + fflush(stdout); + /* Only print the version message when there is room for it. */ if (verlen + prefixlen + pathlen + pluglen + statelen <= COLS) mvwaddstr(topwin, 0, 2, upperleft); -- 2.13.6