1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 18:56:02 +02:00

[Bug 205486] [terminal] create a switch for scroll locking

This commit is contained in:
Martin Oberhuber 2010-06-04 13:38:01 +00:00
parent cf2d279424
commit 7c1b0c438a
2 changed files with 6 additions and 13 deletions

View file

@ -7,7 +7,7 @@ feature@org.eclipse.tm.terminal.ssh=v201005271030,:pserver:anonymous:none@dev.ec
feature@org.eclipse.tm.terminal.telnet=v201005032000,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.telnet-feature
feature@org.eclipse.tm.terminal.test=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.test-feature
feature@org.eclipse.tm.terminal.view=v201006030830,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.view-feature
plugin@org.eclipse.tm.terminal=v201006030830,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal
plugin@org.eclipse.tm.terminal=v201006041340,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal
plugin@org.eclipse.tm.terminal.local=v201006041322,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.local
plugin@org.eclipse.tm.terminal.serial=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.serial
plugin@org.eclipse.tm.terminal.ssh=v201005271030,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.ssh

View file

@ -92,12 +92,8 @@ public class TextCanvas extends GridCanvas {
public void terminalDataChanged() {
if(isDisposed())
return;
// scroll to end (unless scroll lock is active)
scrollToEnd();
// make sure the scroll area is correct:
if (!fScrollLock) {
scrollY(getVerticalBar());
scrollX(getHorizontalBar());
}
}
});
// let the cursor blink if the text canvas gets the focus...
@ -250,14 +246,8 @@ public class TextCanvas extends GridCanvas {
setVirtualExtend(getCols()*getCellWidth(),getRows()*getCellHeight());
setRedraw(false);
try {
// scroll to end
// scroll to end (unless scroll lock is active)
scrollToEnd();
// make sure the scroll area is correct:
if (!fScrollLock) {
scrollY(getVerticalBar());
scrollX(getHorizontalBar());
}
getParent().layout();
} finally {
setRedraw(true);
@ -273,6 +263,9 @@ public class TextCanvas extends GridCanvas {
if(v.y!=-y) {
setVirtualOrigin(v.x,y);
}
// make sure the scroll area is correct:
scrollY(getVerticalBar());
scrollX(getHorizontalBar());
}
}
/**