Commit Graph
8 Commits
Author SHA1 Message Date
Ayman Bagabas 075dd25792 refactor!: use term/input
feat: update bubbletea & term/input

refactor!: use term/input for input handling

Reference: https://github.com/charmbracelet/x/tree/main/exp/term
2024-04-22 16:24:27 -04:00
Michael LorantandMaas Lalani 48dffdd97e refactor(textarea): Improve setting width
When setting the width of the textarea there were some issues
preventing this from working correctly. These problems included:

- If the maximum width needed to be used, the width of the textarea did
  not take into account the prompt and line number width.
- The viewport width did not take into account the style width.

The entire function was confusing to understand and a refactor was
warranted.

As part of this refactor, the bugs mentioned above were fixed and the
code was simplified.

To verify that the logic works as expected, unit tests were expanded to
validate that setting the width works as expected.

Signed-off-by: Michael Lorant <michael.lorant@nine.com.au>
2024-04-06 01:37:46 -04:00
Michael LorantandGitHub b9e62cbfe1 Improve textarea tests (#490) 2024-03-08 19:23:05 -05:00
Michael LorantandGitHub 6c9e52a8fd Fix end of buffer character (#491) 2024-02-29 10:29:45 -05:00
Maas Lalani c94f0cc151 fix(textarea): end of buffer alignment 2024-02-28 10:57:49 -05:00
Michael LorantandMaas Lalani e985ec9f15 Add tests for textarea view
Add improved unit tests for textarea view function.

The end of buffer unit test was flawed and failed to properly check
whether the end of buffer character was in the correct location. This
test has been removed as this feature is now verified as part of these
test cases.

Signed-off-by: Michael Lorant <michael.lorant@nine.com.au>
2024-02-28 10:49:34 -05:00
Glenn GondaandChristian Rocha 3d3ed883d3 docs: fix typos and improve comment clarity 2023-02-16 17:49:32 -05:00
Maas Lalani 2fd583c8ef feat(textarea): Add multi-line text input 2022-06-28 12:29:24 -04:00