skogsbaer / hscurses

ncurses binding for Haskell
http://hackage.haskell.org/package/hscurses
GNU Lesser General Public License v2.1
61 stars 21 forks source link

cursSet CursorInvisible doesn't work in Mac OS X #3

Closed mcandre closed 12 years ago

mcandre commented 13 years ago

Summary:

Even with "cursSet CursorInvisible", the cursor displays where it last drew.

Example:

#!/usr/bin/env runhaskell

module Main where

import UI.HSCurses.Curses

drawGame :: IO ()
drawGame = do
    let rowStrings = replicate 3 "blah blah blah"

    wclear stdScr
    mapM (\row -> mvWAddStr stdScr row 0 (rowStrings !! row)) [0 .. 2]
    refresh

loopGame :: IO ()
loopGame = loopGame

main :: IO ()
main = do
    initCurses
    cBreak True
    cursSet CursorInvisible
    echo False
    nl False
    drawGame
    loopGame
    endWin

$ runhaskell blah.hs
blah blah blah
blah blah blah
blah blah blah[]

Specs:

hscurses 1.4.0.0 cabal 0.8.2 ghc 6.12.3 Mac OS X 10.6.6

skogsbaer commented 13 years ago

On my linux box, I don't see the cursor. Unfortunately, I do not have a mac where I could test it.

skogsbaer commented 12 years ago

Works for me on Mac OSX Lion with hscurses 1.4.1.2 and ncurses 5.9.20110404.