summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-05-02 00:37:39 +0800
committerruki <[email protected]>2020-05-01 21:45:54 +0800
commit5a60c8f0d02f3624909f85dff8d5231af63807d3 (patch)
tree28cf98aefa3b93ec95a3211815bb1c536130509c
parentbcf967b2abd338f9bcd3de403d5ebbaabf963d94 (diff)
fix textarea
-rw-r--r--xmake/core/ui/textarea.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/core/ui/textarea.lua b/xmake/core/ui/textarea.lua
index b505dc81e..84e71dd73 100644
--- a/xmake/core/ui/textarea.lua
+++ b/xmake/core/ui/textarea.lua
@@ -62,7 +62,7 @@ function textarea:draw(transparent)
-- draw progress
if self:option("progress") then
- local progress = (self._STARTLINE + math.min(self:height(), self._LINECOUNT)) * 100 / self._LINECOUNT
+ local progress = math.floor((self._STARTLINE + math.min(self:height(), self._LINECOUNT)) * 100 / self._LINECOUNT)
if (self._STARTLINE > 0 or progress < 100) and self:width() > 20 then
self:canvas():move(self:width() - 10, self:height() - 1):putstr(string.format("(%%%d)", progress))
end