Type CodeDiffSnapshot
type CodeDiffSnapshot struct {
Result CodeDiffResult
ID ui.ID
Label string
Hint string
Value string
Language string
Highlight func(language, line string, dst []CodeEditorRun) []CodeEditorRun
AddedColor ui.Color
RemovedColor ui.Color
Disabled bool
ReadOnly bool
Focused bool
ShowCaret bool
Caret int
SelectionStart int
SelectionEnd int
CompositionStart int
CompositionEnd int
VerticalScrollbarID ui.ID
HorizontalScrollbarID ui.ID
ViewportID ui.ID
}CodeDiffSnapshot describes an aligned two-pane source comparison. The left side is read-only. The right side reuses the caller's native editor state: Value, caret, selection and composition are UTF-8 byte offsets.