brick 0.6.1 → 0.6.2
raw patch · 4 files changed
+13/−2 lines, 4 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Brick.Widgets.List: listElementsL :: Lens (List e_aXI8) (List e_aXOR) (Vector e_aXI8) (Vector e_aXOR)
+ Brick.Widgets.List: listElementsL :: Lens (List e_aXIl) (List e_aXP4) (Vector e_aXIl) (Vector e_aXP4)
- Brick.Widgets.List: listItemHeightL :: Lens' (List e_aXI8) Int
+ Brick.Widgets.List: listItemHeightL :: Lens' (List e_aXIl) Int
- Brick.Widgets.List: listNameL :: Lens' (List e_aXI8) Name
+ Brick.Widgets.List: listNameL :: Lens' (List e_aXIl) Name
- Brick.Widgets.List: listSelectedL :: Lens' (List e_aXI8) (Maybe Int)
+ Brick.Widgets.List: listSelectedL :: Lens' (List e_aXIl) (Maybe Int)
Files
- CHANGELOG.md +8/−0
- brick.cabal +1/−1
- programs/EditDemo.hs +3/−0
- src/Brick/Widgets/Edit.hs +1/−1
CHANGELOG.md view
@@ -2,6 +2,14 @@ Brick changelog --------------- +0.6.2+-----++Bug fixes:+ * Editor: the 'editor' initial content parameter is now correctly split+ on newlines to ensure that the underlying editor zipper is+ initialized properly. (fixes #56; thanks @listx)+ 0.6.1 -----
brick.cabal view
@@ -1,5 +1,5 @@ name: brick-version: 0.6.1+version: 0.6.2 synopsis: A declarative terminal user interface library description: Write terminal applications painlessly with 'brick'! You write an
programs/EditDemo.hs view
@@ -62,6 +62,9 @@ V.EvKey V.KEsc [] -> M.halt st V.EvKey (V.KChar '\t') [] -> M.continue $ switchEditors st V.EvKey V.KBackTab [] -> M.continue $ switchEditors st+ V.EvKey (V.KChar ' ') [] ->+ M.continue st { _edit2 = (E.editor secondEditor (str . unlines) Nothing "hello\nworld")+ } _ -> M.continue =<< T.handleEventLensed st (currentEditorL st) ev initialState :: St
src/Brick/Widgets/Edit.hs view
@@ -85,7 +85,7 @@ -> String -- ^ The initial content -> Editor-editor name draw limit s = Editor (Z.stringZipper [s] limit) draw name+editor name draw limit s = Editor (Z.stringZipper (lines s) limit) draw name -- | Apply an editing operation to the editor's contents. Bear in mind -- that you should only apply zipper operations that operate on the