Issue #237 resolved

input method reset in insert state

lotabout
created an issue

The title looks just like another issue which had been closed. However, this one is different. The problem is:

  1. INSERT mode, toggle on input method (=> on)
  2. INSERT mode, toggle off input method (=> off)
  3. return to NORMAL mode by ESC
  4. enter INSERT mode, and the input method is still on. (=> on)

which should be off;

Emacs Version: 24.2.1 evil version: master (2012-12-20)

I'm not quite familiar with lisp, but I thought there should be a quick hack considering the previous issue => #15:Toggle input method in insert state is broken

Please take a look.

Comments (9)

  1. lotabout reporter

    After some investigation, it seems that input-method-deactivate-hook is actually named input-method-inactivate-hook, and so it will never actually deactivate input mehod.

    So the previous issue seems to be caused by this. I have no idea why it keeps this name though.

    Then I correct this error, and find that when the settings of input method will lost when back to NORMAL state and re-enter INSERT state.

  2. lotabout reporter

    I've made my own patch, just wandering whether commit it or not. Now it works like follows:

    1. totally disable toggle input method in normal mode. (this may upset somebody)
    2. when entering NORMAL mode, it will memorize whatever the input method is in INSERT mode, and turn off input method of course.
    3. when re-entering INSERT mode, it will recover what it remembers.

    BTW, Emacs version: 24.2.1, still don't understand why the name `input-method-inactivate-hook' remains.

  3. Log in to comment