From 1d68e56408441b2d4321b8fa70f86d441fb35683 Mon Sep 17 00:00:00 2001 From: John Foerch Date: Tue, 14 Feb 2012 19:17:16 -0500 Subject: [PATCH] current_buffer_name_widget: style --- modules/mode-line.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/modules/mode-line.js b/modules/mode-line.js index 645c86d..01c2296 100644 --- a/modules/mode-line.js +++ b/modules/mode-line.js @@ -133,6 +133,10 @@ text_widget.prototype = { define_global_window_mode("mode_line", "window_initialize_early_hook"); + +/** + * current_buffer_name_widget shows the name of the current buffer. + */ function current_buffer_name_widget (window) { this.class_name = "current-buffer-name-widget"; text_widget.call(this, window); @@ -141,9 +145,12 @@ function current_buffer_name_widget (window) { this.add_hook("current_content_buffer_location_change_hook"); this.add_hook("select_buffer_hook"); } -current_buffer_name_widget.prototype.__proto__ = text_widget.prototype; -current_buffer_name_widget.prototype.update = function () { - this.view.text = this.window.buffers.current.description; +current_buffer_name_widget.prototype = { + constructor: current_buffer_name_widget, + __proto__: text_widget.prototype, + update: function () { + this.view.text = this.window.buffers.current.description; + } }; -- 2.11.4.GIT