How do I paste text from the clipboard into the console editors without breaking the formatting? #13592

Closed
opened 2026-01-31 03:46:51 +00:00 by claunia · 14 comments
Owner

Originally created by @237dmitry on GitHub (Apr 22, 2021).

The insertion of text breaks the formatting. When are you fix the problem? 2.0, 3.0, or never?

excessive flaming

Instead of solving actual problems, you are implementing new dubious functionality. And most importantly - you absolutely do not want to listen to issues.

I'm already mute about the support of the mouse in third-party applications, it's probably beyond the universe. Why are there no such problems in other console emulators, which, by the way, also use the standard Windows Console Host? Look at ConEmu, Alacritty, etc.

Originally created by @237dmitry on GitHub (Apr 22, 2021). The insertion of text breaks the formatting. When are you fix the problem? 2.0, 3.0, or never? <details> <summary>excessive flaming</summary> Instead of solving actual problems, you are implementing new dubious functionality. And most importantly - you absolutely do not want to listen to issues. I'm already mute about the support of the mouse in third-party applications, it's probably beyond the universe. Why are there no such problems in other console emulators, which, by the way, also use the standard Windows Console Host? Look at ConEmu, Alacritty, etc. </details>
claunia added the Issue-BugNeeds-Tag-FixNeeds-Author-FeedbackProduct-Terminal labels 2026-01-31 03:46:52 +00:00
Author
Owner

@DHowett commented on GitHub (Apr 22, 2021):

If you're here for an actual discussion I am going to insist on an attitude adjustment. However, if you're going to continue to spread your ill intent on this repository, please leave and do not come back.

We want to listen to issues. I would love for you to point out the specific issue you're having. We support bracketed paste so that pasted content doesn't get corrupted, and you can bind copy/paste however you please.

You have not been muted about mouse support. I gave you an issue in which you can COMMENT and SUBSCRIBE FOR STATUS UPDATES. That issue, #376, was updated as recently as TWO DAYS AGO. Is that not priority enough for your liking?

Here's the list of issues you've filed:

image

Not one of those is related to pasting. Trust I have read them all.

@DHowett commented on GitHub (Apr 22, 2021): If you're here for an actual discussion I am going to insist on an attitude adjustment. However, if you're going to continue to spread your ill intent on this repository, please leave and do not come back. We want to listen to issues. I would _love_ for you to point out the specific issue you're having. We support bracketed paste so that pasted content doesn't get corrupted, and you can bind copy/paste however you please. You have not been muted about mouse support. I gave you an issue in which you can COMMENT and SUBSCRIBE FOR STATUS UPDATES. That issue, #376, was updated as recently as TWO DAYS AGO. Is that not priority enough for your liking? Here's the list of issues you've filed: ![image](https://user-images.githubusercontent.com/189190/115766005-0e343f80-a36d-11eb-8dc2-71e14421c436.png) Not one of those is related to pasting. Trust I have read them all.
Author
Owner

@DHowett commented on GitHub (Apr 22, 2021):

Needs must for me to remind you that we fixed (and serviced the fixes for) 75 bugs in version 1.8. I'm terribly sorry that they weren't bugs you cared about and were instead bugs that other community members filed. To be frank, we couldn't find any bugs that you filed that were worth investigating.

@DHowett commented on GitHub (Apr 22, 2021): Needs must for me to remind you that we fixed (and serviced the fixes for) 75 bugs in version 1.8. I'm _terribly_ sorry that they weren't bugs you cared about and were instead bugs that other community members filed. To be frank, we couldn't _find_ any bugs that you filed that were worth investigating.
Author
Owner

@237dmitry commented on GitHub (Apr 22, 2021):

My question is WHEN? I can't paste from clipboard symbol, for example [char]57526 to Far Editor (Far -e file), ^V did not past., if I insert formatted text, all spaces increase by a multiple of their number. And so on.

You suggest that I read old, very old issues. And what good is it to me if you don't solve them? I wait for every minor release in the hope that something will change for the better, but everything seems to be empty. But instead, you add, in my opinion, a completely unnecessary GUI for editing the profile, which also breaks the formatting of settings.json. Why is this even necessary?

Make the third-party apps work normally. And don't close the issue, it's not nice of you, be honest with the users.

