mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-03-05 06:32:51 +01:00
Simplify inserting register text
This commit is contained in:
parent
8a6ecf005b
commit
fa781de76f
@ -308,14 +308,11 @@ public class ChangeGroup {
|
||||
public boolean insertRegister(@NotNull Editor editor, @NotNull DataContext context, char key) {
|
||||
final Register register = VimPlugin.getRegister().getRegister(key);
|
||||
if (register != null) {
|
||||
final String text = register.getText();
|
||||
if (text != null) {
|
||||
final int length = text.length();
|
||||
for (int i = 0; i < length; i++) {
|
||||
processKey(editor, context, KeyStroke.getKeyStroke(text.charAt(i)));
|
||||
}
|
||||
return true;
|
||||
final List<KeyStroke> keys = register.getKeys();
|
||||
for (KeyStroke k:keys) {
|
||||
processKey(editor, context, k);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user