ratpoison-devel
[Top][All Lists]
Advanced

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

[RP] Yet another vscreen patch


From: Gergely Nagy
Subject: [RP] Yet another vscreen patch
Date: Thu Jun 6 09:04:02 2002
User-agent: Wanderlust/2.9.13 (Unchained Melody) Emacs/21.2 Mule/5.0 (SAKAKI)

Hi!

I just noticed that cmd_vscreen and _rel returns NULL
unconditionally. Since I enjoy scripting ratpoison, I like commands
which return something interesting, even when called via ratpoison
-c. So I did a little patch, that makes this two functions return the
same string which appears on the message bar.

The patch below applies after all of yesterdays patches.

-=-

2002-06-06  Gergely Nagy  <address@hidden>

        * src/actions.c (current_vscreen): New function
        (cmd_vscreen, cmd_vscreen_rel): Use it

diff -u -urad ratpoison-yesterday/src/actions.c ratpoison-work/src/actions.c
--- ratpoison-yesterday/src/actions.c   Wed Jun  5 16:12:54 2002
+++ ratpoison-work/src/actions.c        Thu Jun  6 12:54:10 2002
@@ -2448,6 +2448,16 @@
 }
 
 char *
+current_vscreen()
+{
+  char *s;
+
+  s = (char*)xmalloc (strlen (MESSAGE_VSCREEN_STRING) + 10);
+  sprintf (s, MESSAGE_VSCREEN_STRING, current_screen()->current_vscreen);
+  return s;
+}
+
+char *
 cmd_vscreen (int interactive, void *data)
 {
   int num;
@@ -2460,7 +2470,7 @@
     }
   marked_message_printf (0, 0, MESSAGE_VSCREEN_STRING,
                         current_screen()->current_vscreen);
-  return NULL;
+  return current_vscreen();
 }
 
 char *
@@ -2476,7 +2486,7 @@
     }
   marked_message_printf (0, 0, MESSAGE_VSCREEN_STRING,
                         current_screen()->current_vscreen);
-  return NULL;
+  return current_vscreen();
 }
 
 char *

-=-

Attachment: pgpx_1O7ZfHu7.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]