Mercurial > hg > octave-nkf
changeset 5673:0dc67016832b
[project @ 2006-03-16 03:08:58 by jwe]
author | jwe |
---|---|
date | Thu, 16 Mar 2006 03:08:58 +0000 |
parents | 62734ddaf17b |
children | 86adc85cc471 |
files | src/ChangeLog src/pager.cc |
diffstat | 2 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2006-03-15 John W. Eaton <jwe@octave.org> + * pager.cc (Fterminal_size): New function. + * help.cc (help_from_info): Simplify. (try_info): Use feval to call doc instead of executing info program. (additional_help_message): Point users to doc instead of help -i.
--- a/src/pager.cc +++ b/src/pager.cc @@ -504,6 +504,21 @@ return retval; } +DEFUN (terminal_size, , , + "-*- texinfo -*-\n\ +@deftypefn {Built-in Function} {} terminal_size ()\n\ +Return a two-element row vector containing the current size of the\n\ +terminal window in characters (rows and columns).\n\ +@end deftypefn") +{ + RowVector size (2, 0.0); + + size(0) = command_editor::terminal_rows (); + size(1) = command_editor::terminal_cols (); + + return octave_value (size); +} + static std::string default_pager (void) {