From 840e58e0b1d3ca977a411b3d048009eff5f4bdd5 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 23 Apr 2015 21:11:50 +0100 Subject: NCurses: When mode line is too long, trim it rather hiding it --- src/display_buffer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/display_buffer.cc') diff --git a/src/display_buffer.cc b/src/display_buffer.cc index 3bcf37b2..bfd2c780 100644 --- a/src/display_buffer.cc +++ b/src/display_buffer.cc @@ -169,11 +169,11 @@ CharCount DisplayLine::length() const return len; } -void DisplayLine::trim(CharCount first_char, CharCount char_count) +void DisplayLine::trim(CharCount first_char, CharCount char_count, bool only_buffer) { for (auto it = begin(); first_char > 0 and it != end(); ) { - if (not it->has_buffer_range()) + if (only_buffer and not it->has_buffer_range()) { ++it; continue; -- cgit v1.2.3