Kaydet (Commit) 798199d8 authored tarafından Guido van Rossum's avatar Guido van Rossum

* Python/pythonrun.c (print_error): print only last line of

	multi-line source line
üst 1a817c09
......@@ -286,6 +286,18 @@ print_error()
writestring(buf, f);
writestring("\n", f);
if (text != NULL) {
char *nl;
if (offset > 0 &&
offset == strlen(text))
offset--;
for (;;) {
nl = strchr(text, '\n');
if (nl == NULL ||
nl-text >= offset)
break;
offset -= (nl+1-text);
text = nl+1;
}
while (*text == ' ' || *text == '\t') {
text++;
offset--;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment