File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -136,3 +136,7 @@ func (self *ListContextTrait) IsItemVisible(item types.HasUrn) bool {
136136func (self * ListContextTrait ) RangeSelectEnabled () bool {
137137 return true
138138}
139+
140+ func (self * ListContextTrait ) RenderOnlyVisibleLines () bool {
141+ return self .renderOnlyVisibleLines
142+ }
Original file line number Diff line number Diff line change @@ -53,13 +53,19 @@ func (self *ListController) HandleScrollRight() error {
5353func (self * ListController ) HandleScrollUp () error {
5454 scrollHeight := self .c .UserConfig .Gui .ScrollHeight
5555 self .context .GetViewTrait ().ScrollUp (scrollHeight )
56+ if self .context .RenderOnlyVisibleLines () {
57+ return self .context .HandleRender ()
58+ }
5659
5760 return nil
5861}
5962
6063func (self * ListController ) HandleScrollDown () error {
6164 scrollHeight := self .c .UserConfig .Gui .ScrollHeight
6265 self .context .GetViewTrait ().ScrollDown (scrollHeight )
66+ if self .context .RenderOnlyVisibleLines () {
67+ return self .context .HandleRender ()
68+ }
6369
6470 return nil
6571}
Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ type IListContext interface {
153153 FocusLine ()
154154 IsListContext () // used for type switch
155155 RangeSelectEnabled () bool
156+ RenderOnlyVisibleLines () bool
156157}
157158
158159type IPatchExplorerContext interface {
You can’t perform that action at this time.
0 commit comments