[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[tm-cvs-commit] moberhuber org.eclipse.tm.core/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas TextCanvas.java
|
- From: Eclipse CVS Genie <genie@xxxxxxxxxxx>
- Date: Mon, 23 May 2011 12:19:49 +0000
- Delivered-to: tm-cvs-commit@eclipse.org
Update of /cvsroot/tools/org.eclipse.tm.core/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas
In directory dev1:/tmp/cvs-serv30509/src/org/eclipse/tm/internal/terminal/textcanvas
Modified Files:
TextCanvas.java
Log Message:
Bug 324608 - [terminal] Terminal has strange scrolling behaviour
Index: TextCanvas.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.core/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/TextCanvas.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** TextCanvas.java 21 Jan 2011 00:27:53 -0000 1.22
--- TextCanvas.java 23 May 2011 12:19:47 -0000 1.23
***************
*** 15,18 ****
--- 15,19 ----
* Anton Leherbauer (Wind River) - [219589] Copy an entire line selection
* Anton Leherbauer (Wind River) - [196465] Resizing Terminal changes Scroller location
+ * Anton Leherbauer (Wind River) - [324608] Terminal has strange scrolling behaviour
*******************************************************************************/
package org.eclipse.tm.internal.terminal.textcanvas;
***************
*** 98,103 ****
return;
// scroll to end (unless scroll lock is active)
! if (!fResizing)
scrollToEnd();
}
});
--- 99,106 ----
return;
// scroll to end (unless scroll lock is active)
! if (!fResizing) {
! calculateGrid();
scrollToEnd();
+ }
}
});
***************
*** 258,269 ****
private void calculateGrid() {
Rectangle virtualBounds = getVirtualBounds();
- setVirtualExtend(getCols()*getCellWidth(),getRows()*getCellHeight());
setRedraw(false);
try {
! // scroll to end if view port was near last line
! Rectangle viewRect = getViewRectangle();
! if (virtualBounds.height - (viewRect.y + viewRect.height) < getCellHeight() * 2)
! scrollToEnd();
getParent().layout();
} finally {
setRedraw(true);
--- 261,274 ----
private void calculateGrid() {
Rectangle virtualBounds = getVirtualBounds();
setRedraw(false);
try {
! setVirtualExtend(getCols()*getCellWidth(),getRows()*getCellHeight());
getParent().layout();
+ if (fResizing) {
+ // scroll to end if view port was near last line
+ Rectangle viewRect = getViewRectangle();
+ if (virtualBounds.height - (viewRect.y + viewRect.height) < getCellHeight() * 2)
+ scrollToEnd();
+ }
} finally {
setRedraw(true);