glowing-bear/js
Lorenz Hübschle-Schneider aab111bb80 Fix that bug where only one line was loaded
Let me tell the story backwards:
For some reason, only one line would be fetched in `fetchMoreLines`, but
neither `numLines` nor `buffer.requestedLines` were `undefined`. The
paramater `numLines` must have had some strange value, though.
`connection.fetchMoreLines` is invoked through the main controllers
`$scope.fetchMoreLines`, which sets the parameter to `$scope.lines` if it was
undefined before. That value is computed in `$scope.calculateNumLines`,
which takes the height of the lines area and divides it by the height of the first
bufferline. This computation is retriggered on every `resize` event.
The first bufferline is the 'fetch more lines' link at the top of the window. If the
currently active buffer doesn't have more lines, it is hidden with `ngHide`,
causing its `clientHeight` property to be `0`, and the number of lines to be
fetched `$scope.lines = Infinity` (due to a division by zero).
In `connection.fetchMoreLines`, the following request is then made:
`"buffer:0x" + buffer.id + "/own_lines/last_line(-" + numLines + ")/data"`
to which WeeChat responds with one line. Voilà, there's your mess.
2014-05-03 15:07:12 +01:00
..
glowingbear.js Fix that bug where only one line was loaded 2014-05-03 15:07:12 +01:00
irc-utils.js Remove the old and now unused flat nicklist 2014-04-25 21:05:20 +02:00
localstorage.js localstorage: Correctly check whether value is set before setting default 2014-02-21 10:50:29 +00:00
models.js Remove the old and now unused flat nicklist 2014-04-25 21:05:20 +02:00
plugins.js Improve youtube matching URL 2014-04-25 18:39:01 -04:00
websockets.js Remove trailing spaces 2014-02-24 11:41:25 +01:00
weechat.js Decode and encode array directly without for loop 2014-02-18 13:25:03 +01:00