Ticket #337: fix_osc_string_in_prompt.diff
File fix_osc_string_in_prompt.diff, 600 bytes (added by styx, 16 years ago) |
---|
-
mc-4.6.2~git20080311
diff -Naur mc-4.6.2~git20080311.orig/src/util.c mc-4.6.2~git20080311/src/util.c
old new 1175 1175 if (*(++r) == '[') { 1176 1176 /* strchr() matches trailing binary 0 */ 1177 1177 while (*(++r) && strchr ("0123456789;?", *r)); 1178 } else 1179 if (*r == ']') { 1180 // Skip an OSC (Operating System Command) 1181 char* BEL = strchr(r, '\7'); 1182 char* ST = strstr(r, "\33\\"); 1183 if (BEL) 1184 r = BEL; 1185 else if (ST) 1186 r = ST+1; 1178 1187 } 1179 1188 1180 1189 /*