@237dmitry commented on GitHub (Apr 22, 2021): My question is WHEN? I can't paste from clipboard symbol, for example `[char]57526` to Far Editor (`Far -e file`), `^V` did not past., if I insert formatted text, all spaces increase by a multiple of their number. And so on. You suggest that I read old, very old issues. And what good is it to me if you don't solve them? I wait for every minor release in the hope that something will change for the better, but everything seems to be empty. But instead, you add, in my opinion, a completely unnecessary GUI for editing the profile, which also breaks the formatting of `settings.json`. Why is this even necessary? Make the third-party apps work normally. And don't close the issue, it's not nice of you, be honest with the users.
Author
Owner

@DHowett commented on GitHub (Apr 22, 2021):

I can't answer your question of, "when?". I'm directing you to the live, active place where we are discussing things like mouse mode so you can make your opinion heard and follow the status of the project. It's not about hiding what we're doing or being dishonest: it's about getting everyone on the same page so we can move forward instead of arguing about stuff.

Why did we add a settings editor? It might not be useful in your opinion, but there are more than a million Terminal users. A settings UI was the top most requested feature for all 18 releases (0.2 to 1.6). It's probably the most visible and highly-requested work we've done apart from writing Terminal itself.

We do not exist to serve any one specific member of the community; we exist to serve them all in eggregate. Sorry that it seems like we're not prioritizing your specific quality-of-life issues.

To your actual complaint:

I was not able to reproduce this issue. I used the Paste key bindings, ctrl+v, ctrl+shift+v and right-click:

image

Bindings:

        {"command":"paste", "keys":"ctrl+v"},
        {"command":"paste", "keys":"ctrl+shift+v"},

I cannot reproduce a spacing issue, either. I don't know where to behgin?

Can you share a screen recording?

