diff --git a/XSVim/Properties/AddinInfo.fs b/XSVim/Properties/AddinInfo.fs index 2d07acb..9a804f1 100644 --- a/XSVim/Properties/AddinInfo.fs +++ b/XSVim/Properties/AddinInfo.fs @@ -5,7 +5,7 @@ open MonoDevelop [] [] diff --git a/XSVim/Properties/Manifest.addin.xml b/XSVim/Properties/Manifest.addin.xml index 376c1e2..bf5edf4 100644 --- a/XSVim/Properties/Manifest.addin.xml +++ b/XSVim/Properties/Manifest.addin.xml @@ -5,4 +5,12 @@ + + + diff --git a/XSVim/XSVim.fs b/XSVim/XSVim.fs index e7ef322..1d61a20 100755 --- a/XSVim/XSVim.fs +++ b/XSVim/XSVim.fs @@ -3,6 +3,7 @@ open System open System.Collections.Generic open System.Text.RegularExpressions +open MonoDevelop.Components.Commands open MonoDevelop.Core open MonoDevelop.Core.Text open MonoDevelop.Ide @@ -1024,6 +1025,7 @@ type XSVim() = static let editorStates = Dictionary() let mutable disposables : IDisposable list = [] let mutable processingKey = false + member x.FileName = x.Editor.FileName.FullPath.ToString() override x.Initialize() = @@ -1057,6 +1059,7 @@ type XSVim() = processingKey <- true let newState, handledKeyPress = Vim.handleKeyPress vimState descriptor x.Editor processingKey <- false + match newState.statusMessage with | Some m -> IdeApp.Workbench.StatusBar.ShowMessage m | _ -> IdeApp.Workbench.StatusBar.ShowReady() @@ -1067,6 +1070,10 @@ type XSVim() = | VisualMode -> false | _ -> not handledKeyPress + [] + // Disable cmd-z (see https://github.com/nosami/XSVim/issues/92) + member x.CanUndo(ci:CommandInfo) = ci.Enabled <- false + override x.Dispose() = base.Dispose() disposables |> List.iter(fun d -> d.Dispose())