From de0ea44698b314cb1eaa2d83c9b867681d60efd0 Mon Sep 17 00:00:00 2001 From: Michael Ennen Date: Thu, 21 Apr 2016 12:50:33 -0700 Subject: vim-patch: 7.4.1101 Problem: With 'rightleft' and concealing the cursor may move to the wrong position. Solution: Compute the column differently when 'rightleft' is set. (Hirohito Higashi) https://github.com/vim/vim/commit/e39b3d9fb4e4006684c33847d1ef6a0d742699dd --- src/nvim/screen.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/nvim/screen.c') diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 1cc270023c..d650d56bc0 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -3700,9 +3700,13 @@ win_line ( && wp == curwin && lnum == wp->w_cursor.lnum && conceal_cursor_line(wp) && (int)wp->w_virtcol <= vcol + n_skip) { - wp->w_wcol = col - boguscols; + if (wp->w_p_rl) { + wp->w_wcol = wp->w_width - col + boguscols - 1; + } else { + wp->w_wcol = col - boguscols; + } wp->w_wrow = row; - did_wcol = TRUE; + did_wcol = true; } /* Don't override visual selection highlighting. */ -- cgit