- Subject: Re: wjed B0.9.17-56 and slang2-pre2-rc3 patches
- From: Marko Mahnic <marko.mahnic@xxxxxxxx>
- Date: Fri, 28 Jan 2005 15:30:03 +0100
SANGOI DINO wrote:
...
After this patch, both jed and wjed can be compiled without problems. But
while redrawing lines with different colors (e.g. a syntax highlighted C or
SLang code), wjed writes only the characters with the first color. After a
bit of debugging, I found the problem: for redrawing wjed does a loop on
VTerm_Display lines, and for every lines, scans characters until the color
changes, and then uses 'tt_write', the same function used to write for the
first time. tt_write calls vterm_write_nchars() to store the new chars in
VTerm_Display, but before writing the new data, tt_write clears all the
remaining line with a memset(). But this is the same line that
msw_write_smgchars() is scanning! So after writing the first set of
characters, the line is cleared and there's nothing more to write.
(I did not recieve the patches with your message).
In my opinion when redrawing the screen in wjed (and also in xterm),
jed should not be using tt_write! It should just read data from
VTerm_display and output that data to the device context.
There should be a function like:
draw_term_rc(int row, int column, int nchars)
{
loop
... read data from VTerm_Display
... write data to DC
}
that reads characters from VTerm_Display and writes them
to DC.
outline for tt_write:
void tt_write (char *s, int n)
{
vterm_write_nchars (s, (unsigned int) n);
draw_term_rc(CursorRow, CursorCol, n);
CursorCol += n;
}
outline for cover_exposed_area:
void cover_exposed_area()
{
for each line
draw_term_rc (lineno, 0, screen_width)
}
Marko
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2005 date index]
[2005 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]