Bug 118 : extra character (small box) on each line in the console on linux and windows
Last modified: 2005-08-11 09:29




Status:
CLOSED
Resolution:
FIXED -
Priority:
P1
Severity:
normal

 

Reporter:
fry
Assigned To:
fry

Attachment Type Created Size Actions
patch to stop using nulls as dummy characters in new paragraphs patch 2005-08-01 17:51 3.08 KB
correctness (not performance) tests for EditorConsole text/plain 2005-08-01 17:52 1.25 KB

Description:   Opened: 2005-07-28 15:53
caused by a regression introduced by the patch for bug #19. filing as a
separate bug because the initial bug is resolved, and this issue probably
isn't bad enough to prevent 93 from going out (only because we have so few
linux users)
Additional Comment #1 From fry 2005-07-29 06:20
from mellis:

The problem is this line, I was afraid it might not work on
all platforms:

// add a dummy character to the new paragraph; otherwise, a newline at
// the end of a batch will be lost (because batches get appended to the
// paragraph containing the last character of the preceeding batch)
elements.add(new ElementSpec(a, ElementSpec.ContentType,
new char[] { '\0' }, 0, 1));

I'll have to look and figure out another way to do this; it'll
probably just require keeping a bit more state in the
BufferedStyledDocument class.
Additional Comment #2 From stendahl 2005-08-01 17:50
Ok... I think I solved this. Attaching patch and another test case. This code inserts the
newline at the end of each line, which the previous version didn't. Otherwise, blank lines don't
show up. I'm worried that these might display as little boxes on Linux. I'll try to find a box to
test on.
Additional Comment #3 From stendahl 2005-08-01 17:51
edit]
patch to stop using nulls as dummy characters in new paragraphs
Additional Comment #4 From stendahl 2005-08-01 17:52
edit]
correctness (not performance) tests for EditorConsole
Additional Comment #5 From fry 2005-08-10 08:36
great, this looks fixed. i had kind of a weird delay lag here when using
the test script, but hopefully that won't be quite as much trouble in
actual use. if it's a problem, we'll open a new bug for the lag.

this was showing the NUL char on windows too so it's great to have it
working again.