Simplify code
`a += b` instead of `a = a + b`.
This commit is contained in:
parent
09296c0214
commit
1fa41a3796
@ -198,7 +198,7 @@ func (vm *FileTreeViewModel) CursorLeft(filterRegex *regexp.Regexp) error {
|
||||
}
|
||||
|
||||
if vm.bufferIndex > moveIndex {
|
||||
vm.bufferIndex = vm.bufferIndex - moveIndex
|
||||
vm.bufferIndex -= moveIndex
|
||||
} else {
|
||||
vm.bufferIndex = 0
|
||||
}
|
||||
@ -258,7 +258,7 @@ func (vm *FileTreeViewModel) PageDown() error {
|
||||
vm.bufferIndex = 0
|
||||
vm.TreeIndex = nextBufferIndexLowerBound
|
||||
} else {
|
||||
vm.bufferIndex = vm.bufferIndex - newLines
|
||||
vm.bufferIndex -= newLines
|
||||
}
|
||||
|
||||
return nil
|
||||
@ -284,7 +284,7 @@ func (vm *FileTreeViewModel) PageUp() error {
|
||||
vm.bufferIndex = 0
|
||||
vm.TreeIndex = nextBufferIndexLowerBound
|
||||
} else {
|
||||
vm.bufferIndex = vm.bufferIndex + newLines
|
||||
vm.bufferIndex += newLines
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user