Skip to content

Commit a6001dc

Browse files
committed
Cleanup: rename a badly named function
We used the term "change line" to mean "a line that was added or deleted", but it sounded like a verb in the function name.
1 parent 9f23b89 commit a6001dc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/gui/controllers/patch_building_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func (self *PatchBuildingController) toggleSelection() error {
134134
state := self.context().GetState()
135135

136136
// Get added/deleted lines in the selected patch range
137-
lineIndicesToToggle := state.ChangeLinesInSelectedPatchRange()
137+
lineIndicesToToggle := state.LineIndicesOfAddedOrDeletedLinesInSelectedPatchRange()
138138
if len(lineIndicesToToggle) == 0 {
139139
// Only context lines or header lines selected, so nothing to do
140140
return nil

pkg/gui/patch_exploring/state.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ func (s *State) SelectedPatchRange() (int, int) {
335335
}
336336

337337
// Returns the line indices of the selected patch range that are changes (i.e. additions or deletions)
338-
func (s *State) ChangeLinesInSelectedPatchRange() []int {
338+
func (s *State) LineIndicesOfAddedOrDeletedLinesInSelectedPatchRange() []int {
339339
viewStart, viewEnd := s.SelectedViewRange()
340340
patchStart, patchEnd := s.patchLineIndices[viewStart], s.patchLineIndices[viewEnd]
341341
lines := s.patch.Lines()

0 commit comments

Comments
 (0)