From 5f65da2f46554406eda093604ae5173502466755 Mon Sep 17 00:00:00 2001 From: Alexandre De Dommelin Date: Sun, 12 Mar 2017 15:49:46 -0700 Subject: history_string # Description: Handle more than 256 characters in the history # Author: Gbp-Pq: Name 40-history_string.patch --- src/history.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/history.cc b/src/history.cc index 61afba0..33d946c 100644 --- a/src/history.cc +++ b/src/history.cc @@ -41,15 +41,14 @@ HistoryFile::read_the_file() ifstream f(filename); if (!f) return; + string line_text; + while (!f.eof()) { - char line_text[256]; string line_str; - f.getline(line_text, sizeof(line_text)); - if (*line_text) { - line_str = line_text; - history.push_back(line_str); - } + getline(f,line_text); + line_str = line_text; + history.push_back(line_str); } m_file_entries = history.size(); -- cgit v1.2.3