Re: matchparen highlight bug

2006-09-28 Thread Bram Moolenaar

Ilya Bobir wrote:

> I've found bug in highlighting when matchparen is used.  Not sure it is 
> because of a matchparen thought.
> 
> Test case
> =
> gvim
> i{}hO
> 
> Now I can see first line with one character background been highlighted 
> and an insert cursor over it and '{}' on a second line, both highlighted.

I see the problem.  One more for the todo list...

-- 
Looking at Perl through Lisp glasses, Perl looks atrocious.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Re: Matchparen highlight bug?

2006-06-28 Thread Bram Moolenaar

Mikolaj Machowski wrote:

> Create empty file, enter {}, :new, cursor is in new window but parens
> are still highlighted. 

Every window has a cursor position, even though only one is really
active.  Thus the highlighting isn't wrong.

> This example isn't extreme but when returning to previous window in many
> colorschemes it makes hard to notice where cursor is.

Perhaps the colorscheme needs to be fixed?  Note that many colorschemes
have not been updated recently.  The maintainers failed to send me
updated versions (esp. needed for the completion menu).

> This chunk fixes that:
> 
> function RmMH()
>   if exists('w:paren_hl_on') && w:paren_hl_on
>   3match none
>   let w:paren_hl_on = 0
>   endif
> endfunction
> au WinLeave * call RmMH()

So you have a solution if you prefer it this way.

-- 
SOLDIER: What? A swallow carrying a coconut?
ARTHUR:  It could grip it by the husk ...
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Re: Matchparen highlight bug

2006-06-27 Thread A.J.Mechelynck

Ilya wrote:

gvim –u NONE –U NONE

Create file with 100 empty lines, line with {, 20 empty lines and line 
with }:


:exe "normal i{\}\20O\j%100O\j%"

Turn on matchparen plugin:

:set nocp
:source $VIMRUNTIME/plugin/matchparen.vim

Now cursor should be on the }, this line is the lowest line in the vim 
window and both braces should be highlighted.  Use mouse wheel to scroll 
buffer down a bit, so that the line with } would disappear and cursor 
would move several lines up.


Cursor is now on an empty line, but braces are still highlighted.


VIM - Vi IMproved 7.0 (2006 May 7, compiled Jun 24 2006 14:17:06)
MS-Windows 32 bit GUI version with OLE support
Included patches: 1-35





On the corresponding Unix version

VIM - Vi IMproved 7.0 (2006 May 7, compiled Jun 23 2006 22:12:23)
Included patches: 1-35
Compiled by [EMAIL PROTECTED]
Huge version with GTK2-GNOME GUI.  Features included (+) or not (-):
[...]

I see it when scrolling by means of the scrollbar but _not_ when I do it 
by means of the mouse wheel. In the latter case, the top brace loses its 
cyan background as soon as the bottom one is pushed offscreen. In the 
former case, an additional Ctrl-L is necessary.



Best regards,
Tony.


Re: Matchparen highlight bug

2006-06-27 Thread Bram Moolenaar

Ilya Bobir wrote:

> gvim -u NONE -U NONE
> 
> Create file with 100 empty lines, line with {, 20 empty lines and line 
> with }:
> 
>  :exe "normal i{\}\20O\j%100O\j%"
> 
> Turn on matchparen plugin:
> 
>  :set nocp
>  :source $VIMRUNTIME/plugin/matchparen.vim
> 
> Now cursor should be on the }, this line is the lowest line in the vim 
> window and both braces should be highlighted.  Use mouse wheel to scroll 
> buffer down a bit, so that the line with } would disappear and cursor 
> would move several lines up.
> 
> Cursor is now on an empty line, but braces are still highlighted.
> 
> 
> VIM - Vi IMproved 7.0 (2006 May 7, compiled Jun 24 2006 14:17:06)
> MS-Windows 32 bit GUI version with OLE support
> Included patches: 1-35

This appears to be specific for the Win32 GUI version.  Other versions I
tried work OK.

-- 
SUPERIMPOSE "England AD 787".  After a few more seconds we hear hoofbeats in
the distance.  They come slowly closer.  Then out of the mist comes KING
ARTHUR followed by a SERVANT who is banging two half coconuts together.
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///