title: While moving the cursor across a vim process open in a tmux session, every now and then, why does it leave a trail of ghost characters - ^[OB, ^[OA?
body: <p>These disappear if I do a page-up and page-down. Why does this happen and how do I rectify it?</p>
  
  <p><a href="https://i.stack.imgur.com/DnMYl.png" rel="noreferrer">http://i.stack.imgur.com/DnMYl.png</a></p>
  
  <p>I recently fiddled around with my vimrc. Could that be the cause?</p>
  
  <p>UPDATE:
  I figured out the cause. I had added to functions that automatically updated the cwd name and the current git branch in my vim statusline. This caused vim to be laggy and everytime it lagged on a up/down/left/right key hit, it printed out the ghost characters ^[OA, etc.
  It's possible that stuff got complicated because I was using vim in tmux, but I saw the ghost characters outside tmux also. So, probably not.
  I've turned off those two functions in my .vimrc and my vim statusline is presently less awesome than it used to be :(
  Wish there's a way out.</p>