brick 0.72 → 0.73
raw patch · 3 files changed
+13/−1 lines, 3 filesdep ~vtyPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: vty
API changes (from Hackage documentation)
+ Brick.Widgets.Edit: getCursorPosition :: Editor t n -> (Int, Int)
- Brick.Widgets.Dialog: dialogButtonsL :: forall a_a1fS6 a_a1fSK. Lens (Dialog a_a1fS6) (Dialog a_a1fSK) [(String, a_a1fS6)] [(String, a_a1fSK)]
+ Brick.Widgets.Dialog: dialogButtonsL :: forall a_a1fTP a_a1fUt. Lens (Dialog a_a1fTP) (Dialog a_a1fUt) [(String, a_a1fTP)] [(String, a_a1fUt)]
- Brick.Widgets.Dialog: dialogSelectedIndexL :: forall a_a1fS6. Lens' (Dialog a_a1fS6) (Maybe Int)
+ Brick.Widgets.Dialog: dialogSelectedIndexL :: forall a_a1fTP. Lens' (Dialog a_a1fTP) (Maybe Int)
- Brick.Widgets.Dialog: dialogTitleL :: forall a_a1fS6. Lens' (Dialog a_a1fS6) (Maybe String)
+ Brick.Widgets.Dialog: dialogTitleL :: forall a_a1fTP. Lens' (Dialog a_a1fTP) (Maybe String)
- Brick.Widgets.Dialog: dialogWidthL :: forall a_a1fS6. Lens' (Dialog a_a1fS6) Int
+ Brick.Widgets.Dialog: dialogWidthL :: forall a_a1fTP. Lens' (Dialog a_a1fTP) Int
- Brick.Widgets.FileBrowser: fileBrowserEntriesG :: forall n_a1qcJ. SimpleGetter (FileBrowser n_a1qcJ) (List n_a1qcJ FileInfo)
+ Brick.Widgets.FileBrowser: fileBrowserEntriesG :: forall n_a1qes. SimpleGetter (FileBrowser n_a1qes) (List n_a1qes FileInfo)
- Brick.Widgets.FileBrowser: fileBrowserEntryFilterG :: forall n_a1qcJ. SimpleGetter (FileBrowser n_a1qcJ) (Maybe (FileInfo -> Bool))
+ Brick.Widgets.FileBrowser: fileBrowserEntryFilterG :: forall n_a1qes. SimpleGetter (FileBrowser n_a1qes) (Maybe (FileInfo -> Bool))
- Brick.Widgets.FileBrowser: fileBrowserExceptionG :: forall n_a1qcJ. SimpleGetter (FileBrowser n_a1qcJ) (Maybe IOException)
+ Brick.Widgets.FileBrowser: fileBrowserExceptionG :: forall n_a1qes. SimpleGetter (FileBrowser n_a1qes) (Maybe IOException)
- Brick.Widgets.FileBrowser: fileBrowserLatestResultsG :: forall n_a1qcJ. SimpleGetter (FileBrowser n_a1qcJ) [FileInfo]
+ Brick.Widgets.FileBrowser: fileBrowserLatestResultsG :: forall n_a1qes. SimpleGetter (FileBrowser n_a1qes) [FileInfo]
- Brick.Widgets.FileBrowser: fileBrowserNameG :: forall n_a1qcJ. SimpleGetter (FileBrowser n_a1qcJ) n_a1qcJ
+ Brick.Widgets.FileBrowser: fileBrowserNameG :: forall n_a1qes. SimpleGetter (FileBrowser n_a1qes) n_a1qes
- Brick.Widgets.FileBrowser: fileBrowserSearchStringG :: forall n_a1qcJ. SimpleGetter (FileBrowser n_a1qcJ) (Maybe Text)
+ Brick.Widgets.FileBrowser: fileBrowserSearchStringG :: forall n_a1qes. SimpleGetter (FileBrowser n_a1qes) (Maybe Text)
- Brick.Widgets.FileBrowser: fileBrowserSelectableG :: forall n_a1qcJ. SimpleGetter (FileBrowser n_a1qcJ) (FileInfo -> Bool)
+ Brick.Widgets.FileBrowser: fileBrowserSelectableG :: forall n_a1qes. SimpleGetter (FileBrowser n_a1qes) (FileInfo -> Bool)
- Brick.Widgets.FileBrowser: fileBrowserSelectableL :: forall n_a1qcJ. Lens' (FileBrowser n_a1qcJ) (FileInfo -> Bool)
+ Brick.Widgets.FileBrowser: fileBrowserSelectableL :: forall n_a1qes. Lens' (FileBrowser n_a1qes) (FileInfo -> Bool)
- Brick.Widgets.FileBrowser: fileBrowserSelectedFilesG :: forall n_a1qcJ. SimpleGetter (FileBrowser n_a1qcJ) (Set String)
+ Brick.Widgets.FileBrowser: fileBrowserSelectedFilesG :: forall n_a1qes. SimpleGetter (FileBrowser n_a1qes) (Set String)
- Brick.Widgets.FileBrowser: fileBrowserWorkingDirectoryG :: forall n_a1qcJ. SimpleGetter (FileBrowser n_a1qcJ) FilePath
+ Brick.Widgets.FileBrowser: fileBrowserWorkingDirectoryG :: forall n_a1qes. SimpleGetter (FileBrowser n_a1qes) FilePath
- Brick.Widgets.List: listElementsL :: forall n_a1l0R t_a1l0S e_a1l0T t_a1leX e_a1leY. Lens (GenericList n_a1l0R t_a1l0S e_a1l0T) (GenericList n_a1l0R t_a1leX e_a1leY) (t_a1l0S e_a1l0T) (t_a1leX e_a1leY)
+ Brick.Widgets.List: listElementsL :: forall n_a1l2A t_a1l2B e_a1l2C t_a1lgG e_a1lgH. Lens (GenericList n_a1l2A t_a1l2B e_a1l2C) (GenericList n_a1l2A t_a1lgG e_a1lgH) (t_a1l2B e_a1l2C) (t_a1lgG e_a1lgH)
- Brick.Widgets.List: listItemHeightL :: forall n_a1l0R t_a1l0S e_a1l0T. Lens' (GenericList n_a1l0R t_a1l0S e_a1l0T) Int
+ Brick.Widgets.List: listItemHeightL :: forall n_a1l2A t_a1l2B e_a1l2C. Lens' (GenericList n_a1l2A t_a1l2B e_a1l2C) Int
- Brick.Widgets.List: listNameL :: forall n_a1l0R t_a1l0S e_a1l0T n_a1leZ. Lens (GenericList n_a1l0R t_a1l0S e_a1l0T) (GenericList n_a1leZ t_a1l0S e_a1l0T) n_a1l0R n_a1leZ
+ Brick.Widgets.List: listNameL :: forall n_a1l2A t_a1l2B e_a1l2C n_a1lgI. Lens (GenericList n_a1l2A t_a1l2B e_a1l2C) (GenericList n_a1lgI t_a1l2B e_a1l2C) n_a1l2A n_a1lgI
- Brick.Widgets.List: listSelectedL :: forall n_a1l0R t_a1l0S e_a1l0T. Lens' (GenericList n_a1l0R t_a1l0S e_a1l0T) (Maybe Int)
+ Brick.Widgets.List: listSelectedL :: forall n_a1l2A t_a1l2B e_a1l2C. Lens' (GenericList n_a1l2A t_a1l2B e_a1l2C) (Maybe Int)
Files
- CHANGELOG.md +7/−0
- brick.cabal +1/−1
- src/Brick/Widgets/Edit.hs +5/−0
CHANGELOG.md view
@@ -2,6 +2,13 @@ Brick changelog --------------- +0.73+----++API changes:+ * Added `Brick.Widgets.Edit.getCursorPosition` (thanks+ @TristanCacqueray)+ 0.72 ----
brick.cabal view
@@ -1,5 +1,5 @@ name: brick-version: 0.72+version: 0.73 synopsis: A declarative terminal user interface library description: Write terminal user interfaces (TUIs) painlessly with 'brick'! You
src/Brick/Widgets/Edit.hs view
@@ -25,6 +25,7 @@ , editorText -- * Reading editor contents , getEditContents+ , getCursorPosition -- * Handling events , handleEditorEvent -- * Editing text@@ -201,6 +202,10 @@ -- | Get the contents of the editor. getEditContents :: Monoid t => Editor t n -> [t] getEditContents e = Z.getText $ e^.editContentsL++-- | Get the cursor position of the editor (row, column).+getCursorPosition :: Editor t n -> (Int, Int)+getCursorPosition e = Z.cursorPosition $ e^.editContentsL -- | Turn an editor state value into a widget. This uses the editor's -- name for its scrollable viewport handle and the name is also used to