frandallfarmer/neohabitat

BUG: F7 on paper where the first line is blank doesn't display help text

Closed this issue · 3 comments

If you issue an F7 on a piece of paper where the first line is blank, the paper HELP text will not display or the preview of the papers text.

For example, here is a screenshot of me performing this action on a note where the text started on line 2:

image

In Habitat originally, issuing F7 on Paper would show this:

image

This still works if text begins on the first line.

It's not currently clear how Habitat would've handled this particular case but the code will tell whether if it found the first line of actual text and used that to display.

Based on the original code mentioned in my previous comment, it appears to use the following command to trim the blank space on the paper until it reaches a character:

nice_title = ltrim(rtrim(title));

For books and books in vendos, if there is no "title" then it will let you know that book has no title, but for paper, if there is nothing on the paper it won't say anything other than "This paper begins ."

In our current code, this isn't handled the same as the original server and so we just get a blank speech bubble.

FIxed - now matches orginal PL/1 behavior.

image