VirtualBox

Changeset 2388 in kBuild for trunk/VSlickMacros


Ignore:
Timestamp:
Jan 26, 2010 3:12:12 PM (15 years ago)
Author:
bird
Message:

kkeys.e: uuid.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VSlickMacros/kkeys.e

    r2353 r2388  
    4545def  'S-A-]'    = next_buff_tab
    4646def  'S-A-['    = prev_buff_tab
     47def  'S-A-U'    = kkeys_gen_uuid
    4748#endif
    4849/* For the mac (A/M mix, all except A-z): */
     
    5960def  'S-M-]'    = next_buff_tab
    6061def  'S-M-['    = prev_buff_tab
     62def  'S-M-U'    = kkeys_gen_uuid
    6163#endif
    6264/* Fixing brainfucked slickedit silliness: */
    6365def  'M-v'      = paste
     66
     67
     68/** Saves the cursor position. */
     69static long kkeys_save_cur_pos()
     70{
     71   long offset = _QROffset();
     72   message(offset);
     73   return offset;
     74}
     75
     76/** Restores a saved cursor position. */
     77static void kkeys_restore_cur_pos(long lSavedCurPos)
     78{
     79   _GoToROffset(lSavedCurPos);
     80}
     81
    6482
    6583_command kkeys_switch_lines()
     
    149167_command boxer_paste()
    150168{
    151    int rc;
    152    offset = _QROffset();
    153    message(offset);
    154    rc = paste();
    155    _GoToROffset(offset);
     169   long lSavedCurPos = kkeys_save_cur_pos()
     170   paste();
     171   kkeys_restore_cur_pos(lSavedCurPos);
    156172}
    157173
     
    248264
    249265
     266#if __VERSION__ >= 14.0
     267_command kkeys_gen_uuid()
     268{
     269   _str uuid = guid_create_string('G');
     270   uuid = lowcase(uuid);
     271
     272   long lSavedCurPos = kkeys_save_cur_pos();
     273   _insert_text(uuid);
     274   kkeys_restore_cur_pos(lSavedCurPos);
     275}
     276#endif
     277
     278
    250279void nop()
    251280{
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette