From 95c97619c6741c7aa9e5d3847e7cc18d7eb18fc2 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Wed, 31 Jul 2019 12:30:28 -0700 Subject: [PATCH] Use cbegin() in one place in reader --- src/reader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reader.cpp b/src/reader.cpp index 6249a7a08..37eca2b7b 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -631,7 +631,7 @@ void reader_data_t::repaint() { // Re-render our completions page if necessary. Limit the term size of the pager to the true // term size, minus the number of lines consumed by our string. (Note this doesn't yet consider // wrapping). - int full_line_count = 1 + std::count(full_line.begin(), full_line.end(), '\n'); + int full_line_count = 1 + std::count(full_line.cbegin(), full_line.cend(), '\n'); pager.set_term_size(std::max(1, common_get_width()), std::max(1, common_get_height() - full_line_count)); pager.update_rendering(¤t_page_rendering);