@DHowett commented on GitHub (Apr 22, 2021): I can't answer your question of, "when?". I'm directing you to the live, active place where we are discussing things like mouse mode so you can make your opinion heard and follow the status of the project. It's not about hiding what we're doing or being dishonest: it's about getting everyone on the same page so we can move _forward_ instead of arguing about stuff. Why did we add a settings editor? It might not be useful _in your opinion_, but there are more than a million Terminal users. A settings UI was the top most requested feature for all 18 releases (0.2 to 1.6). It's probably the most visible and highly-requested work we've done apart from writing Terminal itself. We do not exist to serve any one specific member of the community; we exist to serve them all in eggregate. Sorry that it seems like we're not prioritizing your specific quality-of-life issues. To your actual complaint: I was not able to reproduce this issue. I used the Paste key bindings, ctrl+v, ctrl+shift+v and right-click: ![image](https://user-images.githubusercontent.com/189190/115775129-134abc00-a378-11eb-9f48-b39e36d40882.png) Bindings: ```json {"command":"paste", "keys":"ctrl+v"}, {"command":"paste", "keys":"ctrl+shift+v"}, ``` I cannot reproduce a spacing issue, either. I don't know where to behgin? Can you share a screen recording?
Author
Owner

@237dmitry commented on GitHub (Apr 22, 2021):

Can you share a screen recording?

I can't record. Just screenshots. In the first one I am copying text and in the second pasting in editor.
This behavior is not only in Far but in micro (editor) the same. This is a small text, but in a large pasting text pasted with animation and with increasing whitespaces before string.
The dots in editor are the whitespaces.

copy
past

@237dmitry commented on GitHub (Apr 22, 2021): > Can you share a screen recording? I can't record. Just screenshots. In the first one I am copying text and in the second pasting in editor. This behavior is not only in Far but in micro (editor) the same. This is a small text, but in a large pasting text pasted with animation and with increasing whitespaces before string. The dots in editor are the whitespaces. ![copy](https://user-images.githubusercontent.com/78153320/115782511-6c404180-a3c4-11eb-9528-9d09b83850af.png) ![past](https://user-images.githubusercontent.com/78153320/115782533-7104f580-a3c4-11eb-8538-e268fd330b4e.png)
Author
Owner

@DHowett commented on GitHub (Apr 22, 2021):

Ah, I understand what's happening. When you copy that text, it contains the leading spaces (we cannot delete them -- users become very upset when we delete them!). When you paste, the editor is not aware that it is pasting, and it receives the leading spaces. Its autoindent feature kicks in, preserving the initial indent from the first line.

This is a common problem:

This is one of the problems "bracketed paste mode" is supposed to solve. It is something that the application, or the user configuration, will need to add support for. OTHERWISE, There is no standard way to tell the application that the content is coming from the clipboard. It looks to the application like the user simply typed the content in.

This is a difficult one to fix because it requires application-specific work. Even if we can fix it for some applications, we cannot fix it for all applications unless they support bracketed paste mode.

@DHowett commented on GitHub (Apr 22, 2021): Ah, I understand what's happening. When you copy that text, it contains the leading spaces (we cannot delete them -- users become very upset when we delete them!). When you paste, the editor is not aware that it is pasting, and it receives the leading spaces. Its autoindent feature kicks in, preserving the initial indent from the first line. This is a common problem: * [Turning off auto-indent when pasting text into vim](https://stackoverflow.com/questions/2514445/turning-off-auto-indent-when-pasting-text-into-vim) * [How to paste into emacs --no-window-system without auto-indent?](https://askubuntu.com/questions/670773/how-to-paste-into-emacs-no-window-system-without-auto-indent) This is one of the problems "[bracketed paste mode]" is supposed to solve. It is something that the application, or the user configuration, will need to add support for. **OTHERWISE**, There is no standard way to tell the application that the content is coming from the clipboard. It looks to the application like the user simply typed the content in. This is a difficult one to fix because it requires application-specific work. Even if we can fix it for _some_ applications, we cannot fix it for all applications unless they support [bracketed paste mode]. [bracketed paste mode]: https://cirw.in/blog/bracketed-paste
Author
Owner

@237dmitry commented on GitHub (Apr 22, 2021):

This is a difficult one to fix

It's pitty a news. Other console emulators have not such a problem. And mouse working.... I'm sorry, I'm just sick of it. Why one man could to write the perfect Tilix but not to do the same the whole Microsoft?

@237dmitry commented on GitHub (Apr 22, 2021): > This is a difficult one to fix It's pitty a news. Other console emulators have not such a problem. And mouse working.... I'm sorry, I'm just sick of it. Why one man could to write the perfect Tilix but not to do the same the whole Microsoft?
Author
Owner

@skyline75489 commented on GitHub (Apr 23, 2021):

Well, if you want the technical details: the console subsystem on Windows is dramatically different from the one on Linux. Traditional console programming on Windows relies on Win32 APIs. On Linux console programming relies on string handling(VT). To better support both kinds of applications, the entire console subsystem on Windows was moved to the new ConPTY infrastructure. In conclusion, there a lot more compatibility issues on Windows than on Linux, due to the legacy Win32 console support.

Also Tilix depends on VTE, which has I think more than decades of history. So i would not really call it “written by one person”. And we can not just use VTE, due to licensing issue. It’s not a perfect world. I get it. But we just have to live with it.

@skyline75489 commented on GitHub (Apr 23, 2021): Well, if you want the technical details: the console subsystem on Windows is dramatically different from the one on Linux. Traditional console programming on Windows relies on Win32 APIs. On Linux console programming relies on string handling(VT). To better support both kinds of applications, the entire console subsystem on Windows was moved to the new ConPTY infrastructure. In conclusion, there a lot more compatibility issues on Windows than on Linux, due to the legacy Win32 console support. Also Tilix depends on VTE, which has I think more than decades of history. So i would not really call it “written by one person”. And we can not just use VTE, due to licensing issue. It’s not a perfect world. I get it. But we just have to live with it.
Author
Owner

@skyline75489 commented on GitHub (Apr 23, 2021):

You mentioned ConEmu. I love ConEmu and use it myself on older systems where Windows Terminal can’t be used. It’s a fantastic product. We actually reuse some of the ConEmu sequences inside Windows Terminal. And the author of ConEmu sometimes gets involved in discussions in the terminal repo, to make sure we are going to the right direction. To quote Dustin’s word, we never want Terminal to be the only choice on Windows. If you like ConEmu more just use it at your free will.

by the way, also use the standard Windows Console Host

This is technically inaccurate but I will not bother you with the details. We want to see good terminals on Windows. We all do. But do realize that developing the terminal is a slower process that developing a third-party terminal like ConEmu, because some of the code will be merged back to Windows which will potentially influence millions of Windows users. If you’re living in a world where people just fulfill your needs (for free) at the risk of sabotaging millions of other people, then I’m ok with it.

Also need I remind you that ConEmu itself has I think over a decade of history. Writing software is hard. Writing code for Windows is even harder. You don’t see the author of other terminal authors dissing Windows Terminal because we all know how hard it is. If you want to contribute to the process by reporting issues, we welcome you. Please don’t just spread hatred words, which solves nothing.

@skyline75489 commented on GitHub (Apr 23, 2021): You mentioned ConEmu. I love ConEmu and use it myself on older systems where Windows Terminal can’t be used. It’s a fantastic product. We actually reuse some of the ConEmu sequences inside Windows Terminal. And the author of ConEmu sometimes gets involved in discussions in the terminal repo, to make sure we are going to the right direction. To quote Dustin’s word, we never want Terminal to be the only choice on Windows. If you like ConEmu more just use it at your free will. > by the way, also use the standard Windows Console Host This is technically inaccurate but I will not bother you with the details. We want to see good terminals on Windows. We all do. But do realize that developing the terminal is a slower process that developing a third-party terminal like ConEmu, because some of the code will be merged back to Windows which will potentially influence millions of Windows users. If you’re living in a world where people just fulfill your needs (for free) at the risk of sabotaging millions of other people, then I’m ok with it. Also need I remind you that ConEmu itself has I think over a decade of history. Writing software is hard. Writing code for Windows is even harder. You don’t see the author of other terminal authors dissing Windows Terminal because we all know how hard it is. If you want to contribute to the process by reporting issues, we welcome you. Please don’t just spread hatred words, which solves nothing.
Author
Owner

@zadjii-msft commented on GitHub (Apr 23, 2021):

For the record, bracketed paste (#395) should be working in Windows Terminal as of v1.7.572.0 (see #9034). What version of micro are you using? Is is a Windows exe or one you're using with a WSL distro?

We'd love to be able to help diagnose this issue, but engaging in a flamewar isn't gonna get anywhere with us.

@zadjii-msft commented on GitHub (Apr 23, 2021): For the record, bracketed paste (#395) should be working in Windows Terminal as of `v1.7.572.0` (see #9034). What version of `micro` are you using? Is is a Windows exe or one you're using with a WSL distro? We'd love to be able to help diagnose this issue, but engaging in a flamewar isn't gonna get anywhere with us.
Author
Owner

@ghost commented on GitHub (Apr 27, 2021):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Apr 27, 2021): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@SuperSandro2000 commented on GitHub (Nov 3, 2021):

I have bracketed paste mode working in vim with Konsole and the following snippet:

" bracketed paste
if &term =~? 'xterm-256color'
  let &t_BE = "\e[?2004h"
  let &t_BD = "\e[?2004l"
  exec "set t_PS=\e[200~"
  exec "set t_PE=\e[201~"
endif

What do I need to change that this works under the latest Windows Terminal Preview? My TERM is set xterm-256color and removing the condition does also not work.

@SuperSandro2000 commented on GitHub (Nov 3, 2021): I have bracketed paste mode working in vim with Konsole and the following snippet: ```vimL " bracketed paste if &term =~? 'xterm-256color' let &t_BE = "\e[?2004h" let &t_BD = "\e[?2004l" exec "set t_PS=\e[200~" exec "set t_PE=\e[201~" endif ``` What do I need to change that this works under the latest Windows Terminal Preview? My TERM is set ``xterm-256color`` and removing the condition does also not work.
Author
Owner

@DHowett commented on GitHub (Nov 3, 2021):

@SuperSandro2000 That mostly depends on what version of vim you're using, what OS it's running on (Linux via WSL? Windows? Linux?) and how you're communicating with it (SSH?).

@DHowett commented on GitHub (Nov 3, 2021): @SuperSandro2000 That mostly depends on what version of vim you're using, what OS it's running on (Linux via WSL? Windows? Linux?) and how you're communicating with it (SSH?).
Author
Owner

@SuperSandro2000 commented on GitHub (Nov 3, 2021):

Running that on WSL2 on Windows 10.

$ vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 21 2021 08:39:53)
Included patches: 1-2434, 3402-3403, 3409, 3428
....
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 21.10
Release:        21.10
Codename:       impish

Not connected via ssh but in a tmux. I tried it without tmux and that did not work better.

@SuperSandro2000 commented on GitHub (Nov 3, 2021): Running that on WSL2 on Windows 10. ```ShellSession $ vim --version VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 21 2021 08:39:53) Included patches: 1-2434, 3402-3403, 3409, 3428 .... ``` ```ShellSession $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 21.10 Release: 21.10 Codename: impish ``` Not connected via ssh but in a tmux. I tried it without tmux and that did not work better.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13592