[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] definition of filestruct with ENABLE_MULTIBUFFER

From: David Benbennick
Subject: Re: [Nano-devel] definition of filestruct with ENABLE_MULTIBUFFER
Date: Tue, 26 Mar 2002 10:33:59 -0500 (EST)

> No problem.  Just be warned: I've discovered a few minor bugs in it
> already, which need fixing before going to step two.

Good.  I will work on correcting those first, and send you back a patch.  
Do you have something specific in mind for step two?  I don't know the
code very well; my current plan is just to remove global.c:totlines and
then fix what breaks.

> >* make only next and prev be conditional on ENABLE_MULTIBUFFER,
> I don't know about this one, since all the prev and next references
> would then have to be #ifdef'ed out, which could end up being a mess.  

I think a lot of the other #ifdef ENABLE_MULTIBUFFER lines will go away
when we finish converting global.c variables to their openfilestruct

Also, the number of prev and next references should be (or become) small
and self contained.  I think they are only needed when inserting, closing,
and switching buffers, and maybe in thanks_for_all_the_fish.  If it does
end up being a mess, then I agree, they could be defined always.

> You have a point about edittop and filebot, but the line number would
> still have to be preserved in order to keep the cursor exactly where
> the user had left it before (i. e. do_gotopos() won't work without a
> line number specified).

No.  In openfilestruct you have edittop and file_current_y.  Then the
current line number is edittop->lineno + file_current_y.  So when you
switch buffers you just recompute the line number.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]