Carlos Alexandro Becker and GitHub
54f28b6501
fix(filepicker): properly scrolling filepicker ( #753 )
...
* fix(filepicker): properly scrolling filepicker
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
* fix: SetHeight
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
2025-03-20 14:00:29 -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
Andrey Nering
76433f7143
ci: fix linting on windows
2025-03-20 10:42:52 -03:00
Andrey Nering
976d9a1108
chore(go.mod): update to go 1.23
2025-03-20 10:42:52 -03:00
Andrey Nering
06824cb77d
chore: add taskfile
2025-03-20 10:42:52 -03:00
Carlos Alexandro Becker
bd20b89a3e
fix(viewport): remove LineNumbersGutter
...
closes #738
2025-03-18 10:22:16 -03:00
Carlos Alexandro Becker
71493456d9
Merge remote-tracking branch 'origin/master' into v2-exp
2025-03-13 16:55:11 -03:00
Ayman Bagabas
59511a71e0
fix(textinput): account for width when calculating cursor position
2025-03-10 15:18:55 -04:00
Ayman Bagabas
6af59e6ea4
fix(textarea): cursor position calculation
2025-03-10 15:12:52 -04:00
Michał Kotowski and Christian Rocha
cdc743f1f4
chore(links): switch bubbletea links to use main
...
Cosmetic change.
Old links used `master` as the main branch. Resulting in GitHub
redirecting to the correct default branch and displaying:
> Branch not found, redirected to default branch.
Signed-off-by: Michał Kotowski <dev@mkotowski.dev >
2025-03-05 06:57:17 -05:00
Christian Rocha
739fec5f64
chore(input,textarea): return nil for cursors when using virtual cursors
2025-03-01 10:10:36 -05:00
Charm and GitHub
7a6b190840
ci: sync dependabot config ( #736 )
2025-02-13 11:29:08 -03:00
Charm and GitHub
2f4944346f
ci: sync dependabot config ( #734 )
2025-02-13 10:58:35 -03:00
Carlos Alexandro Becker and GitHub
4491afa808
feat(viewport): SetLines ( #728 )
2025-02-11 14:07:51 -03:00
Carlos Alexandro Becker and GitHub
c20ae83e2f
fix: lint issues ( #730 )
2025-02-10 16:00:55 -03:00
Andrey Nering
c5b76847ca
chore(go.mod): update github.com/charmbracelet/x/exp/golden
2025-02-07 13:13:47 -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
Ayman Bagabas
a7783a1a58
chore: go mod tidy
2025-02-04 14:45:04 -05:00
Ayman Bagabas and GitHub
3961136a13
fix(viewport): handle nil LeftGutterFunc ( #723 )
...
Since LeftGutterFunc is public, it can be nil if viewport is
instantiated without using `viewport.New()`. This commit adds nil
checks to handle this case.
2025-02-04 16:26:33 -03:00
Ayman Bagabas
3b1b9248be
fix(table): crlf on windows
2025-02-04 13:27:29 -05:00
Ayman Bagabas
061e464a70
refactor!: restore bubbletea model interface
2025-02-04 13:01:13 -05:00
edbb81c136
feat(viewport)!: gutter column, soft wrap, search highlight ( #697 )
...
* horizontal scroll
* rebase branch
* add tests
* add tests with 2 cells symbols
* trimLeft, move to charmbracelete/x/ansi lib
* up ansi package
* Update viewport/viewport.go
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
* fix: do not navigate out to the right
* fix: cache line width on setcontent
* fix tests
* fix viewport tests
* add test for preventing right overscroll
* chore(viewport): increase horizontal step to 6
* chore(viewport): make horizontal scroll API better match vertical scroll API
* fix: nolint
* fix: use ansi.Cut
* perf: do not cut anything if not needed
* feat: expose HorizontalScrollPercent
* fix: do not scroll if width is 0
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
* fix: visible lines take frame into account
* feat(viewport): column sign
* feat: gutter, soft wrap
* wip: search
* wip: search
* wip: search
* fix: perf
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
* fix: rename
* wip
* wip
* refactor: viewport highlight ranges
* fix: ligloss update
* doc: godoc
* feat: fill height optional
* fix: handle no content
* fix: empty lines
* wip
* wip
* Revert "wip"
This reverts commit 933f181e88405c21d65a08b816a88030806ca03e.
* Reapply "wip"
This reverts commit 0e3e31b70f53d93250a1474547cc5157d50e9237.
* fix: wide
* fix: wide, find
* still not quite there
* fix: grapheme width
* fix: cleanups
* fix: refactors, improves highlight visibility
* docs: godoc
* chore: lipgloss update
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
* chore: x/ansi update
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
* fix: typos, godocs
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
* fix: rename
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
* fix: typo
* fix: scroll when soft-wrapping
* fix: soft wrap adjustments
* fix: update
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
* fix: deps
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: Roman Suvorov <suvorov83@gmail.com >
Co-authored-by: Roman Suvorov <tty2.rs@gmail.com >
Co-authored-by: Christian Rocha <christian@rocha.is >
2025-02-04 13:15:40 -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
Christian Rocha
24016e6ce4
chore(textarea): consolidate line number rendering into a method
2025-01-31 16:21:17 -05:00
Christian Rocha
ad8e4bf480
chore(textarea): improve comments, note ares that need attention
2025-01-31 16:21:17 -05:00
Christian Rocha
1fd9c2666a
chore(textarea,cursor): simplify cursor API
2025-01-31 16:21:17 -05:00
Christian Rocha
eb985a2f81
chore(textarea): improve cursor styling API
2025-01-31 16:21:17 -05:00
Christian Rocha
0e5ff3c5c3
chore(textarea): rename Model.SetCursor to Model.SetCursorColumn
...
Set.CursorColumn sets the cursor column position. This change was made
for clarity.
2025-01-31 16:21:17 -05:00
Christian Rocha and Ayman Bagabas
58b94b31e8
fix(textarea): doc comment typo
...
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com >
2025-01-31 16:21:17 -05:00
Christian Rocha and Ayman Bagabas
0b3c0a2653
fix(textarea): doc comment
...
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com >
2025-01-31 16:21:17 -05:00
Christian Rocha
7cdd5f37fe
chore(textarea,cursor): use textarea to manage virtual cursor styling
2025-01-31 16:21:17 -05:00
Christian Rocha
9d5d140b3c
chore(textarea,cursor): flesh out real cursor API
2025-01-31 16:21:17 -05:00
Ayman Bagabas and GitHub
a0d9fe396d
refactor: progress: return Model instead of tea.Model ( #719 )
...
This conforms to the new generic bubbletea API.
See https://github.com/charmbracelet/bubbletea/pull/1298
2025-01-29 15:59:11 -05:00
Christian Rocha
421843b83b
chore(merge): branch 'master' into v2-exp
2025-01-28 09:31:01 -05:00
Pierre Rossi and Christian Rocha
0f9e38c9a7
Don't render suggestions when textinput is not focused.
...
This can look confusing in forms otherwise.
2025-01-28 09:24:43 -05:00
518ff7d0d0
feat(textarea): add Cursor method ( #712 )
...
* feat(textarea): add CursorPosition method
This returns the current cursor position accounting any soft-wrapped
lines and multi-rune characters.
* chore(textarea): redefine how real cursor properties are accessed (#714 )
---------
Co-authored-by: Christian Rocha <christian@rocha.is >
2025-01-23 16:37:07 -05:00
1bdd4c6fb3
fix: stopwatch.Start() ( #707 )
...
Signed-off-by: Bence Vidosits <bence.vidosits1@ibm.com >
Co-authored-by: Bence Vidosits <bence.vidosits1@ibm.com >
2025-01-22 09:10:20 -03:00
Carlos Alexandro Becker and GitHub
7ab08fb438
fix(viewport): scroll to last line when borders ( #706 )
...
If the viewport has borders, they are not currently taken into account
when calculating the viewport max y offset, which might cause the last
line to not be visible.
This is easily reproducible in `gum pager`.
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
2025-01-21 19:31:03 -03:00
bashbunni and GitHub
e3ce11a65f
docs: update charm & friends blurb ( #703 )
...
* docs: update charm & friends blurb
* docs: simplify messaging, link to instructions
2025-01-17 12:48:08 -08:00
87a4e45a58
docs: additional bubbles ( #583 )
...
* docs: additional bubbles
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
* Update README.md
Co-authored-by: bashbunni <15822994+bashbunni@users.noreply.github.com >
* Update README.md
Co-authored-by: Christian Rocha <christian@rocha.is >
* Update README.md
Co-authored-by: Christian Rocha <christian@rocha.is >
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
Co-authored-by: bashbunni <15822994+bashbunni@users.noreply.github.com >
Co-authored-by: Christian Rocha <christian@rocha.is >
2025-01-17 12:32:41 -08:00
Carlos Alexandro Becker
0c83e6f4c8
chore(deps): update
...
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
2025-01-15 12:25:09 -03:00
Carlos Alexandro Becker
fbe642df17
chore(deps): update
2025-01-14 15:34:37 -03:00
Carlos Alexandro Becker
3487634e4d
chore(deps): update ansi
...
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
2025-01-14 14:26:31 -03:00