Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Newly created gvim window not focused, existing gvim window is focused instead

未關閉
#1,156 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
macos, vim

研究方向

首先,在 macOS 11.1 上使用終端機 gvim 命令重現焦點問題,尤其要測試使用多個顯示器和桌面的情況,並將行為與 issue #83 進行比較。當新建立的 gvim 視窗能夠始終取得焦點,而不是既有的 gvim 視窗時,這項工作就完成了。

由索引模型根據 Issue 內容生成。

描述

Describe the bug
When creating a new gvim window via terminal gvim command, sometimes the new pop-up window doesn't gain focus, instead, the pre-existing gvim window is focused. This causes minor annoyance because user would intuitively think he/she is typing into the new window without checking.

I suspect it has something to do with multi-monitor environment and each monitor has a separate desktop number. Sometimes I typed gvim in the terminal and the new gvim window was opened in another monitor. And in that case often the wrong window was focused. Maybe macvim will focus window instance on the desktop with lowest index number?

Not sure if this is related to #83.

I didn't find out the pattern to reliably reproduce the behavior yet.

To Reproduce
Detailed steps to reproduce the behavior:

  1. Open a terminal.
  2. Type gvim.
  3. A new gvim instance popped up.
  4. But the original gvim instance is focused.

Expected behavior
The new gvim instance is focused.

Environment (please complete the following information):

  • Vim version: 8.2.2164
  • OS: macOS 11.1
  • Terminal: iTerm2
主要語言
Vim Script
星號
7.9k
分支
691
PR 合併指標
30 天內沒有已合併 PR

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

macvim-dev/macvim 的其他 Issue

查看 macvim-dev/macvim 的全部 Issue

相似的 Issue

更多 Desktop Dev Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。