Browse files

Make file change polling on every refresh optional.

  • Loading branch information...
1 parent 32c136a commit 669d1eb6d8969fd27955f77e16d51f7df06b8f8c @ethercrow ethercrow committed Aug 26, 2012
Showing with 3 additions and 1 deletion.
  1. +1 −0 yi/src/library/Yi/Config.hs
  2. +1 −0 yi/src/library/Yi/Config/Default.hs
  3. +1 −1 yi/src/library/Yi/Core.hs
View
1 yi/src/library/Yi/Config.hs
@@ -66,6 +66,7 @@ data Config = Config {startFrontEnd :: UIBoot,
configKillringAccumulate :: Bool,
-- ^ Set to 'True' for an emacs-like behaviour, where
-- all deleted text is accumulated in a killring.
+ configCheckExternalChangesObsessively :: Bool,
bufferUpdateHandler :: [([Update] -> BufferM ())],
layoutManagers :: [AnyLayoutManager],
-- ^ List of layout managers for 'cycleLayoutManagersNext'
View
1 yi/src/library/Yi/Config/Default.hs
@@ -174,6 +174,7 @@ defaultConfig =
AnyMode fundamentalMode]
, debugMode = False
, configKillringAccumulate = False
+ , configCheckExternalChangesObsessively = True
, configRegionStyle = Exclusive
, configInputPreprocess = I.idAutomaton
, bufferUpdateHandler = []
View
2 yi/src/library/Yi/Core.hs
@@ -275,7 +275,7 @@ refreshEditor = onYiVar $ \yi var -> do
(if or relayout then UI.layout (yiUi yi) else return) e4
e7 <- return (yiEditor var) >>=
- checkFileChanges >>=
+ (if (configCheckExternalChangesObsessively cfg) then checkFileChanges else return) >>=
pureM clearAllSyntaxAndHideSelection >>=
-- Adjust window sizes according to UI info
UI.layout (yiUi yi) >>=

0 comments on commit 669d1eb

Please sign in to comment.