Skip to content

Commit

Permalink
fix: unexpected restart issue when uninstalling add-in
Browse files Browse the repository at this point in the history
  • Loading branch information
sha5010 committed Dec 1, 2023
1 parent 30c4d70 commit bb0eacc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/classes/Vim.cls
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ End Sub
' * Cleans up resources and disables Vim addin when the class is terminated.
' */
Public Sub Quit()
' Flag to quit
cCount = -1

Me.Enabled = False
Application.OnKey cConfig.VimToggleKey

Expand All @@ -73,10 +76,11 @@ Public Property Let Enabled(ByVal arg As Boolean)
Dim statusMsg As String

cIsEnabled = arg
cCount = 0

If cIsEnabled Then
'Make enable
cCount = 0

If cJumpList Is Nothing Then
Set cJumpList = New cls_DblCircList
cJumpList.Max = Me.Config.MaxHistories
Expand All @@ -92,7 +96,7 @@ Public Property Let Enabled(ByVal arg As Boolean)

Application.OnKey Me.Config.VimToggleKey, "ToggleVim"

If Not gVim Is Nothing Then
If Not gVim Is Nothing And cCount <> -1 Then
If cIsEnabled Then
statusMsg = cMsg.VimStarted
Else
Expand Down

0 comments on commit bb0eacc

Please sign in to comment.