Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#1,156 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

macvim-dev/macvim のほかの issue

macvim-dev/macvim の issue をすべて見る

似ている issue

Desktop Dev の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。