summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/overmap.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-02-18 15:51:08 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-02-18 15:51:08 +0000
commita59025b069d3d08cfa7c5ccd21d3b0ae116da71c (patch)
treec15ea1bf8d4491edc73efef473413ddfc30a09ff /crawl-ref/source/overmap.cc
parente3c41fc21fc88f1e1edb67992a7cb0bbe68abe83 (diff)
downloadcrawl-ref-a59025b069d3d08cfa7c5ccd21d3b0ae116da71c.tar.gz
crawl-ref-a59025b069d3d08cfa7c5ccd21d3b0ae116da71c.zip
First batch of Paul's patches:
1896018: cycle ammo with '(' 1895278: no (v)iewing of unreadable books 1895075: cancel Ely's abilities without cost Fix 1894920: fix overly long dungeon overview Also fix 1884145: weapon swap ignoring {!w} git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3441 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/overmap.cc')
-rw-r--r--crawl-ref/source/overmap.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/crawl-ref/source/overmap.cc b/crawl-ref/source/overmap.cc
index c1fb568ca8..121810fb29 100644
--- a/crawl-ref/source/overmap.cc
+++ b/crawl-ref/source/overmap.cc
@@ -325,7 +325,8 @@ std::string overview_description_string()
disp += shoptype_to_string(ci_shops->second);
++column_count;
}
- disp += "\n";
+ if (!shops_present.empty())
+ disp += "\n";
// print portals
if ( !portals_present.empty() )
@@ -420,13 +421,13 @@ std::string overview_description_string()
disp += depth_str;
disp += ":</white> ";
disp += get_level_annotation(li);
- disp += + "\n";
+ disp += "\n";
}
}
}
}
- return disp;
+ return disp.substr(0, disp.find_last_not_of('\n')+1);
}
template <typename Z, typename Key>