mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-11 10:15:39 +02:00
[Bug 205486] [terminal] create a switch for scroll locking
This commit is contained in:
parent
6cabe5791d
commit
121000b4f0
1 changed files with 5 additions and 12 deletions
|
@ -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