Loading ...
Sorry, an error occurred while loading the content.

15458Re: virtualedit cursor movement and 'x' bug

Expand Messages
  • Matthias Kramm
    Oct 1, 2000
    • 0 Attachment
      On Sat, Sep 30, 2000 at 09:29:14PM +0200, Bram Moolenaar wrote:
      > > +#ifdef FEAT_VIRTUALEDIT
      > > + 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?
      >

      We can't test curwin->w_coladd, as it's zero when the above is executed,
      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...)

      Greetings

      Matthias

      PS: Maybe an extra flag, like started_delete_when_w_coladd_was_not_zero would do?
    • Show all 11 messages in this topic