if 0 " copy this whole message and ":w test.txt"
vim 7.3.11 conditional bug

I have been testing my vimrc with different builds of vim.

The base of each build is:
  Linux -- Quirky 1.3
  vim 7.3.11
  no gui
  no xim

An error occurs ONLY in tiny or small, NOT normal. Did not try big or
huge.

EXAMPLE 3 produces the error messages found at the end.

The error occurs WITHIN a conditional "comment", see the 3 examples.
The "endif" is not paired with the "if". "while" and "endwhile" seem
ok.

It can be replicated by sourcing with ":so test.txt".
endif

""-----=-------=-------=-------=-------=-------=-------=-------=
if 0 " test code -- test comment out

" EXAMPLE 1
"==========
" tiny    ok
" small   ok
" normal  ok

function! T01()
  let r = 1
  if r > 0
    let r = 0
  endif
endfun

function! T02()
  let r = 1 | while r > 1
    let r = 0
  endwhile
endfun

" EXAMPLE 2
"==========
" tiny    ok
" small   ok
" normal  ok

function! T03()
  let r = 1 | if r > 0
    let r = 0
" endif
endfun

function! T04()
  let r = 1 | while r > 1
    let r = 0
  endwhile
endfun

" EXAMPLE 3
"==========
" tiny    bad
" small   bad
" normal  ok

function! T05()
  let r = 1 | if r > 0
    let r = 0
  endif
endfun

function! T06()
  let r = 1 | while r > 1
    let r = 0
  endwhile
endfun

endif
""-----=-------=-------=-------=-------=-------=-------=-------=

if 0 " error messages from Example 3
  Error detected while processing /root/rnd.txt:
  line   55:
  E319: Sorry, the command is not available in this version: endfun
  line   57:
  E319: Sorry, the command is not available in this version: function!
T06()
  line   58:
  E319: Sorry, the command is not available in this version:   let r =
1 | while r > 1
  line   59:
  E319: Sorry, the command is not available in this version:     let r
= 0
  line   60:
  E319: Sorry, the command is not available in this version:
endwhile
  line   61:
  E319: Sorry, the command is not available in this version: endfun
  line   64:
  E319: Sorry, the command is not available in this version: endif
  Press ENTER or type command to continue
endif

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