diff options
author | Bram Moolenaar <bram@vim.org> | 2015-01-14 11:25:05 +0100 |
---|---|---|
committer | Bram Moolenaar <bram@vim.org> | 2015-01-14 11:25:05 +0100 |
commit | caeb77b22c5eae4bec17f27cd70618e896c5592f (patch) | |
tree | a5fa35e78453497fb941e69e9e0c4eb8d98f5f6d | |
parent | 71068b8701a494386895834aa2d2a3f8fe369c00 (diff) | |
download | vim-7-4-568.tar.gz |
Problem: Giving an error for ":0wincmd w" is a problem for some plugins.
Solution: Allow the zero in the range. (Marcin Szamotulski)
-rw-r--r-- | src/ex_docmd.c | 3 | ||||
-rw-r--r-- | src/testdir/test_command_count.ok | 4 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 3276abfd..c36f4074 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -4686,8 +4686,7 @@ invalid_range(eap) return (char_u *)_(e_invrange); break; case ADDR_WINDOWS: - if (eap->line1 < 1 - || eap->line2 > LAST_WIN_NR) + if (eap->line2 > LAST_WIN_NR) return (char_u *)_(e_invrange); break; case ADDR_TABS: diff --git a/src/testdir/test_command_count.ok b/src/testdir/test_command_count.ok index a936715b..d554ae76 100644 --- a/src/testdir/test_command_count.ok +++ b/src/testdir/test_command_count.ok @@ -21,8 +21,8 @@ LocalRangeLines 2 5 4argu d 1argu a 100b E16: Invalid range -0close E16: Invalid range -$close 4 +0close +$close 3 $+close E16: Invalid range $tabe 2 $+tabe E16: Invalid range diff --git a/src/version.c b/src/version.c index 8b3ecbe9..4f9777ff 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 568, +/**/ 567, /**/ 566, |