Skip to content

Commit

Permalink
Add support for calling addnstr on a Window (waddnstr)
Browse files Browse the repository at this point in the history
  • Loading branch information
geolessel committed Aug 29, 2018
1 parent 71528b9 commit 439bb16
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ncurses/raw_window.cr
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,13 @@ module NCurses
end

def addstr(s)
check_error(LibNCurses.waddnstr(raw_win, s.to_unsafe, s.bytesize), "waddnstr")
addnstr(s, s.bytesize)
end

def addnstr(s, i : Int32)
check_error(LibNCurses.waddnstr(raw_win, s.to_unsafe, i), "waddnstr")
end

end

def mvaddstr(s, y, x)
Expand Down

0 comments on commit 439bb16

Please sign in to comment.