finalterm icon indicating copy to clipboard operation
finalterm copied to clipboard

Using clear command has a different behaviour than using Ctrl+L

Open Depado opened this issue 9 years ago • 11 comments

I really often clean my terminal, that's why I'm never using the 'clear' command, it's too long to type when you do this often. Instead I use Ctrl+L which behaviour is the same. Though on FinalTerm when using the clear command, everything is fine, but when using the shortcut, the prompt is cut half on its height.

I don't have time to check if that is an already reported issue. Please let me now if it is. Thanks for the great work anyway :)

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Depado avatar Aug 26 '14 08:08 Depado

or.. you know, alias c="clear" - then just C<RETURN> and you're done, no need for extra shortcut.

MightyPork avatar Aug 27 '14 14:08 MightyPork

That's not a shortcut that's a default behaviour of Bash and other shells. Look at this : http://www.howtogeek.com/howto/ubuntu/keyboard-shortcuts-for-bash-command-shell-for-ubuntu-debian-suse-redhat-linux-etc/ This keyboard shortcut is described as 'similar' to the clear command.
To me it's an issue because both ^L and clear should have the exact same effect.

Anyway I may be wrong when I say it is supposed to have the same effect because clear is part of the Unix operating system, and ^L is not actually a signal, it's just a hotkey set-up by bash. Though I guess it must call the clear command at some point.

According to man bash : clear-screen (C-l) Clear the screen leaving the current line at the top of the screen. With an argument, refresh the current line without clearing the screen.

Depado avatar Aug 29 '14 08:08 Depado

I cannot reproduce this problem. On my system, both clear and Ctrl+L work as expected. Can you give more detailed instructions for reproducing?

p-e-w avatar Sep 03 '14 17:09 p-e-w

The only difference I see is that there is an extra new-line when using the clear command instead of ctrl+L. The prompt seems to be the same height for me. Can you elaborate?

nashley avatar Sep 03 '14 18:09 nashley

Maybe it's because of Fish Shell.

Here is a video that shows what I'm talking about, both with bash and fish. kopasite.net/up/73197bb79t1qd62/issu.webm

Depado avatar Sep 04 '14 11:09 Depado

IIRC, bash is the only officially supported shell at this time. Also, I'm still not seeing the difference between ctrl+L and clear (sorry).

On September 4, 2014 7:03:51 AM EDT, Depado [email protected] wrote:

Maybe it's because of Fish Shell. Tried again, here is a gif for you to see. http://im.ezgif.com/tmp/video_to_gif_1409828453_f6379e99eb.webm.gif


Reply to this email directly or view it on GitHub: https://github.com/p-e-w/finalterm/issues/349#issuecomment-54453314

Sent from my Android device with K-9 Mail. Please excuse my brevity.

nashley avatar Sep 04 '14 11:09 nashley

Edited my answer, a gif was not appropriate I guess. http://kopasite.net/up/73197bb79t1qd62/issu.webm

Depado avatar Sep 04 '14 14:09 Depado

As @Vreality said, Final Term only supports bash at the moment and will also likely only support bash in its first release.

In bash, I cannot find a difference between Ctrl+L and clear.

p-e-w avatar Sep 06 '14 15:09 p-e-w

Must be my configuration then I guess. In the video I also show the issue using Bash. Thanks for the feedback anyway :)

Depado avatar Sep 08 '14 09:09 Depado

This issue occurs due to the vertical height being not a perfect multiple of the text line height. Terminator and gnome-terminal avoid this issue by restricting resizing to integer multiples of line height.

darioush avatar Sep 26 '14 05:09 darioush

I see. The reason why Final Term no longer has that restriction is that it doesn't work with GtkPaned, which would necessitate the implementation of a custom paning system (I believe that's what Terminator does).

p-e-w avatar Oct 14 '14 07:10 p-e-w