Repository navigation
Conversation
when width was less than "..." the loop never ended. break out of loop when gsub cannot make progress. note: avoided empty string test in while condition as this misses edge case of unmatchable stray UTF-8 continuation bytes. clarify in ldoc that width is in pixels. fixes monome#1636
Member
|
This looks good, thanks! The one thing missing from my comment in #1636 is the first bullet, some handling around a Here's a proposal for what we could do around values of width smaller than the ellipsis:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #1636
notes: my original fix was to add a check in the while condition. this works for most cases but on review the ai written original branch #1905 handled the edge case of a string that starts with stray UTF-8 continuation bytes, so I changed approach. The local declare inside the loop feels wrong but research seems to indicate this is the Lua way vs what feels "right" to me so I left it.
Thoughts? My goal is to keep this as in line with Lua conventions and Norns codebase conventions as possible.
Tested on hardware via redefining the function in maiden and testing. Also updated file on two norns shields and rebooted but due to various customizations on each unit I'm not sure how valid that test was.