Skip to content

Commit

Permalink
Merge pull request #2885 from VsVim/dev/nosami/bump-version
Browse files Browse the repository at this point in the history
Prepare for release 2.8.0.11
  • Loading branch information
nosami committed Apr 24, 2021
2 parents d5a64c3 + 2b4d7a0 commit 5fdb893
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 63 deletions.
10 changes: 5 additions & 5 deletions Scripts/build.sh
@@ -1,12 +1,12 @@
echo "Downloading Mono"
wget --quiet https://download.visualstudio.microsoft.com/download/pr/5b7dcb51-3035-46f7-a8cb-efe3a1da351c/dcba976cd3257636b6b2828575d29d3c/monoframework-mdk-6.4.0.208.macos10.xamarin.universal.pkg
wget --quiet https://download.visualstudio.microsoft.com/download/pr/2516b6e5-6965-4f5b-af68-d1959a446e7a/443346a56436b5e2682b7c5b5b25e990/monoframework-mdk-6.12.0.125.macos10.xamarin.universal.pkg

sudo installer -pkg monoframework-mdk-6.4.0.208.macos10.xamarin.universal.pkg -target /
sudo installer -pkg monoframework-mdk-6.12.0.125.macos10.xamarin.universal.pkg -target /

echo "Downloading VSMac"
wget --quiet https://download.visualstudio.microsoft.com/download/pr/82f53c42-6dc7-481b-82e1-c899bb15a753/df08f05921d42cc6b3b02e9cb082841f/visualstudioformac-8.4.0.2350.dmg
wget --quiet https://download.visualstudio.microsoft.com/download/pr/e5b7cb77-1248-4fb7-a3fe-532ca3335f78/777b586636b0cdba9db15d69bf8d8b1f/visualstudioformac-8.9.7.8.dmg

sudo hdiutil attach visualstudioformac-8.4.0.2350.dmg
sudo hdiutil attach visualstudioformac-8.9.7.8.dmg

echo "Removing pre-installed VSMac"
sudo rm -rf "/Applications/Visual Studio.app"
Expand All @@ -19,7 +19,7 @@ rm -rf ~/Library/Preferences/Xamarin/
rm -rf ~/Library/Developer/Xamarin
rm -rf ~/Library/Application\ Support/VisualStudio

echo "Installing VSMac 8.4"
echo "Installing VSMac 8.9"
ditto -rsrc "/Volumes/Visual Studio/" /Applications/

msbuild /p:Configuration=ReleaseMac /p:Platform="Any CPU" /t:Restore /t:Build
Expand Down
2 changes: 1 addition & 1 deletion Src/VimMac/Properties/AddinInfo.cs
Expand Up @@ -5,7 +5,7 @@
[assembly: Addin(
"VsVim",
Namespace = "Vim.Mac",
Version = "2.8.0.8"
Version = "2.8.0.11"
)]

[assembly: AddinName("VsVim")]
Expand Down
37 changes: 0 additions & 37 deletions Src/VimMac/ShellWildcardSearchScope.cs

This file was deleted.

20 changes: 0 additions & 20 deletions Src/VimMac/VimHost.cs
Expand Up @@ -265,26 +265,6 @@ private void EnsureLinePointVisible(ITextView textView, SnapshotPoint point)

public void FindInFiles(string pattern, bool matchCase, string filesOfType, VimGrepFlags flags, FSharpFunc<Unit, Unit> action)
{
var find = new FindReplace();

var options = new FilterOptions
{
CaseSensitive = matchCase,
RegexSearch = true,
};
var scope = new ShellWildcardSearchScope(_vim.VimData.CurrentDirectory, filesOfType);

using (var monitor = IdeApp.Workbench.ProgressMonitors.GetSearchProgressMonitor(true))
{
var results = find.FindAll(scope, monitor, pattern, null, options, System.Threading.CancellationToken.None);
foreach (var result in results)
{
//TODO: Cancellation?
monitor.ReportResult(result);
}
}

action.Invoke(null);
}

public void FormatLines(ITextView textView, SnapshotLineRange range)
Expand Down
28 changes: 28 additions & 0 deletions Src/VimMac/VimKeyProcessor.cs
Expand Up @@ -75,9 +75,32 @@ public override void KeyDown(KeyEventArgs e)
// Attempt to map the key information into a KeyInput value which can be processed
// by Vim. If this works and the key is processed then the input is considered
// to be handled

if (_keyUtil.TryConvertSpecialToKeyInput(e.Event, out KeyInput keyInput))
{
var bufferedKeyInputsWasEmpty = VimBuffer.BufferedKeyInputs.IsEmpty;

handled = TryProcess(keyInput);

if (handled
&& BufferedKeysWasEmptyAndIsEmpty()
&& oldMode == ModeKind.Insert
&& CharTriggersCompletion(keyInput.Char)
&& !_completionBroker.IsCompletionActive(VimBuffer.TextView))
{
// Because VsVim handled the key press for us in insert mode,
// we need to trigger the completion window to open.
_completionBroker.TriggerCompletion(VimBuffer.TextView);
}

bool BufferedKeysWasEmptyAndIsEmpty()
{
// We don't want the completion window to appear if we
// have something like `inoremap fd <esc>`
// and we just typed the first 'f' or the 'd'
return bufferedKeyInputsWasEmpty
&& VimBuffer.BufferedKeyInputs.IsEmpty;
}
}
}

Expand All @@ -94,6 +117,11 @@ public override void KeyDown(KeyEventArgs e)
e.Handled = handled;
}

private bool CharTriggersCompletion(char c)
{
return c == '_' || c == '.' || char.IsLetterOrDigit(c);
}

/// <summary>
/// Try and process the given KeyInput with the IVimBuffer. This is overridable by
/// derived classes in order for them to prevent any KeyInput from reaching the
Expand Down

0 comments on commit 5fdb893

Please sign in to comment.