Lokaltog/vim-powerline — pull request #189 by pydave (2012-08-04 20:12:00+00:00)
Title: Fix filepath caching when cwd changes (Fix #179)

Fixes #179: Update the filepath when the cwd changes

Issue #179 occurred because powerline never recalculated the cached filepath (but 'relative' requires it to be recalculated when the cwd changes). Sometimes, you'd see the filepath change when switching from cwd to another dir because the filepath wasn't cached when the file is in the cwd.

This pull clears the cached filepath when cwd changes (so it will be recalculated) and caches the filepath when the file is in the cwd. (So we're only recalculating when something actually changes.)