diff --git a/CHANGES.md b/CHANGES.md index e968aae793..78d67c7219 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -33,6 +33,7 @@ usual beta standards. * [VIM-1799](https://youtrack.jetbrains.com/issue/VIM-1799) [VIM-1794](https://youtrack.jetbrains.com/issue/VIM-179a) Special characters are not interpreted on yanking +* [VIM-2218](https://youtrack.jetbrains.com/issue/VIM-2218) Fix some shortcuts for 2021.+ ## 0.64, 2020-12-23 diff --git a/resources/META-INF/plugin.xml b/resources/META-INF/plugin.xml index 3d3aeb3295..c54b0aafbb 100644 --- a/resources/META-INF/plugin.xml +++ b/resources/META-INF/plugin.xml @@ -79,6 +79,8 @@ + + diff --git a/src/com/maddyhome/idea/vim/key/VimActionsPromoter.kt b/src/com/maddyhome/idea/vim/key/VimActionsPromoter.kt new file mode 100644 index 0000000000..ffdb8ef5a1 --- /dev/null +++ b/src/com/maddyhome/idea/vim/key/VimActionsPromoter.kt @@ -0,0 +1,33 @@ +/* + * IdeaVim - Vim emulator for IDEs based on the IntelliJ platform + * Copyright (C) 2003-2021 The IdeaVim authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.maddyhome.idea.vim.key + +import com.intellij.openapi.actionSystem.ActionPromoter +import com.intellij.openapi.actionSystem.AnAction +import com.intellij.openapi.actionSystem.DataContext +import com.intellij.openapi.actionSystem.EmptyAction +import com.maddyhome.idea.vim.action.VimShortcutKeyAction + +class VimActionsPromoter : ActionPromoter { + override fun promote(actions: MutableList, context: DataContext): List { + return actions.filter { + it is EmptyAction.MyDelegatingAction && it.delegate is VimShortcutKeyAction + } + } +}