Hello community,
here is the log from the commit of package ghc-yi-frontend-vty for
openSUSE:Factory checked in at 2017-07-05 23:59:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yi-frontend-vty (Old)
and /work/SRC/openSUSE:Factory/.ghc-yi-frontend-vty.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yi-frontend-vty"
Wed Jul 5 23:59:59 2017 rev:2 rq:506858 version:0.13.7
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yi-frontend-vty/ghc-yi-frontend-vty.changes
2017-05-10 20:46:42.347119098 +0200
+++
/work/SRC/openSUSE:Factory/.ghc-yi-frontend-vty.new/ghc-yi-frontend-vty.changes
2017-07-05 23:59:59.855053846 +0200
@@ -1,0 +2,5 @@
+Mon Jun 19 21:01:51 UTC 2017 - [email protected]
+
+- Update to version 0.13.7.
+
+-------------------------------------------------------------------
Old:
----
yi-frontend-vty-0.13.5.tar.gz
New:
----
yi-frontend-vty-0.13.7.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yi-frontend-vty.spec ++++++
--- /var/tmp/diff_new_pack.ZUEo7v/_old 2017-07-06 00:00:00.542956939 +0200
+++ /var/tmp/diff_new_pack.ZUEo7v/_new 2017-07-06 00:00:00.546956376 +0200
@@ -18,7 +18,7 @@
%global pkg_name yi-frontend-vty
Name: ghc-%{pkg_name}
-Version: 0.13.5
+Version: 0.13.7
Release: 0
Summary: Vty frontend for Yi editor
License: GPL-2.0+
@@ -37,6 +37,7 @@
BuildRequires: ghc-vty-devel
BuildRequires: ghc-yi-core-devel
BuildRequires: ghc-yi-language-devel
+BuildRequires: ghc-yi-rope-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
++++++ yi-frontend-vty-0.13.5.tar.gz -> yi-frontend-vty-0.13.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yi-frontend-vty-0.13.5/src/Yi/Frontend/Vty.hs
new/yi-frontend-vty-0.13.7/src/Yi/Frontend/Vty.hs
--- old/yi-frontend-vty-0.13.5/src/Yi/Frontend/Vty.hs 2016-08-20
13:31:50.000000000 +0200
+++ new/yi-frontend-vty-0.13.7/src/Yi/Frontend/Vty.hs 2017-06-14
18:26:30.000000000 +0200
@@ -66,6 +66,7 @@
import Yi.Debug (logError, logPutStrLn)
import Yi.Editor
import Yi.Event (Event)
+import qualified Yi.Rope as R
import Yi.Style
import Yi.Types (YiConfigVariable)
import qualified Yi.UI.Common as Common
@@ -74,7 +75,7 @@
import Yi.UI.TabBar (TabDescr (TabDescr),
tabBarDescr)
import Yi.UI.Utils (arrangeItems,
attributesPictureAndSelB)
import Yi.Frontend.Vty.Conversions (colorToAttr,
fromVtyEvent)
-import Yi.Window (Window (bufkey, isMini, wkey))
+import Yi.Window (Window (bufkey, isMini, wkey,
width, height))
data Rendered = Rendered
@@ -240,10 +241,12 @@
{ Vty.picCursor = cursorPos }
renderWindow :: UIConfig -> Editor -> SL.Rect -> HasNeighborWest -> (Window,
Bool) -> Rendered
-renderWindow cfg e (SL.Rect x y w h) nb (win, focused) =
+renderWindow cfg e (SL.Rect x y _ _) nb (win, focused) =
Rendered (Vty.translate x y $ if nb then vertSep Vty.<|> pict else pict)
(fmap (\(i, j) -> (i + y, j + x')) cur)
where
+ w = Yi.Window.width win
+ h = Yi.Window.height win
x' = x + if nb then 1 else 0
w' = w - if nb then 1 else 0
b = findBufferWith (bufkey win) e
@@ -257,21 +260,25 @@
wsty = attributesToAttr ground Vty.defAttr
eofsty = appEndo (eofStyle sty) ground
(point, _) = runBuffer win b pointB
- region = mkSizeRegion fromMarkPoint $ Size (w' * h')
+ (text, _) = runBuffer win b $
+ -- Take the window worth of lines; we now know exactly how
+ -- much text to render, parse and stroke.
+ fst . R.splitAtLine h' <$> streamB Forward fromMarkPoint
+
+ region = mkSizeRegion fromMarkPoint . Size $! R.length text
-- Work around a problem with the mini window never displaying it's
contents due to a
-- fromMark that is always equal to the end of the buffer contents.
(Just (MarkSet fromM _ _), _) = runBuffer win b (getMarks win)
fromMarkPoint = if notMini
then fst $ runBuffer win b $ use $ markPointA fromM
else Point 0
- (text, _) = runBuffer win b (indexedStreamB Forward fromMarkPoint)
(attributes, _) = runBuffer win b $ attributesPictureAndSelB sty
(currentRegex e) region
-- TODO: I suspect that this costs quite a lot of CPU in the "dry run"
which determines the window size;
-- In that case, since attributes are also useless there, it might
help to replace the call by a dummy value.
-- This is also approximately valid of the call to
"indexedAnnotatedStreamB".
colors = map (fmap (($ Vty.defAttr) . attributesToAttr)) attributes
- bufData = paintChars Vty.defAttr colors text
+ bufData = paintChars Vty.defAttr colors $! zip [fromMarkPoint..]
(R.toString text)
tabWidth = tabSize . fst $ runBuffer win b indentSettingsB
prompt = if isMini win then miniIdentString b else ""
@@ -300,7 +307,7 @@
else T.justifyLeft w' ' ' $ T.singleton (configWindowFill cfg)
pict = Vty.vertCat $ take h' (rendered <> repeat (withAttributes
eofsty filler)) <> modeLines
-
+
sepStyle = attributesToAttr (modelineAttributes sty) Vty.defAttr
vertSep = Vty.charFill sepStyle ' ' 1 h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yi-frontend-vty-0.13.5/yi-frontend-vty.cabal
new/yi-frontend-vty-0.13.7/yi-frontend-vty.cabal
--- old/yi-frontend-vty-0.13.5/yi-frontend-vty.cabal 2016-12-10
10:39:40.000000000 +0100
+++ new/yi-frontend-vty-0.13.7/yi-frontend-vty.cabal 2017-06-17
19:57:23.000000000 +0200
@@ -1,9 +1,9 @@
--- This file has been generated from package.yaml by hpack version 0.14.0.
+-- This file has been generated from package.yaml by hpack version 0.17.0.
--
-- see: https://github.com/sol/hpack
name: yi-frontend-vty
-version: 0.13.5
+version: 0.13.7
synopsis: Vty frontend for Yi editor
category: Yi
homepage: https://github.com/yi-editor/yi#readme
@@ -33,6 +33,7 @@
, vty >= 5.4
, yi-core
, yi-language
+ , yi-rope
exposed-modules:
Yi.Config.Default.Vty
Yi.Frontend.Vty