Using Cmd-C multiple times unexpectedly changes editor contents
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- macos, vim
- 領域
- desktop
調査の方向性
macOS 上で mvim --clean を使い、MacVim GUI における Cmd-C の連続実行時の挙動を再現し、terminal vim --clean と比較します。MacVim のネイティブなコピー処理を追跡し、後続のコピーによって現在の行が消去または変更される理由を特定します。Cmd-C を連続して実行してもエディタの内容が変わらなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
Steps to reproduce
- Open any file in the GUI via
gvim <file>or File > Open - Use your mouse to select some text in the editor (i.e. double-click on a word)
- Use Cmd-C to copy the highlighted text
- Use Cmd-C again - the line your cursor is on gets cleared (sort of like
d$from the start of the line) - Use Cmd-C again - now
<D-c>gets appended onto the line once for every time you type Cmd-C
Expected behaviour
I don't expect Cmd-C to alter the editor contents.
I've been using MacVim since 2017, and I've never run into this before, so I think it's a change from previous behavior. However, I can't figure out what is triggering it or why I've only recently started to see it. I apparently have a habit of sometimes copying the same text multiple times, and I've never before had to worry about lines getting deleted or <D-c> getting inserted into the file I'm editing. I still get the behavior I expect if I'm using vim from a MacOS terminal, which is how I realized I have this habit of using Cmd-C multiple times.
I've tested this behavior with multiple install methods: brew install macvim and brew install --cask macvim, plus manual install from GitHub releases using both MacVim.dmg and MacVim_10.9.dmg. I've also tested with multiple versions of MacVim going back to early 2023. I'm able to reproduce this behavior in all versions I've tried.
Since I've never seen this behavior before, I'm wondering whether something about my combination of hardware and OS might be the root cause. Prior to January of 2024, I was running Ventura on an older Intel Macbook, but now I'm running Sonoma on a new M3 Macbook. Maybe something is slightly different about the way the native Mac copy/paste actions are bound?
Behavior is roughly the same with gvim --clean as with my normal vimrc, although I do normally have set mouse="n" configured (a carryover from my Linux vimrc that has been in there since around 2003).
Version of Vim and architecture
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Jan 04 2024 03:00:35)
Environment
MacOS 14.3.1 (23D60) on a 16" M3 Macbook Pro from Nov 2023
How MacVim was installed
Originally Homebrew (brew install macvim), but behavior persists with other install methods
Logs and stack traces
No response
Vim configuration where issue is reproducable
Occurs with empty vimrc
Issue has been tested with given configuration
- by running MacVim.app from GUI macOS interface
- by running vim/gvim/etc installed by MacVim
- by running other versions of vim (e.g. /usr/bin/vim)
Issue has been tested with no configuration
- by running
mvim --clean(orgvim, supplied by MacVim distribution) - by running
vim --clean(in terminal, supplied by MacVim distribution) - by running
vim --clean(in terminal, other suppliers, e.g. /usr/bin/vim)
Other conditions
- The both Homebrew packages "vim" and "macvim" are installed
- 主要言語
- Vim Script
- スター
- 7.9k
- フォーク
- 691
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
macvim-dev/macvim のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
macvim-dev/macvim#1697 · コメント 5 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
macvim-dev/macvim#1658 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
macvim-dev/macvim#1657 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
macvim-dev/macvim#1655 ·
-
難易度 2/5 半日 初心者へのやさしさ 72/100
macvim-dev/macvim#1653 ·
macvim-dev/macvim の issue をすべて見る
似ている issue
-
[Super Editor][Chat] - Floating editor scaffold does not reset panel height after closing panel オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
bug channel: beta feature: preferences feature: ui/ux
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
bug editor script-component smart items
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
decentraland/creator-hub#1654 ·
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100