Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-text-zipper for openSUSE:Factory 
checked in at 2022-08-01 21:31:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-text-zipper (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-text-zipper.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-text-zipper"

Mon Aug  1 21:31:28 2022 rev:5 rq:989698 version:0.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-text-zipper/ghc-text-zipper.changes  
2021-01-20 18:25:29.099407063 +0100
+++ 
/work/SRC/openSUSE:Factory/.ghc-text-zipper.new.1533/ghc-text-zipper.changes    
    2022-08-01 21:32:14.269973003 +0200
@@ -1,0 +2,8 @@
+Sat Jul  9 15:39:25 UTC 2022 - Peter Simons <[email protected]>
+
+- Update text-zipper to version 0.12.
+  Upstream has renamed and modified the change log file(s) in this
+  release. Unfortunately, the automatic updater cannot reliable
+  determine relevant entries for this release.
+
+-------------------------------------------------------------------

Old:
----
  text-zipper-0.11.tar.gz

New:
----
  text-zipper-0.12.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-text-zipper.spec ++++++
--- /var/tmp/diff_new_pack.ZZd05L/_old  2022-08-01 21:32:14.681974185 +0200
+++ /var/tmp/diff_new_pack.ZZd05L/_new  2022-08-01 21:32:14.689974208 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-text-zipper
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %global pkg_name text-zipper
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.11
+Version:        0.12
 Release:        0
 Summary:        A text editor zipper library
 License:        BSD-3-Clause
@@ -70,7 +70,7 @@
 %files -f %{name}.files
 %license LICENSE
 %dir %{_datadir}/%{pkg_name}-%{version}
-%{_datadir}/%{pkg_name}-%{version}/CHANGELOG
+%{_datadir}/%{pkg_name}-%{version}/CHANGELOG.md
 
 %files devel -f %{name}-devel.files
 

++++++ text-zipper-0.11.tar.gz -> text-zipper-0.12.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/text-zipper-0.11/CHANGELOG 
new/text-zipper-0.12/CHANGELOG
--- old/text-zipper-0.11/CHANGELOG      2001-09-09 03:46:40.000000000 +0200
+++ new/text-zipper-0.12/CHANGELOG      1970-01-01 01:00:00.000000000 +0100
@@ -1,116 +0,0 @@
-
-0.11
-----
-
-API changes:
- * Added `gotoBOF`, `gotoEOF`, `killToBOF`, and `killToEOF` functions
-   (thanks Itai Y. Efrat)
-
-0.10.1
-------
-
- * WordSpec: fix a test verification bug (fixed #11)
- * WordSpec: generation of random text should never include newlines
-
-0.10
-----
-
-- Integrated word editing and navigation functions
-  courtesy of Hans-Peter Deifel's hledger-iadd project (see
-  Data.Text.Zipper.Generic.Words)
-- Added currentChar, nextChar, and previousChar (thanks @kRITZCREEK)
-
-0.9
----
-
-- insertChar and insertMany now only insert printable characters and
-  newlines (subject to text zipper line limits)
-- The GenericTextZipper class now requires a new method,
-  toList :: a -> [Char]
-
-0.8.3
------
-
-- Fixed insertMany accidental addition of trailing newline
-
-0.8.2
------
-
-- Fixed insertMany for zippers with no line limit
-
-0.8.1
------
-
-- Added Github links and CHANGELOG to package
-
-0.8
----
-
-- Added 'transposeChars' function
-
-0.7.1
------
-
-- Generic: import everything from Monoid for older GHCs
-
-0.7
----
-
-- API changes: Add Generic module to abstract over text container types
-
-0.6.1
------
-
-- Make insertMany respect the zipper's line limit
-
-0.6
----
-
-- Add insertMany for faster bulk insertion
-
-0.5
----
-
-- Added killToBOL function (thanks Hans-Peter Deifel)
-- Enabled -Wall
-- Added dependency on deepseq
-- Added NFData instance for TextZipper
-
-0.4
----
-
-- Added clearZipper
-- Added isFirstLine (thanks Kwang Yul Seo)
-- Renamed lastLine to isLastLine (thanks Kwang Yul Seo)
-
-0.3.1
------
-
-- Fixed export of vectorZipper
-
-0.3
----
-
-- Added vectorZipper for zipping over vectors of characters
-
-0.2.1
------
-
-- Exported getLineLimit to permit obtaining a zipper's line limit
-
-0.2
----
-
-- Added support for limiting the number of lines in the zipper
-- insertChar "\n" is now equivalent to breakLine
-- Improved Show instance for TextZipper
-
-0.1.1
------
-
-- Updated package metadata
-
-0.1
----
-
-Initial release (originally split off from vty-ui)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/text-zipper-0.11/CHANGELOG.md 
new/text-zipper-0.12/CHANGELOG.md
--- old/text-zipper-0.11/CHANGELOG.md   1970-01-01 01:00:00.000000000 +0100
+++ new/text-zipper-0.12/CHANGELOG.md   2001-09-09 03:46:40.000000000 +0200
@@ -0,0 +1,123 @@
+
+0.12
+----
+
+API changes:
+ * Added `moveCursorClosest` to allow cursor placement as near as
+   possible to a specified location.
+
+0.11
+----
+
+API changes:
+ * Added `gotoBOF`, `gotoEOF`, `killToBOF`, and `killToEOF` functions
+   (thanks Itai Y. Efrat)
+
+0.10.1
+------
+
+ * WordSpec: fix a test verification bug (fixed #11)
+ * WordSpec: generation of random text should never include newlines
+
+0.10
+----
+
+- Integrated word editing and navigation functions
+  courtesy of Hans-Peter Deifel's hledger-iadd project (see
+  Data.Text.Zipper.Generic.Words)
+- Added currentChar, nextChar, and previousChar (thanks @kRITZCREEK)
+
+0.9
+---
+
+- insertChar and insertMany now only insert printable characters and
+  newlines (subject to text zipper line limits)
+- The GenericTextZipper class now requires a new method,
+  toList :: a -> [Char]
+
+0.8.3
+-----
+
+- Fixed insertMany accidental addition of trailing newline
+
+0.8.2
+-----
+
+- Fixed insertMany for zippers with no line limit
+
+0.8.1
+-----
+
+- Added Github links and CHANGELOG to package
+
+0.8
+---
+
+- Added 'transposeChars' function
+
+0.7.1
+-----
+
+- Generic: import everything from Monoid for older GHCs
+
+0.7
+---
+
+- API changes: Add Generic module to abstract over text container types
+
+0.6.1
+-----
+
+- Make insertMany respect the zipper's line limit
+
+0.6
+---
+
+- Add insertMany for faster bulk insertion
+
+0.5
+---
+
+- Added killToBOL function (thanks Hans-Peter Deifel)
+- Enabled -Wall
+- Added dependency on deepseq
+- Added NFData instance for TextZipper
+
+0.4
+---
+
+- Added clearZipper
+- Added isFirstLine (thanks Kwang Yul Seo)
+- Renamed lastLine to isLastLine (thanks Kwang Yul Seo)
+
+0.3.1
+-----
+
+- Fixed export of vectorZipper
+
+0.3
+---
+
+- Added vectorZipper for zipping over vectors of characters
+
+0.2.1
+-----
+
+- Exported getLineLimit to permit obtaining a zipper's line limit
+
+0.2
+---
+
+- Added support for limiting the number of lines in the zipper
+- insertChar "\n" is now equivalent to breakLine
+- Improved Show instance for TextZipper
+
+0.1.1
+-----
+
+- Updated package metadata
+
+0.1
+---
+
+Initial release (originally split off from vty-ui)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/text-zipper-0.11/src/Data/Text/Zipper.hs 
new/text-zipper-0.12/src/Data/Text/Zipper.hs
--- old/text-zipper-0.11/src/Data/Text/Zipper.hs        2001-09-09 
03:46:40.000000000 +0200
+++ new/text-zipper-0.12/src/Data/Text/Zipper.hs        2001-09-09 
03:46:40.000000000 +0200
@@ -27,6 +27,7 @@
 
     -- * Navigation functions
     , moveCursor
+    , moveCursorClosest
     , moveRight
     , moveLeft
     , moveUp
@@ -185,6 +186,22 @@
                , toRight = drop_ tz col (t !! row)
                }
 
+-- | Move the cursor to the specified row and column. Invalid cursor
+-- positions will be reinterpreted as the closest valid position. Valid
+-- cursor positions range as described for 'cursorPosition'.
+moveCursorClosest :: (Monoid a) => (Int, Int) -> TextZipper a -> TextZipper a
+moveCursorClosest (row, col) tz =
+    let t = getText tz
+        bestRow = min (max 0 $ length t - 1) $ max 0 row
+        bestCol = if bestRow < length t
+                  then min (length_ tz (t !! bestRow)) $ max 0 col
+                  else 0
+    in tz { above = take bestRow t
+          , below = drop (bestRow + 1) t
+          , toLeft = take_ tz bestCol (t !! bestRow)
+          , toRight = drop_ tz bestCol (t !! bestRow)
+          }
+
 isFirstLine :: TextZipper a -> Bool
 isFirstLine = null . above
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/text-zipper-0.11/text-zipper.cabal 
new/text-zipper-0.12/text-zipper.cabal
--- old/text-zipper-0.11/text-zipper.cabal      2001-09-09 03:46:40.000000000 
+0200
+++ new/text-zipper-0.12/text-zipper.cabal      2001-09-09 03:46:40.000000000 
+0200
@@ -1,5 +1,5 @@
 name:                text-zipper
-version:             0.11
+version:             0.12
 synopsis:            A text editor zipper library
 description:         This library provides a zipper and API for editing text.
 license:             BSD3
@@ -10,7 +10,7 @@
 category:            Text
 build-type:          Simple
 cabal-version:       >=1.10
-data-files:          CHANGELOG
+data-files:          CHANGELOG.md
 homepage:            https://github.com/jtdaugherty/text-zipper/
 bug-reports:         https://github.com/jtdaugherty/text-zipper/issues
 

Reply via email to