mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-06-01 10:34:05 +02:00
Remove unused handlers
This commit is contained in:
parent
52da3ed0e4
commit
e3079912ae
src/com/maddyhome/idea/vim
@ -619,12 +619,12 @@
|
||||
* |c_CTRL-H| {@link com.maddyhome.idea.vim.ui.ex.DeletePreviousCharAction}
|
||||
* |c_CTRL-I| TO BE IMPLEMENTED
|
||||
* |c_CTRL-J| {@link com.maddyhome.idea.vim.ui.ex.CompleteEntryAction}
|
||||
* |c_CTRL-K| {@link com.maddyhome.idea.vim.ui.ex.StartDigraphAction}
|
||||
* |c_CTRL-K| Handled by KeyHandler
|
||||
* |c_CTRL-L| TO BE IMPLEMENTED
|
||||
* |c_CTRL-M| {@link com.maddyhome.idea.vim.action.ex.ProcessExEntryAction}
|
||||
* |c_CTRL-N| {@link com.maddyhome.idea.vim.ui.ex.HistoryDownAction}
|
||||
* |c_CTRL-P| {@link com.maddyhome.idea.vim.ui.ex.HistoryUpAction}
|
||||
* |c_CTRL-Q| {@link com.maddyhome.idea.vim.ui.ex.StartDigraphAction}
|
||||
* |c_CTRL-Q| Handled by KeyHandler
|
||||
* |c_CTRL-R| {@link com.maddyhome.idea.vim.ui.ex.InsertRegisterAction}
|
||||
* |c_CTRL-R_CTRL-A| TO BE IMPLEMENTED
|
||||
* |c_CTRL-R_CTRL-F| TO BE IMPLEMENTED
|
||||
@ -635,7 +635,7 @@
|
||||
* |c_CTRL-R_CTRL-W| TO BE IMPLEMENTED
|
||||
* |c_CTRL-T| TO BE IMPLEMENTED
|
||||
* |c_CTRL-U| {@link com.maddyhome.idea.vim.ui.ex.DeleteToCursorAction}
|
||||
* |c_CTRL-V| {@link com.maddyhome.idea.vim.ui.ex.StartDigraphAction}
|
||||
* |c_CTRL-V| Handled by KeyHandler
|
||||
* |c_CTRL-W| {@link com.maddyhome.idea.vim.ui.ex.DeletePreviousWordAction}
|
||||
* |c_CTRL-Y| TO BE IMPLEMENTED
|
||||
* |c_CTRL-\_e| TO BE IMPLEMENTED
|
||||
|
@ -290,55 +290,3 @@ class ToggleInsertReplaceAction : TextAction(ExEditorKit.ToggleInsertReplace) {
|
||||
private val logger = logger<ToggleInsertReplaceAction>()
|
||||
}
|
||||
}
|
||||
|
||||
abstract class StartDigraphLiteralActionBase(name: String?) : TextAction(name), MultiStepAction {
|
||||
private var digraphSequence: DigraphSequence? = null
|
||||
override fun actionPerformed(e: ActionEvent) {
|
||||
val target = getTextComponent(e) as ExTextField
|
||||
val key = ExEditorKit.convert(e)
|
||||
if (key != null && digraphSequence != null) {
|
||||
val res = digraphSequence!!.processKey(key, target.editor)
|
||||
when (res.result) {
|
||||
DigraphResult.RES_HANDLED -> target.setCurrentActionPromptCharacter(res.promptCharacter)
|
||||
DigraphResult.RES_BAD -> {
|
||||
target.clearCurrentAction()
|
||||
// Eat the character, unless it's <C-C>, in which case, forward on and cancel entry. Note that at some point
|
||||
// we should support input of control characters
|
||||
if (key.modifiers and KeyEvent.CTRL_DOWN_MASK != 0 && key.keyCode == KeyEvent.VK_C) {
|
||||
target.handleKey(key)
|
||||
}
|
||||
}
|
||||
DigraphResult.RES_DONE -> {
|
||||
val digraph = res.stroke
|
||||
digraphSequence = null
|
||||
target.clearCurrentAction()
|
||||
if (digraph != null) {
|
||||
target.handleKey(digraph)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (key != null) {
|
||||
digraphSequence = DigraphSequence()
|
||||
val res = start(digraphSequence!!)
|
||||
target.setCurrentAction(this, res.promptCharacter)
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract fun start(digraphSequence: DigraphSequence): DigraphResult
|
||||
|
||||
override fun reset() {
|
||||
digraphSequence = null
|
||||
}
|
||||
}
|
||||
|
||||
class StartDigraphAction : StartDigraphLiteralActionBase(ExEditorKit.StartDigraph) {
|
||||
override fun start(digraphSequence: DigraphSequence): DigraphResult {
|
||||
return digraphSequence.startDigraphSequence()
|
||||
}
|
||||
}
|
||||
|
||||
class StartLiteralAction : StartDigraphLiteralActionBase(ExEditorKit.StartLiteral) {
|
||||
override fun start(digraphSequence: DigraphSequence): DigraphResult {
|
||||
return digraphSequence.startLiteralSequence()
|
||||
}
|
||||
}
|
||||
|
@ -78,8 +78,6 @@ object ExEditorKit : DefaultEditorKit() {
|
||||
HistoryUpFilterAction(),
|
||||
HistoryDownFilterAction(),
|
||||
ToggleInsertReplaceAction(),
|
||||
StartDigraphAction(),
|
||||
StartLiteralAction(),
|
||||
InsertRegisterAction()
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user