|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Bug with getpos()?Open Vim with any file: ~$ vim -u NONE -U NONE -N foobar :exe "normal V\<ESC>" :echo getpos("'>") [0, 1, 2147483647, 0] This does look like an integer overflow. Is this a bug or feature? I would consider that a bug, because the column is too large (or even negative) but before reporting it at vim_dev wanted to ask here. Interestingly col("'>") does not suffer from this overflow and reports the correct column. Oh, version: 7.2.284 and I get the same error with a 7.1 build. Operating system is Windows in both cases. Haven't tested on linux yet. regards, Christian -- :wq --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Bug with getpos()?Christian Brabandt wrote: > Open Vim with any file: > ~$ vim -u NONE -U NONE -N foobar > :exe "normal V\<ESC>" > :echo getpos("'>") > [0, 1, 2147483647, 0] > > This does look like an integer overflow. Is this a bug or feature? I > would consider that a bug, because the column is too large (or even > negative) but before reporting it at vim_dev wanted to ask here. > > Interestingly col("'>") does not suffer from this overflow and reports > the correct column. > > Oh, version: 7.2.284 and I get the same error with a 7.1 build. > Operating system is Windows in both cases. Haven't tested on linux yet. This is not an error, it's the normal value for the maximum column. It means the position is at the end of the line. The difference with the real column number is that it works like the "$" command. -- Why is "abbreviation" such a long word? /// Bram Moolenaar -- Bram@... -- 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 /// --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Bug with getpos()?Hi Bram! On Mo, 09 Nov 2009, Bram Moolenaar wrote: > Christian Brabandt wrote: > > Open Vim with any file: > > ~$ vim -u NONE -U NONE -N foobar > > :exe "normal V\<ESC>" > > :echo getpos("'>") > > [0, 1, 2147483647, 0] > > > > This does look like an integer overflow. Is this a bug or feature? I > > would consider that a bug, because the column is too large (or even > > negative) but before reporting it at vim_dev wanted to ask here. > > > > Interestingly col("'>") does not suffer from this overflow and reports > > the correct column. > > > > Oh, version: 7.2.284 and I get the same error with a 7.1 build. > > Operating system is Windows in both cases. Haven't tested on linux yet. > > This is not an error, it's the normal value for the maximum column. It > means the position is at the end of the line. The difference with the > real column number is that it works like the "$" command. And this value can be negative? Should that be added to the documentation? regards, Christian -- • I'm always right. This time I'm just even more right than usual. Torvalds, Linus (2005-07-14). --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Bug with getpos()?Christian Brabandt wrote: > On Mo, 09 Nov 2009, Bram Moolenaar wrote: > > Christian Brabandt wrote: > > > Open Vim with any file: > > > ~$ vim -u NONE -U NONE -N foobar > > > :exe "normal V\<ESC>" > > > :echo getpos("'>") > > > [0, 1, 2147483647, 0] > > > > > > This does look like an integer overflow. Is this a bug or feature? I > > > would consider that a bug, because the column is too large (or even > > > negative) but before reporting it at vim_dev wanted to ask here. > > > > > > Interestingly col("'>") does not suffer from this overflow and reports > > > the correct column. > > > > > > Oh, version: 7.2.284 and I get the same error with a 7.1 build. > > > Operating system is Windows in both cases. Haven't tested on linux yet. > > > > This is not an error, it's the normal value for the maximum column. It > > means the position is at the end of the line. The difference with the > > real column number is that it works like the "$" command. > > And this value can be negative? > Should that be added to the documentation? It's not supposed to be negative, it's supposed close to the maximum positive value. Where did you see it go negative? -- ERIC IDLE PLAYED: THE DEAD COLLECTOR, MR BINT (A VILLAGE NE'ER-DO -WELL VERY KEEN ON BURNING WITCHES), SIR ROBIN, THE GUARD WHO DOESN'T HICOUGH BUT TRIES TO GET THINGS STRAIGHT, CONCORDE (SIR LAUNCELOT'S TRUSTY STEED), ROGER THE SHRUBBER (A SHRUBBER), BROTHER MAYNARD "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@... -- 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 /// --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Bug with getpos()?Hi Bram! On Di, 10 Nov 2009, Bram Moolenaar wrote: > Christian Brabandt wrote: > > On Mo, 09 Nov 2009, Bram Moolenaar wrote: > > > Christian Brabandt wrote: > > > > Open Vim with any file: > > > > ~$ vim -u NONE -U NONE -N foobar > > > > :exe "normal V\<ESC>" > > > > :echo getpos("'>") > > > > [0, 1, 2147483647, 0] > > > > > > > > This does look like an integer overflow. Is this a bug or feature? I > > > > would consider that a bug, because the column is too large (or even > > > > negative) but before reporting it at vim_dev wanted to ask here. > > > > > > > > Interestingly col("'>") does not suffer from this overflow and reports > > > > the correct column. > > > > > > > > Oh, version: 7.2.284 and I get the same error with a 7.1 build. > > > > Operating system is Windows in both cases. Haven't tested on linux yet. > > > > > > This is not an error, it's the normal value for the maximum column. It > > > means the position is at the end of the line. The difference with the > > > real column number is that it works like the "$" command. > > > > And this value can be negative? > > Should that be added to the documentation? > > It's not supposed to be negative, it's supposed close to the maximum > positive value. Where did you see it go negative? Last time I saw it was on an plain stock install of 7.1 on Windows. Can't reproduce it on a newer version, neither Windows, nor Cygwin or Linux built. Could that be a compilation issue? Windows Vim 7.1 was compiled using cl: VIM - Vi IMproved 7.1 (2007 May 12, compiled May 12 2007 14:19:39) MS-Windows 32 bit GUI version with OLE support Compiled by Bram@KIBAALE 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\" -DDYNAMIC_TCL_VER=\"8.3\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python24.dll\" -DFEAT_PERL -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl58.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=18 -DDYNAMIC_RUBY_DLL=\"msvcrt-ruby18.dll\" -DFEAT_BIG /Zi /Fd.\ObjGOLYTR/ Linking: link /RELEASE /nologo /subsystem:windows /incremental:no /nodefaultlib:libc advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib oldnames.lib kernel32.lib gdi32.lib version.lib winspool.lib comctl32.lib advapi32.lib shell32.lib /machine:i386 /nodefaultlib libcmt.lib oleaut32.lib user32.lib /nodefaultlib:python24.lib e:\tcl\lib\tclstub83.lib WSock32.lib e:\xpm\lib\libXpm.lib /PDB:gvim.pdb -debug while Vim 7.2.148 (latest Version from www.vim.org) used gcc: VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Mar 20 2009 07:43:49) MS-Windows 32-bit GUI version with OLE support Included patches: 1-148 Compiled by digitectNO@... 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 +float +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: gcc -O3 -fomit-frame-pointer -freg-struct-return -fno-strength-reduce -DWIN32 -DHAVE_PATHDEF -DFEAT_BIG -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DFEAT_PERL -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL="perl510.dll" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL="python26.dll" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL="msvcrt-ruby18.dll" -DDYNAMIC_RUBY_VER=18 -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL="tcl85.dll" -DDYNAMIC_GETTEXT -DDYNAMIC_ICONV -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_OLE -march=i386 -Iproto -I/cygdrive/c/PERL/lib/CORE -I/cygdrive/c/PYTHON26/include -I/cygdrive/c/RUBY/lib/ruby/1.8/i386-mswin32 -I/cygdrive/c/Tcl/include -s -mno-cygwin Linking: gcc -s -o gvim.exe -luuid -lole32 /cygdrive/c/Tcl/lib/tclstub85.lib -lwsock32 -mwindows -lcomctl32 -lversion -loleaut32 -lstdc++ regards, Christian -- Schauspieler sind doch nichts anderes als professionelle Schwindler. -- Antonio Banderas --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~--- |
| Free embeddable forum powered by Nabble | Forum Help |