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

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

[Octave-bug-tracker] [bug #39722] history list adds extraneous carriage


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #39722] history list adds extraneous carriage return when recalling commands
Date: Thu, 08 Aug 2013 01:27:40 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15

Follow-up Comment #1, bug #39722 (project octave):

I think I see how these newline characters arose.  When copying many items in
the list, there are no carriage returns between lines.  However, the approach
of always adding a newline character isn't quite correct.  It is better to add
newline characters only between the valid lines.  The attached patch generally
does that.

Test all the circumstances.  Select a block of commands in the history and
right click "Create script".  You'll see lines in the editor with the last
line not having a carriage return.  Select a block of commands and right click
"Copy" and then past that in the editor and paste that in the command-line
window.  There will again be carriage returns appropriately between commands,
but the last command will not be executed until typing return.  I think I like
that behavior in the editor... and probably in the command window too.  I'm
not too concerned if that aspect of it is changed.  Double clicking on a
single line of text in the history window correctly issues a command without
the extra spaces.

There is a bug, however.  I think that another reason someone introduced the
carriage return sent to Octave core is that somewhere along the way lines of
text are being lost in the "emit" of the signal/slot communication.  The extra
carriage return may have made that situation happier, but I think we should
address that bug in a better way.  I will create a separate bug report.

(file #28790)
    _______________________________________________________

Additional Item Attachment:

File name: octave-history_buffer_action-2013aug07.patch Size:3 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?39722>

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




reply via email to

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