Hello,
I think you have set the ignorecase option to on, isn't it?
I can reproduce the bug when the ignorecase is on.
The problem comes from my use of searchdecl(), I forgot to disable
ignorecase when using it.
Try the normal command 'gd' (same as searchdecl()) on your variable
'a' and you'll see the cursor moving to 'A' instead of 'a', this is
what happen in the script. Thus for these 2 lines, after the call of
searchdecl():
let lines[0] = lines[0][ sStart : ]
let lines[-1] = lines[-1][ : sEnd ]
The column position 'sEnd' is incorrect and the string 'A a;' disapears.
I'll fix it for the next release by disabling the ignorecase option
during searchdecl().
Thank you for reporting this bug
Best regards,
Vissale
2007/2/16, Alexey Vakhov <[EMAIL PROTECTED]>:
Hi all,
I want to migrate to Vim in everyday work. I instlalled
OmniCppComplete-0.4 from vim.org.
I installed this plugin, create dir with one cpp file. And run ctags
(as documented)
#ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .
cpp file
---------------------------
#include <iostream>
struct A
{
int x;
int y;
};
int main()
{
A a;
return 0;
}
After that I add to main function variable 'a' with type 'A'. And
typed a. and got error message (Pattern not found). After some
investigation of plugin I found that
in function omni#cpp#utils#GetCode(posStart, posEnd) there are
proceeded two lines (' {', ' A a;') but in omni/cpp/utils.cpp
file
let lines[0] = lines[0][ sStart : ]
let lines[-1] = lines[-1][ : sEnd ]
second code kills string ' A a;' !!! I commented this line and
omnifunc began working but not so gut as ft-c-omni. I'm newbie in Vim
and don't wont to change system files. Would you like to help me with
this plugin? Thanks a lot.
--
Alexey Vakhov mailto:[EMAIL PROTECTED]
versions
---------------------------
#cat tags
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append
;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR Darren Hiebert /[EMAIL PROTECTED]/
!_TAG_PROGRAM_NAME Exuberant Ctags //
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
!_TAG_PROGRAM_VERSION 5.6 //
A .\touch.cpp /^struct A$/;" s file:
A::x .\touch.cpp /^ int x;$/;" m struct:A file:
access:public
A::y .\touch.cpp /^ int y;$/;" m struct:A file:
access:public
Flametest .\test.vim /^function! Flametest()$/;" f
main .\touch.cpp /^int main()$/;" f signature:()
x .\touch.cpp /^ int x;$/;" m struct:A file: access:public
y .\touch.cpp /^ int y;$/;" m struct:A file: access:public
#ctags --version
Exuberant Ctags 5.6, Copyright (C) 1996-2004 Darren Hiebert
Compiled: Jul 30 2006, 16:12:20
Addresses: <[EMAIL PROTECTED]>, http://ctags.sourceforge.net
Optional compiled features: +win32, +regex, +internal-sort
#gvim --version
VIM - Vi IMproved 7.0 (2006 May 7, compiled May 7 2006 16:23:43)
MS-Windows 32 bit GUI version with OLE support
Compiled by [EMAIL PROTECTED]
Big version with GUI. Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+cryptv +cscope +cursorshape +dialog_con_gui +diff +digraphs -dnd -ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
+folding -footer +gettext/dyn -hangul_input +iconv/dyn +insert_expand +jumplist
+keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu
+mksession +modify_fname +mouse +mouseshape +multi_byte_ime/dyn +multi_lang
-mzscheme +netbeans_intg +ole -osfiletype +path_extra +perl/dyn -postscript
+printer -profile +python/dyn +quickfix +reltime +rightleft +ruby/dyn
+scrollbind +signs +smartindent -sniff +statusline -sun_workshop +syntax
+tag_binary +tag_old_static -tag_any_white +tcl/dyn -tgetent -termresponse
+textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual
+visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup
-xfontset -xim -xterm_save +xpm_w32
system vimrc file: "$VIM\vimrc"
user vimrc file: "$HOME\_vimrc"
2nd user vimrc file: "$VIM\_vimrc"
user exrc file: "$HOME\_exrc"
2nd user exrc file: "$VIM\_exrc"
system gvimrc file: "$VIM\gvimrc"
user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$VIM\_gvimrc"
system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /nologo -D_MT -MT -I. -Iproto -DHAVE_PATHDEF -DWIN32
-DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_XPM_W32 -DWINVER=0x0400
-D_WIN32_WINNT=0x0400 /Fo.\ObjGOLYTR/ /Ox -DNDEBUG -DFEAT_OLE
-DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_GUI_W32 -DDYNAMIC_ICONV
-DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl83.dll\"
--
Alexey Vakhov mailto:[EMAIL PROTECTED]