From d6372c04f5f0b273905b1279897fd86e5e067d1d Mon Sep 17 00:00:00 2001 From: John Foerch Date: Tue, 14 Feb 2012 19:33:28 -0500 Subject: [PATCH] buffer_count_widget: style --- modules/mode-line.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/mode-line.js b/modules/mode-line.js index cfdf31c..48f6ce3 100644 --- a/modules/mode-line.js +++ b/modules/mode-line.js @@ -223,6 +223,10 @@ clock_widget.prototype = { } }; + +/** + * buffer_count_widget shows the number of buffers in the window. + */ function buffer_count_widget (window) { this.class_name = "buffer-count-widget"; text_widget.call(this, window); @@ -231,10 +235,13 @@ function buffer_count_widget (window) { this.add_hook("kill_buffer_hook"); this.add_hook("move_buffer_hook"); } -buffer_count_widget.prototype.__proto__ = text_widget.prototype; -buffer_count_widget.prototype.update = function () { - this.view.text = ("[" + (this.window.buffers.selected_index+1) + "/" + - this.window.buffers.count + "]"); +buffer_count_widget.prototype = { + constructor: buffer_count_widget, + __proto__: text_widget.prototype, + update: function () { + this.view.text = ("[" + (this.window.buffers.selected_index+1) + "/" + + this.window.buffers.count + "]"); + } }; -- 2.11.4.GIT