yi-ireader 0.17.1 → 0.18.0
raw patch · 2 files changed
+9/−5 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)
+ Yi.IReader: getArticleDbFilename :: IO FilePath
Files
- src/Yi/IReader.hs +6/−2
- yi-ireader.cabal +3/−3
src/Yi/IReader.hs view
@@ -35,7 +35,7 @@ import Yi.Buffer.Misc (elemsB, getBufferDyn, putBufferDyn) import Yi.Editor (withCurrentBuffer) import Yi.Keymap (YiM)-import Yi.Paths (getArticleDbFilename)+import Yi.Paths (getConfigPath) import qualified Yi.Rope as R (fromString, toString) import Yi.Types (YiVariable) import Yi.Utils (io)@@ -74,7 +74,7 @@ -- 2' will move it to the middle of the list, though; last index = 50, -- then 50 `div` 2 will shift the item to index 25, and so on down to -- 50 `div` 50 - the head of the list/Seq.-shift :: Int ->ArticleDB -> ArticleDB+shift :: Int -> ArticleDB -> ArticleDB shift n adb = if n < 2 || lst < 2 then adb else ADB $ (r S.|> lastentry) >< s' where lst = S.length (unADB adb) - 1 (r,s) = S.splitAt (lst `div` n) (unADB adb)@@ -97,6 +97,10 @@ -- closed, and then we convert it to the lazy bytestring -- data.binary expects. This is inefficient, but alas... returnDefault (_ :: SomeException) = return def++-- | Get articles.db database of locations to visit+getArticleDbFilename :: IO FilePath+getArticleDbFilename = getConfigPath "articles.db" -- | Returns the database as it exists on the disk, and the current Yi -- buffer contents. Note that the Default typeclass gives us an empty
yi-ireader.cabal view
@@ -1,5 +1,5 @@ name: yi-ireader-version: 0.17.1+version: 0.18.0 synopsis: Yi editor incremental reader category: Yi homepage: https://github.com/yi-editor/yi#readme@@ -25,8 +25,8 @@ , data-default , microlens-platform , text- , yi-core >= 0.17- , yi-language >= 0.17+ , yi-core >= 0.18+ , yi-language >= 0.18 , yi-rope >= 0.10 exposed-modules: Yi.Mode.IReader