summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémie Courrèges-Anglas <jca@wxcvbn.org>2017-03-09 20:01:45 +0100
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2017-03-09 20:02:40 +0100
commitec7897570eb01594dd4e89264c8a27d5c8b87d5a (patch)
treee1d5810aa5663e28be2524633dd64542dd746803
parent90559c9fed49ee3f3453f78bf6fd4fbf5edd65a4 (diff)
downloadratpoison-ec7897570eb01594dd4e89264c8a27d5c8b87d5a.zip
Setting framemsgwait to -1 disables the 'Current frame' message.
-rw-r--r--NEWS1
-rw-r--r--doc/ratpoison.mdoc.15
-rw-r--r--doc/ratpoison.texi3
-rw-r--r--src/actions.c2
-rw-r--r--src/split.c7
5 files changed, 14 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 0d632a9..9b7571d 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,7 @@ The msgwait command will stay around for a few releases.
** new variable `framemsgwait'
Timeout (in seconds) for the `Current frame' message window.
+If set to -1, no message is shown.
** better `select' error handling
diff --git a/doc/ratpoison.mdoc.1 b/doc/ratpoison.mdoc.1
index 2e19a60..4058c19 100644
--- a/doc/ratpoison.mdoc.1
+++ b/doc/ratpoison.mdoc.1
@@ -1132,6 +1132,11 @@ indicator is shown.
If
.Ar seconds
is zero, wait until the next interactive command.
+If
+.Ar seconds
+is
+.Li -1 ,
+don't show any message.
.It Cm startupmessage Li 0 | 1
Decide whether to show a greeting message at startup.
.It Cm warp Li 0 | 1
diff --git a/doc/ratpoison.texi b/doc/ratpoison.texi
index fb26dac..1fa79c3 100644
--- a/doc/ratpoison.texi
+++ b/doc/ratpoison.texi
@@ -1369,7 +1369,8 @@ When called with no arguments, the current setting is returned.
@deffn Command {set framemsgwait} @var{n}
Set the duration the @samp{Current frame} indicator is shown. If seconds
-is zero, wait until the next interactive command.
+is zero, wait until the next interactive command. If seconds is -1,
+don't show any message.
When called with no arguments, the current setting is returned.
@end deffn
diff --git a/src/actions.c b/src/actions.c
index c2eca3c..56bccb3 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -3934,7 +3934,7 @@ set_framemsgwait (struct cmdarg **args)
if (args[0] == NULL)
return cmdret_new (RET_SUCCESS, "%d", defaults.frame_indicator_timeout);
- if (ARG(0,number) < 0)
+ if (ARG(0,number) < -1)
return cmdret_new (RET_FAILURE, "framemsgwait: %s", invalid_negative_arg);
else
defaults.frame_indicator_timeout = ARG(0,number);
diff --git a/src/split.c b/src/split.c
index 7042a55..a9d69cd 100644
--- a/src/split.c
+++ b/src/split.c
@@ -934,8 +934,11 @@ show_frame_indicator (int force)
if (num_frames (rp_current_screen) > 1 || force)
{
hide_frame_indicator ();
- show_frame_message (defaults.frame_fmt);
- alarm (defaults.frame_indicator_timeout);
+ if (defaults.frame_indicator_timeout != -1)
+ {
+ show_frame_message (defaults.frame_fmt);
+ alarm (defaults.frame_indicator_timeout);
+ }
}
}