]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView2.C
Avoid repeated name in tabfolders
[lyx.git] / src / BufferView2.C
index 7bdda14a64331c48a76ad5896b6e4f6514771b29..0eb2b4611c5383658a03560990f4ed5e7af8a4cc 100644 (file)
@@ -590,7 +590,10 @@ bool BufferView::ChangeRefsIfUnique(string const & from, string const & to)
 {
        // Check if the label 'from' appears more than once
        vector<string> labels = buffer()->getLabelList();
-       if (count(labels.begin(), labels.end(), from) > 1)
+       // count is broken on some systems, so use the HP version
+       int res;
+       count(labels.begin(), labels.end(), from, res);
+       if (res > 1)
                return false;
 
        return ChangeInsets(Inset::REF_CODE, from, to);