Commit edbb81c
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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 933f181.
* Reapply "wip"
This reverts commit 0e3e31b.
* 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 <[email protected]>
* chore: x/ansi update
Signed-off-by: Carlos Alexandro Becker <[email protected]>
* fix: typos, godocs
Signed-off-by: Carlos Alexandro Becker <[email protected]>
* fix: rename
Signed-off-by: Carlos Alexandro Becker <[email protected]>
* fix: typo
* fix: scroll when soft-wrapping
* fix: soft wrap adjustments
* fix: update
Signed-off-by: Carlos Alexandro Becker <[email protected]>
* fix: deps
Signed-off-by: Carlos Alexandro Becker <[email protected]>
---------
Signed-off-by: Carlos Alexandro Becker <[email protected]>
Co-authored-by: Roman Suvorov <[email protected]>
Co-authored-by: Roman Suvorov <[email protected]>
Co-authored-by: Christian Rocha <[email protected]>1 parent b2e3cc5 commit edbb81c
File tree
5 files changed
+646
-56
lines changed- viewport
5 files changed
+646
-56
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
34 | 32 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
19 | 12 | | |
20 | 13 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
27 | 20 | | |
28 | 21 | | |
29 | | - | |
30 | | - | |
| 22 | + | |
| 23 | + | |
31 | 24 | | |
32 | 25 | | |
33 | | - | |
34 | | - | |
35 | 26 | | |
36 | 27 | | |
37 | 28 | | |
| |||
40 | 31 | | |
41 | 32 | | |
42 | 33 | | |
| 34 | + | |
43 | 35 | | |
44 | 36 | | |
45 | 37 | | |
46 | 38 | | |
| 39 | + | |
47 | 40 | | |
48 | 41 | | |
49 | 42 | | |
| |||
56 | 49 | | |
57 | 50 | | |
58 | 51 | | |
59 | | - | |
60 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
0 commit comments