Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F91618846
Teach libedit how to parse ^[
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
pstef
Aug 19 2024, 10:24 PM
2024-08-19 22:24:30 (UTC+0)
Size
732 B
Referenced Files
None
Subscribers
None
Teach libedit how to parse ^[
View Options
diff --git a/contrib/libedit/parse.c b/contrib/libedit/parse.c
index 2620f41eb1c..3bfea8126bf 100644
--- a/contrib/libedit/parse.c
+++ b/contrib/libedit/parse.c
@@ -228,7 +228,17 @@ parse__escape(const wchar_t **ptr)
}
} else if (*p == '^') {
p++;
- c = (*p == '?') ? '\177' : (*p & 0237);
+ switch (*p) {
+ case '?':
+ c = '\177';
+ break;
+ case '[':
+ c = '\033';
+ break;
+ default:
+ c = *p & 0237;
+ break;
+ }
} else
c = *p;
*ptr = ++p;
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
11140605
Default Alt Text
Teach libedit how to parse ^[ (732 B)
Attached To
Mode
P645 Teach libedit how to parse ^[
Attached
Detach File
Event Timeline
Log In to Comment