Ticket #337: fix_osc_string_in_prompt.2.diff
File fix_osc_string_in_prompt.2.diff, 602 bytes (added by snizovtsev, 16 years ago) |
---|
-
src/util.c
diff -Naur mc-4.6.2-orig/src/util.c mc-4.6.2/src/util.c
old new 1185 1185 if (*(++r) == '[') { 1186 1186 /* strchr() matches trailing binary 0 */ 1187 1187 while (*(++r) && strchr ("0123456789;?", *r)); 1188 } else 1189 if (*r == ']') { 1190 // Skip an OSC (Operating System Command) 1191 char* BEL = strchr(r, '\7'); 1192 char* ST = strstr(r, "\33\\"); 1193 if (ST && BEL) 1194 r = min(ST+1, BEL); 1195 else if (BEL) 1196 r = BEL; 1197 else if (ST) 1198 r = ST+1; 1188 1199 } 1189 1200 1190 1201 /*