Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"tried to embed an infinite-width or infinite-height widget" error when viewing code block with line wrap #666

Closed
RyanGlScott opened this issue Sep 16, 2020 · 0 comments
Labels

Comments

@RyanGlScott
Copy link
Contributor

On the develop branch (as of commit 4495cee), trying to use Ctrl-s, Ctrl-v to view a message that contains a code block that is long enough to wrap around to another line (cf. ed71b61) will cause Matterhorn to crash and print the following error:

matterhorn: tried to embed an infinite-width or infinite-height widget in 'Both' type viewport ViewMessageArea
CallStack (from HasCallStack):
  error, called at src/Brick/Widgets/Core.hs:1048:25 in brick-0.55-95152ca5b78b04408fd9576ec8ce5cc5cbd676d74ca933cd4a8a944d2b87e866:Brick.Widgets.Core
jtdaugherty added a commit that referenced this issue Sep 16, 2020
…666)

This change exposes control over when to wrap non-highlighted code
blocks via the MessageData field mdWrapNonhighlightedCodeBlocks. We need
this because in the message view window we never want to line-wrap such
blocks, but everywhere else, we do. This change ensures that the
wrapping is done when desired elsewhere, but not in the message view
window case.

As a side note, this change is the latest in a long series that show how
the Draw.RichText parameter passing is getting out of hand. It is time
for a reader monad to tuck those things away.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants