From dbf253d606db7f6aa38f73e81b16b848482a8194 Mon Sep 17 00:00:00 2001 From: AardCrowley Date: Mon, 13 Mar 2023 15:51:19 -0400 Subject: [PATCH] Update NoteExtender.xml --- NoteExtender/NoteExtender.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/NoteExtender/NoteExtender.xml b/NoteExtender/NoteExtender.xml index f4f94b0..e1669db 100644 --- a/NoteExtender/NoteExtender.xml +++ b/NoteExtender/NoteExtender.xml @@ -25,6 +25,7 @@ local extras = require "aard_lua_extras" require "gmcphelper" local snapshotV = tonumber(extras.PackageVersion()) +require 'tprint' local prefix = GetAlphaOption("script_prefix") @@ -89,9 +90,9 @@ end function findBoundaries(tbl) local tildeStr = string.rep("~", 79) for indexStart,v in ipairs(tbl) do - if v[1].text == tildeStr then + if v[1].text == tildeStr or v[1].text:find("No more new") then for indexEnd = #tbl, 1, -1 do - if tbl[indexEnd][1].text == tildeStr then + if tbl[indexEnd][1].text == tildeStr or tbl[indexEnd][1].text:find("There are no") or tbl[indexEnd][1].text:find("Changed") then table.move(tbl, indexStart, indexEnd, 1) local len = indexEnd - indexStart + 1 table.move(tbl, #tbl + 1, #tbl*2 - len, len + 1) @@ -103,6 +104,7 @@ function findBoundaries(tbl) return tbl end + function addToWindow(lines) local lines = findBoundaries(lines) NotesWin:clear(false)