Deuce display problem and possible fix 
Author Message
 Deuce display problem and possible fix

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.*-*-*.com/



Sat, 27 Mar 2004 11:49:16 GMT  
 Deuce display problem and possible fix
I'll look into this.  I wonder if there's a corresponding bug in
'delete-display-lines' that has no observable effects.


Quote:
> 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 file://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



Sat, 27 Mar 2004 20:49:01 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. changes fixed the Histogram display but spoilt the Geometry display

2. Looking for possible bug fixes for Clarion 4 b

3. Possible bug/fix in abstract.c

4. Possible fix for Bug 494589 - os.path.expandvars bug

5. Tkinter + Unicode -- possible FIX

6. bug in tkGeometry.c:Tk_MaintainGeometry + possible fix

7. tk4.0b2 long selection from text widget bug -- possible fix

8. Possible to display a field passed by address?

9. browse display 'flickers' - FIX

10. I want the wavegraph display 10 grids on x,y axis,how to make it fixed

11. come changes to the deuce editor gadget

12. Question on implementing a Deuce command

 

 
Powered by phpBB® Forum Software