From 70331559b3f0e89d882e8a5b85c6f1acdfc1799b Mon Sep 17 00:00:00 2001 From: Tor Hveem Date: Fri, 11 Oct 2013 16:11:19 +0200 Subject: [PATCH] Switch to first buffer on startup --- js/websockets.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/websockets.js b/js/websockets.js index 1b79ed9..a1ab042 100644 --- a/js/websockets.js +++ b/js/websockets.js @@ -20,6 +20,7 @@ weechat.factory('colors', [function($scope) { var part, fg, bg, attrs, colors = ['', 'black', 'dark gray', 'dark red', 'light red', 'dark green', 'light green', 'brown', 'yellow', 'dark blue', 'light blue', 'dark magenta', 'light magenta', 'dark cyan', 'light cyan', 'gray', 'white']; // XTerm 8-bit pallete var colors = [ + '', '#000000', '#AA0000', '#00AA00', '#AA5500', '#0000AA', '#AA00AA', '#00AAAA', '#AAAAAA', '#555555', '#FF5555', '#55FF55', '#FFFF55', '#5555FF', '#FF55FF', '#55FFFF', @@ -257,6 +258,10 @@ weechat.factory('handlers', ['$rootScope', 'colors', 'models', 'plugins', functi for (var i = 0; i < bufferInfos.length ; i++) { var buffer = new models.Buffer(bufferInfos[i]); models.addBuffer(buffer); + // Switch to first buffer on startup + if (i == 0) { + models.setActiveBuffer(buffer.id); + } } // Request latest buffer lines for each buffer