[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: Tue, 24 May 2011 11:26:46 +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-serv20618/src/org/eclipse/tm/internal/terminal/textcanvas
Modified Files:
Tag: R3_2_maintenance
TextCanvas.java
Log Message:
Bug 346965 - [terminal] Backport to 3.2.x: 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.21.2.1
retrieving revision 1.21.2.2
diff -C2 -d -r1.21.2.1 -r1.21.2.2
*** TextCanvas.java 26 Jan 2011 02:32:19 -0000 1.21.2.1
--- TextCanvas.java 24 May 2011 11:26:44 -0000 1.21.2.2
***************
*** 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);