Hi,
Every time I try to diff 2 files with different paths with gvim
through wine on Ubuntu 8.04, I get "E:97 Cannot create diffs".
Strangely enough, if I diff a file against itself, the diff works and
I see the expected results.

I tried simplifying the "silent execute" command in the _vimrc ->
MyDiff function to isolate the problem with no results. I suspect it
is a wine bug. Does anybody have gvim 7.2 (latest win32 from vim.org)
diff working?

Below is the broken _vimrc file and my failed attempts to hack the
silent execute diff command.

Thank you,

    BrianP

bri...@godzilla2:~$ cat /home/brianp/.wine/drive_c/Program\ Files/Vim/
_vimrc
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

set nocompatible
set bs=2
set backupdir=c:/temp/vim
set directory=c:/temp/vim
set shiftwidth=4
set tabstop=4
set visualbell
set autoindent
set guifont=FreeMono:h11:cANSI
"set guifont=Courier:h10:cANSI

set diffexpr=MyDiff()
function MyDiff()
  let opt = '-a --binary '
  if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
  if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
  let arg1 = v:fname_in
  if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
  let arg2 = v:fname_new
  if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
  let arg3 = v:fname_out
  if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
  let eq = ''
  if $VIMRUNTIME =~ ' '
    if &sh =~ '\<cmd'
      let cmd = '""' . $VIMRUNTIME . '\diff"'
      let eq = '"'
    else
      let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
    endif
  else
    let cmd = $VIMRUNTIME . '\diff'
  endif
  let cmd = '"C:\Program Files\Vim\vim72\diff"'
  silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' .
arg3 . eq
endfunction
  "let cmd = '"C:\\Program Files\\Vim\\vim72\\diff"'
  "let cmd = '"C:\\Program Files\\Vim\\vim72\\diff.exe"'
  "let cmd = '"C:\Program Files\Vim\vim72\diff.exe"'
        "let cmd = '"C:/Program Files/Vim/vim72/diff.exe"'
  "silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' .
arg3 . eq


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

Reply via email to