Skip to content

Fix issue #106 - #107

Open
tmuaz wants to merge 1 commit into
makspll:mainfrom
tmuaz:main
Open

Fix issue #106#107
tmuaz wants to merge 1 commit into
makspll:mainfrom
tmuaz:main

Conversation

@tmuaz

@tmuaz tmuaz commented Nov 28, 2025

Copy link
Copy Markdown

See #106 for details.

I've just swapped out Arc<Mutex<Cursor<Vec<u8>>>> for Arc<Mutex<Vec<u8>>>.

This doesn't seem to break anything but I'm assuming Cursor was being used for a reason and it does take away that functionality.

@tmuaz

tmuaz commented Nov 28, 2025

Copy link
Copy Markdown
Author

Simply resetting the buffer position to 0 after a clear also seems to work. I'm just not entirely as to why this doesn't trigger in Startup but triggers in Update.

    {
        let buffer = buffer.get_mut();
        for line in buffer.lines().map_while(Result::ok) {
            // assert_eq!(line.trim_start_matches('\0').len(), line.len());
            console_lines.write(PrintConsoleLine { line });
        }
        buffer.clear();
    }
    buffer.set_position(0);
}

@tmuaz
tmuaz marked this pull request as ready for review December 14, 2025 14:45
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.

1 participant