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

Small glitch with new IM code

Expand Messages
  • Nico Weber
    Hi, the new IM code does not display the IM marks at the end of a line if the line is as wide as the window: 0. Use a US keyboard layout 1. `set columns=80` 2.
    Message 1 of 6 , Jul 1, 2008
    • 0 Attachment
      Hi,

      the new IM code does not display the IM marks at the end of a line if
      the line is as wide as the window:

      0. Use a US keyboard layout
      1. `set columns=80`
      2. 80ia<esc>
      3. r⌥u

      Expected: MacVim should display '¨' to signal that an Umlaut is being
      entered (works fine if you do r⌥u at another position in the line).
      Actual: That '¨' character is not displayed. As there's room to
      display this character, there is no reason why MacVim should not
      display it.


      Furthermore, IM characters should be displayed with highlight CursorIM
      (see `:h CursorIM`). Once this is done, the macvim colorscheme should
      be changed so that the CursorIM color matches what OS X uses for IM
      chars (black text, yellow background).

      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 letting me know these issues. ... This was because my old patch still assumed that a marked text consists of two-byte wide characters
      Message 2 of 6 , Jul 1, 2008
      • 0 Attachment
        Hi Nico,

        Thank you for letting me know these issues.

        On 2008/07/02, at 6:49, Nico Weber wrote:

        > the new IM code does not display the IM marks at the end of a line if
        > the line is as wide as the window:
        >
        > 0. Use a US keyboard layout
        > 1. `set columns=80`
        > 2. 80ia<esc>
        > 3. r⌥u
        >
        > Expected: MacVim should display '¨' to signal that an Umlaut is being
        > entered (works fine if you do r⌥u at another position in the line).
        > Actual: That '¨' character is not displayed. As there's room to
        > display this character, there is no reason why MacVim should not
        > display it.

        This was because my old patch still assumed that a marked text
        consists of two-byte wide characters when displaying marked text.
        The attached patch should fix this.
        Björn, could you please merge the patch?

        > Furthermore, IM characters should be displayed with highlight CursorIM
        > (see `:h CursorIM`). Once this is done, the macvim colorscheme should
        > be changed so that the CursorIM color matches what OS X uses for IM
        > chars (black text, yellow background).


        Oh, I haven't known such a parameter is available... Thanks.
        The current implementation simply draws IM characters with a bold
        underline to indicate that users are now in IM mode. And bg and fg
        of IM characters inherits from users' colorscheme. But you're right,
        this implementation doesn't meet the VIM's requirement. I'll take a
        look at the code and try to fix it.

        Thanks,

        Kaoru


        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Nico Weber
        ... The attached patch looks quoted-printable to me (this seems to be a problem how Mail.app interprets git s patch files). I just added the following to my
        Message 3 of 6 , Jul 2, 2008
        • 0 Attachment
          > The attached patch should fix this.
          > Björn, could you please merge the patch?

          The attached patch looks quoted-printable to me (this seems to be a
          problem how Mail.app interprets git's patch files). I just added the
          following to my _vimrc:

          This is all on one line:
          command QPd %!python -c 'import fileinput, quopri; print
          quopri.decodestring("".join(list(fileinput.input())))'

          With this, I can decode those quoted-printable patches by opening them
          in MacVim and hitting `:QPd`. Perhaps this is useful to some of you,
          too.

          Nico

          ps: Surely, there has to be an existing, pre-installed binary that
          does quoted-printable conversion, so that one does not have to use
          Python for that? I couldn't find one…
          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • björn
          ... Kaoru, thanks for responding with a patch so quickly. I have merged your patch. ... Nico, that s a life-saver...up until now I ve been going to that
          Message 4 of 6 , Jul 2, 2008
          • 0 Attachment
            2008/7/2 Nico Weber <nicolasweber@...>:
            >
            >> The attached patch should fix this.
            >> Björn, could you please merge the patch?

            Kaoru, thanks for responding with a patch so quickly. I have merged
            your patch.

            > The attached patch looks quoted-printable to me (this seems to be a
            > problem how Mail.app interprets git's patch files). I just added the
            > following to my _vimrc:
            >
            > This is all on one line:
            > command QPd %!python -c 'import fileinput, quopri; print
            > quopri.decodestring("".join(list(fileinput.input())))'
            >
            > With this, I can decode those quoted-printable patches by opening them
            > in MacVim and hitting `:QPd`. Perhaps this is useful to some of you,
            > too.

            Nico, that's a life-saver...up until now I've been going to that
            website link you posted a while back. This command makes things a lot
            easier! :-)

            Björn

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Nico Weber
            Hi, ... Yupp, it s fixed now. Thanks for the quick fix. I like the new IM inline display a lot, by the way. ... Great :-) Nico
            Message 5 of 6 , Jul 2, 2008
            • 0 Attachment
              Hi,

              >> the new IM code does not display the IM marks at the end of a line if
              >> the line is as wide as the window:
              >>
              >> 0. Use a US keyboard layout
              >> 1. `set columns=80`
              >> 2. 80ia<esc>
              >> 3. r⌥u
              >>
              >> Expected: MacVim should display '¨' to signal that an Umlaut is
              >> being
              >> entered (works fine if you do r⌥u at another position in the line).
              >> Actual: That '¨' character is not displayed. As there's room to
              >> display this character, there is no reason why MacVim should not
              >> display it.
              >
              > This was because my old patch still assumed that a marked text
              > consists of two-byte wide characters when displaying marked text.
              > The attached patch should fix this.
              > Björn, could you please merge the patch?

              Yupp, it's fixed now. Thanks for the quick fix. I like the new IM
              inline display a lot, by the way.

              >> Furthermore, IM characters should be displayed with highlight
              >> CursorIM
              >> (see `:h CursorIM`). Once this is done, the macvim colorscheme should
              >> be changed so that the CursorIM color matches what OS X uses for IM
              >> chars (black text, yellow background).
              >
              >
              > Oh, I haven't known such a parameter is available... Thanks.
              > The current implementation simply draws IM characters with a bold
              > underline to indicate that users are now in IM mode. And bg and fg
              > of IM characters inherits from users' colorscheme. But you're right,
              > this implementation doesn't meet the VIM's requirement. I'll take a
              > look at the code and try to fix it.

              Great :-)

              Nico
              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_mac" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • Kaoru YOSHIDA
              Hi Nico, ... I read the document( :h CursorIM ) and checked the code related to this. In my understanding CursorIM doesn t change bg and fg colors of IM
              Message 6 of 6 , Jul 6, 2008
              • 0 Attachment
                Hi Nico,

                On 2008/07/02, at 6:49, Nico Weber wrote:

                > Furthermore, IM characters should be displayed with highlight CursorIM
                > (see `:h CursorIM`). Once this is done, the macvim colorscheme should
                > be changed so that the CursorIM color matches what OS X uses for IM
                > chars (black text, yellow background).

                I read the document(':h CursorIM') and checked the code related to
                this. In my understanding CursorIM doesn't change bg and fg colors
                of IM characters but a bg color of the cursor itself. And I think
                CursorIM should work with the current implementation, actually it
                doesn't work on 10.5 but on 10.4 or earlier. This is because
                there're some deprecated codes used around CursorIM in 10.5.
                I'll try to provide a patch, once I can figure out how I fix this.

                Thanks,

                Kaoru

                --~--~---------~--~----~------------~-------~--~----~
                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.