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

[1/5] Defining options for the text widget. #32

Merged
merged 29 commits into from
May 27, 2018

Conversation

mum4k
Copy link
Owner

@mum4k mum4k commented May 14, 2018

Works on #4

mum4k added 11 commits May 14, 2018 22:07
Each set of options applies to a range of characters equal to the length
of the text added.

E.g. on write calls like:
Write("text", opts1)
Write("long text", opts2)

The two passed options will be stored as:
opts1 for byte range low:0, high:4
opts2 for byte range low:4, high:13

The text itself will be stored in a bytes.Buffer.
The line scanner identifies and counts lines in the input text and
performs wrapping if required.
And adding a demo.
@mum4k mum4k self-assigned this May 14, 2018
@mum4k mum4k requested a review from chipmunkie May 14, 2018 21:37
@coveralls
Copy link

coveralls commented May 14, 2018

Pull Request Test Coverage Report for Build 67

  • 342 of 362 (94.48%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.8%) to 85.653%

Changes Missing Coverage Covered Lines Changed/Added Lines %
widgets/text/line_scanner.go 61 63 96.83%
widgets/text/scroll.go 63 65 96.92%
widgets/text/text.go 134 150 89.33%
Totals Coverage Status
Change from base Build 15: 1.8%
Covered Lines: 1791
Relevant Lines: 2091

💛 - Coveralls

// See the License for the specific language governing permissions and
// limitations under the License.

package text
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please provide a documentation for the package. Maybe it makes sense to move the comment related to the file on line 22 here.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Sorry, this is related to how I split this into multiple pull requests. The documentation is in a later pull request, in the main file for this package.

@mum4k mum4k merged commit 7adc901 into master May 27, 2018
@mum4k mum4k deleted the text-widget/1/widget-options 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