From fc22b3439f4a7ce205c49a5a260a210623d0eb92 Mon Sep 17 00:00:00 2001 From: Mario Lang Date: Sat, 5 Dec 2020 19:16:09 +0100 Subject: [PATCH] Only position cursor when FileBrowser is actually focused --- src/Brick/Widgets/FileBrowser.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Brick/Widgets/FileBrowser.hs b/src/Brick/Widgets/FileBrowser.hs index 382c546..eb48580 100644 --- a/src/Brick/Widgets/FileBrowser.hs +++ b/src/Brick/Widgets/FileBrowser.hs @@ -734,7 +734,7 @@ renderFileInfo foc maxLen selFiles n listSel info = addAttr = maybe id (withDefAttr . attrForFileType) (fileInfoFileType info) body = addAttr (hLimit (maxLen + 1) $ 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) suffix = (if fileInfoFileType info == Just Directory then "/" else "") <> (if sel then "*" else "")