kassio/neoterm

Tclear! doesn't work.

Closed this issue · 1 comments

Describe the bug
Doesn't clear terminal history when execute Tclear! command.

To Reproduce

  1. g:neoterm_clear_cmd is default value(["\<c-l>"]).
  2. Opend a neoterm with :Tnew. The terminal window height is 10.
  3. Added histories with :T cat tclear-test.txt.
  4. Excuted Tclear!.
  5. The cat tclear-text.txt output is supposed to be deleted, but visible it.

tclear-test.txt

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

The terminal before Tclear! is executed

Welcome to fish, the friendly interactive shell
vagrant@ubuntu-bionic ~/d/c/c/v/d/r/g/k/neoterm> cat tclear-test.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
vagrant@ubuntu-bionic ~/d/c/c/v/d/r/g/k/neoterm>

The terminal after Tclear! is executed

Welcome to fish, the friendly interactive shell
vagrant@ubuntu-bionic ~/d/c/c/v/d/r/g/k/neoterm> cat tclear-test.txt
1
2
3
4
5
6
7
8
9
10
11
vagrant@ubuntu-bionic ~/d/c/c/v/d/r/g/k/neoterm>

Expected behavior
The cat tclear-text.txt output is delete.

The termianl after the expected Tclear! execute

vagrant@ubuntu-bionic ~/d/c/c/v/d/r/g/k/neoterm>

Screenshots
None.

Versions (please complete the following information):

  • OS: Ubuntu 18.04 LTS
  • neoterm commit sha1 9d56a0c
  • Vim or Neovim
    • Vim
    • Neovim
  • Version: v0.4.3

Additional context
I think 0 is an invalid value for scrollback.

References

Thanks for the issue, it should be fixed now.