Skip to content

bug fix: journal.lua minor performance lost due to typo "colllapsed" #1469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 2, 2025

Conversation

TheLouisHong
Copy link
Contributor

@TheLouisHong TheLouisHong 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