1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
Description: Ensure that the title prompt only appears once
Windows in screen can be renamed using C-a A (title). This can be done
repeatedly so that any number of prompts for a new window name overlay
each other. Once the user entered a name in the topmost prompt and
presses enter, he has to do it again for all the prompts underneath.
This can be very confusing in case the user hit C-a A several times
without noticing or realizing.
Author: Tobias Wulff <tobi@swulff.de>
Debian-Bug: 625866
Index: screen/process.c
===================================================================
--- screen.orig/process.c 2013-07-14 23:43:28.058810093 +0200
+++ screen/process.c 2013-07-14 23:43:28.050810057 +0200
@@ -478,6 +478,8 @@
char *noargs[1];
+int enter_window_name_mode = 0;
+
void
InitKeytab()
{
@@ -5745,6 +5747,8 @@
ASSERT(display);
if (len && fore)
ChangeAKA(fore, buf, strlen(buf));
+
+ enter_window_name_mode = 0;
}
static void
@@ -5752,6 +5756,11 @@
{
char *s, *ss;
int n;
+
+ if (enter_window_name_mode == 1) return;
+
+ enter_window_name_mode = 1;
+
Input("Set window's title to: ", sizeof(fore->w_akabuf) - 1, INP_COOKED, AKAfin, NULL, 0);
s = fore->w_title;
if (!s)
|