# HG changeset patch # User William Astle # Date 1706909967 25200 # Node ID 0ae10ecfba1e1d145e82f6abd156f2be0a92017b # Parent de527b99d881fd56897e1e6da867ae0a6aaa055e Make filename in listing left truncate so file name isn't hidden It's not helpful to show the path prefix when the name is too long so truncate that instead of the trailing part of the file name string when the name is too long to fit the listing field. diff -r de527b99d881 -r 0ae10ecfba1e lwasm/list.c --- a/lwasm/list.c Fri Dec 22 21:59:41 2023 -0700 +++ b/lwasm/list.c Fri Feb 02 14:39:27 2024 -0700 @@ -221,6 +221,8 @@ { linespec = cl -> linespec; if ((strlen(linespec) > 8) && (linespec[7] == ':')) linespec += 8; + if (strlen(linespec) > max_linespec_len) + linespec += strlen(linespec) - max_linespec_len; while (*linespec == ' ') linespec++; if (of) fprintf(of, "(%*.*s):%05d ", max_linespec_len, max_linespec_len, linespec, cl->lineno);