Hi Ingo!

On Di, 04 Sep 2012, Ingo Karkat wrote:

> this does indeed fix the problem, but now (with empty 'clipboard'), when I 
> "dd"
> a single line, I get "cannot yank; delete anyway (y/n)?" and then a "E470:
> Command aborted" when I press "n".

Oh yes, sorry.
This one works:
diff --git a/src/ops.c b/src/ops.c
--- a/src/ops.c
+++ b/src/ops.c
@@ -1623,6 +1623,7 @@
 #endif
     linenr_T           old_lcount = curbuf->b_ml.ml_line_count;
     int                        did_yank = FALSE;
+    int                        orig_regname = oap->regname;
 
     if (curbuf->b_ml.ml_flags & ML_EMPTY)          /* nothing to do */
        return OK;
@@ -1716,7 +1717,7 @@
         * Put deleted text into register 1 and shift number registers if the
         * delete contains a line break, or when a regname has been specified.
         */
-       if (oap->regname != 0 || oap->motion_type == MLINE
+       if (orig_regname != 0 || oap->motion_type == MLINE
                                   || oap->line_count > 1 || oap->use_reg_one)
        {
            y_current = &y_regs[9];


Mit freundlichen Grüßen
Christian
-- 
Der Gütige läßt die Art, wie er einen geliebten Menschen behandelt,
auch den Ungeliebten zuteil werden.
                -- Meng-Tzu

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