15458Re: virtualedit cursor movement and 'x' bug
- Oct 1, 2000On Sat, Sep 30, 2000 at 09:29:14PM +0200, Bram Moolenaar wrote:
> > +#ifdef FEAT_VIRTUALEDITWe can't test curwin->w_coladd, as it's zero when the above is executed,
> > + if((oap->start.col == oap->end.col) &&
> > + (oap->start.lnum == oap->end.lnum)
> > + ) oap->end.col++;
> > +#endif
> I can't add it just like this. It means that when FEAT_VIRTUALEDIT is defined
> the operated area is never empty. I'm sure some commands will work
> differently then.
> Shouldn't there be some test if w_coladd is non-zero here?
and oap->start and oap->end don't contain any coladd-information.
To change this, we would have to add a coladd field to pos_t.
Anyway, i don't see the problem with the above code, i.e. i can't think of
a command which would behave differently.
(It's just that i can't think of a useful command which deletes an empty
region of text...)
PS: Maybe an extra flag, like started_delete_when_w_coladd_was_not_zero would do?
- << Previous post in topic Next post in topic >>