Changeset 555

Show
Ignore:
Timestamp:
01/24/10 16:34:20 (3 years ago)
Author:
stefan
Message:

alt+up fix in the diff

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/sce/component/SCEDiff.java

    r554 r555  
    8686      public void keyPressed(KeyEvent e) { 
    8787        if (e.getModifiers() == KeyEvent.ALT_MASK) { 
     88          // alt+up 
    8889          if (e.getKeyCode() == KeyEvent.VK_UP) { 
    8990            jumpToPreviousTargetModification(); 
    9091            e.consume(); 
    9192          } 
     93          // alt+down 
    9294          if (e.getKeyCode() == KeyEvent.VK_DOWN) { 
    9395            jumpToNextTargetModification(); 
     
    101103      public void keyPressed(KeyEvent e) { 
    102104        if (e.getModifiers() == KeyEvent.ALT_MASK) { 
     105          // alt+up 
    103106          if (e.getKeyCode() == KeyEvent.VK_UP) { 
    104107            jumpToPreviousSourceModification(); 
    105108            e.consume(); 
    106109          } 
     110          // alt+down 
    107111          if (e.getKeyCode() == KeyEvent.VK_DOWN) { 
    108112            jumpToNextSourceModification(); 
     
    124128      } 
    125129    } 
    126  
    127130  } 
    128131 
     
    143146    int currRow = caret.getRow(); 
    144147 
    145     for (int modi = 0; modi < modifications.size(); modi++) { 
    146       if (modifications.get(modi).getSourceStartIndex() >= currRow) { 
    147         if (modi > 0) { 
    148           right.getCaret().moveTo(modifications.get(modi-1).getSourceStartIndex(), 0); 
    149         } 
     148    for (int modi = modifications.size()-1; modi >= 0; modi--) { 
     149      if (modifications.get(modi).getSourceStartIndex() < currRow) { 
     150        right.getCaret().moveTo(modifications.get(modi).getSourceStartIndex(), 0); 
    150151        break; 
    151152      }