Skip to content

Commit

Permalink
buffer_count_widget: style
Browse files Browse the repository at this point in the history
  • Loading branch information
John Foerch committed Feb 15, 2012
1 parent 02b2903 commit d6372c0
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions modules/mode-line.js
Expand Up @@ -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);
Expand All @@ -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 + "]");
}
};


Expand Down

0 comments on commit d6372c0

Please sign in to comment.