Ayman Bagabas
93a004ab70
fix(viewport): optimize subline splitting by skipping lines without line endings
2025-12-08 12:18:59 -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
Liam Stanley and GitHub
7445f97348
refactor(viewport): softwrap; improve perf; various bug fixes ( #823 )
2025-09-12 13:24:49 -04:00
Andrey Nering
04ec518a95
chore: run modernize
2025-05-30 17:20:01 -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
38200076b7
Merge branch 'UnseenBook/master' into v2-exp
2025-03-28 14:02:13 -03:00
Unseen Daan and GitHub
ea344ab907
feat(viewport): horizontal scroll with mouse wheel ( #761 )
...
Add support for the events of a horizontal mouse wheel and when holding
shift while using the regular mouse wheel now scrolls the screen left
and right.
2025-03-28 13:59:12 -03:00
Daan Schoone
a0a432e11d
feat(viewport): horizontal scroll with mouse wheel
...
Add support for the events of a horizontal mouse wheel and when holding
shift while using the regular mouse wheel now scrolls the screen left
and right.
2025-03-28 10:18:17 +01:00
6f4a536421
Update viewport/viewport.go
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-03-27 16:51:54 -03:00
Carlos Alexandro Becker
b1cef26c7d
fix: normalize yoffset
2025-03-27 16:34:10 -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
acc929c43e
fix: lint
...
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
2025-03-25 13:42:02 -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
Carlos Alexandro Becker
bd20b89a3e
fix(viewport): remove LineNumbersGutter
...
closes #738
2025-03-18 10:22:16 -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
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 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
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
421843b83b
chore(merge): branch 'master' into v2-exp
2025-01-28 09:31:01 -05: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
Carlos Alexandro Becker
fbe642df17
chore(deps): update
2025-01-14 15:34:37 -03:00
Carlos Alexandro Becker
f28e78e6ab
Merge remote-tracking branch 'origin/master' into v2-exp
2025-01-14 14:22:36 -03:00
2d53a618a9
feat(viewport): horizontal scroll ( #240 )
...
* 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
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
Co-authored-by: Christian Rocha <christian@rocha.is >
2025-01-10 08:38:48 -03:00
Ayman Bagabas
812f74ffff
chore: remove unused YPosition field from viewport.Model
2024-11-06 18:26:15 -05:00
Christian Rocha
52bd03ed5b
feat!(viewport): use getters and setters for width and height
2024-10-31 15:02:05 -04:00
Christian Rocha
3b879e7694
feat!(viewport): width and height are now optional args in New()
2024-10-31 15:02:05 -04:00
Ayman Bagabas
db64e3cd78
feat: update lipgloss to v2
2024-10-29 15:54:24 -04:00
Christian Rocha
57ac102802
chore(merge): branch 'master' into v2-mini-tidy
2024-10-24 15:22:16 -04:00
Christian Rocha
358a6c58c8
chore(lint): fix and suppress all soft lint issues; update directives
2024-10-24 12:35:42 -04:00
Ayman Bagabas
95541c2f51
refactor!: viewport: remove deprecated HighPerformanceRendering
...
This breaks the API and removes high performance rendering and its
related methods from the viewport package. It changes the API and
makes the methods return nothing instead of lines to render.
2024-09-19 13:42:02 -04:00
Ayman Bagabas
f81fd5246a
fix: spacebar keybinding is now "space" instead of a literal space
2024-09-18 14:55:49 -04:00
Ayman Bagabas
a2602f8509
feat!: v2: move to v2 module
2024-09-18 14:12:55 -04:00
Ayman Bagabas
0fdf5f5be5
feat: use bubbletea/v2
2024-09-18 14:09:58 -04:00
Ayman Bagabas
488bef7c13
Merge branch 'master' into v2-exp
2024-09-18 14:09:05 -04:00
Christian Rocha
2caa9d4bdf
chore(viewport): deprecate performance rendering stuff
2024-09-12 10:43:36 -04:00
Ayman Bagabas
8972b56c9d
feat!: make Init return the model
2024-09-10 14:04:36 -04:00
Ayman Bagabas
a93bfef532
feat!: use bubbletea@v2-exp
2024-09-09 14:12:52 -04:00
Ayman Bagabas and GitHub
11a9fccd58
chore: fix lint issues ( #534 )
2024-05-31 16:48:29 -04:00
Moritz Biering and Christian Rocha
961c081347
Fix division by zero in viewport scrollpercentage calculation
2024-03-11 09:32:23 -04:00
Ivan Valdes and Maas Lalani
1ba1200c31
fix(viewport): pad width to contentWidth
2024-01-08 11:43:20 -05:00
Ayman Bagabas
330dd3fa5d
feat: upgrade bubbletea and remove deprecated code
...
Supersedes: https://github.com/charmbracelet/bubbles/pull/447
2023-12-13 10:37:00 -08:00
Glenn Gonda and Christian Rocha
3d3ed883d3
docs: fix typos and improve comment clarity
2023-02-16 17:49:32 -05:00
Christian Rocha and GitHub
4a71cee5a1
fix(viewport): performance scrolling ( #312 )
...
* fix(viewport): performance scroll behavior for line up/down
* fix(viewport): performance scrolling in multi-line operations
2023-01-20 10:51:00 -05:00
Adam Bull and GitHub
fac7a01329
feat(viewport): line count getters ( #283 )
2022-11-07 10:05:03 -05:00