microsoft/Terminal

Add ability to not automatically copy whitespace-only selections

Open

#11,751 建立於 2021年11月12日

在 GitHub 查看
 (6 留言) (4 反應) (0 負責人)C++ (3,212 fork)batch import
Area-TerminalControlHelp WantedIssue-TaskProduct-Terminal

倉庫指標

Star
 (35,764 star)
PR 合併指標
 (平均合併 27天 19小時) (30 天內合併 24 個 PR)

描述

Automatic copy to clipboard and clicking in the terminal window combine to overwrite the contents of the clipboard with some whitespace or a single character, far too often/easily.

I find myself, and I imagine others do as well, accidentally selecting something when clicking into the terminal to give it focus, which then wipes out whatever I had in the clipboard that I was about to paste. Window's clipboard history allows retrieval, at least, but it's a few extra steps.

I can think of couple possible solutions off-hand:

  • When both copyOnSelect is enabled, it would be wonderful to have an option to NOT automatically copy whitespace-only and/or single-character selections.
  • Just automatically, quietly, don't do white-space only or single-character selections within a short period of the terminal window gaining focus. Getting the exact conditions for this could be tricky; something like "within the first 0.5 seconds of gaining focus, and only the first click/drag (or touch), ignore it".

Either of these options (or something similar) should be basically invisible to the user, functioning to protect mistakes with minimal to no impact upon intentional actions, much like palm rejection in apps/systems does.

貢獻者指南