Ben Fritz wrote:

> Using this XML snippet:
> 
> <?xml version="1.0"?>
> <root_tag>
>   <SomeTag>
>      <SomeTagPlusText>content</SomeTagPlusText>
>   </SomeTag>
>   <another_tag></another_tag>
> </root_tag>
> 
> I place my cursor on SomeTag and hit vit. It acts like I placed my
> cursor on root_tag. Same with vat. In other words, vat selects the
> entire <root_tag>...</root_tag> text, whereas I expect it to highlight
> only <SomeTag>...</SomeTag>
> 
> If I make a minor change to the XML:
> 
> <?xml version="1.0"?>
> <root_tag>
>   <SomeTag>
>      <SomeOtherTag>content</SomeOtherTag>
>   </SomeTag>
>   <another_tag></another_tag>
> </root_tag>
> 
> Then everything works as I expect. Pressing vat on SomeTag will
> highlight only from <SomeTag> to </SomeTag>.
> 
> It does not seem to depend on the length of the tag. This also does
> not work:
> 
> <?xml version="1.0"?>
> <root_tag>
>   <T>
>      <T2>content</T2>
>   </T>
>   <another_tag></another_tag>
> </root_tag>
> 
> Visual mode is not needed, it also acts on the wrong area when using
> dat for example (which is what I tried first, got confused, pressed u,
> tried again, got frustrated, used V%d instead).
> 
> This is with gvim -N -u NONE -i NONE on 64-bit Windows XP.

Right, it appears there is no proper check for the end of the tag name.

-- 
hundred-and-one symptoms of being an internet addict:
37. You start looking for hot HTML addresses in public restrooms.

 /// 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

Raspunde prin e-mail lui