mirror of
https://github.com/Dummi26/tuifile.git
synced 2025-03-10 11:43:53 +01:00
fixed bug where error lines would be 1 character too long
This commit is contained in:
parent
cad3e759af
commit
0991c84de5
@ -468,7 +468,8 @@ impl TuiFile {
|
|||||||
text_charlen -= 1;
|
text_charlen -= 1;
|
||||||
}
|
}
|
||||||
text.push_str(" - Err: ");
|
text.push_str(" - Err: ");
|
||||||
text_charlen += 8;
|
// make text_charlen 1 too large (for the endchar)
|
||||||
|
text_charlen += 9;
|
||||||
for ch in e.chars() {
|
for ch in e.chars() {
|
||||||
if ch == '\n' || ch == '\r' {
|
if ch == '\n' || ch == '\r' {
|
||||||
continue;
|
continue;
|
||||||
@ -479,8 +480,6 @@ impl TuiFile {
|
|||||||
text_charlen += 1;
|
text_charlen += 1;
|
||||||
text.push(ch);
|
text.push(ch);
|
||||||
}
|
}
|
||||||
// make text_charlen 1 too large (for the endchar)
|
|
||||||
text_charlen += 1;
|
|
||||||
while text_charlen < share.size.0 as _ {
|
while text_charlen < share.size.0 as _ {
|
||||||
text.push(' ');
|
text.push(' ');
|
||||||
text_charlen += 1;
|
text_charlen += 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user