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

Issue 250 in vim: Random US-International keyboard layout (dead keys) support

Expand Messages
  • vim@...
    Status: New Owner: ---- Labels: Type-Defect Priority-Medium New issue 250 by John.Wel...@gmail.com: Random US-International keyboard layout (dead keys) support
    Message 1 of 9 , Aug 19, 2014
    • 0 Attachment
      Status: New
      Owner: ----
      Labels: Type-Defect Priority-Medium

      New issue 250 by John.Wel...@...: Random US-International keyboard
      layout (dead keys) support
      http://code.google.com/p/vim/issues/detail?id=250

      What steps will reproduce the problem?
      1. OS: Win7 64 (32bit GVIm build)
      2. Use US-International keyboard layout
      3. In insert mode try to insert ' " ` ~ (hit the corresponding key followed
      by <SPACE>)

      What is the expected output? What do you see instead?

      Vim will fail to insert those characters on a fairly random basis.

      The issue is perfectly described there:
      http://stackoverflow.com/questions/3937237/gvim-us-international-not-combining-dead-keys-with-space
      and there:
      http://vim.1045645.n5.nabble.com/dead-key-bug-td4358973.html

      What version of the product are you using? On what operating system?
      7.4.402 on Win7x64

      Please provide any additional information below.

      The issue seems random but dependent on the compiler and optimisations
      used, it first appeared with vim7. For years I have been dodging this issue
      by using @wuyongwei builds but his latest 7.4.402 unfortunately exhibits
      the problem.



      --
      You received this message because this project is configured to send all
      issue notifications to this address.
      You may adjust your notification preferences at:
      https://code.google.com/hosting/settings

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/d/optout.
    • vim@...
      Comment #1 on issue 250 by chrisbr...@googlemail.com: Random US-International keyboard layout (dead keys) support
      Message 2 of 9 , Aug 19, 2014
      • 0 Attachment
        Comment #1 on issue 250 by chrisbr...@...: Random
        US-International keyboard layout (dead keys) support
        http://code.google.com/p/vim/issues/detail?id=250

        This has been reported before:
        https://groups.google.com/d/msg/vim_dev/99DYFZvvBNE/xuwuWsZdc1IJ
        sounded like a compiler bug to me. Unfortunately now patch has been offered
        to fix this issue.

        --
        You received this message because this project is configured to send all
        issue notifications to this address.
        You may adjust your notification preferences at:
        https://code.google.com/hosting/settings

        --
        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/d/optout.
      • vim@...
        Comment #2 on issue 250 by John.Wel...@gmail.com: Random US-International keyboard layout (dead keys) support http://code.google.com/p/vim/issues/detail?id=250
        Message 3 of 9 , Aug 19, 2014
        • 0 Attachment
          Comment #2 on issue 250 by John.Wel...@...: Random US-International
          keyboard layout (dead keys) support
          http://code.google.com/p/vim/issues/detail?id=250

          In the past I remember testing several builds and if I remember correctly
          some of the 'VIm without cream' builds did also exhibits this problem and
          thus I settled on Wu Yongwei's.

          Now the situation is 'reversed' as the 'VIm without cream' 402 is the one
          working correctly.
          on the Stackoverflow link I provided a commenter said that Yongwei's build
          did not solve the problem for him...

          I'm not familiar with VIm sources so I don't know where to look for
          ambiguous code (this problem looks like a missing 'sequence point' where
          depending on the circumstances a part of the code would be
          compiled/executed in a different order)

          --
          You received this message because this project is configured to send all
          issue notifications to this address.
          You may adjust your notification preferences at:
          https://code.google.com/hosting/settings

          --
          --
          You received this message from the "vim_dev" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_dev" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/d/optout.
        • vim@...
          Comment #3 on issue 250 by John.Wel...@gmail.com: Random US-International keyboard layout (dead keys) support http://code.google.com/p/vim/issues/detail?id=250
          Message 4 of 9 , Aug 19, 2014
          • 0 Attachment
            Comment #3 on issue 250 by John.Wel...@...: Random US-International
            keyboard layout (dead keys) support
            http://code.google.com/p/vim/issues/detail?id=250

            Ok, I've made an interesting discovery that proves that it's not related to
            Microsoft compiler as implied in
            https://groups.google.com/d/msg/vim_dev/99DYFZvvBNE/xuwuWsZdc1IJ

            I've managed to compile two versions of gvim using mingw64 one for i686 and
            the other for x86-64 (both with directx):

            the i686 32it version doesn't have the issue discussed here while the x64
            build does!

            So I have a build environment where I can easily reproduce the problem, any
            idea where to look in the sources for dead key handling?

            --
            You received this message because this project is configured to send all
            issue notifications to this address.
            You may adjust your notification preferences at:
            https://code.google.com/hosting/settings

            --
            --
            You received this message from the "vim_dev" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php

            ---
            You received this message because you are subscribed to the Google Groups "vim_dev" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
            For more options, visit https://groups.google.com/d/optout.
          • vim@...
            Comment #4 on issue 250 by chrisbr...@googlemail.com: Random US-International keyboard layout (dead keys) support
            Message 5 of 9 , Aug 20, 2014
            • 0 Attachment
              Comment #4 on issue 250 by chrisbr...@...: Random
              US-International keyboard layout (dead keys) support
              http://code.google.com/p/vim/issues/detail?id=250

              Can you try, if building without optimiziations fixes your issue as well?

              --
              You received this message because this project is configured to send all
              issue notifications to this address.
              You may adjust your notification preferences at:
              https://code.google.com/hosting/settings

              --
              --
              You received this message from the "vim_dev" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php

              ---
              You received this message because you are subscribed to the Google Groups "vim_dev" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
              For more options, visit https://groups.google.com/d/optout.
            • vim@...
              Comment #5 on issue 250 by John.Wel...@gmail.com: Random US-International keyboard layout (dead keys) support http://code.google.com/p/vim/issues/detail?id=250
              Message 6 of 9 , Aug 20, 2014
              • 0 Attachment
                Comment #5 on issue 250 by John.Wel...@...: Random US-International
                keyboard layout (dead keys) support
                http://code.google.com/p/vim/issues/detail?id=250

                I've found and fixed the problem. Here is a patch.

                A custom MSG structure used for sending a fake VK_SPACE was declared
                locally before being used with TranslateMessage().

                Solution: declare the MSG struct statically instead.



                Attachments:
                0001-Fix-possible-undefined-behavior-when-handling-non-al.patch 1.3 KB

                --
                You received this message because this project is configured to send all
                issue notifications to this address.
                You may adjust your notification preferences at:
                https://code.google.com/hosting/settings

                --
                --
                You received this message from the "vim_dev" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php

                ---
                You received this message because you are subscribed to the Google Groups "vim_dev" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                For more options, visit https://groups.google.com/d/optout.
              • vim@...
                Comment #6 on issue 250 by christ.v...@coosto.com: Random US-International keyboard layout (dead keys) support
                Message 7 of 9 , Aug 20, 2014
                • 0 Attachment
                  Comment #6 on issue 250 by christ.v...@...: Random US-International
                  keyboard layout (dead keys) support
                  http://code.google.com/p/vim/issues/detail?id=250

                  Looks like a solution. Increases Vim's size by SIZEOF(MSG) again, though :-)

                  --
                  You received this message because this project is configured to send all
                  issue notifications to this address.
                  You may adjust your notification preferences at:
                  https://code.google.com/hosting/settings

                  --
                  --
                  You received this message from the "vim_dev" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php

                  ---
                  You received this message because you are subscribed to the Google Groups "vim_dev" group.
                  To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                  For more options, visit https://groups.google.com/d/optout.
                • vim@...
                  Comment #7 on issue 250 by John.Wel...@gmail.com: Random US-International keyboard layout (dead keys) support http://code.google.com/p/vim/issues/detail?id=250
                  Message 8 of 9 , Aug 20, 2014
                  • 0 Attachment
                    Comment #7 on issue 250 by John.Wel...@...: Random US-International
                    keyboard layout (dead keys) support
                    http://code.google.com/p/vim/issues/detail?id=250

                    I came up with a much nicer solution that actually addresses the underlying
                    issue and that decreases Vim's size^^

                    Besides this bug, dead key handling was not behaving like in other Windows
                    application.

                    I spent some time understanding
                    http://msdn.microsoft.com/en-us/library/windows/desktop/ms646267(v=vs.85).aspx#_win32_Dead_Character_Messages

                    So the solution is to reset dead_key as soon as any WM_CHAR is received and
                    to _NOT_ do anything special if dead_key is set and the key being pressed
                    is either VK_SPACE, VK_BACK or VK_ESCAPE in which case we just let WIndows
                    generate its WM_CHAR: just one will be generated if it's VK_SPACE being
                    pressed or two will be if it's either VK_BACK or VK_ESCPAE (the dead key +
                    the VK_BACK or VK_ESCPAE)

                    My patch includes a detailed comment on the logic used

                    The fix is very simple and feels just right :)

                    Attachments:
                    0001-Fix-dead-key-handling-on-Windows-non-standard-behavi.patch 2.0 KB

                    --
                    You received this message because this project is configured to send all
                    issue notifications to this address.
                    You may adjust your notification preferences at:
                    https://code.google.com/hosting/settings

                    --
                    --
                    You received this message from the "vim_dev" maillist.
                    Do not top-post! Type your reply below the text you are replying to.
                    For more information, visit http://www.vim.org/maillist.php

                    ---
                    You received this message because you are subscribed to the Google Groups "vim_dev" group.
                    To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                    For more options, visit https://groups.google.com/d/optout.
                  • vim@...
                    Updates: Status: Fixed Comment #8 on issue 250 by brammool...@gmail.com: Random US-International keyboard layout (dead keys) support
                    Message 9 of 9 , Aug 22, 2014
                    • 0 Attachment
                      Updates:
                      Status: Fixed

                      Comment #8 on issue 250 by brammool...@...: Random US-International
                      keyboard layout (dead keys) support
                      https://code.google.com/p/vim/issues/detail?id=250

                      Included as patch 7.4.413

                      --
                      You received this message because this project is configured to send all
                      issue notifications to this address.
                      You may adjust your notification preferences at:
                      https://code.google.com/hosting/settings

                      --
                      --
                      You received this message from the "vim_dev" maillist.
                      Do not top-post! Type your reply below the text you are replying to.
                      For more information, visit http://www.vim.org/maillist.php

                      ---
                      You received this message because you are subscribed to the Google Groups "vim_dev" group.
                      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                      For more options, visit https://groups.google.com/d/optout.
                    Your message has been successfully submitted and would be delivered to recipients shortly.