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 摘要。