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

481Annoying Mouse bug and fix.

Expand Messages
  • Mike Hopkirk(hops)
    Nov 15, 2001
    • 0 Attachment
      Running Jasspa-me Aug-2001 on linux RHat 6.2 ( built from source)

      - pressing MB1 in editor pane moves cursor to pressed place but thereafter
      refuses to action any keyboard input and only takes
      additional mouse cursor movement (no mouse popup or selection)

      Applied two fixes - one in src and one in mouse.emf macro file
      (.00 versions are original source)
      main.c - execFunc code incorrect wrt comment

      *** main.c.00 Tue Aug 7 06:14:36 2001
      --- main.c Tue Nov 13 16:39:36 2001
      ***************
      *** 277,290 ****
      * so many hoops I've changed to input support so the macros can fail
      * in such a way as to indicate that they have not handled this input,
      * this allows them to pick and choose.
      ! * The method chosen was to check the command variable status if it aborted, if
      ! * defined to "0" then its not handled the input
      */
      if((ii=curbp->inputFunc) >= 0)
      {
      uint8 *ss ;
      if(((cmdstatus = (execFunc(ii,f,n) == TRUE))) ||
      ! ((ss=getUsrLclCmdVar((uint8 *)"status",&(cmdTable[ii]->varList))) == errorm) || meAtoi(ss))
      return cmdstatus ;
      }
      if(index >= 0)
      --- 277,292 ----
      * so many hoops I've changed to input support so the macros can fail
      * in such a way as to indicate that they have not handled this input,
      * this allows them to pick and choose.
      ! * The method chosen was to check the command variable status if the
      ! * macro aborted, if defined to "0" then its not handled the input
      */
      if((ii=curbp->inputFunc) >= 0)
      {
      uint8 *ss ;
      if(((cmdstatus = (execFunc(ii,f,n) == TRUE))) ||
      ! (((ss= getUsrLclCmdVar((uint8 *)"status",
      ! &(cmdTable[ii]->varList))) == errorm)
      ! && meAtoi(ss)))
      return cmdstatus ;
      }
      if(index >= 0)

      In mouse.emf macro mouse-drop-t1 is setting up a buffer-input macro
      (presumably for callback handling) but never clearing it
      - above src change fixes problem but key action execution thereafter
      is always doing buffer-input macro when doesn't need to.

      Liberally Added code to clear buffer-input macro - this probably is overkill
      but if fixes the redundant execution.

      *** mouse.emf.00 Tue Nov 13 15:53:58 2001
      --- mouse.emf Tue Nov 13 16:36:10 2001
      ***************
      *** 227,232 ****
      --- 227,233 ----
      !elif &seq @cck "callback"
      !if ¬ &seq @cc "mouse-drop-t1"
      execute-named-command @cc
      + set-variable $buffer-input ""
      !return
      !endif
      !endif
      ***************
      *** 244,249 ****
      --- 245,251 ----
      -1 create-callback mouse-drop-t1
      execute-line :mouse-word-select
      !endif
      + set-variable $buffer-input ""
      !return
      !endif
      !endif
      ***************
      *** 272,286 ****
      --- 274,291 ----
      !elif &seq .drop @cck
      show-region
      300 create-callback mouse-drop-t1
      + set-variable $buffer-input ""
      !return
      !endif
      set-variable $buffer-input .input
      -1 create-callback mouse-drop-t1
      !if &and &equ #l0 $window-line &equ #l1 $window-col
      !if &seq @cck "callback"
      + set-variable $buffer-input ""
      !return
      !endif
      ; abort to tell ME to handle the actual input
      + set-variable $buffer-input ""
      set-variable .status "0"
      !abort
      !endif
      ***************
      *** 289,294 ****
      --- 294,300 ----
      !if &seq @cck "callback"
      show-region
      msshift
      + set-variable $buffer-input ""
      !return
      !endif
      copy-region
      ***************
      *** 302,307 ****
      --- 308,314 ----
      ; reset the last command to the copy-region
      set-variable @cl copy-region
      !if &seq @cck "callback"
      + set-variable $buffer-input ""
      !return
      !endif
      ; abort to tell ME to handle the actual input

      ... No job is finished until cleanup is done ...


      Is there any particular reason for the binary search for matching
      key bindings to function-names and function-names to code execution
      rather than a hash table setup as later version of MicroEmacs (4.00) do ?


      --
      - hops
      Everything disclaimed (including disclaimer)
      ----<hops@...>-----------------------------------------------------
      Mike Hopkirk (hops) | Whenever possible steal code
      InterSAN Inc | -- Tom Duff. (ex) Bell Labs
    • Show all 4 messages in this topic