Loading ...
Sorry, an error occurred while loading the content.

10546Possible bug in Visual Block mode

Expand Messages
  • Daniele Avitabile
    Aug 3, 2009
      Hi all,

      with Snapshot 47, copy/paste the following code (the spaces at the beginning of each line are essential)

            if (west >= 0) {
            nonzeroIndices[numNonzeroEntries] = west*numEquations+component;
            if (east > 0)
      nonzeroValues[numNonzeroEntries]  = nu*lambda2X;
            else
      nonzeroValues[numNonzeroEntries]  = 2.0*nu*lambda2X;
            numNonzeroEntries++;
            }

      Imagine you want to indent all at once the code in curly brackets. 
      1) place the cursor on the second line, on the first letter "n", just underneath the "i" of "if"
      2) Press "Ctrl-v" and enter Visual Block. Press "j" in sequence to highlight until the last-but-one line
      3) press ">"
      4) Look at what happens at the 4th line. The indented version of  

      nonzeroValues[numNonzeroEntries]  = nu*lambda2X;

      reads

      onzeroValues[numNonzeroEntries]  = nu*lambda2X;

      In other words, the initial "n" of this line has been eaten. Do I do something wrong or is this a bug?

      Best.

      Daniele 

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---