When a buffer is modified by a BufRead autocommand or by a filetype
plugin, 'modified' is not set.

To show this, create a simple file (testfile) containing these
lines:

    abc
    def
    ghi

>From a shell prompt, execute this command:

    vim -u NONE --cmd 'au BufRead * %s/e//' -c 'set laststatus=2' testfile

The buffer now contains

    abc
    df
    ghi

but 'modified' is not set.

This also happens in a more complex scenario where the contents of a
file are modified by a filetype plugin in ~/.vim/ftplugin.

This happens using Vim 7.3.301 in a GNOME Terminal on a system
running Fedora 11.  It also happens using Vim 7.3.189 on the same
system.


$ vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Sep  7 2011 12:46:37)
Included patches: 1-301
Compiled by me
Normal version with GTK2 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_gui +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 +menu +mksession +modify_fname 
+mouse +mouseshape -mouse_dec +mouse_gpm -mouse_jsbterm -mouse_netterm 
-mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg 
+path_extra -perl +persistent_undo +postscript +printer -profile -python 
-python3 +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"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/home/garyjohn/src/vim-hg-new/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 
-I/usr/include/libpng12     -g -O2 -D_FORTIFY_SOURCE=1      
Linking: gcc   -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-x11-2.0 
-lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 
-lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 
-lgmodule-2.0 -lglib-2.0   -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm 
-ltinfo -lelf -lnsl  -lselinux -lacl -lattr -lgpm           


Regards,
Gary

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