Loading ...
Sorry, an error occurred while loading the content.

More IM problems

Expand Messages
  • Nico Weber
    Hi all, I m testing the new IM stuff. Since I don t speak any languages that _need_ IMs, I don t really know what I m doing, but I do believe the following is
    Message 1 of 5 , Jul 2, 2008
    • 0 Attachment
      Hi all,

      I'm testing the new IM stuff. Since I don't speak any languages that
      _need_ IMs, I don't really know what I'm doing, but I do believe the
      following is a bug.

      1. Open SysPrefs->International, make sure "Show Input in menu bar" at
      the bottom is checked
      2. Check the "Kotoeri" input method
      3. Open TextEdit, switch to "Hiragana" in the language selector.
      4. Hit 'd' 'o' (some japanese appears, underlined)
      5. Hit space (japanese changes)
      6. Hit space again (a popup menu appears)
      7. Hit enter (popup menu disappears, japanese is still underlined)
      8. Hit enter again (underline disappears).

      9. Now open MacVim
      10. Switch to US layout, hit 'i' to start insert mode
      11. switch back to hiragana and also enter 'd', 'o', space, space,
      enter, enter

      Expected: This should work as in TextEdit (and it kind of did with the
      old IM code).
      Actual: It nearly works, but after hitting enter the first time, the
      japanese disappears (it reappears when hitting enter the second time).

      This is probably easy to fix, and it sounds like this is very annoying
      to people writing japanese text (but I don't know).

      Nico

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Kaoru YOSHIDA
      Hi Nico, ... Thank you for your report. It is strange. I always use another input method for typing Japanese, and have never tested with Kotoeri . Since
      Message 2 of 5 , Jul 2, 2008
      • 0 Attachment
        Hi Nico,

        On 2008/07/03, at 5:37, Nico Weber wrote:

        > I'm testing the new IM stuff. Since I don't speak any languages that
        > _need_ IMs, I don't really know what I'm doing, but I do believe the
        > following is a bug.
        >
        > 1. Open SysPrefs->International, make sure "Show Input in menu bar" at
        > the bottom is checked
        > 2. Check the "Kotoeri" input method
        > 3. Open TextEdit, switch to "Hiragana" in the language selector.
        > 4. Hit 'd' 'o' (some japanese appears, underlined)
        > 5. Hit space (japanese changes)
        > 6. Hit space again (a popup menu appears)
        > 7. Hit enter (popup menu disappears, japanese is still underlined)
        > 8. Hit enter again (underline disappears).
        >
        > 9. Now open MacVim
        > 10. Switch to US layout, hit 'i' to start insert mode
        > 11. switch back to hiragana and also enter 'd', 'o', space, space,
        > enter, enter
        >
        > Expected: This should work as in TextEdit (and it kind of did with the
        > old IM code).
        > Actual: It nearly works, but after hitting enter the first time, the
        > japanese disappears (it reappears when hitting enter the second time).
        >
        > This is probably easy to fix, and it sounds like this is very annoying
        > to people writing japanese text (but I don't know).

        Thank you for your report. It is strange.
        I always use another input method for typing Japanese, and
        have never tested with "Kotoeri". Since Hiragana doesn't
        disappear with the first 'Enter' in my environment and I did
        think all input method works almost same way, I haven't thought
        such a thing happens...
        Anyway, I now realize what the issue is, so let me see the code.

        Thank,

        Kaoru


        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Kaoru YOSHIDA
        Hi Nico and Björn, ... I think the attached patch(*1) fixes the above issue. Basically to fix this, I newly introduced a variant markedRange and a function
        Message 3 of 5 , Jul 3, 2008
        • 0 Attachment
          Hi Nico and Björn,

          On 2008/07/03, at 8:57, Kaoru YOSHIDA wrote:

          > Hi Nico,
          >
          > On 2008/07/03, at 5:37, Nico Weber wrote:
          >
          >> I'm testing the new IM stuff. Since I don't speak any languages that
          >> _need_ IMs, I don't really know what I'm doing, but I do believe the
          >> following is a bug.
          >>
          >> 1. Open SysPrefs->International, make sure "Show Input in menu bar"
          >> at
          >> the bottom is checked
          >> 2. Check the "Kotoeri" input method
          >> 3. Open TextEdit, switch to "Hiragana" in the language selector.
          >> 4. Hit 'd' 'o' (some japanese appears, underlined)
          >> 5. Hit space (japanese changes)
          >> 6. Hit space again (a popup menu appears)
          >> 7. Hit enter (popup menu disappears, japanese is still underlined)
          >> 8. Hit enter again (underline disappears).
          >>
          >> 9. Now open MacVim
          >> 10. Switch to US layout, hit 'i' to start insert mode
          >> 11. switch back to hiragana and also enter 'd', 'o', space, space,
          >> enter, enter
          >>
          >> Expected: This should work as in TextEdit (and it kind of did with
          >> the
          >> old IM code).
          >> Actual: It nearly works, but after hitting enter the first time, the
          >> japanese disappears (it reappears when hitting enter the second
          >> time).
          >>
          >> This is probably easy to fix, and it sounds like this is very
          >> annoying
          >> to people writing japanese text (but I don't know).
          >
          > Thank you for your report. It is strange.
          > I always use another input method for typing Japanese, and
          > have never tested with "Kotoeri". Since Hiragana doesn't
          > disappear with the first 'Enter' in my environment and I did
          > think all input method works almost same way, I haven't thought
          > such a thing happens...
          > Anyway, I now realize what the issue is, so let me see the code.

          I think the attached patch(*1) fixes the above issue.
          Basically to fix this, I newly introduced a variant "markedRange"
          and a function "markedRange()" in "MMTextView" and use them to
          handle the marked text. And it seems this change also fixes
          another issue that the marked text disappears when we type some
          control keys which aren't assigned to input methods. This is a
          little bit difficult to explain... Some input methods, at least
          Japanese, use some control keys like Ctrl-i to select which part
          of the marked text should be translated from "Hiragana" into "Kanji"
          and there are other control keys not assigned to the input methods.
          The marked text disappeared when we type such unassigned control
          keys with the previous implementation.

          And, I had met another issue, which an underline of the marked
          text isn't displayed correctly, during the debugging process,
          I also fixed the issue. The issue might be because the way of
          setting "NSUnderlineStyleAttributeName" to the marked text in
          setMarkedText() isn't the right way.

          Since Both two issues are somehow related, I only made one patch
          file to fix them.

          I also noticed that the marked text isn't drawn at the expected
          location when vim isn't in INSERT mode. This is because my
          previous implementation uses insertionPoint{Column,Row} instead
          of preEdit{Column,Row} to draw the marked text in drawRect().

          1. type some message in INSERT mode.
          2. hit ESC.
          (At this time, insertionPoint{Column,Row} remembers the location
          where ESC key is hit.)
          3. shift cursor w/o INSERT mode.
          (preEdit{Column,Row} indicates the location where the cursor is,
          but insertionPoint{Column,Row} doesn't change.)
          4. start typing the marked text w/o INSERT mode.

          Since the past implementation used the insertionPoint{Column,Row}
          to draw the marked text in drawRect(), the marked text was drawn
          where ESC key is hit not where the current cursor is. The patch(*2)
          fixes this issue.

          (*1) 0001-fix-the-markedText-disappearing-issues.patch
          (*2) 0002-fix-drawing-place-of-the-markedText.patch

          Björn,
          Sorry for bothering you... But could you please check and
          merge the patch?

          Thanks,

          Kaoru


          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • björn
          ... Kaoru, Thank you very much for the patch. At a glance the patch looks fine so I will merge it tomorrow. ...and you are not bothering me in the slightest.
          Message 4 of 5 , Jul 4, 2008
          • 0 Attachment
            2008/7/4 Kaoru YOSHIDA <to.kaoru@...>:
            > Hi Nico and Björn,
            >
            > On 2008/07/03, at 8:57, Kaoru YOSHIDA wrote:
            >
            >> Hi Nico,
            >>
            >> On 2008/07/03, at 5:37, Nico Weber wrote:
            >>
            >>> I'm testing the new IM stuff. Since I don't speak any languages that
            >>> _need_ IMs, I don't really know what I'm doing, but I do believe the
            >>> following is a bug.
            >>>
            >>> 1. Open SysPrefs->International, make sure "Show Input in menu bar"
            >>> at
            >>> the bottom is checked
            >>> 2. Check the "Kotoeri" input method
            >>> 3. Open TextEdit, switch to "Hiragana" in the language selector.
            >>> 4. Hit 'd' 'o' (some japanese appears, underlined)
            >>> 5. Hit space (japanese changes)
            >>> 6. Hit space again (a popup menu appears)
            >>> 7. Hit enter (popup menu disappears, japanese is still underlined)
            >>> 8. Hit enter again (underline disappears).
            >>>
            >>> 9. Now open MacVim
            >>> 10. Switch to US layout, hit 'i' to start insert mode
            >>> 11. switch back to hiragana and also enter 'd', 'o', space, space,
            >>> enter, enter
            >>>
            >>> Expected: This should work as in TextEdit (and it kind of did with
            >>> the
            >>> old IM code).
            >>> Actual: It nearly works, but after hitting enter the first time, the
            >>> japanese disappears (it reappears when hitting enter the second
            >>> time).
            >>>
            >>> This is probably easy to fix, and it sounds like this is very
            >>> annoying
            >>> to people writing japanese text (but I don't know).
            >>
            >> Thank you for your report. It is strange.
            >> I always use another input method for typing Japanese, and
            >> have never tested with "Kotoeri". Since Hiragana doesn't
            >> disappear with the first 'Enter' in my environment and I did
            >> think all input method works almost same way, I haven't thought
            >> such a thing happens...
            >> Anyway, I now realize what the issue is, so let me see the code.
            >
            > I think the attached patch(*1) fixes the above issue.
            > Basically to fix this, I newly introduced a variant "markedRange"
            > and a function "markedRange()" in "MMTextView" and use them to
            > handle the marked text. And it seems this change also fixes
            > another issue that the marked text disappears when we type some
            > control keys which aren't assigned to input methods. This is a
            > little bit difficult to explain... Some input methods, at least
            > Japanese, use some control keys like Ctrl-i to select which part
            > of the marked text should be translated from "Hiragana" into "Kanji"
            > and there are other control keys not assigned to the input methods.
            > The marked text disappeared when we type such unassigned control
            > keys with the previous implementation.
            >
            > And, I had met another issue, which an underline of the marked
            > text isn't displayed correctly, during the debugging process,
            > I also fixed the issue. The issue might be because the way of
            > setting "NSUnderlineStyleAttributeName" to the marked text in
            > setMarkedText() isn't the right way.
            >
            > Since Both two issues are somehow related, I only made one patch
            > file to fix them.
            >
            > I also noticed that the marked text isn't drawn at the expected
            > location when vim isn't in INSERT mode. This is because my
            > previous implementation uses insertionPoint{Column,Row} instead
            > of preEdit{Column,Row} to draw the marked text in drawRect().
            >
            > 1. type some message in INSERT mode.
            > 2. hit ESC.
            > (At this time, insertionPoint{Column,Row} remembers the location
            > where ESC key is hit.)
            > 3. shift cursor w/o INSERT mode.
            > (preEdit{Column,Row} indicates the location where the cursor is,
            > but insertionPoint{Column,Row} doesn't change.)
            > 4. start typing the marked text w/o INSERT mode.
            >
            > Since the past implementation used the insertionPoint{Column,Row}
            > to draw the marked text in drawRect(), the marked text was drawn
            > where ESC key is hit not where the current cursor is. The patch(*2)
            > fixes this issue.
            >
            > (*1) 0001-fix-the-markedText-disappearing-issues.patch
            > (*2) 0002-fix-drawing-place-of-the-markedText.patch
            >
            > Björn,
            > Sorry for bothering you... But could you please check and
            > merge the patch?

            Kaoru,

            Thank you very much for the patch. At a glance the patch looks fine
            so I will merge it tomorrow.

            ...and you are not bothering me in the slightest. I'm very happy that
            you are fixing the IM system. :-)

            Björn

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Nico Weber
            ... The patch does fix the problem I reported. Thanks :-) Nico --~--~---------~--~----~------------~-------~--~----~ You received this message from the
            Message 5 of 5 , Jul 5, 2008
            • 0 Attachment
              > I think the attached patch(*1) fixes the above issue.

              The patch does fix the problem I reported. Thanks :-)

              Nico


              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_mac" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            Your message has been successfully submitted and would be delivered to recipients shortly.