]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView2.C
Avoid repeated name in tabfolders
[lyx.git] / src / BufferView2.C
index af1326aa034e21b578feebe2ef833a29d5deb40d..0eb2b4611c5383658a03560990f4ed5e7af8a4cc 100644 (file)
@@ -437,6 +437,7 @@ bool BufferView::lockInset(UpdatableInset * inset)
                                par->inset_iterator_end();
                        for (; it != end; ++it) {
                                if ((*it) == inset) {
+                                       text->setCursorIntern(this, par, it.getPos());
                                        theLockingInset(inset);
                                        return true;
                                }
@@ -456,7 +457,7 @@ bool BufferView::lockInset(UpdatableInset * inset)
 
 void BufferView::showLockedInsetCursor(int x, int y, int asc, int desc)
 {
-       if (available() && theLockingInset()) {
+       if (available() && theLockingInset() && !theLockingInset()->nodraw()) {
                LyXCursor cursor = text->cursor;
                Inset * locking_inset = theLockingInset()->getLockingInset();
 
@@ -589,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);