[bug #9631] Cannot "put tabs only where I want them"

Follow-up Comment #5, bug #9631 (project mc):

this one is really a hard birth ... it has two years of history already ...

disclaimer: i freely interpret the original report as being the same as my
wish, because the request makes little sense when implemented literally. :)

ok, here is the mail i sent along with the patch:

once upon a time, i wrote:
> proski wrote:
> > ossi wrote:
> > > the type of white-space used by auto-indent should not be based on the
> > > "fill tabs with spaces" setting. instead, the leading whitespace from
> > > the above line should be copied. otherwise it's impossible to use a
> > > tabbing style like
> > > <tab>if (...)
> > > <tab><tab>if (cond1 && function(par1,
> > > <tab><tab>                      par2))
> > > <tab><tab><tab>statement;
> [to say it in words: tab for indentation, space for padding]
> > > (which is _the_ tabbing style).
> >
> > I have no idea what you mean.
> >
> preserving the already present indentation style as much as possible.
> take the above example and imagine i want to add par3 to the function
> call. when i press enter on the first closing paren, the new line should
> be identical to the par2 line up to the point where the cursor is placed
> (below the p of par2, obviouly).

and this time i have a patch.
i implemented two variants, therefore the ifdef.
the first variant takes the nearest line with any non-whitespace as a
template, like current mcedit does. but unlike the current code, it does
not truncate the indentation to the current column (this can happen if
the line we are coming from is whitespace only and shorter than the
template line). this is also the way the old borland editors behaved,
but it's a true nightmare if you have no trailing whitespace removal.
the second variant just copies the leading whitespace of the previous
line, even if it is whitespace-only or even empty. i think this is
perfectly reasonable.


Reply to this item at:


  Message sent via/by Savannah

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