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

Re: M$W2000: Edit->Copy dosn't work after filetype on

Expand Messages
  • Milan Vancura
    ... Not any my script, I run virgin gvim only. runtime menu.vim (re)defines all basic menus (File,Edit etc.) when it is called from runtime filetype.vim. But
    Message 1 of 6 , Sep 2, 2002
      > Very strange, since these menus and toolbar buttons all use the same
      > commands. Perhaps some script redefined the menus?

      Not any my script, I run "virgin gvim" only. runtime\menu.vim (re)defines all
      basic menus (File,Edit etc.) when it is called from runtime\filetype.vim. But
      the problems are elsewhere.

      set nocompatible
      let did_install_syntax_menu=1
      filetype on

      works OK.

      Little tracing mechanism shows me that if I don't set this variable before
      "filetype on", menu.vim is executed twice. Firstly with all three conditions
      passed (default_menu, syntax_menu and syntax_menu2), secondly with all
      conditions skipped (so nothing is done).

      If I set the variable, there is only one pass of menu.vim and only the first
      condition (default_menu) is done, other two are skipped.

      The problem is why the code in the "syntax menu conditions" does so strange
      things. Very strange. For example if I mark a visual block and do Edit.Copy
      three or four times, vim will crash. ("gvim.exe generated error and will be
      restarted by Windows system.")

      Milan Vancura
    • Bram Moolenaar
      ... I have no explanation for this behavior. Don t forget that this works just fine for most people. Thus there must be something special about your
      Message 2 of 6 , Sep 2, 2002
        Milan Vancura wrote:

        > > Very strange, since these menus and toolbar buttons all use the same
        > > commands. Perhaps some script redefined the menus?
        >
        > Not any my script, I run "virgin gvim" only. runtime\menu.vim (re)defines all
        > basic menus (File,Edit etc.) when it is called from runtime\filetype.vim. But
        > the problems are elsewhere.
        >
        > set nocompatible
        > let did_install_syntax_menu=1
        > filetype on
        >
        > works OK.
        >
        > Little tracing mechanism shows me that if I don't set this variable before
        > "filetype on", menu.vim is executed twice. Firstly with all three conditions
        > passed (default_menu, syntax_menu and syntax_menu2), secondly with all
        > conditions skipped (so nothing is done).
        >
        > If I set the variable, there is only one pass of menu.vim and only the first
        > condition (default_menu) is done, other two are skipped.
        >
        > The problem is why the code in the "syntax menu conditions" does so strange
        > things. Very strange. For example if I mark a visual block and do Edit.Copy
        > three or four times, vim will crash. ("gvim.exe generated error and will be
        > restarted by Windows system.")

        I have no explanation for this behavior. Don't forget that this works
        just fine for most people. Thus there must be something special about
        your situation that causes the problem. Any idea? Are you using
        translated menus perhaps?

        --
        CUSTOMER: You're not fooling anyone y'know. Look, isn't there something
        you can do?
        DEAD PERSON: I feel happy... I feel happy.
        [whop]
        CUSTOMER: Ah, thanks very much.
        MORTICIAN: Not at all. See you on Thursday.
        CUSTOMER: Right.
        The Quest for the Holy Grail (Monty Python)

        /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
        /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
        \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
        \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
      • Milan Vancura
        ... I have made some new tests. All problems with Edit.Copy/Cut/Paste become if and only if menu.vim is sourced from filetype.vim (lines 1376-1381). It
        Message 3 of 6 , Sep 5, 2002
          > > The problem is why the code in the "syntax menu conditions" does so strange
          > > things. Very strange. For example if I mark a visual block and do Edit.Copy
          > > three or four times, vim will crash. ("gvim.exe generated error and will be
          > > restarted by Windows system.")
          >
          > I have no explanation for this behavior. Don't forget that this works
          > just fine for most people. Thus there must be something special about
          > your situation that causes the problem. Any idea? Are you using
          > translated menus perhaps?

          I have made some new tests.

          All problems with Edit.Copy/Cut/Paste become "if and only if" menu.vim is
          sourced from filetype.vim (lines 1376-1381). It doesn't depend on setting menu
          items, syntax and anything else.

          I used the binary package "GUI vim" + vim rt files package from vim.org. The
          "Self-installing executable" vim from vim.org (which I have installed now)
          doesn't have this problem.

          Maybe I did something wrong before, maybe it's an error on my system and maybe
          there is some error in "GUI executable" vim at vim.org. I think testing it on
          the system of someone else could be a good idea.

          Have a nice day,

          Milan
        • Bram Moolenaar
          ... How do you make sure that menu.vim is sourced from filetype.vim? Anyway, starting Vim with -V shows me it s done this way for me. I don t see these
          Message 4 of 6 , Sep 5, 2002
            Milan Vancura wrote:

            > > > The problem is why the code in the "syntax menu conditions" does
            > > > so strange things. Very strange. For example if I mark a visual
            > > > block and do Edit.Copy three or four times, vim will crash.
            > > > ("gvim.exe generated error and will be restarted by Windows
            > > > system.")
            > >
            > > I have no explanation for this behavior. Don't forget that this works
            > > just fine for most people. Thus there must be something special about
            > > your situation that causes the problem. Any idea? Are you using
            > > translated menus perhaps?
            >
            > I have made some new tests.
            >
            > All problems with Edit.Copy/Cut/Paste become "if and only if" menu.vim
            > is sourced from filetype.vim (lines 1376-1381). It doesn't depend on
            > setting menu items, syntax and anything else.

            How do you make sure that menu.vim is sourced from filetype.vim?
            Anyway, starting Vim with "-V" shows me it's done this way for me. I
            don't see these problems though.

            > I used the binary package "GUI vim" + vim rt files package from vim.org. The
            > "Self-installing executable" vim from vim.org (which I have installed now)
            > doesn't have this problem.

            Which binary package is that? gvim61.zip? It is compiled in the same
            way as the one included with the self-installing executable, only with
            less features.

            > Maybe I did something wrong before, maybe it's an error on my system
            > and maybe there is some error in "GUI executable" vim at vim.org. I
            > think testing it on the system of someone else could be a good idea.

            Since you reported a crash, I would suspect something went wrong with
            downloading that specific gvim.exe.

            --
            LAUNCELOT: I am, sir. I am a Knight of King Arthur.
            FATHER: 'Mm ... very nice castle, Camelot ... very good pig country....
            "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

            /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
            /// Creator of Vim - Vi IMproved -- http://www.vim.org \\\
            \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
            \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
          Your message has been successfully submitted and would be delivered to recipients shortly.