Only position cursor when FileBrowser is actually focused

This commit is contained in:
Mario Lang 2020-12-05 19:16:09 +01:00
parent b0500f3bd6
commit fc22b3439f

View File

@ -734,7 +734,7 @@ renderFileInfo foc maxLen selFiles n listSel info =
addAttr = maybe id (withDefAttr . attrForFileType) (fileInfoFileType info) addAttr = maybe id (withDefAttr . attrForFileType) (fileInfoFileType info)
body = addAttr (hLimit (maxLen + 1) $ body = addAttr (hLimit (maxLen + 1) $
padRight Max $ padRight Max $
(if listSel then showCursor n (Location (0,0)) else id) $ (if foc && listSel then showCursor n (Location (0,0)) else id) $
str $ fileInfoSanitizedFilename info <> suffix) str $ fileInfoSanitizedFilename info <> suffix)
suffix = (if fileInfoFileType info == Just Directory then "/" else "") <> suffix = (if fileInfoFileType info == Just Directory then "/" else "") <>
(if sel then "*" else "") (if sel then "*" else "")