On Sat, Mar 08, 2003 at 04:06:54PM +0100, Alfredo Braunstein wrote: > It seems to me that lots of the const/mutable confusion in lyxtext comes > from the fact that cursor movement methods are declared const but are not > const at all, mostly because of the double space/double paragraph removal > mechanism. > > As a first step, I propose the removal of constness to all methods that are > _not_ const, like cursorRight etc.
I think that's a move in the wrong direction and 'mutable' is indeed the way to go here. The document is _logically_ unchanged after a CursorRight. > What about removing the double space/par removal mechanism? > > Proposal 1) Plain forbid 3 spaces / 2 empty paragraphs (in order to > discourage space/newline formatting abuse, do not load nor save double > spaces, empty paragraphs). > > Proposal 2) Mark double/triple/... spaces and empty pars with some > disgusting mark or colour, to encourage their removal. Can be combined with > 1) > > Proposal 3) A space after a space is forbidden, a space before makes the > cursor move to the right. Same for paragraphs: an enter after a newline > forbidden, an enter before a newline goes down. > > Proposal 4) The same as 3) plus the following: with some kind of visual > feedback (a somewhat different cursor maybe) the about-to-be-added space is > remembered but not added yet. If the user types something, then it's added > and the space is added after it. > > I think that 4) is my prefered option, because it keeps the same concrete > behaviour than now. (but not the same visual) So what about implementing it and let the rest have a look. This is the kind of things were consensus is never reached by discussion... > PS: I think that the removal of the double space/empty par mechanism can > lead to a _huge_ simplification in lyxtext code. I believe so, too. That's why I am not going to throw anything in your head ;-} > PS2: another thing that I don't like is the fact that a bv is passed to > almost all methods in lyxtext. As a lyxtext has one and only one bv, this > is absurd. Currently yes, but not in all scenarios for the future. > (apart from the fact that I think that the use of bv from > lyxtext should be eliminated or kept to a minimum if possible) That's a different point ;-) Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson)