diff --git a/src/MacVim/MMBackend.m b/src/MacVim/MMBackend.m index 608388bd6f..0afd312264 100644 --- a/src/MacVim/MMBackend.m +++ b/src/MacVim/MMBackend.m @@ -1569,8 +1569,16 @@ static NSString *MMSymlinkWarningString = // flushed (e.g. storing the currently selected text would be a bad idea). // We take this approach of "pushing" the state to MacVim to avoid having // to make synchronous calls from MacVim to Vim in order to get state. + +#ifdef FEAT_RIGHTLEFT + BOOL rightLeft = curwin->w_p_rl; +#else + BOOL rightLeft = NO; +#endif + NSDictionary *vimState = [NSDictionary dictionaryWithObjectsAndKeys: [[NSFileManager defaultManager] currentDirectoryPath], @"pwd", + [NSNumber numberWithBool:rightLeft], @"w_p_rl", nil]; [self queueMessage:SetVimStateMsgID data:[vimState dictionaryAsData]]; diff --git a/src/MacVim/MMTextView.m b/src/MacVim/MMTextView.m index 72bcf4f1e7..c9b3431bce 100644 --- a/src/MacVim/MMTextView.m +++ b/src/MacVim/MMTextView.m @@ -469,7 +469,11 @@ enum { ipRect.origin.y += ipRect.size.height - frac; ipRect.size.height = frac; } else if (MMInsertionPointVertical == insertionPointShape) { + BOOL rightLeft = [[[[self vimController] vimState] + objectForKey:@"w_p_rl"] boolValue]; int frac = ([ts cellSize].width* insertionPointFraction + 99)/100; + if (rightLeft) + ipRect.origin.x += ipRect.size.width - frac; ipRect.size.width = frac; }