;ui: cleanup (#1359)

This commit is contained in:
Simon Michael 2020-09-29 17:02:09 -07:00
parent 9dad59b0cc
commit f2b9ac2af1

View File

@ -87,7 +87,7 @@ editFileAtPositionCommand mpos f = do
editor = lowercase $ takeBaseName $ headDef "" $ words' cmd editor = lowercase $ takeBaseName $ headDef "" $ words' cmd
f' = singleQuoteIfNeeded f f' = singleQuoteIfNeeded f
ml = show.fst <$> mpos ml = show.fst <$> mpos
mc = maybe Nothing (fmap show.snd) mpos :: Maybe String mc = maybe Nothing (fmap show.snd) mpos
args = case editor of args = case editor of
e | e `elem` ["emacs", "emacsclient"] -> ['+' : join ":" [ml,mc], f'] e | e `elem` ["emacs", "emacsclient"] -> ['+' : join ":" [ml,mc], f']
e | e `elem` ["nano"] -> ['+' : join "," [ml,mc], f'] e | e `elem` ["nano"] -> ['+' : join "," [ml,mc], f']