Skip to content
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

Fix textutils.pagedTabulate and tabulate #522

Open
wants to merge 5 commits into
base: mc-1.15.x
Choose a base branch
from

Conversation

dierks-m
Copy link

This addresses issue #487 and just is the 1.15 version of #517 with the two commits cherry-picked over. textutils.pagedTabulate also now correctly prints an entire page before waiting for input.
Due to the inner workings of makePagedScroll it waits for user input - even when there's no more content to come. See here:
https://github.com/SquidDev-CC/CC-Tweaked/blob/e8e2ed9fe521b4b420c5eb93190fa3f1f6f58686/src/main/resources/data/computercraft/lua/rom/apis/textutils.lua#L91-L97

The returned function first scrolls, them asks for input - this is due to print() doing a last term.scroll() at the end with the newline character - pagedPrint() does the same.
For that to be fixed, all of pagedPrint, makePagedScroll and pagedTabulate would have to be changed.
Besides that, the function seems to work as intended.

grafik
Other pictures are in #517

dierks-m and others added 5 commits August 6, 2020 17:58
Initial commit where textutils.pagedTabulate and textutils.tabulate should work as intended
It appears I had failed to update this when last bumping the Forge
version. Closes cc-tweaked#521 - we're relying on a feature only added in Forge
31.1.16, and they're using 3.1.14.
Switch to table.pack in order for tabulateCommon to properly error when one of the arguments provided is nil
@SquidDev SquidDev added area-CraftOS This affects CraftOS, or any other Lua portions of the mod. enhancement An extension of a feature or a new feature. labels Aug 10, 2020
@SquidDev SquidDev self-requested a review November 11, 2020 21:58
@SquidDev SquidDev self-assigned this Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CraftOS This affects CraftOS, or any other Lua portions of the mod. enhancement An extension of a feature or a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants