]> git.phdru.name Git - dotfiles.git/blobdiff - .vimrc
.fvwm/main.m4: Remove MyRuLib
[dotfiles.git] / .vimrc
diff --git a/.vimrc b/.vimrc
index 1620a5d40ad0b78cd52e498f9a6807d38dbfce5e..052ace0c2411344db22847dbfc9cab5f661c1183 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -589,9 +589,8 @@ endif
 if executable('chmod')
    function! SetExecutableBit(x)
       checktime
-      let fname = expand("%:p")
-      let fx = executable(fname)
-      execute "au FileChangedShell " . fname . " :echo"
+      let fx = executable(expand("%:p"))
+      execute "au FileChangedShell <buffer> call _BufChangedCB()"
       if a:x && !fx
          !chmod a+x %
       elseif !a:x && fx
@@ -601,7 +600,9 @@ if executable('chmod')
          echoerr 'Error running chmod: ' . v:shell_error
       endif
       checktime
-      execute "au! FileChangedShell " . fname
+   endfunction
+   function! _BufChangedCB()
+      execute "au! FileChangedShell <buffer>"
    endfunction
    command! ToggleXbit if executable(expand("%:p")) | call SetExecutableBit(0) | else | call SetExecutableBit(1) | endif
 endif