summaryrefslogtreecommitdiff
path: root/xmake/modules/private/utils/progress.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-05-31 20:59:20 +0800
committerruki <[email protected]>2020-05-31 20:59:20 +0800
commit3c1d11faa2ca0c6e6eb1664ee938d5c49867b02d (patch)
tree1575dc41a36bf9ee19701de774fbc075f5b7b9db /xmake/modules/private/utils/progress.lua
parente14789b622232874b5d4781550182975de4da8df (diff)
improve to show progress message
Diffstat (limited to 'xmake/modules/private/utils/progress.lua')
-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