Fix cursor drawing issue with 'rl' enabled

This commit is contained in:
Bjorn Winckler
2011-05-10 13:11:31 +02:00
parent 3c7743bc13
commit 77b96094f0
+7 -9
View File
@@ -1155,13 +1155,6 @@ gui_mch_draw_part_cursor(int w, int h, guicolor_T color)
// the shape_table to determine the shape and size of the cursor (just like
// gui_update_cursor() does).
#ifdef FEAT_RIGHTLEFT
// If 'rl' is set the insert mode cursor must be drawn on the right-hand
// side of a text cell.
int rl = curwin ? curwin->w_p_rl : FALSE;
#else
int rl = FALSE;
#endif
int idx = get_shape_idx(FALSE);
int shape = MMInsertionPointBlock;
switch (shape_table[idx].shape) {
@@ -1169,8 +1162,13 @@ gui_mch_draw_part_cursor(int w, int h, guicolor_T color)
shape = MMInsertionPointHorizontal;
break;
case SHAPE_VER:
shape = rl ? MMInsertionPointVerticalRight
: MMInsertionPointVertical;
shape =
#ifdef FEAT_RIGHTLEFT
// If 'rl' is set the insert mode cursor may be drawn on
// the right-hand side of a text cell.
CURSOR_BAR_RIGHT ? MMInsertionPointVerticalRight :
#endif
MMInsertionPointVertical;
break;
}