[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debian-users:16539] Bug#JP/946: A patch to preserve the title of window.



-DUSE_X11 してない時でもJVim(Vim3.0 + Japanized patch 1.5)にちゃ
んとウィンドウタイトルを元に戻させるぱっち。


diff -dNru ../vim-3.0.orig/src/unix.c ./src/unix.c
--- ../vim-3.0.orig/src/unix.c	Fri Mar 19 11:09:54 1999
+++ ./src/unix.c	Fri Mar 19 11:17:02 1999
@@ -484,19 +484,25 @@
 
 #else	/* USE_X11 */
 
+	static char_u *
+get_term_strings()
+{
+	if (STRNCMP(term_strings.t_name, "builtin_", 8) == 0)
+		return term_strings.t_name + 8;
+	else
+		return term_strings.t_name;
+}
+
 	static void
 get_x11_title()
 {
-	oldtitle = (char_u *)"Thanks for flying Vim";
+	oldtitle = get_term_strings();
 }
 
 	static void
 get_x11_icon()
 {
-	if (STRNCMP(term_strings.t_name, "builtin_", 8) == 0)
-		oldicon = term_strings.t_name + 8;
-	else
-		oldicon = term_strings.t_name;
+	oldicon = get_term_strings();
 }
 
 #endif	/* USE_X11 */
 
 -.- . -. -.
Ken Nakagaki <Nakagaki@xxxxxxxxx>
「人は船ではない。人は会社ではない」-- Gerry Spence