Changeset 324


Ignore:
Timestamp:
09/24/08 17:40:49 (16 years ago)
Author:
ra33
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/items/Text.java

    r311 r324  
    601601                        // if this is a backspace key
    602602                        if (text.charAt(0) == KeyEvent.VK_BACK_SPACE) {
    603                                 if (insertPos > 0) {
     603                                if (hasSelection()) {
     604                                        cutSelectedText();
     605                                        clearSelection();
     606                                } else if (insertPos > 0) {
    604607                                        deleteChar(insertPos - 1);
    605608                                        if (pos > 0)
     
    608611                                // if this is a delete key
    609612                        } else if (text.charAt(0) == KeyEvent.VK_DELETE) {
    610                                 if (insertPos < _text.length()) {
     613                                if (hasSelection()) {
     614                                        cutSelectedText();
     615                                        clearSelection();
     616                                } else if (insertPos < _text.length()) {
    611617                                        deleteChar(insertPos);
    612618                                }
Note: See TracChangeset for help on using the changeset viewer.