On 20-Apr-2010 Lech Lorens <[email protected]> wrote:
> On 18-Apr-2010 Robert Webb <[email protected]> wrote:
> > Hi guys,
> [...]
> > If anyone tries my script, let me know how it goes! :-)
> > Rob.
Hooray!
It works for C. My C code was simply written in a way that revealed an
issue with the script. Here's a patch for this problem and for the
beep.
--
Cheers,
Lech
--
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
Subscription settings: http://groups.google.com/group/vim_dev/subscribe?hl=en
diff --git a/_vimSmartTags.vim b/_vimSmartTags.vim
index f0b9274..0a6f315 100644
--- a/_vimSmartTags.vim
+++ b/_vimSmartTags.vim
@@ -440,7 +440,7 @@ func! GetThisClass()
let firstTime = 1
while (1)
let origCursor = getpos(".")
- normal [{
+ call search('{', 'bW')
let oldCursor = getpos(".")
if (!firstTime && oldCursor == origCursor)
break " We're stuck at start of outer {..} block.
@@ -584,7 +584,7 @@ func! GoToTag(tag, flags)
" Search will occasionally match more than one line. Search
" for class name first, as we know our tag will have to appear
" after that.
- call search('^\<\(struct\|class\)\>.*' .
+ call search('\<\(struct\|class\)\>.*' .
\ escape('\<' . tagClass . '\>', '*[]~') .
\ '[^;]*$', 'c')
endif