set new text width on workarea resize

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8180 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-12-02 10:51:58 +00:00
parent a5e85854f8
commit b36207b449
2 changed files with 13 additions and 17 deletions

View File

@ -384,25 +384,21 @@ void BufferView::Pimpl::resizeCurrentBuffer()
owner_->message(_("Formatting document..."));
lyxerr << "### resizeCurrentBuffer: text" << bv_->text() << endl;
lyxerr << "### resizeCurrentBuffer: text " << bv_->text() << endl;
if (!bv_->text())
return;
//if (bv_->text()) {
par = bv_->text()->cursor.par();
pos = bv_->text()->cursor.pos();
selstartpar = bv_->text()->selection.start.par();
selstartpos = bv_->text()->selection.start.pos();
selendpar = bv_->text()->selection.end.par();
selendpos = bv_->text()->selection.end.pos();
selection = bv_->text()->selection.set();
mark_set = bv_->text()->selection.mark();
bv_->text()->fullRebreak();
update();
//} else {
// bv_->setText(new LyXText(bv_, 0, false, bv_->buffer()->paragraphs()));
// bv_->text()->init(bv_);
//}
par = bv_->text()->cursor.par();
pos = bv_->text()->cursor.pos();
selstartpar = bv_->text()->selection.start.par();
selstartpos = bv_->text()->selection.start.pos();
selendpar = bv_->text()->selection.end.par();
selendpos = bv_->text()->selection.end.pos();
selection = bv_->text()->selection.set();
mark_set = bv_->text()->selection.mark();
bv_->text()->textwidth_ = bv_->workWidth();
bv_->text()->fullRebreak();
update();
if (par != -1) {
bv_->text()->selection.set(true);

View File

@ -201,7 +201,7 @@ int InsetBibtex::latex(Buffer const & buffer, ostream & os,
db_in = split(db_in, adb,',');
}
db_out = rtrim(db_out, ",");
os << "\\bibliography{" << db_out << "}\n";
os << "\\bibliography{" << db_out << "}\n";
return 2;
}