在这个论坛中已经显示gitk使用本机OS密钥来复制/粘贴例如SHA1 ID行:请参阅
unable to copy and paste in gitk – macosx和
How to copy text in gitk
我的问题是为什么这个功能不出现在编辑下的菜单项中?
是否有一些障碍能够做到这一点?
另请参阅此参考,以便在答案中更好地概述gitk:
Guide to understanding gitk?
最佳答案 关于Tk和其他应用程序之间的复制/粘贴支持,这个
wiki page总结了它:
Q9. When I copy from a Tcl/Tk app on OS X, then quit that app, the text I copied doesn’t appear in the system-wide paste buffer.
I need to switch focus to something else while the Tk app is still running for cross-app copy/paste to work as expected. I’m using Tcl/Tk 8.10 on Leopard, though I had the same problem with 8.7 on Tiger. Any way around this?A9. SLB: I cannot answer specifically for OS X but a similar problem occurs on Windows.
I did investigate that and found that Windows provides two methods for storing information in the clipboard:
- you can copy the textinto the clipboard or
- you can store in the clipboard a reference to the application holding the text.
The latter is more efficient when the amount of text is very large but means the information is lost when the application terminates.
This is the only form of copy offered by Tk.
Resolving it would require a TIP to extend clipboard support in Tk.
因此,在应用程序和Tk应用程序之间复制/粘贴可能现在不容易……
原始答案:
今天全天都在使用gitk,我可以看到即使在gitk的左下方面板上也没有“焦点”,其中显示了内容的差异.
即单击该面板不会触发其他面板的任何内容.
换句话说,gitk GUI不监视该面板中的鼠标单击/选择事件,并且只有本机剪贴板功能适用于该面板.
“编辑”菜单似乎不能反映任何复制/粘贴条目,因为gitk不会监视这些选择事件.
实际上,“编辑”仅用于编辑首选项.