Commit Graph
10 Commits
Author SHA1 Message Date
Michael LorantandGitHub 296fcf77fa feat(textarea) Add multiline placeholder (#302)
Add the capability to show a multiline placeholder. Some refactoring was
required to improve readability and improve logic.

End of line buffer character was only shown when line numbers were
displayed which requires some verification whether this is the intended
outcome. This change resolves this issue.
2024-05-30 20:28:20 -04:00
Garrett MartinandGitHub 620ca7dfa9 fix: default textarea EndOfBufferCharacter should be ' ' (#510) 2024-05-23 17:37:59 -04:00
Ayman Bagabas 14a62710fc fix(textarea): use x/ansi to strip ansi sequences 2024-05-23 15:01:44 -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