octave-patch-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-patch-tracker] [patch #8532] Use conventional signaling to modif


From: Dan Sebald
Subject: [Octave-patch-tracker] [patch #8532] Use conventional signaling to modify Readline term size rather than callback.
Date: Thu, 18 Sep 2014 22:07:24 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15

Follow-up Comment #6, patch #8532 (project octave):

OK, I guess I should have been a little more descriptive about exactly the
problem is.  Or I should say "was", because the oldcol!=_columns code is gone
and the width now behaves properly.

It's subtle.  What PN describes is the behavior of the GUI's terminal window,
but I was referring to Octave's internal output format.  The callback (and the
SIGWICH) are meant to indicate to the core that the terminal size has changed,
e.g., it is no longer 80 characters wide.  The internal formatter uses the new
size to determine how many columns of a matrix can be printed on one line.

It's hard to illustrate with examples when there is no window, but if one
would have shrunk the terminal window to the minimum columns, exit, then
relaunch, the output would look something like:


>> pi*ones(10)
ans =

 Columns 1 through 7:

   3.1416   3.1416   3.1416   3.1
416   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416   3.1
416   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416   3.1
416   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416   3.1
416   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416   3.1
416   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416   3.1
416   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416   3.1
416   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416   3.1
416   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416   3.1
416   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416   3.1
416   3.1416   3.1416   3.1416

 Columns 8 through 10:

   3.1416   3.1416   3.1416


Resizing would correct the appearance as (*after another print out*):


>> pi*ones(10)
ans =

 Columns 1 through 3:

   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416

 Columns 4 through 6:

   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416
   3.1416   3.1416   3.1416


Well, it's been corrected now, and the internal Octave format line width is
correct.

I still prefer using SIGWICH.  That's the mechanism that other terminal
emulators use (e.g., Gnome Terminal).

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8532>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]