git - 为什么gitk在编辑下没有复制/粘贴菜单项?

标签 git gitk

在这个论坛上已经表明,gitk 与 native 操作系统 key 一起工作,例如将复制/粘贴到 SHA1 ID 行中:请参阅 unable to copy and paste in gitk - macosxHow 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 不监视该面板中的鼠标单击/选择事件,它只应用 native 剪贴板功能。

'Edit' 菜单似乎没有反射(reflect)任何复制/粘贴条目,因为 gitk 不监视这些选择事件。
实际上,“Edit”仅用于编辑首选项。

关于git - 为什么gitk在编辑下没有复制/粘贴菜单项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5450762/

相关文章:

gitk:找不到命令

git - 我如何在 gitk 中提交 "unmark"?

git - 为什么我不能用 git push origin :branchname? 删除远程 git 分支

GitHub:同步失败

git - Composer 更新不 pull 最新的开发大师

git - 删除一个分支,包括它的提交

windows - 在 Windows 中 merge 为 gitk 中的 diff 工具

git - [git pull] 从哪里 pull ?

git - ansible:git 模块挂起

git - 如何修复 Gitk 错误 : Expected integer but got ""