summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/comm.c2
-rw-r--r--src/process.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/src/comm.c b/src/comm.c
index 4843e10..ba9806b 100644
--- a/src/comm.c
+++ b/src/comm.c
@@ -286,7 +286,7 @@ struct comm comms[RC_LAST + 1] =
#ifdef COPY_PASTE
{ "scrollback", NEED_FORE|ARGS_1 },
#endif
- { "select", ARGS_01 },
+ { "select", CAN_QUERY|ARGS_01 },
{ "sessionname", ARGS_01 },
{ "setenv", ARGS_012 },
{ "setsid", ARGS_1 },
diff --git a/src/process.c b/src/process.c
index 5d6941d..34ed63d 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1208,7 +1208,10 @@ int key;
else if (args[0][0] == '.' && !args[0][1])
{
if (!fore)
- Msg(0, "select . needs a window");
+ {
+ Msg(0, "select . needs a window");
+ queryflag = -1;
+ }
else
{
SetForeWindow(fore);
@@ -1217,6 +1220,8 @@ int key;
}
else if (ParseWinNum(act, &n) == 0)
SwitchWindow(n);
+ else if (queryflag >= 0)
+ queryflag = -1; /* ParseWinNum already prints out an appropriate error message. */
break;
#ifdef AUTO_NUKE
case RC_DEFAUTONUKE: