Fix page rendering when a leftbox is rendered
This commit is contained in:
parent
b920adf649
commit
d870a2a7d9
@ -332,13 +332,13 @@ class Page
|
|||||||
$subtext = substr($this->text,$current_pos,$space_pos);
|
$subtext = substr($this->text,$current_pos,$space_pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the reset of the string will fit on the current line
|
// If the rest of the string will fit on the current line
|
||||||
} elseif ($text_length-$current_pos < static::MSG_WIDTH-$buffer) {
|
} elseif ($text_length-$current_pos < static::MSG_WIDTH-$this->x-$buffer) {
|
||||||
$subtext = substr($this->text,$current_pos);
|
$subtext = substr($this->text,$current_pos);
|
||||||
|
|
||||||
// Get the next lines worth of chars, breaking on a space
|
// Get the next lines worth of chars, breaking on a space
|
||||||
} else {
|
} else {
|
||||||
$subtext = $this->text_substr(substr($this->text,$current_pos),static::MSG_WIDTH-$buffer);
|
$subtext = $this->text_substr(substr($this->text,$current_pos),static::MSG_WIDTH-$this->x-$buffer);
|
||||||
|
|
||||||
// Include the text up to the last space
|
// Include the text up to the last space
|
||||||
if (substr($this->text,$current_pos+strlen($subtext),1) !== ' ')
|
if (substr($this->text,$current_pos+strlen($subtext),1) !== ' ')
|
||||||
|
Loading…
Reference in New Issue
Block a user