Use common v0.8.0 UI, transport, and translation APIs
This commit is contained in:
1 parent
317303adb7
commit
92fd479336
344 files changed
+4102
-4973
No files matched your search
@@ -13,7 +13,7 @@ type Region struct {
|
||||
ToLineEnd bool
|
||||
}
|
||||
|
||||
func (r Region) Right_edge(cols int) int {
|
||||
func (r Region) RightEdge(cols int) int {
|
||||
if r.ToLineEnd {
|
||||
return cols - 1
|
||||
}
|
||||
@@ -21,11 +21,11 @@ func (r Region) Right_edge(cols int) int {
|
||||
}
|
||||
|
||||
func (r Region) Contains(x, y, cols int) bool {
|
||||
return x >= r.Left && x <= r.Right_edge(cols) && y >= r.Top && y <= r.Bottom
|
||||
return x >= r.Left && x <= r.RightEdge(cols) && y >= r.Top && y <= r.Bottom
|
||||
}
|
||||
|
||||
func (r Region) Text(s Snapshot) string {
|
||||
right := r.Right_edge(s.Cols)
|
||||
right := r.RightEdge(s.Cols)
|
||||
if r.Left > right || r.Top >= s.Rows {
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
// rows fixed. Suppress the longest contiguous shifted overlap, while leaving
|
||||
// every other changed row available for normal feedback. Partial overlaps
|
||||
// require two nonblank rows: a lone repeated label or a blank area is ambiguous.
|
||||
func Scrolled_overlap(previous, next Snapshot) (bestStart, bestEnd int) {
|
||||
func ScrolledOverlap(previous, next Snapshot) (bestStart, bestEnd int) {
|
||||
// Match a whole-screen scroll first, including sparse screens. Ignore
|
||||
// whitespace-only overlaps, which cannot establish that anything scrolled.
|
||||
firstText := slices.IndexFunc(next.Cells, func(cell rune) bool { return !unicode.IsSpace(cell) })
|
||||
|
||||
Reference in new issue
Block a user