PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Console » Console_ProgressBar » Bug #7407

Fix for bug with ansi_terminal not erasing complete line

Details

Request #7407Fix for bug with ansi_terminal not erasing complete line
Submitted2006-04-17 01:33 UTC
Fromapinstein at mac dot com
StatusClosed
PackageConsole_ProgressBar
PHP Version5.0.4
OSmac os x / any?
Roadmaps(Not assigned)

Comments

[2006-04-17 01:33 UTC] apinstein at mac dot com

Description:
------------
Using ansi_terminal=true, if the line length changes b/w
updates, there can be leftover chars at the end. This patch
fixes it.

Test script:
---------------
Put this in display($current) just after the printf()

// erase to end of line so previous displays of longer length don't still appear
if ($this->_options['ansi_terminal']) {
print("\x1b[K");
}

[2006-04-24 04:17 UTC] apinstein at mac dot com

Ok, i'll try this out. I just saw that you posted 0.4.

[2006-04-25 15:38 UTC] apinstein at mac dot com

things seem to be fine. the way my code worked the "length" of
the line changed a lot. With the way you re-did my patch the
line length stays fixed and it isn't a problem.

Thanks for incorporating the time-estimate code!