This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 242439 - Terminal -- Clear preserves position of the prompt
Summary: Terminal -- Clear preserves position of the prompt
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Terminalemulator (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: ilia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-28 09:22 UTC by rherschke
Modified: 2016-08-19 17:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rherschke 2014-02-28 09:22:40 UTC
Product Version = NetBeans IDE 8.0 Beta (Build 201401141042)
Operating System = Mac OS X version 10.9.1 running on x86_64
Java; VM; Vendor = 1.7.0_45
Runtime = Java HotSpot(TM) 64-Bit Server VM 24.45-b08

Aspected behavior:

When clearing the terminal with it's context-menu-option "Clear"
Then the terminal is cleared/blanked and a new prompt starts from the first line of the terminal window

Current (wrong) behavior:

When clearing the terminal,
then the terminal is blanked, but the cursor stays at the exactly position it was before clearing the terminal. Next to this, the prompt is just shown, when hitting RETURN.


In addition to this, please provide a keyboard-binding for clearing the terminal as it is in the output window.
Comment 1 jaisondaniel 2015-08-22 09:08:11 UTC
I am facing the same issue in Cross Platform netbeans 8.1 beta.
Also if the terminal has scroll bar then if you do clear its not clearing the full terminal window, only the current view potion. and if you scroll you can see the old content.
Comment 2 jaisondaniel 2015-08-22 09:09:18 UTC
As facing the same issue in Linux with cross-platform binary. changed the hardware to All.
Comment 3 ilia 2015-08-27 10:51:05 UTC
Hi, 

> In addition to this, please provide a keyboard-binding for clearing the terminal as it is in the output window
You can assign shortcuts to all of the Terminal actions in Options.

As a workaround you can use a clear-screen shortcut of your shell. Ctrl+L in bash, for example.

$ bind -P | grep clear
clear-screen can be found on "\C-l".

> changed the hardware to All
It does affect all platforms, thanks.

It's not a P2, as it doesn't prevent users from completing their work in Terminal.
Comment 4 ivan 2016-08-18 05:00:20 UTC
changeset   : 299669:4617a6b98811
author      : ivan@netbeans.org
date        : Sat Aug 13 11:31:02 PDT 2016
summary     : 242439 - Terminal -- Clear preserves position of the prompt

        Fix is easy.
        Just have the Clear action call Term.clearHistory() instead of clear().

        User Visible Changes
        --------------------
        Clear action will clear history, selection and move cursor to 0,0.

        Added a Ctl-Shift-L accelerator for Clear. It can't be Ctl-L like
        it is in the regular output window because Ctrl-L might mean something
        to the application running in the terminal. Allother terminal
        accelerators are Ctl-Shift for the same reason.
Comment 5 ivan 2016-08-19 17:26:10 UTC
I had to back out CS-L because collab.ui is already using it.