summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/private/utils/progress.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/private/utils/progress.lua b/xmake/modules/private/utils/progress.lua
index 95581c67f..96678eee3 100644
--- a/xmake/modules/private/utils/progress.lua
+++ b/xmake/modules/private/utils/progress.lua
@@ -118,7 +118,7 @@ function show(progress, format, ...)
else
-- windows width is too small? strip the partial message in middle
local partlen = math.floor(maxwidth / 2) - 3
- local sep = msg_plain:sub(partlen, #msg_plain - partlen)
+ local sep = msg_plain:sub(partlen + 1, #msg_plain - partlen - 1)
local split = msg:split(sep, {plain = true, strict = true})
cprintf(table.concat(split, "..."))
end