Cleanup and fix selection section cursor position bug

This commit is contained in:
2023-05-19 19:29:37 +01:00
parent 03b793802f
commit 17c79e7cee
6 changed files with 35 additions and 37 deletions
+3 -1
View File
@@ -12,6 +12,7 @@ module Dodge.Render.List (
listCursorChooseBorderScale,
) where
import Dodge.SelectionSections
import Data.Maybe
import Dodge.Base.Window
import Dodge.Data.CardinalPoint
@@ -85,7 +86,8 @@ stackPicturesAtOff i = mconcat . zipWith (drawListElement 10 1 0) [i, i -1 ..]
selSecDrawCursor :: Int -> ListDisplayParams -> SelectionSections a -> Picture
selSecDrawCursor xsize ldp sss = fromMaybe mempty $ do
(i, j) <- sss ^? sssExtra . sssSelPos . _Just
yint <- sss ^? sssSections . ix i . ssCursor . _Just . scurPos
--yint <- sss ^? sssSections . ix i . ssCursor . _Just . scurPos
yint <- selSecYint i j sss
xint <- sss ^? sssSections . ix i . ssIndent
si <- sss ^? sssSections . ix i . ssItems . ix j
return $