WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Pasting to terminals  (Read 6170 times)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Pasting to terminals
« on: February 11, 2011, 07:58:10 AM »
[This thread split off from http://forum.tinycorelinux.net/index.php?topic=8650.msg46892#msg46892]

---snip---

An other thing about aterm makes me angry a lot: copy'n'paste over multiple lines copies the whole width's white spaces at the end of the line instead of just the new line char.

Such can be annoying indeed. In other cases, each line might be interpreted as a separate command, and falling back to prompt in between pasted lines can then happen.

However, I would be reluctant to blame aterm on such for more than one reason:

Upon
Code: [Select]
cat > testin an aterm and then pasting test (after having hit "Enter") and then ^C out, the pasted text seems to look verbatim in file.

Are there any terminal emulators known with a different behaviour?

I did some comparison with gpm on VTs and couldn't find any notible differences in behavior.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: Pasting to terminals
« Reply #1 on: February 11, 2011, 08:09:52 AM »
It often happens here when I snarf text from vi.
I can reproduce it, but not always. I'm still wondering where it might come from...

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Pasting to terminals
« Reply #2 on: February 11, 2011, 08:17:08 AM »
Quote
copy'n'paste over multiple lines copies the whole width's white spaces at the end of the line instead of just the new line char.

I don't know for sure, but I have always assumed, it is just the way it is displayed on the screen.

You will probably find, it is actually just copying the new line character, just that it is displayed that way so you know when you are including the new line character.
Many people see what is. Some people see what can be, and make a difference.

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: Pasting to terminals
« Reply #3 on: February 11, 2011, 08:28:12 AM »
I agree it's not aterm. It's probably vi's fault...
Guy, I don't think so. But I'm not sure I understood you correctly.

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Pasting to terminals
« Reply #4 on: February 11, 2011, 03:46:41 PM »
If you copy from the editor, or leafpad, the same thing happens. You can try other text editors.

If you change the width of the window, the space to the end of the line is highlighted, no matter how wide the window is.

As I said, I think it is just the way it is displayed on the screen.
Many people see what is. Some people see what can be, and make a difference.

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: Pasting to terminals
« Reply #5 on: February 11, 2011, 07:17:51 PM »
We don't seem to be talking about the same thing :D It seems now that what I experienced does only occur in vi. Like poodle hinted I can snarf from the Terminal after doing cat bla.txt, everything works as expected, whereas vi seems to print white spaces, filling the remaining width of each line.

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: Pasting to terminals
« Reply #6 on: February 11, 2011, 07:19:56 PM »
Such can be annoying indeed. In other cases, each line might be interpreted as a separate command, and falling back to prompt in between pasted lines can then happen.

Still not sure what you're seeing there, but pasting \n characters has the same effect as pressing the enter button on any Terminal I know.