mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-28 11:25:35 +02:00
[Bug 205486] [terminal] create a switch for scroll locking
This commit is contained in:
parent
cf2d279424
commit
7c1b0c438a
2 changed files with 6 additions and 13 deletions
|
@ -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.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.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
|
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.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.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
|
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
|
||||||
|
|
|
@ -92,12 +92,8 @@ public class TextCanvas extends GridCanvas {
|
||||||
public void terminalDataChanged() {
|
public void terminalDataChanged() {
|
||||||
if(isDisposed())
|
if(isDisposed())
|
||||||
return;
|
return;
|
||||||
|
// scroll to end (unless scroll lock is active)
|
||||||
scrollToEnd();
|
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...
|
// 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());
|
setVirtualExtend(getCols()*getCellWidth(),getRows()*getCellHeight());
|
||||||
setRedraw(false);
|
setRedraw(false);
|
||||||
try {
|
try {
|
||||||
// scroll to end
|
// scroll to end (unless scroll lock is active)
|
||||||
scrollToEnd();
|
scrollToEnd();
|
||||||
// make sure the scroll area is correct:
|
|
||||||
if (!fScrollLock) {
|
|
||||||
scrollY(getVerticalBar());
|
|
||||||
scrollX(getHorizontalBar());
|
|
||||||
}
|
|
||||||
|
|
||||||
getParent().layout();
|
getParent().layout();
|
||||||
} finally {
|
} finally {
|
||||||
setRedraw(true);
|
setRedraw(true);
|
||||||
|
@ -273,6 +263,9 @@ public class TextCanvas extends GridCanvas {
|
||||||
if(v.y!=-y) {
|
if(v.y!=-y) {
|
||||||
setVirtualOrigin(v.x,y);
|
setVirtualOrigin(v.x,y);
|
||||||
}
|
}
|
||||||
|
// make sure the scroll area is correct:
|
||||||
|
scrollY(getVerticalBar());
|
||||||
|
scrollX(getHorizontalBar());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue