diff options
author | tv <tv@shackspace.de> | 2014-12-27 23:25:03 +0100 |
---|---|---|
committer | tv <tv@shackspace.de> | 2014-12-27 23:25:03 +0100 |
commit | 98facf82ff30e56b14367c3c303dd553daa1d48d (patch) | |
tree | 5503557849cf335c92a3c9876f8c2f8844a968b4 /test4.hs | |
parent | 6b9ed1ce38f82f69950dcf1dc8474b47470fd18f (diff) |
kill ghosts after EOF, vi-style
Diffstat (limited to 'test4.hs')
-rw-r--r-- | test4.hs | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -110,11 +110,16 @@ redraw _q@State{..} = do -- consumes 1 screenHeight putStr $ "\ESC[2K" ++ flashMessage ++ " " ++ show (screenWidth, screenHeight) + + let buf = map (take screenWidth . drop xoffset) $ + take (screenHeight - 1) $ + drop yoffset $ + renderTreeView (Z.label cursor) (Z.toTree cursor) + mapM_ (putStr . ("\n\ESC[2K"++)) $ - map (take screenWidth . drop xoffset) $ - take (screenHeight - 1) $ - drop yoffset $ - renderTreeView (Z.label cursor) (Z.toTree cursor) + buf + ++ + take (screenHeight - 1 - length buf) (repeat "~") |