diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-08-04 15:11:43 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-08-04 15:11:43 -0700 |
commit | c67702a4989c450acd2c9f02fb65aa757f74880f (patch) | |
tree | f1def9222481625273521642d68db72c46b866b1 /reader.cpp | |
parent | 5880cd88c8e378efb3c76e0cfdff99dce0edf810 (diff) |
Cleaned up lots of typecasts, simplified some string handling
Diffstat (limited to 'reader.cpp')
-rw-r--r-- | reader.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -444,7 +444,9 @@ static void reader_repaint() parser_t::principal_parser().test( data->command_line.c_str(), &data->indents[0], 0, 0 ); wcstring full_line = (data->autosuggestion.empty() ? data->command_line : data->autosuggestion); - size_t len = std::max((size_t)1, full_line.size()); + size_t len = full_line.size(); + if (len < 1) + len = 1; std::vector<color_t> colors = data->colors; colors.resize(len, HIGHLIGHT_AUTOSUGGESTION); |