Bug with "cgN" when selection=exclusive

38 views
Skip to first unread message

Ben Fritz

unread,
Oct 1, 2012, 5:37:35 PM10/1/12
to vim...@googlegroups.com
Consider the text:

my very excellent mother just served us nachos

Launching Vim with:

gvim -N -u NONE -i NONE

Start with the cursor at the beginning of the line. Search for "mother". Go back to the beginning of the line. Type cgnmongoose<Esc> and the line becomes:

my very excellent mongoose just served us nachos

Undo the change, and go to the end of the line. Type cgNmongoose<Esc>

If 'selection' is "inclusive", the result is the same.

If 'selection' is "exclusive", instead I get:

my very excellent mongooser just served us nachos


VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Sep 14 2012 13:24:15)
MS-Windows 32-bit GUI version with OLE support
Included patches: 1-661
Compiled by digit...@SPAMdancingpaper.com
Huge version with GUI.

Christian Brabandt

unread,
Oct 2, 2012, 7:47:30 AM10/2/12
to vim...@googlegroups.com
On Mon, October 1, 2012 23:37, Ben Fritz wrote:
> Consider the text:
>
> my very excellent mother just served us nachos
>
> Launching Vim with:
>
> gvim -N -u NONE -i NONE
>
> Start with the cursor at the beginning of the line. Search for "mother".
> Go back to the beginning of the line. Type cgnmongoose<Esc> and the line
> becomes:
>
> my very excellent mongoose just served us nachos
>
> Undo the change, and go to the end of the line. Type cgNmongoose<Esc>
>
> If 'selection' is "inclusive", the result is the same.
>
> If 'selection' is "exclusive", instead I get:
>
> my very excellent mongooser just served us nachos
>

Thanks. Good description. Attached patch fixes it.

regards,
Christian
gn_bug.diff

Bram Moolenaar

unread,
Oct 3, 2012, 7:36:21 AM10/3/12
to Christian Brabandt, vim...@googlegroups.com
Thanks for the quick fix! I'll include it.

I should ask for a test though...

--
It is illegal for anyone to try and stop a child from playfully jumping over
puddles of water.
[real standing law in California, United States of America]

/// Bram Moolenaar -- Br...@Moolenaar.net -- 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 ///

Christian Brabandt

unread,
Oct 3, 2012, 3:23:46 PM10/3/12
to vim...@googlegroups.com
Hi Bram!

On Mi, 03 Okt 2012, Bram Moolenaar wrote:

>
> Christian Brabandt wrote:
>
> > On Mon, October 1, 2012 23:37, Ben Fritz wrote:
> > > Consider the text:
> > >
> > > my very excellent mother just served us nachos
> > >
> > > Launching Vim with:
> > >
> > > gvim -N -u NONE -i NONE
> > >
> > > Start with the cursor at the beginning of the line. Search for "mother".
> > > Go back to the beginning of the line. Type cgnmongoose<Esc> and the line
> > > becomes:
> > >
> > > my very excellent mongoose just served us nachos
> > >
> > > Undo the change, and go to the end of the line. Type cgNmongoose<Esc>
> > >
> > > If 'selection' is "inclusive", the result is the same.
> > >
> > > If 'selection' is "exclusive", instead I get:
> > >
> > > my very excellent mongooser just served us nachos
> > >
> >
> > Thanks. Good description. Attached patch fixes it.
>
> Thanks for the quick fix! I'll include it.
>
> I should ask for a test though...

Attached.

regards,
Christian
--
Der Staat an und f�r sich ist das sittlichste Ganze, die
Verwirklichung der Freiheit; und es ist absoluter Zweck der Vernunft,
das die Freiheit wirklich sei.
-- Georg Wilhelm Friedrich Hegel
gn_test.diff

Bram Moolenaar

unread,
Oct 3, 2012, 5:44:56 PM10/3/12
to Christian Brabandt, vim...@googlegroups.com

Christian Brabandt wrote:

> On Mi, 03 Okt 2012, Bram Moolenaar wrote:
> >
> > Christian Brabandt wrote:
> >
> > > On Mon, October 1, 2012 23:37, Ben Fritz wrote:
> > > > Consider the text:
> > > >
> > > > my very excellent mother just served us nachos
> > > >
> > > > Launching Vim with:
> > > >
> > > > gvim -N -u NONE -i NONE
> > > >
> > > > Start with the cursor at the beginning of the line. Search for "mother".
> > > > Go back to the beginning of the line. Type cgnmongoose<Esc> and the line
> > > > becomes:
> > > >
> > > > my very excellent mongoose just served us nachos
> > > >
> > > > Undo the change, and go to the end of the line. Type cgNmongoose<Esc>
> > > >
> > > > If 'selection' is "inclusive", the result is the same.
> > > >
> > > > If 'selection' is "exclusive", instead I get:
> > > >
> > > > my very excellent mongooser just served us nachos
> > > >
> > >
> > > Thanks. Good description. Attached patch fixes it.
> >
> > Thanks for the quick fix! I'll include it.
> >
> > I should ask for a test though...
>
> Attached.

Great, thanks. I'll try it out soon.


--
Females are strictly forbidden to appear unshaven in public.
[real standing law in New Mexico, United States of America]
Reply all
Reply to author
Forward
0 new messages