~ubuntu-branches/debian/stretch/screen/stretch

« back to all changes in this revision

Viewing changes to debian/patches/62-prevent-repeated-title-prompt.patch

  • Committer: Package Import Robot
  • Author(s): Axel Beckert
  • Date: 2014-07-26 14:05:20 UTC
  • mfrom: (7.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20140726140520-68d50x42gevcjy5e
Tags: 4.2.1-2
* Upload to unstable again
* Enable parallel building

Show diffs side-by-side

added added

removed removed

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