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

8214Re: MacVim inline patch

Expand Messages
  • kaoru
    Jun 22, 2008
    • 0 Attachment
      Hi Björn,

      On 2008/06/22, at 20:55, björn wrote:

      > Here are some things that I noticed:
      > 1. Marked text is always assumed to output wide characters. This may
      > be true when inputting Japanese, but if I for example hit Alt-u on an
      > English keyboard the marked text that appears is an umlaut which
      > should not be wide.

      Ben also mentioned to this issue at his past post, but I didn't
      understand what the issue was at the time. Since I use Japanese
      keyboard and Alt-u doesn't cause the marked text with the keyboard.
      I mean, I can type "ö" without the marked text in my environment.
      But, I now understand what the issue is, so let me see whether
      I can find some solution.

      > 2. The insert mode cursor keeps blinking in the background as marked
      > text is being entered. Also, there is no cursor "inside" the marked
      > text. (Note that when you've entered some marked text you can move
      > around inside it with the arrow keys, but since there is no cursor it
      > is a bit hard to know where you are.) My code has the same problems,
      > but maybe you can fix this?

      Yes, I always have a difficulty to find out where I'm now inside
      the marked text. I'll try to fix it even though I'm not sure whether
      I can do it right now.

      > 3. Your code does not take "splits" into consideration. E.g. if I
      > enter :vsp to split the (Vim-)window vertically into two and then type
      > at the right edge of the left window the text will overflow into the
      > right split. The same thing happens with my input method code and
      > this is basically not possible to fix unless you make Vim (as opposed
      > to MacVim) handle marked text. I just wanted to bring this to your
      > attention.

      Yeah, I already noticed this.
      I would like to have fixed it, but I have no idea how I can fix it
      so far. And, I've realized that this behavior happens even when I
      run vim inside Terminal.app, so the priority of fixing this may not
      be so high...

      > 4. Another problem related to the above (which my code also does not
      > consider) is when you go into insert mode in the middle of some text.
      > In this case the marked text is drawn on top of the text to the right
      > instead of being inserted in between. Again, to fix this you would
      > have to pass the marked text on to Vim and let it handle it.
      > 5. If I type text near the bottom right-hand corner the marked text
      > will overflow into the command line and if I type even more eventually
      > there will be no place for the marked text to go since the window
      > ends. In essence my code has a similar problem because eventually the
      > popup window will reach the right-hand side of the screen and it can't
      > expand any further. Maybe your approach is even better if you keep
      > the window close to the right-hand side of the screen.

      Oops... I didn't test these cases, but these are actually problems.

      > Anyway, all of these issues are problematic with both yours and my
      > approach and the only way to solve issues 3--5 would be to make Vim
      > handle marked text. It would be great if you wanted to take a look at
      > how this could be done and there is already some code in there for
      > other platforms (see ":h xim" and look for xim in the source code).

      The issues 3--5 happens even when I run vim, which is provided by
      Apple Inc., inside Terminal.app.
      To fix them, I also think letting Vim handle the marked text, as
      you said, is the best solution. But anyway, I'll take a look at
      other platforms' approaches. Thank you for telling me a pointer
      of where I should check.

      > Until then, I would like to merge your patch but please see what you
      > can do about issues 1 and 2 in my list above (the other issues I only
      > wanted to bring to your attention, I don't expect much can be done
      > about them without a lot of work). I would merge your patch despite
      > these problems since then you can hopefully continue improving this
      > support as you find more problems with it.
      > Also, it would be good if we could get some more people testing this
      > patch to see how it works with other input methods than Japanese (how
      > do we reach out to people to get them to test this patch?).

      Yes, we definitely need more testers! I don't have any idea how
      we can find testers, though. Hopefully, the new patched MacVim
      can have more contributors.

      Thank you for going to merge my patch! I'll continue working
      on these issues and try to provide a better solution. But again,
      I'm quite a beginner of Cocoa programming as I said at my first
      post, it would be great if you modify the patch to fit your or
      Cocoa programming style.

      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 17 messages in this topic