-
Notifications
You must be signed in to change notification settings - Fork 11
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows版GVimでカーソル表示のゴミが表示される #960
Comments
|
自前ビルドでも |
本家のGVim 8.0.19 Win 64bitでも再現しました。 ただし、こちらは上記手順では再現しなかったので、 :so vimrc_example.vim
:e {上記手順にあるヘルプファイルを直接指定}
:h
gm @k-takata concealなしでも発生すると思います。私が最初に気付いた時はconceal未設定かつ普通のテキストファイル(hoge.txt)でした。 |
本家GVimで日本語(cp932)入りノーマルテキストで再現出来ました。 https://github.com/vim/vim-win32-installer/releases/tag/v8.0.0019 Kaoriya版の :e \Program\ Files\vim\README.txt 以下のコマンドを入力する。 41G
zb
33|
jjjjjjj 補足:
|
以下のpatchで問題が発生することを突き止めました。
これが元のスレッド これがpatch releaseスレッド
7.4.2003って7月初旬。。 |
GVim 7.4.2002で元スレッドに書いてある再現手順で再現しなかったので、_gvimrcにカーソルブリンクをまったりさせる設定を書いたら再現するようになった。 set guicursor+=a:blinkon1700-blinkoff700 で、どう修正しましょうか? |
んー。kaoriya の README.txt で試してるんですが再現しない。 Windows10 |
@mattn |
はい。guicursor も試したけど再現せず。 |
ちなみに僕は非 kaoriya 版。kaoriya 版使ってる場合、README.txt は ft=memo なんですが h_east さんは ft は空でしょうか? |
(kaoriyaの)README.txtのmodelineに |
手順の |
お。再現ed |
これはあれだな。 w_curswant が右端超えてる時に描画が右端までしか描画されてないからもう1セル足らない系かな。 |
zb した行がもう半角ずれて(先頭に半角入れる)ると 33| でも 34| でも発生しない。TOMB っぽい。 |
再現手順通り |
スクロール後に w_curswant の位置から mb_adjust_cursor してるはずですが、それが効いてないかその時にカーソルがのこりっぱになってるのかも。 |
んー。やっぱりそれっぽい。強制で書いてる箇所をコメントアウトしたら発生しない。 if (did_undraw && !gui_mch_is_blink_off())
{
/* Put the GUI position where the cursor was, gui_update_cursor()
* uses that. */
gui.col = gui_cursor_col;
gui.row = gui_cursor_row;
//gui_update_cursor(FALSE, FALSE);
screen_cur_col = gui.col;
screen_cur_row = gui.row;
} |
これでどうでしょう? diff --git a/src/screen.c b/src/screen.c
index 4604ec7..ad9a865 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -765,6 +765,9 @@ update_screen(int type)
* uses that. */
gui.col = gui_cursor_col;
gui.row = gui_cursor_row;
+#ifdef FEAT_MBYTE
+ gui.col = mb_fix_col(gui.col, gui.row);
+#endif
gui_update_cursor(FALSE, FALSE);
screen_cur_col = gui.col;
screen_cur_row = gui.row; |
@mattn 直りました:+1: |
patch 8.0.0021 @mattn 👍 |
再現手順:
C:\Program Files\vim
)$HOME
(C:\Users_ユーザー名_)に空の_vimrc
と_gvimrc
を作成する。gvim.exe
を起動する。j
を16回押す。:h gm
実行結果:
カーソル表示?のゴミが表示される。(再現率: 100%)
「を」のカーソル表示が本物でその前のがゴミです。
Vimのバージョン
GVim 8.0.3 Win 64bit +kaoriya
OSの種類/ディストリ/バージョン
その他
おそらくマルチバイト絡み。
上記再現手順だと
enc
はcp932
、fenc
はutf-8
だが、どちらもcp932
の時でも再現した。The text was updated successfully, but these errors were encountered: