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

68443Re: [PATCH] Support mouse wheel scrolling of inactive windows in the terminal

Expand Messages
  • Bram Moolenaar
    Feb 25, 2013
      Brodie Rao wrote:

      > On Sun, Feb 24, 2013 at 12:40 PM, Bram Moolenaar <Bram@...> wrote:
      > >
      > > Brodie Rao wrote:
      > >
      > >> Support mouse wheel scrolling of inactive windows in the terminal
      > >
      > > Does this actually work for every type of terminal that supports the
      > > mouse wheel? Or only for some of them?
      > Reading check_termcode() in src/term.c, I find the following:
      > and FEAT_MOUSE_URXVT, all mouse events come with the mouse's position.
      > FEAT_MOUSE_PTERM, the mouse wheel is not supported, so mouse wheel
      > events will never be sent.
      > - According to src/os_msdos.c, DOS_MOUSE also doesn't support the mouse wheel.
      > I think that covers everything.

      OK. I do think users will be surprised that the behavior changes.
      But it becomes more consistent with the GUI.

      > It's possible that there are some terminal emulators that don't set
      > the mouse position properly for mouse wheel events, but considering
      > all the protocols consider it a normal button press like any other
      > button, that seems unlikely.
      > I did notice one issue in my patch that I'm not sure about: Is the
      > gui.in_use check necessary? If it's false, does Vim fall back to the
      > terminal, and if so, will it handle mouse events? If that's the case,
      > that check probably shouldn't be there.

      The Unix version of Vim has one binary that can run both in a terminal
      and as a GUI. You can switch from terminal to GUI with the ":gui"
      command. Thus we need a runtime check if it matters whether the GUI is

      The budget process was invented by an alien race of sadistic beings who
      resemble large cats.
      (Scott Adams - The Dilbert principle)

      /// 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 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/groups/opt_out.
    • Show all 6 messages in this topic