Skip to content

Commit

Permalink
Implement wrapping in text field
Browse files Browse the repository at this point in the history
Closes osa1#101

Update tests:

- Improve error reporting on test failure
- Use smaller screen in text_field_wrap tests, document screen size
- Combine multiple text_field_wrap tests in single test
  (not complete)

Fix a few clippy warnings

tui: Implement methods for testing resizing

Allow servers to have aliases. Fixes osa1#186.

Remove outdated contributors list from README

We don't update it, and Github maintains an up-to-date list for us
anyway (in 'contributors' page).

Test resizing

Fixed test after rebase with master

Added word wrapping on text field input

Fix for line calculation.

Added indentation for message lines

Fixed bug with Line::rendered_height not calculating based on timestamp and nick length

Implement wrapping in text field

Closes osa1#101

Update tests:

- Improve error reporting on test failure
- Use smaller screen in text_field_wrap tests, document screen size
- Combine multiple text_field_wrap tests in single test
  (not complete)

Test resizing

Formatting

Fixed test after rebase with master

Added word wrapping on text field input

Fix for line calculation.

Added indentation for message lines

Fixed bug with Line::rendered_height not calculating based on timestamp and nick length

- moved text_field to own module - input_area
- started making TextArea work like MsgArea, new InputLine like Line

Working more on wrapping...autocomplete still buggy

buffer remove fix.

Progress on wrapping, added some tests - need more

Autocompletion - hacky solution

Not resizing msg_area every draw - only on height change

Caching textarea height so that we only need to calculate lines on modify() or resize()

Fixes after my bad rebase

Fixed nickname not showing on tiny window.

Fixed PR feedback:
- Nickname suffix is now static
- removed pub from some functions

Fixes for PR:
- Removes text_field_wrap config. Defaulting to text wrapping, falling
back to scroll when width is too small.
- Reverted indenting for message area.

Fixed issue with calculate_lines() where it would not correctly calculate when there were multi-line words.

Another rework. Exhaustive wrapping algorithm. Removed keeping track of white spaces. Added keeping track of line starts for easy wrapped drawing. No more crazy BTree insert/remove code.

Added fallback to scroll after input area is greater than half of the
screen height.
  • Loading branch information
trevarj committed Jun 6, 2020
1 parent 2cea367 commit dfd080d
Show file tree
Hide file tree
Showing 7 changed files with 892 additions and 230 deletions.
Loading

0 comments on commit dfd080d

Please sign in to comment.