Tue 17 Feb 2015 02:43:31 AM UTC, comment #19:
I applied the patch to change the text to "Clear Window" here (http://hg.savannah.gnu.org/hgweb/octave/rev/94cc1bdaf884).
|
Sat 14 Feb 2015 07:35:23 PM UTC, comment #18:
Attached (trivial) changeset to change "Clear All" to "Clear Window"
(file #33076)
|
Fri 13 Feb 2015 07:42:36 PM UTC, comment #17:
Both are good, and better than "clear all", that can be misleading.
|
Fri 13 Feb 2015 05:43:27 PM UTC, comment #16:
What would be better for the context menu to say, "clear window" or "clear screen"? It's simple enough to fix.
|
Fri 13 Feb 2015 05:11:25 PM UTC, comment #15:
@Avinoam: That is the intended behavior. The action is in the Edit menu as "Clear Command Window" and in the command window context menu as "Clear All". If the wording of the menu item is unclear, that should be a separate bug report.
@jwe: Works perfectly for me.
|
Fri 13 Feb 2015 05:04:12 PM UTC, comment #14:
There is still a (minor) problem. The bottom is marked as "clear all", but it acts as "clc" and not as "clear all",
|
Thu 12 Feb 2015 07:37:32 PM UTC, comment #13:
I checked in two changesets. One to avoid having command_editor::interrupt result in an EOF for the parser and another to kill any pending input line when the screen is cleared with the GUI "clear command window" action.
http://hg.savannah.gnu.org/hgweb/octave/rev/f4af02a9a6fc
http://hg.savannah.gnu.org/hgweb/octave/rev/c048358da712
Closing report again as I think this is fixed.
|
Thu 12 Feb 2015 05:18:36 PM UTC, comment #12:
Using rl_kill_full_line (0, 0) before the call to command_editor::clear_screen works for me. Fow now, I'll fix it by wrapping this function in the command_editor class but I still think it would be good to have command_editor::interrupt work properly so that it doesn't result in the parser seeing EOF.
|
Thu 12 Feb 2015 03:56:59 PM UTC, comment #11:
Ok, I see. Keeping the current input line made more sense to me, but if it's Matlab compatible to clear it, so be it.
FWIW, I think rl_kill_text might be the right way to do it, but it's not wrapped by command_editor yet.
|
Thu 12 Feb 2015 11:49:22 AM UTC, comment #10:
The reason I used command_editor::interrupt was because Matlab apparently clears pending command input as well so that the command window is completely cleared except for the prompt and someone who was paying asked me to make Octave do the same. I know this feature worked at one time, and so if it is not crashing, I suspect the problem is that now when readline returns in this case, Octave sees it at EOF instead of "no command here, move along..."
Also, this shouldn't be the only place where we would have this trouble since I think command_editor::interrupt is also used in other callback functions.
I'll take a look at fixing this problem.
|
Thu 12 Feb 2015 07:06:26 AM UTC, comment #9:
Instead of trying to figure out why this sequence was causing the interpreter to exit, I fixed the callback to clear the command window using (I think) the proper readline function:
http://hg.savannah.gnu.org/hgweb/octave/rev/2e9f17872f36
|
Sat 17 Jan 2015 11:21:16 PM UTC, comment #8:
I can confirm that
is somehow being set to true, which means end-of-input to Octave and causes it to exit normally.
|
Fri 16 Jan 2015 10:42:12 PM UTC, comment #7:
Debugging is proving difficult because of the way Octave forks at the start and then also does an exec call in the child process. Maybe jwe needs to take a look at this. I did diff the file cmd-edit.cc between 3.8.2 and the development branch and I don't see anything that would obviously explain this.
|
Fri 16 Jan 2015 09:43:52 PM UTC, comment #6:
If I set the argument to command_editor::interrupt to false then the program does not crash. But it does wait for at least one character to be typed before the octave prompt is shown. The character doesn't need to be a <RETURN>. Any character will do.
|
Fri 16 Jan 2015 09:38:29 PM UTC, comment #5:
I just ran Octave under gdb and the sequence causes Octave to exit normally. I think that instead of interrupting Octave we are somehow giving it the command to terminate normally.
|
Fri 16 Jan 2015 09:07:52 PM UTC, comment #4:
In version 3.8.2 "clear all" in right click menu works well.
What has been changed?
|
Fri 16 Jan 2015 08:54:38 PM UTC, comment #3:
The GUI already calls the equivalent for clc (main-window.cc:1985):
When commenting out the line "command_editor::interrupt (true);", the program does not crash but a prompt is not showing up before the user hits "return". Any ideas what might happen here?
|
Fri 16 Jan 2015 04:58:11 AM UTC, comment #2:
This bug happens on the gui-release and development branches and on Linux as well as MXE-Octave. Changing title to reflect that
|
Fri 16 Jan 2015 01:21:02 AM UTC, comment #1:
Confirmed.
The GUI should be executing the equivalent of 'clc' to clear the screen and put the cursor in the home position.
|
Thu 15 Jan 2015 10:06:01 PM UTC, original submission:
When I use the mouse right click menu (copy/paste/sellect all/clear all), in MXE version, the "clear all" cause Octave to crash
|