clear doesn't clear the scrollback buffer (putty/kitty terminal)

The “clear” command stdout is “ESC[3j[b]ESC[H[b]ESC[2J”
If I use “printf ‘\033[3J’” the scrollback cache [i]is cleared.

$TERM = xterm

If I call “clear && clear” it works

Using KiTTY (fork of pUTTY)

How to fix this?

It works if I use:
printf ‘\033**[2J[/b]\033[H\033[3J
instead of
printf ‘\033**[3J[/b]\033[H\033[2J
clear is using the later and it doesn’t clear the buffer :frowning:

Is it a bug in clear or my config?****

Disable ‘Push erased text into scrollback’ option.****

IT WORKS :slight_smile: :slight_smile: