reset scroll position when the text is changed

develop
myk002 2022-07-11 17:23:23 -07:00
parent 4ed15ffcc4
commit a5da3c18f9
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 1 additions and 1 deletions

@ -469,7 +469,6 @@ Label.ATTRS{
} }
function Label:init(args) function Label:init(args)
self.start_line_num = 1
-- use existing saved text if no explicit text was specified. this avoids -- use existing saved text if no explicit text was specified. this avoids
-- overwriting pre-formatted text that subclasses may have already set -- overwriting pre-formatted text that subclasses may have already set
self:setText(args.text or self.text) self:setText(args.text or self.text)
@ -479,6 +478,7 @@ function Label:init(args)
end end
function Label:setText(text) function Label:setText(text)
self.start_line_num = 1
self.text = text self.text = text
parse_label_text(self) parse_label_text(self)