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

+conceal機能がright-to-leftに対応していない #799

Closed
h-east opened this issue Dec 21, 2015 · 5 comments
Closed

+conceal機能がright-to-leftに対応していない #799

h-east opened this issue Dec 21, 2015 · 5 comments

Comments

@h-east
Copy link
Member

h-east commented Dec 21, 2015

$ vim -Nu NONE -c "set rightleft cole=1 cocu=n"
iabc<Esc>

カーソルが逆側(左側)に移動してしまう。

  1. 対応する。
  2. :h rileftBugsright-to-leftウィンドウではconceal機能は正しく動かないと書く。既存で書かれている以下の様な感じで。
  • "右左" ウィンドウではCTRL-AとCTRL-X(足し算、引き算)コマンドは正しく働かない。

個人的には:helpの左右カーソル移動が残念になっているので対応してあげたいなと思っていますが、修正ボリュームは見積もれていません。

余談ですがCTRL-AとCTRL-X(足し算、引き算)コマンドはちょっと修正すればright-to-leftウィンドウでも機能するようになることは把握しています。

@h-east
Copy link
Member Author

h-east commented Dec 21, 2015

Vimで世界を平和にしていきましょう:smile:

@h-east
Copy link
Member Author

h-east commented Jan 13, 2016

vim_devには今晩送る。

diff --git a/src/screen.c b/src/screen.c
index 5610d8a..d34c4b2 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -4976,7 +4976,12 @@ win_line(wp, lnum, startrow, endrow, nochange)
        && conceal_cursor_line(wp)
        && (int)wp->w_virtcol <= vcol + n_skip)
    {
-       wp->w_wcol = col - boguscols;
+#  ifdef FEAT_RIGHTLEFT
+       if (wp->w_p_rl)
+       wp->w_wcol = W_WIDTH(wp) - col + boguscols - 1;
+       else
+#  endif
+       wp->w_wcol = col - boguscols;
        wp->w_wrow = row;
        did_wcol = TRUE;
    }

@mattn
Copy link
Member

mattn commented Jan 13, 2016

お。意外とパッチ小さめで素敵。

@h-east
Copy link
Member Author

h-east commented Jan 13, 2016

@mattn ありがとー。今、testどうしようか調べ中。 'rightleft' のtestってこのまえ私が書いた test_increment.vim 以外やってないっぽい?

@h-east
Copy link
Member Author

h-east commented Jan 16, 2016

Post to vim_dev
https://groups.google.com/d/msg/vim_dev/qNYgvyuuKC8/MVyxFB1jBQAJ

> p.s. 
> I believe Vim makes world peace. 

I hope so. 

patch 7.4.1101
vim/vim@e39b3d9

テスト書きます!世界平和のために:smile:

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

No branches or pull requests

2 participants