Skip to content
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

Introduce s:opened_committa #17

Closed
wants to merge 2 commits into from

Conversation

haruyama
Copy link

In my environment, committia#open() is called twice after git commit.
s:open_diff_window() is called twice and setlocal nomodifiable fails.

This PR is not appropriate on g:committia_open_only_vim_starting = 0 environment.

@haruyama haruyama changed the title Introduce opened committa Introduce s:opened_committa Oct 18, 2015
@rhysd
Copy link
Owner

rhysd commented Oct 18, 2015

  1. どういう背景&理由があってこのプルリクエストを作成したのか説明をお願いします.コード見ただけでは分かりません.
  2. s:opened_committia は一度でもウィンドウが開かれると永遠に 0 にはならないようです.これだと複数回 committia.vim を使うような使い方をしている場合に困るので修正が必要です.1. に書いたように背景が不明なのでなんとも言えないですが,「現在すでに開いているか?」を知りたいなら現在のバッファのバッファ名を見ていって committia のバッファが見つかるかどうかで判定するのが良いと思います.(もし修正きつそうなら僕の方でやります)

@haruyama
Copy link
Author

OK, I try implementing 『「現在すでに開いているか?」を知りたいなら現在のバッファのバッファ名を見ていって committia のバッファが見つかるかどうかで判定する』

@rhysd
Copy link
Owner

rhysd commented Oct 18, 2015

description の追加ありがとうございます.読ませていただいた感じ,2回 open が呼ばれてしまう原因をつぶすほうが正攻法だと思うのですが,どうしてそうしないのでしょうか?

@haruyama
Copy link
Author

#11 と同じで 他のプラグインとの干渉と思われるので, 今回の(別のプラグインでの)問題をみつけてもまた発生すると思い, committia.vim側で制御したいと思いました.

こちらに PR を送ってしまったのはミスですが, 送ってしまったので適当にしたいと思います

@rhysd
Copy link
Owner

rhysd commented Oct 18, 2015

うーん,了解です.「すでに開いていたら再度開かないようにする」はチェック入れる意味が確かにありますね.説明ありがとうございます.

@haruyama
Copy link
Author

『「現在すでに開いているか?」を知りたいなら現在のバッファのバッファ名を見ていって committia のバッファが見つかるかどうかで判定する』

の方向で実装しようとしてみましたが, 私の症状は s:open_multicolumn() が呼ばれたあとで s:open_singlecolumn() が呼ばれるため変更箇所が大きくなるので, 一旦あきらめました.
差分はあとで整理して 自分のレポジトリに PUSH しておきます.

利用しているプラグインについて見直したところ Shougo/vimfiler のために autocmd BufReadPost COMMIT_EDITMSG が2回呼ばれていることがわかりました. 余裕があったら vimfiler 側のどの変更が問題か特定します

@rhysd
Copy link
Owner

rhysd commented Oct 18, 2015

ここのところ neobundle 周りで何件かうまく動かないと言われているので,最近の neobundle か vimfiler の変更が問題の可能性があります.(ちらっと聞いた話だと explorer1 にしているのが原因という話らしい…?)

お手数ですが,vimfiler のほうに issue を立てていただくのが一番良いかもしれません.

@haruyama
Copy link
Author

haruyama@d00a681

バッファ名のチェックをやりかけたものです. これだけだと s:open_multicolumn() が呼ばれたあとで s:open_singlecolumn() が呼ばれた際に s:current_info から status の情報が消えてしまうので うまくありません.

今日は時間がないので vimfiler の explorer の設定で再現するかどうかだけ調べて
それを書いたらこちらは Close します.

@haruyama
Copy link
Author

g:vimfiler_as_default_explorer を 1 にしていましたが 0 にしても挙動に変化はありませんでした.

おつきあいありがとうございました

@haruyama haruyama closed this Oct 18, 2015
@rhysd
Copy link
Owner

rhysd commented Oct 18, 2015

いえ,そちらの explorer ではなく,NeoBundle 時の explorer です.

https://github.com/Shougo/neobundle.vim/blob/master/doc/neobundle.txt#L1127

@haruyama
Copy link
Author

こちらの explorer を削除すると問題がなくなりました

@rhysd
Copy link
Owner

rhysd commented Oct 18, 2015

確認ありがとうございます.うーん,ちょっとこっちでも見てみて,場合によっては neobundle のほうに issue 立ててみます.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants