This change removes fileBrowserEntryFilterL from the public API (which
was unsafe because it could not update the appropriate internal
state when used) and replaces it with fileBrowserEntryFilterG,
a getter for the same field. Users of the lens should be using
setFileBrowserEntryFilter.
This fixes a bug where a cached image can cause a containing viewport to
honor a visibility request when the cached image is re-used. This is
almost certainly never desirable because we probably only want viewports
to scroll visible regions into view the first time they are drawn. This
change makes that so, since the Result returned by 'cached' contains the
visibility requests but its cached representation has them cleared.
This fix just completes the work that I intended to do in the previous
commit.
API change note: some functions got an additional Ord constraint on the
resource name type, but that shouldn't present any issues for
applications since Ord was already required on that type for some of the
fundamental parts of the API.
This change adds a function, Brick.Main.makeVisible, which can be used
from EventM to request that a region (specified by its resource name) be
scrolled into view on the next rendering. This requires the region to be
named in the drawing using either reportExtent or clickable (which just
calls reportExtent). If the specified region is in a viewport, this will
result in the same behavior as if 'visible' was used to wrap the
specified region.
Prior to this change, the size of a viewport's contents would be off by
one row or column if a scroll bar was enabled because we weren't
accounting for the extra row or column taken up by the bar. This change
makes it so that viewports that scroll only in one direction apply a
width or height constraint to their contents to account for the reduced
rendering area when a scroll bar is enabled.
This change fixes a bug where clickable regions in the UI could be
forgotten by the rendering loop if the application called
"continueWithoutRedraw." This was because although the rendering loop
correctly skipped the redraw, it would reset the rendering state's
clickable regions. That meant that if a mouse click event came in
immediately after a call to "continueWithoutRedraw", the mouse click
would not match any extents because the resource name associated with
the click was not considered clickable. This change fixes runWithVty so
that the rendering state's clickable name list is NOT reset in the
specific case where we're going to skip a screen redraw due to a call to
continueWithoutRedraw.
M-b and M-f to navigate by word
C-b and C-f for consistency
M-d to delete word under cursor
C-t to transpose previous char with current char
This replaces the Monoid constraint on handleEditorEvent with GenericTextZipper
This change adds a new field to the Viewport type to track the size of
the viewport content. Previously, the size of the content was not
tracked anywhere, which made it possible to compute how much of the
content was visible in relation to the total content available.
This function for Brick.Forms allows the user to specify an additional function
to validate input in addition to `readMaybe`, as a slightly more flexible
version of `editShowableField`.
Mouse events for `Widget`s were being received inconsistently if/when
they are cached. This appears to be because `Widget`s when rendered
update the list of clickable elements that `brick` should track for
mouse activity. However, when a `Widget` is cached, this information is
lost.
This commit updates the rendering cache to also include the clickable
elements exposed by a `Widget` and update `brick`'s tracking list
appropriately when utilizing the cache.
This change removes the unused extentOffset field of Extent, which was
being used in some calculations but was never changing from its
initialized value of zero (and thus had no meaningful impact on any of
its uses). I'm not sure what I intended with this field when it was
originally added, but clearly this is dead code.