Ignore:
Timestamp:
Jun 23, 2009, 3:58:15 AM (16 years ago)
Author:
Andreas Schnellbacher
Message:
  • Fixed Sh+F10 to not use the pos. of the previous mouse click.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/netlabs/macros/popup.e

    r2375 r2384  
    55* Copyright (c) Netlabs EPM Distribution Project 2004
    66*
    7 * $Id: popup.e,v 1.10 2009-06-23 00:53:58 aschn Exp $
     7* $Id: popup.e,v 1.11 2009-06-23 01:58:15 aschn Exp $
    88*
    99* ===========================================================================
     
    161161   activemenu = menuname
    162162
    163 compile if 0
    164    call psave_pos( savedpos)
    165 compile endif
     163   fNoMove = (translate( strip( arg(1))) = 'NOCURSORMOVE')
    166164
    167165   deletemenu menuname, 0, 0, 0
    168    'BuildPopupMenu' menuname
     166   'BuildPopupMenu' menuname fNoMove
    169167   showmenu menuname, 1
    170 
    171 compile if 0
    172    -- Disadvantage: scrolls window if cursor is off the edit window
    173    call prestore_pos( savedpos)
    174 compile endif
    175168
    176169   -- Cascade menu now replaced by inline menu items, because it doesnot work:
     
    185178   universal LEXAM_is_available
    186179compile endif
    187    menuname = arg(1)
     180   parse arg menuname fNoMove
    188181   if menuname = '' then
    189182      menuname = 'popup1'
    190183   endif
     184
     185   fNoMove = (strip( arg(2)) = 1)
     186
    191187   mt = leftstr( marktype(), 1)
    192188   fInMark = mouse_in_mark()  -- Save in a variable so user's include file can test.
     
    260256
    261257   elseif mt <> ' ' then  -- Build Outside-Mark pop-up --------------------------------------------------------------------------------
    262       'MH_gotoposition'
     258      if not fNoMove then
     259         'MH_gotoposition'
     260      endif
    263261      buildmenuitem menuname, 80, 8000, COPY_MARK_MENU__MSG\9'Alt+C',     'DUPMARK C'COPY_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_COPYMARK, 0)
    264262      buildmenuitem menuname, 80, 8001, MOVE_MARK_MENU__MSG\9'Alt+M',     'DUPMARK M'MOVE_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_MOVE, 0)
     
    269267
    270268   else  -- Build No-mark pop-up ------------------------------------------------------------------------------------------------------
    271       'MH_gotoposition'
     269      if not fNoMove then
     270         'MH_gotoposition'
     271      endif
    272272      ch = substr( textline(.line), .col, 1)
    273273      gray_if_space = 16384*( ch = ' ' | not .line)
Note: See TracChangeset for help on using the changeset viewer.