Changeset 8751


Ignore:
Timestamp:
03/08/05 02:24:03 (16 years ago)
Author:
piso
Message:

copyRegion(): support emacs emulation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/j/Editor.java

    r8745 r8751  
    33 *
    44 * Copyright (C) 1998-2005 Peter Graves
    5  * $Id: Editor.java,v 1.147 2005-03-07 19:49:16 piso Exp $
     5 * $Id: Editor.java,v 1.148 2005-03-08 02:24:03 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    51675167        if (dot == null)
    51685168            return;
    5169 
    51705169        String message = null;
    5171 
    51725170        if (mark != null) {
    51735171            Region r = new Region(this);
     
    51795177                message = "Region copied to clipboard";
    51805178            }
     5179        } else if (buffer.getMark() != null) {
     5180            Region r = new Region(buffer, dot, buffer.getMark());
     5181            killRing.appendNew(r.toString());
     5182            message = "Region copied to clipboard";
    51815183        } else if (!getDotLine().isBlank()) {
    51825184            killRing.appendNew(getDotLine().getText() + System.getProperty("line.separator"));
     
    51845186        } else
    51855187            return; // Nothing to do.
    5186 
    51875188        if (!isColumnSelection())
    51885189            killRing.copyLastKillToSystemClipboard();
    5189 
    51905190        if (message != null)
    51915191            status(message);
Note: See TracChangeset for help on using the changeset viewer.