yalay / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

Auto-formatting comments is broken when second line has different indentation and using fo+=2 #74

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run in shell

        vim -u NONE --cmd 'set fo=an12wcq tw=20' \
            -s <(echo -n $'i/* abc def ghi jkl mno pqr\eT*a   \eA stu vwx yz\e')

What is the expected output? What do you see instead?
Expected (== line is 20 characters wide):
====================
/* abc def ghi jkl 
 *    mno pqr stu 
 *    vwx yz
Got:
====================
/* abc def ghi jkl 
 *    mno pqr stuzx 
 *    y vw

What version of the product are you using? On what operating system?
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jul 15 2012 02:39:48)
Included patches: 1-600
Compiled by zyx@zyx-desktop
Huge version without GUI.  Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent 
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs 
-dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path 
+find_in_path +float +folding -footer +fork() +gettext -hangul_input +iconv 
+insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent 
+listcmds +localmap +lua/dyn +menu +mksession +modify_fname +mouse -mouseshape 
+mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse 
+mouse_xterm +mouse_urxvt +multi_byte +multi_lang -mzscheme +netbeans_intg 
+path_extra +perl +persistent_undo +postscript +printer +profile +python/dyn 
+python3/dyn +quickfix +reltime +rightleft +ruby +scrollbind +signs 
+smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary 
+tag_old_static -tag_any_white +tcl +terminfo +termresponse +textobjects +title
 -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo 
+vreplace +wildignore +wildmenu +windows +writebackup +X11 +xfontset -xim 
+xsmp_interact +xterm_clipboard -xterm_save 
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O3 -march=amdfam10 -pipe 
-mmmx -msse -msse2 -msse3 -msse4a -m3dnow -mfpmath=sse,387 -fomit-frame-pointer 
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1     -I/usr/include  
-D_LARGEFILE64_SOURCE=1  
Linking: gcc   -L. -Wl,-O1 -rdynamic -Wl,-export-dynamic -Wl,--no-undefined  
-Wl,-E   -L/usr/local/lib -Wl,--as-needed -o vim    -lSM -lICE -lXpm -lXt -lX11 
-lXdmcp -lSM -lICE -lm -lncurses -lelf -lnsl    -lacl -lattr -lgpm    -Wl,-E 
-Wl,-O1  -L/usr/lib64/perl5/5.12.4/x86_64-linux/CORE -lperl -lnsl -ldl -lm 
-lcrypt -lutil -lc   -L/usr/lib64 -ltcl8.5 -ldl -lieee -lm -Wl,-R 
-Wl,/usr/lib64 -L/usr/lib64 -lruby18 -lrt -ldl -lcrypt -lm  -L/usr/lib64   

Original issue reported on code.google.com by zyx....@gmail.com on 15 Jul 2012 at 12:55

GoogleCodeExporter commented 9 years ago
One additional note: breakage happens when writing second lines only. Third and 
further lines can be typed normally.

Original comment by zyx....@gmail.com on 15 Jul 2012 at 12:56

GoogleCodeExporter commented 9 years ago
Fixed by patch 7.3.612

Original comment by brammool...@gmail.com on 25 Jul 2012 at 2:12