Mercurial > hg > octave-lojdl
changeset 10705:d500acdcf2dd
Remove extra newlines when displaying multi-dimensional arrays.
Fixes bug #30029.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Mon, 14 Jun 2010 19:53:19 -0700 |
parents | 0bcd17cad9d1 |
children | 6f34e781aed2 |
files | src/ChangeLog src/pr-output.cc |
diffstat | 2 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-06-14 Rik <octave@nomad.inbox5.com> + + * pr-output.cc: Remove extra newlines when displaying multi-dimensional + arrays (bug #30029). + 2010-06-14 Jaroslav Hajek <highegg@gmail.com> * data.cc (Fsort, Fnth_element): Fix behavior when trailing singleton
--- a/src/pr-output.cc +++ b/src/pr-output.cc @@ -1895,8 +1895,16 @@ octave_value page \ = MAT_T (Array<ELT_T> (nda.index (idx), nr, nc)); \ \ - page.print_with_name (os, nm); \ - \ + if (i < ndims - 2) \ + { \ + page.print_with_name (os, nm); \ + } \ + else \ + { \ + page.print_name_tag (os, nm); \ + page.print_raw(os); \ + } \ + \ if (i < m) \ NDA_T::increment_index (ra_idx, dims, 2); \ } \