Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 324608
Collapse All | Expand All

(-)src/org/eclipse/tm/internal/terminal/textcanvas/TextCanvas.java (-6 / +11 lines)
Lines 14-19 Link Here
14
 * Uwe Stieber (Wind River) - [205486] Fix ScrollLock always moving to line 1
14
 * Uwe Stieber (Wind River) - [205486] Fix ScrollLock always moving to line 1
15
 * Anton Leherbauer (Wind River) - [219589] Copy an entire line selection
15
 * Anton Leherbauer (Wind River) - [219589] Copy an entire line selection
16
 * Anton Leherbauer (Wind River) - [196465] Resizing Terminal changes Scroller location
16
 * Anton Leherbauer (Wind River) - [196465] Resizing Terminal changes Scroller location
17
 * Anton Leherbauer (Wind River) - [324608] Terminal has strange scrolling behaviour
17
 *******************************************************************************/
18
 *******************************************************************************/
18
package org.eclipse.tm.internal.terminal.textcanvas;
19
package org.eclipse.tm.internal.terminal.textcanvas;
19
20
Lines 97-104 Link Here
97
				if(isDisposed())
98
				if(isDisposed())
98
					return;
99
					return;
99
				// scroll to end (unless scroll lock is active)
100
				// scroll to end (unless scroll lock is active)
100
				if (!fResizing)
101
				if (!fResizing) {
102
					calculateGrid();
101
					scrollToEnd();
103
					scrollToEnd();
104
				}
102
			}
105
			}
103
		});
106
		});
104
		// let the cursor blink if the text canvas gets the focus...
107
		// let the cursor blink if the text canvas gets the focus...
Lines 257-270 Link Here
257
260
258
	private void calculateGrid() {
261
	private void calculateGrid() {
259
		Rectangle virtualBounds = getVirtualBounds();
262
		Rectangle virtualBounds = getVirtualBounds();
260
		setVirtualExtend(getCols()*getCellWidth(),getRows()*getCellHeight());
261
		setRedraw(false);
263
		setRedraw(false);
262
		try {
264
		try {
263
			// scroll to end if view port was near last line
265
			setVirtualExtend(getCols()*getCellWidth(),getRows()*getCellHeight());
264
			Rectangle viewRect = getViewRectangle();
265
			if (virtualBounds.height - (viewRect.y + viewRect.height) < getCellHeight() * 2)
266
				scrollToEnd();
267
			getParent().layout();
266
			getParent().layout();
267
			if (fResizing) {
268
				// scroll to end if view port was near last line
269
				Rectangle viewRect = getViewRectangle();
270
				if (virtualBounds.height - (viewRect.y + viewRect.height) < getCellHeight() * 2)
271
					scrollToEnd();
272
			}
268
		} finally {
273
		} finally {
269
			setRedraw(true);
274
			setRedraw(true);
270
		}
275
		}

Return to bug 324608