diff src/input.cc @ 9483:25c2e92ee03c

correctly skip frame assigned to keyboard function
author John W. Eaton <jwe@octave.org>
date Tue, 04 Aug 2009 12:59:16 -0400
parents fb22dd5d6242
children bbe033dcfe13
line wrap: on
line diff
--- a/src/input.cc	Tue Aug 04 11:54:15 2009 +0200
+++ b/src/input.cc	Tue Aug 04 12:59:16 2009 -0400
@@ -940,7 +940,15 @@
 
   if (nargin == 0 || nargin == 1)
     {
+      unwind_protect::add_fcn (octave_call_stack::restore_frame, 
+			       octave_call_stack::current_frame ());
+
+      // Skip the frame assigned to the keyboard function.
+      octave_call_stack::goto_frame_relative (0, true);
+
       do_keyboard (args);
+
+      unwind_protect::run ();
     }
   else
     print_usage ();