27 lines
728 B
Go
27 lines
728 B
Go
// Copyright (c) 2026 Storm Dragon
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
package review
|
|
|
|
import (
|
|
"git.stormux.org/storm/fenrir/internal/presentation"
|
|
"git.stormux.org/storm/fenrir/internal/screen"
|
|
)
|
|
|
|
func (r *Review) Configure_attributes(format string) { r.attributeFormat = format }
|
|
|
|
func (r *Review) Attribute() (screen.Attribute, bool) {
|
|
if !r.ready || len(r.screen.Attributes) != len(r.screen.Cells) || len(r.screen.Attributes) == 0 {
|
|
return screen.Attribute{}, false
|
|
}
|
|
return r.screen.Attributes[r.y*r.screen.Cols+r.x], true
|
|
}
|
|
|
|
func (r *Review) attribute_cursor() string {
|
|
attribute, valid := r.Attribute()
|
|
if !valid {
|
|
return ""
|
|
}
|
|
return presentation.Format_attributes(attribute, r.attributeFormat)
|
|
}
|