summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--src/actions.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b355a4f..96f0139 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
arguments, not numbers.
(cmd_windows): Use the argument as a window format string in
non-interactive mode.
+ (cmd_windows): if data is NULL use the default format string.
2001-09-08 shawn <sabetts@diggin.lamenet.tmp>
diff --git a/src/actions.c b/src/actions.c
index 857bc9e..2f748aa 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -1006,7 +1006,10 @@ cmd_windows (int interactive, void *data)
else
{
window_list = sbuf_new (0);
- get_window_list ((char *)data, "\n", window_list, &dummy, &dummy);
+ if (data)
+ get_window_list ((char *)data, "\n", window_list, &dummy, &dummy);
+ else
+ get_window_list (defaults.window_fmt, "\n", window_list, &dummy, &dummy);
tmp = sbuf_get (window_list);
free (window_list);