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

[5/5] Implementing the text widget. #36

Merged
merged 6 commits into from
May 27, 2018

Conversation

mum4k
Copy link
Owner

@mum4k mum4k commented May 14, 2018

Fixes #4

@mum4k mum4k self-assigned this May 14, 2018
@mum4k mum4k requested a review from chipmunkie May 14, 2018 21:41
@coveralls
Copy link

Pull Request Test Coverage Report for Build 25

  • 134 of 150 (89.33%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+3.0%) to 85.653%

Changes Missing Coverage Covered Lines Changed/Added Lines %
widgets/text/text.go 134 150 89.33%
Totals Coverage Status
Change from base Build 19: 3.0%
Covered Lines: 1791
Relevant Lines: 2091

💛 - Coveralls

@coveralls
Copy link

coveralls commented May 14, 2018

Pull Request Test Coverage Report for Build 57

  • 134 of 150 (89.33%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+3.0%) to 85.653%

Changes Missing Coverage Covered Lines Changed/Added Lines %
widgets/text/text.go 134 150 89.33%
Totals Coverage Status
Change from base Build 54: 3.0%
Covered Lines: 1791
Relevant Lines: 2091

💛 - Coveralls

t.givenWOpts = newGivenWOpts()
t.scroll = newScrollTracker(t.opts)
t.lastWidth = 0
t.newText = true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be true if there is no content and has been reset (reset kind of gives the impression on new text was added yet).

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, renamed newText to contentChanged.

break
}

if r == '\n' {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we actually need this statement?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, otherwise we print out the newline rune below which adds an empty line of text.

Note - I am not happy with this function as it is in this pull request. I have refactored it into something hopefully easier to understand in the next one.

@mum4k mum4k merged commit c7aaaed into text-widget/4/scroll-tracker May 27, 2018
@mum4k mum4k deleted the text-widget/5/widget branch May 27, 2018 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants