- pair<bool, string> result = Alert::askForText(_("Enter label:"), getContents());
- if (result.first) {
- string new_contents = frontStrip(strip(result.second));
- if (!new_contents.empty() &&
- getContents() != new_contents) {
- bv->buffer()->markDirty();
- bool flag = bv->ChangeRefsIfUnique(getContents(),
- new_contents);
- setContents(new_contents);
-#if 0
- bv->text->redoParagraph(bv);
- if (flag) {
- bv->redraw();
- bv->fitCursor();
- } else
- bv->update(bv->text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
-#else
- bv->updateInset(this, !flag);
-#endif
- }
- }