VirtualBox

Changeset 3604 in kBuild for trunk


Ignore:
Timestamp:
Feb 4, 2024 11:19:33 PM (15 months ago)
Author:
bird
Message:

SlickEdit/kdev.e: Added function for C-escaping a selection block and bound it to control-shift-\.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SlickEdit/kdev.e

    r3589 r3604  
    7474def  'C-S-T' = k_rebuild_tagfile
    7575def  'C-S-L' = k_style_load
     76def  'C-S-\' = k_newline_escape_selection
    7677
    7778//optional stuff
     
    16861687    _insert_text(sNoRefs);
    16871688}
     1689
     1690/* Adds newline escape slashes to the current selection. */
     1691void k_newline_escape_selection()
     1692{
     1693    filter_init();
     1694    typeless rc = filter_get_string(sLine);
     1695    if (rc == 0)
     1696    {
     1697        _str sPrev = '';
     1698        do
     1699        {
     1700            /* */
     1701            if (sLine != '')
     1702                sLine = sLine ' \';
     1703            else
     1704            {
     1705                int offNonWhitespace = pos("[^ \t]", sPrev, 1, 'L');
     1706                if (offNonWhitespace > 0)
     1707                    sLine = _pad(sLine, offNonWhitespace - 1, ' ');
     1708                sLine = sLine '\';
     1709            }
     1710
     1711            filter_put_string(sLine);
     1712
     1713            /* next line */
     1714            sPrev = sLine;
     1715            rc = filter_get_string(sLine);
     1716        } while (rc == 0);
     1717
     1718    }
     1719    else if (isinteger(rc))
     1720        message(get_message(rc));
     1721    else
     1722        message(rc);
     1723}
     1724
    16881725
    16891726/*******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.

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