title: Directory changes after opening certain files
body: <p><strong>EDIT</strong></p>
  
  <p>The scenario changed. Sorry, for posting question a bit too early.</p>
  
  <p>When opening a file (<code>vim filename.ext</code>, or <code>:e filename.txt</code>, etc.), when the CWD is <code>~/Sites/A</code>, vim changes to another CWD (<code>~/Sites/B</code>).</p>
  
  <p>I found out, that vim does this because of a file in my <code>~/.vim/view/</code> folder, called <code>~=+Sites=+B=+src=+filename.txt=</code>.</p>
  
  <p>The file inside <code>~/.vim/view/</code> contains:</p>
  
  <pre><code>let s:so_save = &amp;so | let s:siso_save = &amp;siso | set so=0 siso=0
  argglobal
  setlocal fdm=manual
  setlocal fde=0
  setlocal fmr={{{,}}}
  setlocal fdi=#
  setlocal fdl=0
  setlocal fml=1
  setlocal fdn=20
  setlocal fen
  silent! normal! zE
  let s:l = 200 - ((13 * winheight(0) + 11) / 23)
  if s:l &lt; 1 | let s:l = 1 | endif
  exe s:l
  normal! zt
  200
  normal! 030|
  lcd ~/Sites/B
  let &amp;so = s:so_save | let &amp;siso = s:siso_save
  doautoall SessionLoadPost
  " vim: set ft=vim :
  </code></pre>
  
  <p>Why is the line <code>lcs ~/Sites/B</code> standing in this file? Inside <code>~/Sites/B</code> never existed a file called <code>filename.ext</code>.</p>
  
  <p><strong>For the sake of completeness, this is my question, before I localized the error:</strong></p>
  
  <p>When i vimgrep something in a codebase located in <code>~/Sites/a</code> (e.g. <code>:vimgrep DateCell src/**/*</code>) vim's current working directory changes to another directory <code>~/Sites/B</code>.</p>
  
  <p>Every subsequent call to <code>vimgrep</code> or another working-directory-aware-command fails or returns wrong results, because it is operating in the <code>~/Sites/B</code> directory.</p>
  
  <p>What could cause this?</p>
  
  <p>What I do, to achieve the error / wrong behaviour:</p>
  
  <ol>
  <li><code>cd ~/Sites/A</code></li>
  <li><code>vim</code></li>
  <li><code>vimgrep something src/**/*</code></li>
  <li><code>:!pwd</code> shows <code>~/Sites/B</code></li>
  <li><code>:quit</code></li>
  <li><code>pwd</code> shows <code>~/Sites/A</code></li>
  </ol>
  
  <p><strong>EDIT</strong></p>
  
  <p>It turns out, that the directory change also happens if I don't use <code>vimgrep</code>. I still don't know what produces the error.</p>
  
  <p>BTW: It is always the same directory (<code>~/Sites/B</code>), vim changes to. No matter in which directory i am working.</p>
  
  <p>Vim Version: 8.0.2<br>
  OS Version: OS X 10.10.5</p>