blob: bfc5f9b23518a5a47518d6ab7021aedcc04c0ce4 (
plain)
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
|
Fix the bug reported by Alexander Skwar:
bash applies all invisible characters to the first line instead of the ones
that actually (dis)appear in that line. I've also pushed this upstream.
http://bugs.gentoo.org/36393
--- bash-3.0/lib/readline/display.c
+++ bash-3.0/lib/readline/display.c
@@ -258,23 +258,21 @@
#endif
{
*r++ = *p;
- if (!ignoring)
+ if (!ignoring)
rl++; /* visible length byte counter */
- else
- ninvis++; /* invisible chars byte counter */
+ else
+ {
+ ninvis++; /* invisible chars byte counter */
+ if (rl < _rl_screenwidth)
+ invfl = ninvis;
+ }
}
- if (rl >= _rl_screenwidth)
- invfl = ninvis;
-
if (ignoring == 0)
physchars++;
}
}
- if (rl < _rl_screenwidth)
- invfl = ninvis;
-
*r = '\0';
if (lp)
*lp = rl;
|