Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Deuce display problem and possible fix

4 views
Skip to first unread message

Chris Double

unread,
Oct 8, 2001, 11:49:16 PM10/8/01
to
When editing a file using the Deuce editor (either in the Functional
Developer IDE or standalone-deuce) there is a small re-display
problem.

The problem is when inserting text (a newline for example) before the
end of the file, causing the lines below it to move down. The last
line, if it is not pushed off the end of the window, redisplays merged
with the line before it. For example, a file with contents:

---------
line 1
line 2
line 3
line 4<eof>
---------

Where <eof> is end of file. Insert a new line before 'line 3' then
line 3 and line 4 will be moved down but will appear merged together
on one line. That is, both lines are displayed at the same 'y'
position.

If the file is:

---------
line 1
line 2
line 3
line 4
<eof>
---------

Then the problem does not appear as the merged line is empty. All
appears ok. I tracked the problem down to 'insert-display-lines' where
the <display-line> was not having its y position updated. Changing the
portions of 'insert-display-lines' to match the following fixes the
problem:

-------------------
// Fix the Y positions of the lines we moved down,
// unless they're off the bottom of the screen now
block (return)
without-bounds-checks
for (i :: <integer> from index + n below n-slots,
line = next //line-next-in-buffer(next, buffer, skip-test: #f)
then line-next-in-buffer(line, buffer, skip-test: #f),
while: line)
let dline :: <display-line> = lines[i];
-------------------

The changed line is the one containing the '//line-next' comment. The
text after the '//' is what is originally there, I replaced it with
'next'. It's the 'next' display line that wasn't getting the update
'y' position. The call to 'line-next-in-buffer' returned #f as there
is no following line and the loop is not processed.

Any comments as to whether this is the right place to fix the problem
are appreciated.

Chris.
--
http://www.double.co.nz/dylan


Scott McKay

unread,
Oct 9, 2001, 8:49:01 AM10/9/01
to
I'll look into this. I wonder if there's a corresponding bug in
'delete-display-lines' that has no observable effects.

"Chris Double" <ch...@double.co.nz> wrote in message
news:wkbsjht...@double.co.nz...

> line = next file://line-next-in-buffer(next, buffer, skip-test: #f)

0 new messages