Commit 2bd17db
committed
Added code to protect against GNU Readline bug
GNU Readline has a bug in calculating prompt length when ANSI escape codes are present in the prompt. It requires you to escape the escape codes to tell it where sections of invisible characters begin and end.
So before calling input(), cmd2 now makes the prompt safe by escaping any ANSI escape codes present.1 parent ecf5a11 commit 2bd17db
1 file changed
+27
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
1096 | 1097 | | |
1097 | 1098 | | |
1098 | 1099 | | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
1099 | 1124 | | |
1100 | 1125 | | |
1101 | 1126 | | |
1102 | 1127 | | |
| 1128 | + | |
1103 | 1129 | | |
1104 | | - | |
| 1130 | + | |
1105 | 1131 | | |
1106 | 1132 | | |
1107 | 1133 | | |
| |||
0 commit comments