Skip to content

Commit

Permalink
Add fake caret to status bar
Browse files Browse the repository at this point in the history
  • Loading branch information
nosami committed Nov 6, 2019
1 parent 2ce516d commit 6cd0516
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Src/VimMac/VimKeyProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,14 @@ public override void KeyDown(KeyEventArgs e)

VimTrace.TraceInfo("VimKeyProcessor::KeyDown Handled = {0}", handled);

var message = Mac.StatusBar.GetStatus(VimBuffer).Text;
IdeApp.Workbench.StatusBar.ShowMessage(message);
var status = Mac.StatusBar.GetStatus(VimBuffer);
var text = status.Text;
if(status.CaretPosition != 0)
{
// Add a fake 'caret'
text = text.Insert(status.CaretPosition, "|");
}
IdeApp.Workbench.StatusBar.ShowMessage(text);
e.Handled = handled;
CaretUtil.SetCaret(VimBuffer);
}
Expand Down

0 comments on commit 6cd0516

Please sign in to comment.