On 00:22 Wed 03 Dec     , Matteo Cavalleri wrote:
> 
> > On 18:21 Tue 02 Dec     , Marcin Szamotulski wrote:
> > 
> > This patch should fix this.
> 
> Hi! sorry, I forgot to specify I tried again with vim patched up to 540. 
> anyway, I've tried your patch and I still get the error:
> 
> http://oi60.tinypic.com/21b991x.jpg
> 
> this time it seems range is always reported as 1 - 1
> btw I've forgot to copy it, but during compilation I saw an error about the 
> implicit definition of parse_addr_type_arg or something like that.
> 
> anyway thanks for your time and work :)

I sent wrong patch.  With the attached one I don't get any error.

Regards,
Marcin

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 607dbd9..b4ca2bc 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2629,8 +2629,40 @@ do_one_cmd(cmdlinep, sourcing,
 
     if ((ea.argt & DFLALL) && ea.addr_count == 0)
     {
-	ea.line1 = 1;
-	ea.line2 = curbuf->b_ml.ml_line_count;
+	buf_T	    *buf;
+	switch (ea.addr_type)
+	{
+	    case ADDR_LINES:
+		ea.line1 = 1;
+		ea.line2 = curbuf->b_ml.ml_line_count;
+		break;
+	    case ADDR_LOADED_BUFFERS:
+		buf = firstbuf;
+		while (buf->b_next != NULL && buf->b_ml.ml_mfp == NULL)
+		    buf = buf->b_next;
+		ea.line1 = buf->b_fnum;
+		buf = lastbuf;
+		while (buf->b_prev != NULL && buf->b_ml.ml_mfp == NULL)
+		    buf = buf->b_prev;
+		ea.line2 = buf->b_fnum;
+		break;
+	    case ADDR_UNLOADED_BUFFERS:
+		ea.line1 = firstbuf->b_fnum;
+		ea.line2 = lastbuf->b_fnum;
+		break;
+	    case ADDR_WINDOWS:
+		ea.line1 = 1;
+		ea.line2 = LAST_WIN_NR;
+		break;
+	    case ADDR_TABS:
+		ea.line1 = 1;
+		ea.line2 = LAST_TAB_NR;
+		break;
+	    case ADDR_ARGUMENTS:
+		ea.line1 = 1;
+		ea.line2 = ARGCOUNT;
+		break;
+	}
     }
 
     /* accept numbered register only when no count allowed (:put) */

Attachment: signature.asc
Description: Digital signature

Raspunde prin e-mail lui