diff options
author | Alex Goodman <wagoodman@users.noreply.github.com> | 2019-07-21 15:48:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-21 15:48:25 -0400 |
commit | 68acfcdd64131693c198bb6a415c301b04f7d128 (patch) | |
tree | ad3da4cd0c09567d468ed79eed675eaa463a31a5 | |
parent | 3752d641ef8a6bb409e1e14e315d0432e4c3ac16 (diff) | |
parent | 1fa41a37965214d82161034898eff177dbd456d4 (diff) |
Merge pull request #206 from muesli/linter-fixes
Simplify code
-rw-r--r-- | ui/filetree_viewmodel.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/filetree_viewmodel.go b/ui/filetree_viewmodel.go index cabb5f7..641e71b 100644 --- a/ui/filetree_viewmodel.go +++ b/ui/filetree_viewmodel.go @@ -196,7 +196,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 } @@ -256,7 +256,7 @@ func (vm *FileTreeViewModel) PageDown() error { vm.bufferIndex = 0 vm.TreeIndex = nextBufferIndexLowerBound } else { - vm.bufferIndex = vm.bufferIndex - newLines + vm.bufferIndex -= newLines } return nil @@ -282,7 +282,7 @@ func (vm *FileTreeViewModel) PageUp() error { vm.bufferIndex = 0 vm.TreeIndex = nextBufferIndexLowerBound } else { - vm.bufferIndex = vm.bufferIndex + newLines + vm.bufferIndex += newLines } return nil } |