summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstk <stk@ableton.com>2023-02-15 21:19:46 +0100
committerstk <stk@ableton.com>2023-02-15 21:32:21 +0100
commit8cad8cda8fa742c7c2a6cf52848104cef3b4d7d4 (patch)
tree0112485b8b0ce2412a7587b3096d0bb8f5f19587
parent6b81e6adca1248c7a6cffc0e5567b37920133e27 (diff)
Don't bother setting view cursor pos for staging/stagingSecondary views
Now that the cursor highlight is never shown (see previous commit), there's no reason to update the cursor position any more.
-rw-r--r--pkg/gui/context/patch_explorer_context.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/pkg/gui/context/patch_explorer_context.go b/pkg/gui/context/patch_explorer_context.go
index 3e13b8539..b6bea2af3 100644
--- a/pkg/gui/context/patch_explorer_context.go
+++ b/pkg/gui/context/patch_explorer_context.go
@@ -100,12 +100,9 @@ func (self *PatchExplorerContext) focusSelection() {
bufferHeight := viewHeight - 1
_, origin := view.Origin()
- selectedLineIdx := state.GetSelectedLineIdx()
-
newOrigin := state.CalculateOrigin(origin, bufferHeight)
_ = view.SetOriginY(newOrigin)
- _ = view.SetCursor(0, selectedLineIdx-newOrigin)
}
func (self *PatchExplorerContext) GetContentToRender(isFocused bool) string {