Earlier, I wrote about version 7.0e:

  >  Is this a bug, or is it something that cannot be fixed?
  >
  >  1) gvim.exe -u NONE -U NONE --noplugin
  >  2) :set smartindent tw=40 fo=tcq
  >  3) Type text -- at least, say, 60 characters.
  >     Vim will insert linebreaks.
  >  4) Join the pieces to have a single long line
  >  5) yyp to get two lines each with 60 or more characters.
  >  6) move the cursor to, say, 50th column on first line.
  >  7) <ctrl-v>, select a two-line block, say 2x2
  >  8)  hit c and type mymy
  >
  >  Expect: selected two line block will become:
  >
  >                     mymy
  >                     mymy
  >
  >  Issue:  the first line breaks and only it gets mymy;
  >          second line remains as-is.
  
  Gerald Lai confirmed the above for 6.3, made some 
  speculations, and asked:
  
  GL> In retrospect, were you expecting either
  GL> 
  GL>    (a) tw=40 not to work when typing "mymy" in step (8)
  GL> 
  GL>    or
  GL> 
  GL>    (b) the second line to break exactly like the first one did
  GL> 
  GL> leading you with two "mymy"'s?
  GL> 
  GL> IMHO, the alternate expectations (a) & (b) do not make much sense.
  
  Visual Mode is VISUAL -- so once in visual mode, I do not expect
  changes in visual layout.  When a line breaks, it has changed
  visually.  In the example, I was expecting to end up with two long
  lines with "mymy" inserted into them -- as if tw had been longer
  than the length of the lines.

  So perhaps a fix would be to change tw to 0 when one starts visual
  mode -- but we then need the concept of "insert mode entered from
  visual mode", and we need to restore tw after exiting from this
  special "visual insert" mode.

  --Suresh

Reply via email to