Line wrapping for documents #123

Closed
opened 2019-12-28 09:51:24 +00:00 by asdf · 4 comments
Collaborator

We have been over this a few times so sorry if this has already been covered.

When viewing the document gopher://baud.baby:70/0/phlog/fs20191226.txt in bombadillo, the first and second lines wrap what seems to be empty space with the terminal at 80 characters wide. Downloading and viewing this document in vim or less does not show this wrapping.

It's possible to reproduce this behaviour by setting the terminal width to 80 characters, then viewing a document with 80 characters per line. I've just tested using ASCII characters - an example I used with underscores as the 80th character:

                                                                               _
                /_----                                                        _

This does not relate to #35 which was a very similar situation. That document displays correctly now.

Was there something recently about wrapping slightly early to avoid issues with some really wide characters? I couldn't find this issue to refer to it.

We have been over this a few times so sorry if this has already been covered. When viewing the document gopher://baud.baby:70/0/phlog/fs20191226.txt in bombadillo, the first and second lines wrap what seems to be empty space with the terminal at 80 characters wide. Downloading and viewing this document in vim or less does not show this wrapping. It's possible to reproduce this behaviour by setting the terminal width to 80 characters, then viewing a document with 80 characters per line. I've just tested using ASCII characters - an example I used with underscores as the 80th character: ``` _ /_---- _ ``` This does not relate to #35 which was a very similar situation. That document displays correctly now. Was there something recently about wrapping slightly early to avoid issues with some really wide characters? I couldn't find this issue to refer to it.
Owner

This is indeed caused by wrapping to one less than the width.

This can be fixed by making the < into a <= here: https://tildegit.org/sloum/bombadillo/src/branch/master/page.go#L80

Before opening a PR I want to make sure that this does not affect the render method(s) or the main draw method. Once I have verified that I will open a PR.

I think once this goes in and the other two that are open PRs currently I may call that 2.1.0 and move develop into master. Maybe? A good number of features and bug fixes have built up and are available to people pulling develop, but it would be good to have them on master.

This is indeed caused by wrapping to one less than the width. This can be fixed by making the `<` into a `<=` here: https://tildegit.org/sloum/bombadillo/src/branch/master/page.go#L80 Before opening a PR I want to make sure that this does not affect the render method(s) or the main draw method. Once I have verified that I will open a PR. I think once this goes in and the other two that are open PRs currently I may call that 2.1.0 and move develop into master. Maybe? A good number of features and bug fixes have built up and are available to people pulling develop, but it would be good to have them on master.
sloum added the
bug
rendering
labels 2019-12-28 17:30:43 +00:00
sloum added this to the 2.1.0 milestone 2019-12-28 17:30:48 +00:00
sloum self-assigned this 2019-12-28 17:30:53 +00:00
Owner

I thought I had included this in the recent merge of 2.1.0. It seems I did not. I will get this updated soon, sorry for letting the issue sit so long!

I thought I had included this in the recent merge of 2.1.0. It seems I did not. I will get this updated soon, sorry for letting the issue sit so long!
sloum added the
in progress
label 2020-03-17 19:57:32 +00:00
Owner

@asdf Are you able to confirm if this has been fixed? This has been on here awhile and I had thought this got merged in but now I am unsure.

@asdf Are you able to confirm if this has been fixed? This has been on here awhile and I had thought this got merged in but now I am unsure.
Author
Collaborator

I've retested using the document mentioned and the issue is resolved. Thank you!

I've retested using the document mentioned and the issue is resolved. Thank you!
asdf closed this issue 2020-05-14 02:36:43 +00:00
sloum removed the
in progress
label 2020-05-24 17:02:06 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sloum/bombadillo#123
No description provided.