#include "support/convert.h"
#include "support/debug.h"
#include "support/ExceptionMessage.h"
-#include "support/FileFilterList.h"
#include "support/filetools.h"
#include "support/gettext.h"
#include "support/lstrings.h"
while (tmpdit) {
Inset const * inset = tmpdit.nextInset();
if (inset
- && find(codes.begin(), codes.end(), inset->lyxCode()) != codes.end()
+ && std::find(codes.begin(), codes.end(), inset->lyxCode()) != codes.end()
&& (contents.empty() ||
static_cast<InsetCommand const *>(inset)->getFirstNonOptParam() == contents)) {
dit = tmpdit;
if (same_content) {
Inset const * inset = tmpdit.nextInset();
if (inset
- && find(codes.begin(), codes.end(), inset->lyxCode()) != codes.end()) {
+ && std::find(codes.begin(), codes.end(), inset->lyxCode()) != codes.end()) {
contents = static_cast<InsetCommand const *>(inset)->getFirstNonOptParam();
}
}
for (InsetIterator it = inset_iterator_begin(buffer_.inset()); it; ++it) {
vector<docstring> labels;
it->getLabelList(buffer_, labels);
- if (find(labels.begin(), labels.end(), label) != labels.end()) {
+ if (std::find(labels.begin(), labels.end(), label) != labels.end()) {
setCursor(it);
showCursor();
return;
// Rebreak anchor paragraph.
tm.redoParagraph(d->anchor_pit_);
ParagraphMetrics & anchor_pm = tm.par_metrics_[d->anchor_pit_];
+
+ // position anchor
+ if (d->anchor_pit_ == 0) {
+ int scrollRange = d->scrollbarParameters_.max - d->scrollbarParameters_.min;
+
+ // Complete buffer visible? Then it's easy.
+ if (scrollRange == 0)
+ d->anchor_ypos_ = anchor_pm.ascent();
+
+ // FIXME: Some clever handling needed to show
+ // the _first_ paragraph up to the top if the cursor is
+ // in the first line.
+ }
anchor_pm.setPosition(d->anchor_ypos_);
LYXERR(Debug::PAINTING, "metrics: "