jed-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

RE: Word-wrapping


> -----Original Message-----
> From: owner-jed-users-l@xxxxxxxxxxxxxx 
> [mailto:owner-jed-users-l@xxxxxxxxxxxxxx] On Behalf Of Marko Mahnic
> Sent: mercoledì 4 maggio 2005 11.26
> To: jed-users@xxxxxxxxxxx
> Subject: Word-wrapping

Hi,
 
> Some editors use word-wrapping to achieve the desired effect. 
> If a line of text is too long to fit on the screen it is 
> continued into the next line on screen - a virtual line-break.

Well, this is a different feature... But it may or may not help to solve the
original problem, and anyways it's a desiderable feature that some other
editors have.

> How hard would it be to implement word-wrapping in JED?
> Let mi think...
> 
[SNIP]
> 
> There are more solutions to the problem:
>     * each line has a list of fragment offsets
>     * there is no list of fragments - the line is wrapped when
>       it is copied to the screen buffer
>     *...

For the real implementation, I think I would need a good depth look at the
code before saying anything... But leaving Line structure and handling code
"as is" and doing the work while writing to SLsmg sounds appealing... (but
then we will have issues tracking screen rows).

> But with word-wrapping there are some questions to answer:
>     * how are lines numbered - by line or by fragment

- By line.

>     * how are columns numbered

- By line: e.g. is a line long 100 characters wraps at position 72,
goto_column(80) should go to the 8 character on the second line.

>     * is the topline of the window the top _line_ or the top _fragment_

- I would say the line, but what happens if a line starts off screen and
finish on screen ?

>     * when user presses down-arrow, does he move to the next line
>       or the next fragment

- Next line.

>     * can a fragment mark the beginning of a fold

- No. (and the '...' should go at the end of the last fragment for this
line).


>     * can a buffer be narrowed to a set of fragments or only to a set
>       of lines - does struct Fragment need flags

- Full lines for narrow(), everything (as today...) for narrow_to_region().

So, I think that line identity should be preserved, and word-wrapping should
be a visual artifact.

All the above IMHO.

Thanks,
						Dino


--------------------------
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]