Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredpar committed Mar 28, 2014
2 parents 8c98a55 + 5b8743d commit 86d9e29
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Src/VimCore/Constants.fs
Expand Up @@ -27,10 +27,10 @@ module Constants =

#if DEBUG
[<Literal>]
let VersionNumber = "1.6.0.1 Debug"
let VersionNumber = "1.6.0.2 Debug"
#else
[<Literal>]
let VersionNumber = "1.6.0.1"
let VersionNumber = "1.6.0.2"
#endif


2 changes: 1 addition & 1 deletion Src/VimCore/Modes_Normal_NormalMode.fs
Expand Up @@ -350,7 +350,7 @@ type internal NormalMode
x.Reset()

// Ensure the caret is positioned correctly vis a vis virtual edit
if not (TextViewUtil.GetCaretPoint(_operations.TextView).Position = 0) then
if not _textView.IsClosed && not (TextViewUtil.GetCaretPoint(_textView).Position = 0) then
_operations.EnsureAtCaret ViewFlags.VirtualEdit

// Process the argument if it's applicable
Expand Down
2 changes: 1 addition & 1 deletion Src/VsVim/source.extension.vsixmanifest
Expand Up @@ -3,7 +3,7 @@
<Identifier Id="VsVim.Microsoft.e214908b-0458-4ae2-a583-4310f29687c3">
<Name>VsVim</Name>
<Author>Jared Parsons</Author>
<Version>1.6.0.1</Version>
<Version>1.6.0.2</Version>
<Description xml:space="preserve">VIM emulation layer for Visual Studio</Description>
<Locale>1033</Locale>
<MoreInfoUrl>http://blogs.msdn.com/b/jaredpar</MoreInfoUrl>
Expand Down
8 changes: 8 additions & 0 deletions Test/VimCoreTest/CommandModeIntegrationTest.cs
Expand Up @@ -1113,6 +1113,14 @@ public void Replace_GoToLastEditPosition()
Assert.Equal(1, _textView.Caret.Position.BufferPosition.GetColumn().Column);
Assert.Equal(1, _textView.GetCaretLine().LineNumber);
}

[Fact]
public void Issue1327()
{
Create("cat", "dog");
_textView.MoveCaretTo(3);
RunCommand("wq");
}
}
}
}
1 change: 1 addition & 0 deletions Test/VimCoreTest/Mock/MockVimHost.cs
Expand Up @@ -123,6 +123,7 @@ string IVimHost.GetName(ITextBuffer textBuffer)
void IVimHost.Close(ITextView textView)
{
LastClosed = textView;
textView.Close();
}

ITextView IVimHost.CreateHiddenTextView()
Expand Down
1 change: 1 addition & 0 deletions Test/VimCoreTest/VimBufferFactoryIntegrationTest.cs
Expand Up @@ -71,6 +71,7 @@ public void TextViewDelayInitialize()
var textView = MockObjectFactory.CreateTextView(textBuffer);
textView.SetupGet(x => x.TextViewLines).Returns((ITextViewLineCollection)null);
textView.SetupGet(x => x.Caret.Position).Returns(new CaretPosition());
textView.SetupGet(x => x.IsClosed).Returns(false);
var vimTextBuffer = _vimBufferFactory.CreateVimTextBuffer(textBuffer, _vim);
var vimBuffer = _vimBufferFactory.CreateVimBuffer(textView.Object, vimTextBuffer);
Assert.Equal(ModeKind.Uninitialized, vimBuffer.ModeKind);
Expand Down

0 comments on commit 86d9e29

Please sign in to comment.