From d75dfc14cb20a8b77d3eedd9aae19fb9350fa10f Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Sun, 27 Nov 2016 10:12:35 +0100 Subject: [PATCH] Guard against non-cwd-changes... - Should be fixed. --- VimR/MainWindowComponent.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/VimR/MainWindowComponent.swift b/VimR/MainWindowComponent.swift index 4b13ef21..55d7cf34 100644 --- a/VimR/MainWindowComponent.swift +++ b/VimR/MainWindowComponent.swift @@ -465,6 +465,12 @@ extension MainWindowComponent { func cwdChanged() { let old = self._cwd self._cwd = self.neoVimView.cwd + + // FIXME: This can still happen... + if old == self._cwd { + return + } + self.fileItemService.unmonitor(url: old) self.fileItemService.monitor(url: self._cwd)