PICO-8 Text Editor with Effects, #8

Today I continued to work on the word wrap and I’ve encountered some bugs. To fix them, I need to define how the editor handles leading and trailing spaces. The problem has three parts:

  1. I use spaces as delimiters for the word wrap.
  2. I don’t want the editor to show the leading and trailing spaces of word wrapped lines.
  3. How do I handle lines with many consecutive spaces?

One thing I’m thinking of doing is adding a leading and trailing space field to each line. Then when lines word wrap, I could just move spaces into or out of their respective fields.

Side note: While writing this post, I noticed the WordPress editor doesn’t handle lines with many spaces, either. It’s quite content to let me continue adding spaces, even as the cursor slides out of view xD

Leave a comment

Your email address will not be published. Required fields are marked *

Your data is processed in accordance with my privacy policy. Comments are manually approved and may take a while to appear.