Merge pull request #490 from ailin-nemui/pgup-fetch-lines
make pageup key trigger fetch more lines
This commit is contained in:
commit
336c8d5a5c
1 changed files with 6 additions and 0 deletions
|
@ -292,6 +292,12 @@ weechat.directive('inputBar', function() {
|
||||||
|
|
||||||
// Page up -> scroll up
|
// Page up -> scroll up
|
||||||
if ($event.type === "keydown" && code === 33 && document.activeElement === inputNode && !$event.ctrlKey && !$event.altKey && !$event.shiftKey) {
|
if ($event.type === "keydown" && code === 33 && document.activeElement === inputNode && !$event.ctrlKey && !$event.altKey && !$event.shiftKey) {
|
||||||
|
if (bufferlines.scrollTop === 0) {
|
||||||
|
if (!$rootScope.loadingLines) {
|
||||||
|
$scope.$parent.fetchMoreLines();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
lines = bufferlines.querySelectorAll("tr");
|
lines = bufferlines.querySelectorAll("tr");
|
||||||
for (i = lines.length - 1; i >= 0; i--) {
|
for (i = lines.length - 1; i >= 0; i--) {
|
||||||
if ((lines[i].offsetTop-bufferlines.scrollTop)<bufferlines.clientHeight/2) {
|
if ((lines[i].offsetTop-bufferlines.scrollTop)<bufferlines.clientHeight/2) {
|
||||||
|
|
Loading…
Reference in a new issue