Recently creating a command with the -buffer argument started
supplying incorrect values for <line1> and <line2>. When no range is
supplied <line1> and <line2> values will always be 1, regardless of
the current cursor line. Also, when using a visual selection and using
the '<,'> range, <line1> and <line2> will always be passed into the
function as 1 and an 'E14: Invalid address' error is raised.

Here is an example command which reproduces the issue:

  command! -buffer -range TestRange :echo "line1: <line1> line2: <line2>"

Removing -buffer from that command results in <line1> and <line2>
working as expected.

I ran an hg bisect and it seems this issue was introduced by this
commit:

changeset:   6398:5a76e36f07b1
tag:         v7-4-530
user:        Bram Moolenaar <[email protected]>
date:        Thu Nov 27 16:22:48 2014 +0100
summary:     updated for version 7.4.530

-- 
eric

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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui