On Sep 30, 1:08 pm, Ben Fritz <[email protected]> wrote:
> Actually, this says absolutely nothing about small or tiny
> builds of Vim 7.3. I take it, you expect Vim 7.3 Tiny to act
> like Vim 4.5 in this case? This does seem reasonable, but is not
> explicitly stated. I think you're right and that's how it's
> supposed to work.

Well... maybe this then :)
vim is amazing, vim :help is galactic.

10. No +eval feature                            *no-eval-feature*

When the |+eval| feature was disabled at compile time, none of
the expression evaluation commands are available.  To prevent
this from causing Vim scripts to generate all kinds of errors,
the ":if" and ":endif" commands are still recognized, though the
argument of the ":if" and everything between the ":if" and the
matching ":endif" is ignored.  Nesting of ":if" blocks is
allowed, but only if the commands are at the start of the line.
The ":else" command is not recognized.

Example of how to avoid executing commands when the |+eval|
feature is missing:

        :if 1
        :  echo "Expression evaluation is compiled in"
        :else
        :  echo "You will _never_ see this message"
        :endif

> This does look like a bug. However, I note that :let is an
> expression-related command. Maybe :let commands without +eval
> just ignore everything on the line without checking for more
> commands? I'm not sure if there's really a way around this,
> since expressions cannot be parsed without +eval.
>
> What happens if you replace the "let r = 1" command with a :set
> command or something else that does not relate to expression
> evaluation? I'm more curious than anything else...I don't have
> the knowledge of Vim's code or the desire to use a Tiny/Small
> build to even begin to know how to fix this.

ok, I tried :set with the same result, FAIL.
I also put "set wrap" inside to see if it executed, it did not.
see T-5

I tried some not "expression-related" commands which FAIL.
see T-9 T-10

And tried some "expression-related" commands which do NOT fail.
Not only "expression-related", but are conditionals.
while ... endwhile
for ... endfor
try ... endtry
Seems only ":if" parsing is broken.
see T-2 T-8

T-6 is a strange case.


""-----=-------=-------=-------=-------=-------=-------=-------=
set nowrap
if has("eval") " tiny, small FAIL --  normal parse correctly
  function! T-5()
    set wrap | if r > 0 " <<= <<= <<= FAIL
      set wrap | let r = 0
    endif
  endfun
endif


""-----=-------=-------=-------=-------=-------=-------=-------=
if has("eval") " tiny, small, normal parse correctly
  function! T-6()
    | if r > 0 " <<= <<= <<= no error
      let r = 0
    endif
  endfun
endif


""-----=-------=-------=-------=-------=-------=-------=-------=
if has("eval") " tiny, small, normal parse correctly
  function! T-2()
    let r = 1 | while r > 1 " <<= <<= <<= no error
      let r = 0
    endwhile
  endfun
endif


if has("eval") " tiny, small, normal parse correctly
  function! T-8()
    let r = 1 | for i in mylist " <<= <<= <<= no error
      let r = 0
    endfor
  endfun
endif

if has("eval") " tiny, small, normal parse correctly
  function! T-7()
    let r = 1 | try " <<= <<= <<= no error
      let r = 0
    endtry
  endfun
endif


""-----=-------=-------=-------=-------=-------=-------=-------=
if has("eval") " tiny, small FAIL --  normal parse correctly
  function! T-9()
    pwd | if r > 0 " <<= <<= <<= FAIL
      let r = 0
    endif
  endfun
endif


if has("eval") " tiny, small FAIL --  normal parse correctly
  function! T10()
    fixdel | if r > 0 " <<= <<= <<= FAIL
      let r = 0
    endif
  endfun
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