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

Re: Patch 7.3.699

Expand Messages
  • h_east
    Hi, Bram I also confirmed. I got Hayaki s behavior. Best, regards -- Hirohito Higashi -- You received this message from the vim_dev maillist. Do not
    Message 1 of 7 , Dec 3, 2012
    • 0 Attachment
      Hi, Bram

      I also confirmed. I got Hayaki's behavior.

      Best, regards
      --
      Hirohito Higashi

      --
      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
    • Hayaki Saito
      Hi Bram, ... Hmm, I checked this problem in Debian squeeze and OSX 10.7 environment. My $HOME/.vimrc is here: -- set nocompatible set mouse=a -- There are no
      Message 2 of 7 , Dec 3, 2012
      • 0 Attachment
        Hi Bram,

        > It works correctly for me, setting 'ttymouse' to "sgr" automatically.

        Hmm, I checked this problem in Debian squeeze and OSX 10.7 environment.

        My $HOME/.vimrc is here:
        --
        set nocompatible
        set mouse=a
        --

        There are no statements any more.
        The environment variable $TERM is "xterm".

        I compared changeset 3884 (Patch 698) with 3885 (Patch 699), with configuring --with-features=huge.
        The details of features are here:
        +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent
        +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
        +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff
        +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi
        +file_in_path +find_in_path +float +folding -footer +fork() +gettext
        -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall
        +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname
        +mouse +mouseshape +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm
        +mouse_sgr -mouse_sysmouse +mouse_urxvt +mouse_xterm +multi_byte +multi_lang
        -mzscheme +netbeans_intg +path_extra -perl +persistent_undo +postscript
        +printer +profile -python -python3 +quickfix +reltime +rightleft -ruby
        +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop
        +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse
        +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual
        +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup
        +X11 -xfontset +xim +xsmp_interact +xterm_clipboard -xterm_save

        Yukihiro Nakadaira tested it in Ubuntu 12.10 xterm and gnome-terminal
        He also checked Patch 698 and Patch 699.
        He says, when He launch vim with "-u NONE -N" option, patch 698 sets ttymouse=sgr automatically, but patch 699 sets ttymouse=xterm.

        Hirohito Higash tested in Fedora 16 and PuTTY. $TERM is "xterm".
        He checked Patch 698 and Patch 744.
        He says, when He launch vim with "-N" option, patch 698 sets ttymouse=xterm2 automatically, but patch 744 sets ttymouse=xterm.

        > For a quick check you can comment out these lines in term.c:
        >
        > if (p != NULL)
        > set_option_value((char_u *)"ttym", 0L, p, 0);
        >
        > If that works, then try:
        >
        > if (p != NULL && *p != NUL)
        > set_option_value((char_u *)"ttym", 0L, p, 0);

        With commenting out these lines, automatic detection works well.

        /* if (p != NULL)
        set_option_value((char_u *)"ttym", 0L, p, 0); */

        but It does not works.

        if (p != NULL && *p != NUL)
        set_option_value((char_u *)"ttym", 0L, p, 0);

        I make sure "use_xterm_like_mouse" returns TRUE and "use_xterm_mouse" returns 0.
        I think it is a matter of course because I do not set anything to ttymouse.
        So the string value "xterm" is set to ttym_flags around there automatically, and this condition around term.c:4084 returns FALSE.

        if (!option_was_set((char_u *)"ttym"))

        Thanks.
        ---
        Hayaki Saito
        user@...

        On 2012/12/03, at 1:08, Bram Moolenaar wrote:

        >
        > Hayaki Saito wrote:
        >
        >> By Patch 7.3.699, this line was added.
        >>
        >>> + if (!option_was_set((char_u *)"ttym"))
        >>
        >> With this condition clause, The ttymouse automatic detection behavior that had been detected as "xterm2", also seems to be changed.
        >> In .vimrc, If we set mouse=a and don't set any value to "ttymouse", this change is found out.
        >> In this case, former vim sets "xterm2" to ttymouse, but new one sets "xterm".
        >>
        >> This change affects some terminal emulators that report Pv value(xterm version) in the specific range(that is more than 95, and less than 20000), ageinst DA2 query,
        >> such as xterm, gnome-terminal, konsole, mlterm, iTerm2, tmux ... etc.
        >>
        >> Is this the intended behavior?
        >
        > It works correctly for me, setting 'ttymouse' to "sgr" automatically.
        > Perhaps your combinations of features is different? There is one other
        > call to set 'ttymouse', if that somehow happens first then it won't be
        > set again. For a quick check you can comment out these lines in term.c:
        >
        > if (p != NULL)
        > set_option_value((char_u *)"ttym", 0L, p, 0);
        >
        > If that works, then try:
        >
        > if (p != NULL && *p != NUL)
        > set_option_value((char_u *)"ttym", 0L, p, 0);
        >
        >
        > --
        >> From "know your smileys":
        > % Bike accident. A bit far-fetched, I suppose; although...
        > o _ _ _
        > _o /\_ _ \\o (_)\__/o (_)
        > _< \_ _>(_) (_)/<_ \_| \ _|/' \/
        > (_)>(_) (_) (_) (_) (_)' _\o_
        >
        > /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        > /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        > \\\ an exciting new programming language -- http://www.Zimbu.org ///
        > \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
        >
        > --
        > 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 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
      • Bram Moolenaar
        ... Thanks. I could reproduce it now. This patch should fix it: ... *************** ... } /* + * Reset the flag indicating option name was set. + */ +
        Message 3 of 7 , Dec 3, 2012
        • 0 Attachment
          Hayaki Saito wrote:

          > > It works correctly for me, setting 'ttymouse' to "sgr" automatically.
          >
          > Hmm, I checked this problem in Debian squeeze and OSX 10.7 environment.
          >
          > My $HOME/.vimrc is here:
          > --
          > set nocompatible
          > set mouse=a
          > --
          >
          > There are no statements any more.
          > The environment variable $TERM is "xterm".
          >
          > I compared changeset 3884 (Patch 698) with 3885 (Patch 699), with configuring --with-features=huge.
          > The details of features are here:
          > +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent
          > +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
          > +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff
          > +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi
          > +file_in_path +find_in_path +float +folding -footer +fork() +gettext
          > -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall
          > +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname
          > +mouse +mouseshape +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm
          > +mouse_sgr -mouse_sysmouse +mouse_urxvt +mouse_xterm +multi_byte +multi_lang
          > -mzscheme +netbeans_intg +path_extra -perl +persistent_undo +postscript
          > +printer +profile -python -python3 +quickfix +reltime +rightleft -ruby
          > +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop
          > +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse
          > +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual
          > +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup
          > +X11 -xfontset +xim +xsmp_interact +xterm_clipboard -xterm_save
          >
          > Yukihiro Nakadaira tested it in Ubuntu 12.10 xterm and gnome-terminal
          > He also checked Patch 698 and Patch 699.
          > He says, when He launch vim with "-u NONE -N" option, patch 698 sets ttymouse=sgr automatically, but patch 699 sets ttymouse=xterm.
          >
          > Hirohito Higash tested in Fedora 16 and PuTTY. $TERM is "xterm".
          > He checked Patch 698 and Patch 744.
          > He says, when He launch vim with "-N" option, patch 698 sets ttymouse=xterm2 automatically, but patch 744 sets ttymouse=xterm.
          >
          > > For a quick check you can comment out these lines in term.c:
          > >
          > > if (p != NULL)
          > > set_option_value((char_u *)"ttym", 0L, p, 0);
          > >
          > > If that works, then try:
          > >
          > > if (p != NULL && *p != NUL)
          > > set_option_value((char_u *)"ttym", 0L, p, 0);
          >
          > With commenting out these lines, automatic detection works well.
          >
          > /* if (p != NULL)
          > set_option_value((char_u *)"ttym", 0L, p, 0); */
          >
          > but It does not works.
          >
          > if (p != NULL && *p != NUL)
          > set_option_value((char_u *)"ttym", 0L, p, 0);
          >
          > I make sure "use_xterm_like_mouse" returns TRUE and "use_xterm_mouse" returns 0.
          > I think it is a matter of course because I do not set anything to ttymouse.
          > So the string value "xterm" is set to ttym_flags around there automatically, and this condition around term.c:4084 returns FALSE.
          >
          > if (!option_was_set((char_u *)"ttym"))

          Thanks. I could reproduce it now. This patch should fix it:

          *** ../vim-7.3.744/src/option.c 2012-10-21 03:45:57.000000000 +0200
          --- src/option.c 2012-12-03 20:07:32.000000000 +0100
          ***************
          *** 11179,11184 ****
          --- 11179,11197 ----
          }

          /*
          + * Reset the flag indicating option "name" was set.
          + */
          + void
          + reset_option_was_set(name)
          + char_u *name;
          + {
          + int idx = findoption(name);
          +
          + if (idx >= 0)
          + options[idx].flags &= ~P_WAS_SET;
          + }
          +
          + /*
          * compatible_set() - Called when 'compatible' has been set or unset.
          *
          * When 'compatible' set: Set all relevant options (those that have the P_VIM)
          *** ../vim-7.3.744/src/proto/option.pro 2012-10-21 00:10:29.000000000 +0200
          --- src/proto/option.pro 2012-12-03 20:08:36.000000000 +0100
          ***************
          *** 52,57 ****
          --- 52,58 ----
          void vimrc_found __ARGS((char_u *fname, char_u *envname));
          void change_compatible __ARGS((int on));
          int option_was_set __ARGS((char_u *name));
          + void reset_option_was_set __ARGS((char_u *name));
          int can_bs __ARGS((int what));
          void save_file_ff __ARGS((buf_T *buf));
          int file_ff_differs __ARGS((buf_T *buf, int ignore_empty));
          *** ../vim-7.3.744/src/term.c 2012-10-21 02:10:20.000000000 +0200
          --- src/term.c 2012-12-03 20:09:28.000000000 +0100
          ***************
          *** 1864,1870 ****
          --- 1864,1875 ----
          }
          # endif
          if (p != NULL)
          + {
          set_option_value((char_u *)"ttym", 0L, p, 0);
          + /* Reset the WAS_SET flag, 'ttymouse' can be set to "sgr" or
          + * "xterm2" in check_termcode(). */
          + reset_option_was_set((char_u *)"ttym");
          + }
          if (p == NULL
          # ifdef FEAT_GUI
          || gui.in_use


          --
          I AM THANKFUL...
          ...for all the complaining I hear about the government
          because it means we have freedom of speech.

          /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
          /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
          \\\ an exciting new programming language -- http://www.Zimbu.org ///
          \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

          --
          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
        • Hayaki Saito
          Bram, ... It works! It seems to be a nice solution. Thanks. ... Hayaki Saito user@zuse.jp ... -- You received this message from the vim_dev maillist. Do not
          Message 4 of 7 , Dec 4, 2012
          • 0 Attachment
            Bram,

            This patch should fix it:

            It works!
            It seems to be a nice solution.

            Thanks.
            ---
            Hayaki Saito
            user@...

            On 2012/12/04, at 4:37, Bram Moolenaar wrote:


            Hayaki Saito wrote:

            It works correctly for me, setting 'ttymouse' to "sgr" automatically.

            Hmm, I checked this problem in Debian squeeze and OSX 10.7 environment.

            My $HOME/.vimrc is here:
            --
            set nocompatible
            set mouse=a
            --

            There are no statements any more.
            The environment variable $TERM is "xterm".

            I compared changeset 3884 (Patch 698) with 3885 (Patch 699), with configuring --with-features=huge.
            The details of features are here:
            +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent
            +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
            +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff
            +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi
            +file_in_path +find_in_path +float +folding -footer +fork() +gettext
            -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall
            +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname
            +mouse +mouseshape +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm
            +mouse_sgr -mouse_sysmouse +mouse_urxvt +mouse_xterm +multi_byte +multi_lang
            -mzscheme +netbeans_intg +path_extra -perl +persistent_undo +postscript
            +printer +profile -python -python3 +quickfix +reltime +rightleft -ruby
            +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop
            +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse
            +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual
            +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup
            +X11 -xfontset +xim +xsmp_interact +xterm_clipboard -xterm_save

            Yukihiro Nakadaira tested it in Ubuntu 12.10 xterm and gnome-terminal
            He also checked Patch 698 and Patch 699.
            He says, when He launch vim with "-u NONE -N" option, patch 698 sets ttymouse=sgr automatically, but patch 699 sets ttymouse=xterm.

            Hirohito Higash tested in Fedora 16 and PuTTY.  $TERM is "xterm".
            He checked Patch 698 and Patch 744.
            He says, when He launch vim with "-N" option, patch 698 sets ttymouse=xterm2 automatically, but patch 744 sets ttymouse=xterm.

            For a quick check you can comment out these lines in term.c:

            if (p != NULL)
               set_option_value((char_u *)"ttym", 0L, p, 0);

            If that works, then try:

            if (p != NULL && *p != NUL)
               set_option_value((char_u *)"ttym", 0L, p, 0);

            With commenting out these lines, automatic detection works well.

            /* if (p != NULL)
               set_option_value((char_u *)"ttym", 0L, p, 0); */

            but It does not works.

            if (p != NULL && *p != NUL)
               set_option_value((char_u *)"ttym", 0L, p, 0);

            I make sure "use_xterm_like_mouse" returns TRUE and "use_xterm_mouse" returns 0.
            I think it is a matter of course because I do not set anything to ttymouse.
            So the string value "xterm" is set to ttym_flags around there automatically, and this condition around term.c:4084 returns FALSE.

                                    if (!option_was_set((char_u *)"ttym"))

            Thanks.  I could reproduce it now.  This patch should fix it:

            *** ../vim-7.3.744/src/option.c 2012-10-21 03:45:57.000000000 +0200
            --- src/option.c 2012-12-03 20:07:32.000000000 +0100
            ***************
            *** 11179,11184 ****
            --- 11179,11197 ----
             }

             /*
            +  * Reset the flag indicating option "name" was set.
            +  */
            +     void
            + reset_option_was_set(name)
            +     char_u *name;
            + {
            +     int idx = findoption(name);
            +
            +     if (idx >= 0)
            + options[idx].flags &= ~P_WAS_SET;
            + }
            +
            + /*
              * compatible_set() - Called when 'compatible' has been set or unset.
              *
              * When 'compatible' set: Set all relevant options (those that have the P_VIM)
            *** ../vim-7.3.744/src/proto/option.pro 2012-10-21 00:10:29.000000000 +0200
            --- src/proto/option.pro 2012-12-03 20:08:36.000000000 +0100
            ***************
            *** 52,57 ****
            --- 52,58 ----
             void vimrc_found __ARGS((char_u *fname, char_u *envname));
             void change_compatible __ARGS((int on));
             int option_was_set __ARGS((char_u *name));
            + void reset_option_was_set __ARGS((char_u *name));
             int can_bs __ARGS((int what));
             void save_file_ff __ARGS((buf_T *buf));
             int file_ff_differs __ARGS((buf_T *buf, int ignore_empty));
            *** ../vim-7.3.744/src/term.c 2012-10-21 02:10:20.000000000 +0200
            --- src/term.c 2012-12-03 20:09:28.000000000 +0100
            ***************
            *** 1864,1870 ****
            --- 1864,1875 ----
              }
             #  endif
              if (p != NULL)
            + {
                 set_option_value((char_u *)"ttym", 0L, p, 0);
            +    /* Reset the WAS_SET flag, 'ttymouse' can be set to "sgr" or
            +     * "xterm2" in check_termcode(). */
            +    reset_option_was_set((char_u *)"ttym");
            + }
              if (p == NULL
             #   ifdef FEAT_GUI
              || gui.in_use


            --
            I AM THANKFUL...
            ...for all the complaining I hear about the government
            because it means we have freedom of speech.

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
            ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
            \\\  an exciting new programming language -- http://www.Zimbu.org        ///
            \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

            --
            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 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
          Your message has been successfully submitted and would be delivered to recipients shortly.