text-zipper 0.10 → 0.10.1
raw patch · 3 files changed
+14/−3 lines, 3 files
Files
- CHANGELOG +7/−0
- tests/WordsSpec.hs +6/−2
- text-zipper.cabal +1/−1
CHANGELOG view
@@ -1,3 +1,10 @@++0.10.1+------++ * WordSpec: fix a test verification bug (fixed #11)+ * WordSpec: generation of random text should never include newlines+ 0.10 ----
tests/WordsSpec.hs view
@@ -120,7 +120,7 @@ numLines = length (getText zipper) curLine = currentLine zipper in- (col == T.length curLine && row == numLines)+ (col == T.length curLine && row == numLines - 1) || ((col == T.length curLine || isSpace (T.index curLine col)) -- next is space && (col == 0 || not (isSpace (T.index curLine (col-1))))) -- previous is word @@ -152,4 +152,8 @@ _ -> deleteToBeginning (deletePrevChar (killToBOL zipper)) instance Arbitrary Text where- arbitrary = T.pack <$> arbitrary+ arbitrary = do+ ls <- lines <$> arbitrary+ return $ T.pack $ case ls of+ (l:_) -> l+ _ -> mempty
text-zipper.cabal view
@@ -1,5 +1,5 @@ name: text-zipper-version: 0.10+version: 0.10.1 synopsis: A text editor zipper library description: This library provides a zipper and API for editing text. license: BSD3