MCPcopy
hub / github.com/jesseduffield/lazygit / wrapPatchLines

Function wrapPatchLines

pkg/gui/patch_exploring/state.go:426–430  ·  view source on GitHub ↗
(diff string, view *gocui.View)

Source from the content-addressed store, hash-verified

424}
425
426func wrapPatchLines(diff string, view *gocui.View) ([]int, []int) {
427 _, viewLineIndices, patchLineIndices := utils.WrapViewLinesToWidth(
428 view.Wrap, view.Editable, strings.TrimSuffix(diff, "\n"), view.InnerWidth(), view.TabWidth)
429 return viewLineIndices, patchLineIndices
430}
431
432func (s *State) SelectNextStageableLineOfSameIncludedState(includedLines []int, included bool) {
433 _, lastLineIdx := s.SelectedPatchRange()

Callers 2

NewStateFunction · 0.85
OnViewWidthChangedMethod · 0.85

Calls 2

WrapViewLinesToWidthFunction · 0.92
InnerWidthMethod · 0.80

Tested by

no test coverage detected