packages feed

yi-fuzzy-open 0.17.0 → 0.17.1

raw patch · 2 files changed

+16/−18 lines, 2 filesdep ~yi-coredep ~yi-languagePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: yi-core, yi-language

API changes (from Hackage documentation)

Files

src/Yi/Fuzzy.hs view
@@ -64,15 +64,13 @@  instance Show FuzzyItem where   show :: FuzzyItem -> String-  show i = case i of-    FileItem   _ -> "File  "   <> itemAsStr i-    BufferItem _ -> "Buffer  " <> itemAsStr i+  show i@(FileItem   _) = "File  "   <> itemAsStr i+  show i@(BufferItem _) = "Buffer  " <> itemAsStr i  itemAsTxt :: FuzzyItem -> Text-itemAsTxt f = case f of-  FileItem   x              -> x-  BufferItem (MemBuffer  x) -> x-  BufferItem (FileBuffer x) -> T.pack x+itemAsTxt (FileItem x) = x+itemAsTxt (BufferItem (MemBuffer  x)) = x+itemAsTxt (BufferItem (FileBuffer x)) = T.pack x  itemAsStr :: FuzzyItem -> String itemAsStr = T.unpack . itemAsTxt@@ -197,13 +195,14 @@ changeIndex dir fs = fs { items = items fs >>= dir }  renderE :: FuzzyState -> EditorM ()-renderE (FuzzyState maybeZipper s) = do+renderE (FuzzyState maybeZipper s) =   case mcontent of     Nothing      -> printMsg "No match found"     Just content -> setStatus (toList content, defaultStyle)  where   tshow :: Show s => s -> Text   tshow = T.pack . show+   mcontent :: Maybe (NonEmpty Text)   mcontent = do     zipper  <- maybeZipper@@ -238,13 +237,12 @@       action f  where   action :: FuzzyItem -> YiM ()-  action fi = case fi of-    FileItem   x -> void (editFile (T.unpack x))-    BufferItem x -> withEditor $ do-      bufs <- gets (M.assocs . buffers)-      case filter ((==x) . ident . attributes . snd) bufs of-        []            -> error ("Couldn't find " <> show x)-        (bufRef, _):_ -> switchToBufferE bufRef+  action (FileItem   x) = void (editFile (T.unpack x))+  action (BufferItem x) = withEditor $ do+    bufs <- gets (M.assocs . buffers)+    case filter ((==x) . ident . attributes . snd) bufs of+      []            -> error ("Couldn't find " <> show x)+      (bufRef, _):_ -> switchToBufferE bufRef   insertChar :: Keymap
yi-fuzzy-open.cabal view
@@ -1,5 +1,5 @@ name:           yi-fuzzy-open-version:        0.17.0+version:        0.17.1 synopsis:       Fuzzy open plugin for yi description:    This plugin tries to do what ctrl-p does for vim and helm does for emacs. category:       Yi@@ -30,8 +30,8 @@     , text >= 1.2     , transformers-base >= 0.4.4     , vector >= 0.11-    , yi-core >= 0.17.0-    , yi-language >= 0.16.0+    , yi-core >= 0.17+    , yi-language >= 0.17     , yi-rope >= 0.10   exposed-modules:       Yi.Fuzzy