summaryrefslogtreecommitdiffstats
path: root/pkg/gui/lbl/state.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/gui/lbl/state.go')
-rw-r--r--pkg/gui/lbl/state.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/gui/lbl/state.go b/pkg/gui/lbl/state.go
index 8ae828923..e8014fc1a 100644
--- a/pkg/gui/lbl/state.go
+++ b/pkg/gui/lbl/state.go
@@ -180,6 +180,11 @@ func (s *State) RenderForLineIndices(includedLineIndices []int) string {
return s.patchParser.Render(firstLineIdx, lastLineIdx, includedLineIndices)
}
+func (s *State) RenderSelected() string {
+ firstLineIdx, lastLineIdx := s.SelectedRange()
+ return s.patchParser.RenderLines(firstLineIdx, lastLineIdx)
+}
+
func (s *State) SelectBottom() {
s.SetLineSelectMode()
s.SelectLine(len(s.patchParser.PatchLines) - 1)