From 8ef79c41bdf0382c7e320ab7bcb46591b4d375c0 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 1 Mar 2013 14:30:30 +0100 Subject: [PATCH] show_line_numbers does not need a window --- src/highlighters.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/highlighters.cc b/src/highlighters.cc index edd4500f..ff623601 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -245,9 +245,9 @@ void expand_tabulations(Window& window, DisplayBuffer& display_buffer) } } -void show_line_numbers(Window& window, DisplayBuffer& display_buffer) +void show_line_numbers(DisplayBuffer& display_buffer) { - LineCount last_line = window.buffer().line_count(); + LineCount last_line = display_buffer.range().first.buffer().line_count(); int digit_count = 0; for (LineCount c = last_line; c > 0; c /= 10) ++digit_count; @@ -358,7 +358,7 @@ void register_highlighters() registry.register_func("highlight_selections", WindowHighlighterFactory("highlight_selections")); registry.register_func("expand_tabs", WindowHighlighterFactory("expand_tabs")); registry.register_func("expand_unprintable", SimpleHighlighterFactory("expand_unprintable")); - registry.register_func("number_lines", WindowHighlighterFactory("number_lines")); + registry.register_func("number_lines", SimpleHighlighterFactory("number_lines")); registry.register_func("regex", colorize_regex_factory); registry.register_func("search", highlight_search_factory); registry.register_func("group", highlighter_group_factory);