Skip to content

Conversation

LouisGameDev
Copy link
Contributor

@LouisGameDev LouisGameDev commented Jun 26, 2025

obvious typo causing unintended performance lost in journal.lua

collapsed is typo-ed as colllapsed which is always nil

since not colllapsed is always true, unintended performance lost when table_of_contents_panel is collapsed.

if not colllapsed then

        shifter.Shifter{
            view_id='shifter',
            frame={l=0, w=1, t=1, b=2},
-- the intended name is collapsed here
            collapsed=not toc_visible,
            on_changed = function (collapsed)
                self.subviews.table_of_contents_panel.visible = not collapsed
                self.subviews.table_of_contents_divider.visible = not collapsed
-- if statement always true because it's spelled "colllapsed"
                if not colllapsed then
                    self:reloadTableOfContents()
                end

                self:ensurePanelsRelSize()
                self:updateLayout()
            end,
        },

obvious typo causing unintended performance lost
@ab9rf ab9rf merged commit 10a04ab into DFHack:master Jul 2, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants