Christian Rocha
d2b2217d63
fix(textarea): apply prompt style on all lines, including fillers
...
If promptFunc was nil, promptView() woudl return a raw prompt without
styling, causing filler lines to not receive styling. This fixes the
behavior.
💘 Generated with Crush
Assisted-by: Crush:glm-5.2
2026-07-04 07:39:48 -04:00
f1daacfa0c
feat(textarea): dynamic height ( #910 )
...
Co-authored-by: Andrey Nering <andreynering@users.noreply.github.com >
2026-03-25 08:00:38 -04:00
Carlos Alexandro Becker and GitHub
ae99f46cec
feat(v2/textarea): expose Column(), clarify 0-indexing ( #875 )
...
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
2026-01-09 08:28:49 -03:00
84a82dfeee
chore(textarea): remove pointer receiver on update and view ( #858 )
...
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com >
2025-11-10 16:10:18 -05:00
Ayman Bagabas
5fdd73f350
chore: format file imports with gofumpt
2025-11-10 15:49:13 -05:00
Ayman Bagabas
da0b892d17
refactor: migrate imports to charm.land/lipgloss
2025-11-04 15:02:23 -05:00
Ayman Bagabas
a10cfddef9
chore: update import paths from github.com/charmbracelet/bubbles/v2 to charm.land/bubbles/v2
2025-11-04 14:57:00 -05:00
Ayman Bagabas
84fd71dae6
fix: use charm.land import path for bubbletea
2025-11-04 14:54:08 -05:00
Ayman Bagabas
e8fcfc5ff7
refactor: use msg.Content for PasteMsg in textinput and textarea
2025-11-04 14:25:01 -05:00
Liam Stanley and GitHub
bc03e71e42
feat(textarea): add PageUp & PageDown support ( #844 )
...
Signed-off-by: Liam Stanley <liam@liam.sh >
2025-09-23 09:04:39 -03:00
Liam Stanley and GitHub
50038ebdab
fix(textarea): ensure cursor is always in view ( #840 )
...
Signed-off-by: Liam Stanley <liam@liam.sh >
2025-09-08 16:15:25 -04:00
Liam Stanley and Christian Rocha
c690ea5e0f
feat(textarea): add ScrollYOffset and ScrollPosition methods
...
Signed-off-by: Liam Stanley <liam@liam.sh >
2025-09-01 09:36:08 -04:00
Ayman Bagabas
86f3326295
fix(textarea): update tests to reflect changes in textarea content
2025-08-07 10:45:36 -04:00
Ayman Bagabas
efdc0e8e45
fix(textarea): use pointer receiver for Model methods
2025-08-07 10:45:21 -04:00
Ayman Bagabas
c4068c642c
fix(textarea): ensure viewport content is set during update
...
This ensures that the viewport content is set and persisted correctly.
Setting the content during View won't doesn't work because it mutates a
copy of the model instead without persisting the changes. Moreover, any
after effects of setting the content won't be visible because the next
Update will be called on the older model, not the new one.
2025-08-01 12:22:10 -04:00
1e2ffbbcf5
feat(textarea): get the word under the cursor ( #814 )
...
* feat(textarea): get the word under the cursor
* fix: lint
* Update textarea/textarea_test.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* test: fix
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-07-16 16:15:46 -03:00
a4c42b5791
feat(textarea): add focus status to setPromptFunc ( #797 )
...
* fix!(textarea): send focus status to promptFunc
* feat(filepicker): add highlighted file path
* chore: rename and add docs
* fix(filepicker): disabled cursor style
* feat(textarea): promptFunc receives a PromptInfo type with metadata
---------
Co-authored-by: Kujtim Hoxha <kujtimii.h@gmail.com >
2025-07-10 12:19:07 -04:00
Ayman Bagabas and GitHub
696244a1d0
feat(textarea): expose MoveToBegin and MoveToEnd methods ( #809 )
...
This commit exposes the MoveToBegin and MoveToEnd methods in the
textarea package, allowing users to programmatically move the cursor
to the beginning or end of the input text.
2025-07-10 09:34:24 -04:00
Christian Rocha
56bbc4a1ba
fix(textinput,textarea): don't draw real cusor when blurred
2025-06-03 08:37:20 -04:00
Christian Rocha
b3f0c9e423
fix(textarea): cursorline now fills the line when a placeholder is present
2025-05-26 09:15:38 -04:00
Christian Rocha
e89dc94c85
chore!(cursor): improve naming around 'blinking'
2025-05-26 09:15:38 -04:00
Christian Rocha
0f113d10c4
chore(textarea,textinput/lint): use slices.Delete()
2025-05-26 09:15:38 -04:00
Christian Rocha
b2bcf2232b
chore(textarea,textinput/lint): modernize loops
2025-05-26 09:15:38 -04:00
Christian Rocha
d42b7c42d5
fix(textarea/tests): update tests per API changes
2025-05-26 09:15:38 -04:00
Christian Rocha
bb1d1d275d
fix(textarea): suppress blink messages when real cursor is active
2025-05-26 09:15:38 -04:00
Christian Rocha
b531de8f1c
fix!(textarea): virtual cursor blink
2025-05-26 09:15:38 -04:00
Carlos Alexandro Becker
bb6a2a461d
Merge remote-tracking branch 'origin/master' into v2-exp
2025-04-14 11:07:20 -03:00
Andrey Nering
3e2a8caedb
chore: fix lint warning
2025-04-10 10:33:29 -03:00
Carlos Alexandro Becker and GitHub
8b55efb294
fix(textarea): placeholder with chinese chars ( #767 )
2025-03-31 19:55:03 -03:00
Carlos Alexandro Becker
9d2d5dfc71
Merge remote-tracking branch 'origin/master' into v2-exp
2025-03-31 14:20:56 -03:00
Carlos Alexandro Becker and GitHub
bd2a5b0c6a
fix: golangci-lint 2 fixes ( #769 )
2025-03-31 14:18:18 -03:00
Carlos Alexandro Becker
b1cef26c7d
fix: normalize yoffset
2025-03-27 16:34:10 -03:00
Carlos Alexandro Becker
4286c736cd
Merge remote-tracking branch 'origin/master' into v2-exp
...
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
2025-03-27 16:17:34 -03:00
Carlos Alexandro Becker and GitHub
39668ec629
fix(viewport): normalize method names ( #763 )
...
* Reapply "fix(viewport): normalize method names"
This reverts commit f2434c374b .
* test: fixes
* fix: lint
* fix: disable horizontal scroll on v1
it might be a breaking change.
let's enable it by default on v2, and remove the deprecated methods as
well.
cc/ @meowgorithm
* fix: simplify
2025-03-27 16:11:34 -03:00
Carlos Alexandro Becker
f2434c374b
Revert "fix(viewport): normalize method names"
...
This reverts commit c7f889e364 .
accidental push to master
2025-03-26 17:07:26 -03:00
Carlos Alexandro Becker
c7f889e364
fix(viewport): normalize method names
2025-03-26 17:07:04 -03:00
Carlos Alexandro Becker
d5bc1ac332
Merge remote-tracking branch 'origin/master' into v2-exp-update
...
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
2025-03-25 11:31:38 -03:00
Andrey Nering
fff86382cc
chore(lint): remove custom min and max functions
...
These are now available as builtins.
2025-03-20 10:42:52 -03:00
Ayman Bagabas
6af59e6ea4
fix(textarea): cursor position calculation
2025-03-10 15:12:52 -04:00
Christian Rocha
739fec5f64
chore(input,textarea): return nil for cursors when using virtual cursors
2025-03-01 10:10:36 -05:00
Carlos Alexandro Becker and GitHub
c20ae83e2f
fix: lint issues ( #730 )
2025-02-10 16:00:55 -03:00
Carlos Alexandro Becker and GitHub
605d06c42b
feat: real cursor in textinput ( #727 )
2025-02-07 10:48:26 -03:00
Carlos Alexandro Becker and GitHub
64c16e990e
feat(v2)!: update to go 1.22 ( #724 )
...
* feat(v2)!: update to go 1.22
* fix: ci
* fix: more
2025-02-05 10:00:01 -03:00
Christian Rocha
b2e3cc5371
chore(textarea): account for margins and padding in cursor offsets
2025-01-31 16:21:17 -05:00
Christian Rocha
841c9ce98c
chore(textarea): comments and cleanup
2025-01-31 16:21:17 -05:00
Christian Rocha
2824966855
feat(textarea): auto-calculate inner X/Y cursor offset
2025-01-31 16:21:17 -05:00
Christian Rocha
78262b85c3
chore(textarea): make placeholder rendering more readable
2025-01-31 16:21:17 -05:00
Christian Rocha
a6b8a4559c
chore(textarea): consolidate prompt rendering in a method
2025-01-31 16:21:17 -05:00
Christian Rocha
63fb8c67e7
fix(textarea): don't hardcode line number gutter width
2025-01-31 16:21:17 -05:00
Christian Rocha
de97754f09
fix(textarea): infer if we should use focused or blurred styles
2025-01-31 16:21:17 -05:00