From dc0ce33bea8e155db6b260dd6dae59f658a6df8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Sat, 8 Mar 2014 21:30:14 +0000 Subject: [PATCH] Fetch nicklist by buffer name, not pointer An invalid pointer will crash WeeChat, while an invalid name will not. A pointer becomes invalid e.g. if the buffer is closed by another client, g-b not updated, and the buffer then selected in g-b. --- js/glowingbear.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/glowingbear.js b/js/glowingbear.js index b8975ff..4de2c77 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -657,8 +657,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', // Send a request for the nicklist if it hasn't been loaded yet if (!ab.nicklistRequested()) { - var bufferId = '0x' + ab.id; // WeeChat needs the 0x prefix - connection.requestNicklist(bufferId, function() { + connection.requestNicklist(ab.fullName, function() { $scope.showNicklist = $scope.updateShowNicklist(); // Scroll after nicklist has been loaded, as it may break long lines $rootScope.scrollWithBuffer(true);