Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Disappearing cursor with alias cls='printf "\033c"' in ~/.bashrc #797

Open
1 task
twifty opened this issue Oct 22, 2019 · 5 comments
Open
1 task

Disappearing cursor with alias cls='printf "\033c"' in ~/.bashrc #797

twifty opened this issue Oct 22, 2019 · 5 comments

Comments

@twifty
Copy link

twifty commented Oct 22, 2019

  • [x ] I have reset Atom to defaults prior to submitting report.
  • I have not reset Atom to defaults prior to submitting report.

Description

The terminal cursor disappears when entering the \033c character.

I have defined a bash alias in my ~/bashrc file as alias cls='printf "\033c"'. When I enter the command in ide-terminal, the screen is cleared correctly, but the blinking cursor disappears. The terminal however, continues to accept input and the cursor returns after executing the next command.

I am aware of the reset command, but this causes a noticable delay.

Steps to reproduce

  1. Add alias cls='printf "\033c"' to ~/.bashrc
  2. run reset in ide-terminal, to reload the above file
  3. run cls in ide-terminal

Expected behavior:
A blinking cursor

Actual behavior:
A missing cursor

Reproduces how often:
100%

Versions

> atom --version
Atom    : 1.40.1
Electron: 4.2.11
Chrome  : 69.0.3497.128
Node    : 10.11.0
> apm --version
apm  2.4.3
npm  6.12.0
node 12.11.1 x64
atom 1.40.1
python 2.7.16
git 2.23.0

OS name and version:
Manjaro KDE 18.1.1 kernel 5.3
Platformio-ide-terminal version: 2.9.4

Additional Information

@the-j0k3r
Copy link
Collaborator

the-j0k3r commented Oct 22, 2019

Hi @twifty and thanks or this report.

Your alias is clearing the screen completely which is meant to do that. Could you try to use \033[H\033[J instead of \033c just in case.

What we really need is #426 term.js is wildly buggy and not maintained, so need to be replaced in order to provide better compatibility with modern terminals across OS's.

@twifty
Copy link
Author

twifty commented Oct 22, 2019

\033[H\033[J only clears the visible screen, exactly the same as the clear command. It doesn't clear the scrollback buffer. Scrolling up will reveal the history.

I use the terminal to run makefiles, so I need to quickly scroll to the output start in order to see the first compiler error. I'll continue to use \033c for now, which clears everything. The presence of a cursor is not that important.

Next time you are working on this part of the code, would you add an option to not scroll to end of output.

@the-j0k3r
Copy link
Collaborator

Next time you are working on this part of the code, would you add an option to not scroll to end of output.

This project is community driven so its up to users to submit fixes and features.

\033[H\033[J only clears the visible screen, exactly the same as the clear command. It doesn't clear the scrollback buffer. Scrolling up will reveal the history.

Then you will have to put up with the issue until such time anyone who can fix the issue is also annoyed enough because of it and will just submit a PR. Who know when that will be,

We recently had a couple of contributions that closed old tickets, so who knows what will happen and when.

Thanks for understanding and thanks for filling in all issue template details.

@twifty
Copy link
Author

twifty commented Oct 23, 2019

Community driven? Well, when I get the time I'll look into fixing the issue.

@the-j0k3r
Copy link
Collaborator

the-j0k3r commented Oct 24, 2019

@twifty Yes, the project owner is minimally involved just merging and doing releases as they dont use the plugin anymore read #543 for further information. So its up to us. I deal with node-pty-prebuild-multiarch and the issue tracker + testing of PRs.

Best would be to fork really but definitely need some support from other community users who are proficient at coffescript and can replace old abandoned dependencies like term.js and fix bugs etc.

@the-j0k3r the-j0k3r changed the title Disappearing cursor Disappearing cursor with alias cls='printf "\033c"' in ~/.bashrc Oct 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants