1
0
mirror of https://github.com/Earu/EasyChat.git synced 2025-03-04 03:13:20 -05:00

fix a bug with the new setting

This commit is contained in:
Earu 2021-07-10 19:02:48 +02:00
parent 935af9d6ad
commit 9cb4531a7c
2 changed files with 3 additions and 3 deletions

View File

@ -645,7 +645,7 @@ local function create_default_settings()
settings:AddSpacer(category_name)
if EasyChat.GUI.RichText and EasyChat.GUI.RichText.ClassName == "RichTextX" then
settings:AddConvarSetting(category_name, "number", EC_MODERN_TEXT_HISTORY_LIMIT, "History Line Amount Limit", 5000, -1)
settings:AddConvarSetting(category_name, "number", EC_MODERN_TEXT_HISTORY_LIMIT, "History Line Limit", 5000, -1)
end
if EasyChat.CanUseCEFFeatures() then

View File

@ -208,7 +208,7 @@ function PANEL:AppendText(text)
isAtBottom = atBottom();
RICHTEXT.appendChild(span);
if (]] .. limit .. [[!= -1 && ]] .. limit .. [[ <= RICHTEXT.childElementCount && RICHTEXT.children[0]) {
if (]] .. limit .. [[> 0 && ]] .. limit .. [[ <= RICHTEXT.childElementCount && RICHTEXT.children[0]) {
RICHTEXT.children[0].remove();
}
@ -237,7 +237,7 @@ function PANEL:AppendImageURL(url)
RICHTEXT.appendChild(img);
RICHTEXT.appendChild(document.createElement("br"));
if (]] .. limit .. [[!= -1 && ]] .. limit .. [[ <= RICHTEXT.childElementCount && RICHTEXT.children[0]) {
if (]] .. limit .. [[> 0 && ]] .. limit .. [[ <= RICHTEXT.childElementCount && RICHTEXT.children[0]) {
RICHTEXT.children[0].remove();
}