Lech Lorens wrote:
> > > Attached is a patch fixing E315 error caused by delete ex command not
> > > resetting visual selection.
> > >
> > > Test included.
> > >
> > > Note that this is related to pressing Escape when in visual mode
> > > triggering a yank to the clipboard. This means that the problem might
> > > (but I'm not sure) be limited to X11 (so *nix, Cygwin). This might mean
> > > that the test file should source unix.vim. Or perhaps check for Vim
> > > having been compiled with X11 support.
> >
> > I can't seem to reproduce the E315 error. I do see strange errors for
> > "normal gv" trying to select lines that don't exist.
>
> What about the attached test? Doesn't it fail for you without the patch
> and start working after the patch has been applied?
I do not get an E315 error but something else. When I select lines in
the middle of the buffer there is no error. When I select lines further
down I get "E16: Invalid range: <09>normal gv".
This indicates the line count is used at the current cursor position,
which would be understandable. Still wrong but a different error than
the E315.
When I comment-out the "'<,'>del" command the Visual selection remains,
but not with the same end.
> > > diff --git a/src/ex_docmd.c b/src/ex_docmd.c
> > > index 24f80fb..1f6fd9b 100644
> > > --- a/src/ex_docmd.c
> > > +++ b/src/ex_docmd.c
> > > @@ -8556,6 +8556,7 @@ ex_operators(eap)
> > > beginline(BL_SOL | BL_FIX);
> > > }
> > >
> > > + end_visual_mode();
> > > switch (eap->cmdidx)
> > > {
> > > case CMD_delete:
> >
> > Calling end_visual_mode() without Visual mode being active is not right.
>
> Yes, now it doesn't look right any more.
>
> > And this should be inside an #ifdef.
> >
> > Can you have another look at this Lech?
>
> Sure. But do you mean anything other than not ending visual mode when
> we're not in visual mode?
--
A fool must search for a greater fool to find admiration.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.