summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/curses/curses.c3
-rw-r--r--ext/curses/hello.rb4
-rw-r--r--ext/curses/view.rb1
3 files changed, 6 insertions, 2 deletions
diff --git a/ext/curses/curses.c b/ext/curses/curses.c
index c502d3faf61..89ed2966a02 100644
--- a/ext/curses/curses.c
+++ b/ext/curses/curses.c
@@ -423,7 +423,8 @@ window_close(obj)
struct windata *winp;
GetWINDOW(obj, winp);
- free_window(winp);
+ delwin(winp->window);
+ winp->window = 0;
return Qnil;
}
diff --git a/ext/curses/hello.rb b/ext/curses/hello.rb
index bed7779aac4..a1915ce60d0 100644
--- a/ext/curses/hello.rb
+++ b/ext/curses/hello.rb
@@ -10,6 +10,7 @@ def show_message(message)
win.box(?|, ?=)
win.setpos(2, 3)
win.addstr(message)
+ win.refresh
win.getch
win.close
end
@@ -18,8 +19,9 @@ init_screen
begin
crmode
# show_message("Hit any key")
- setpos (lines - 5) / 2, (cols - 10) / 2
+ setpos((lines - 5) / 2, (cols - 10) / 2)
addstr("Hit any key")
+ refresh
getch
show_message("Hello, World!")
refresh
diff --git a/ext/curses/view.rb b/ext/curses/view.rb
index e59a74ed448..5ba1a8413c4 100644
--- a/ext/curses/view.rb
+++ b/ext/curses/view.rb
@@ -43,6 +43,7 @@ while TRUE
addstr(data_lines[lptr + i]) #if data_lines[lptr + i]
i += 1
end
+ refresh
explicit = FALSE
n = 0