1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-02-28 02:45:59 +01:00

Saving configuration fixed

This commit is contained in:
Oleg Shpynov 2011-03-15 16:41:26 +03:00
parent aecd3d0336
commit d859e67ba5

View File

@ -218,7 +218,7 @@ public class VimPlugin implements ApplicationComponent, PersistentStateComponent
}
@Override
public void loadState(Element element) {
public void loadState(final Element element) {
LOG.debug("Loading state");
// Restore whether the plugin is enabled or not
@ -235,11 +235,12 @@ public class VimPlugin implements ApplicationComponent, PersistentStateComponent
public Element getState() {
LOG.debug("Saving state");
final Element element = new Element("ideavim");
// Save whether the plugin is enabled or not
Element element = new Element("state");
element.setAttribute("enabled", Boolean.toString(enabled));
element.setAttribute("keymap", previousKeyMap);
element.addContent(element);
final Element state = new Element("state");
state.setAttribute("enabled", Boolean.toString(enabled));
state.setAttribute("keymap", previousKeyMap);
element.addContent(state);
CommandGroups.getInstance().saveData(element);
return element;