packages feed

text-zipper 0.5 → 0.6

raw patch · 2 files changed

+7/−1 lines, 2 files

Files

src/Data/Text/Zipper.hs view
@@ -28,6 +28,7 @@     -- *Navigation and editing functions     , moveCursor     , insertChar+    , insertMany     , breakLine     , killToEOL     , killToBOL@@ -183,6 +184,11 @@ insertChar :: (Monoid a) => Char -> TextZipper a -> TextZipper a insertChar '\n' tz = breakLine tz insertChar ch tz = tz { toLeft = toLeft tz `mappend` (fromChar tz ch) }++-- |Insert many characters at the current cursor position. Move the+-- cursor one position to the end of the inserted text.+insertMany :: (Monoid a) => a -> TextZipper a -> TextZipper a+insertMany cs tz = tz { toLeft = toLeft tz `mappend` cs }  -- |Insert a line break at the current cursor position. breakLine :: (Monoid a) => TextZipper a -> TextZipper a
text-zipper.cabal view
@@ -1,5 +1,5 @@ name:                text-zipper-version:             0.5+version:             0.6 synopsis:            A text editor zipper library description:         This library provides a zipper and API for editing text. license:             BSD3