aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-01-03 20:15:23 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-01-03 20:15:23 +0000
commit88898b629cd93472cf249f601190466c104e99a5 (patch)
treeacedf0c45af95a0a42969efa082461f7ca505c14
parent7f8a902f8314dcbbae6454dfed8fb6f4490b19e9 (diff)
downloadpaludis-88898b629cd93472cf249f601190466c104e99a5.tar.gz
paludis-88898b629cd93472cf249f601190466c104e99a5.tar.xz
Get columns right when newlines are present
-rw-r--r--src/clients/cave/format_string.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/clients/cave/format_string.cc b/src/clients/cave/format_string.cc
index 7893275..5127c44 100644
--- a/src/clients/cave/format_string.cc
+++ b/src/clients/cave/format_string.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -102,6 +102,8 @@ paludis::cave::format_string(
if ('m' == result[q])
break;
}
+ else if ('\n' == result[q])
+ l = 0;
else
++l;