On 7 Aug 2000, Lars Gullik Bjønnes wrote:
> Angus Leeming <[EMAIL PROTECTED]> writes:
[...]
> | void BufferView::Pimpl::restorePosition()
> | {
> | if (backstack.empty()) return;
> |
> | int x, y;
> - string fname = backstack.pop(&x, &y);
> + string fname(backstack.pop(&x, &y);
> - string cname = current_view->buffer()->fileName();
- > + string cname(buffer_->fileName());
> |
> | beforeChange();
> |
- | if( fname != cname ) {
+ | if( fname != buffer_->fileName() ) {
> | Buffer * b = bufferlist.exists(fname) ?
> | bufferlist.getBuffer(fname) :
> | bufferlist.loadLyXFile(fname); // don't ask, just load it
> | buffer(b);
> | }
> |
> | bv_->text->SetCursorFromCoordinates(bv_, x, y);
> | update(BufferView::SELECT|BufferView::FITCUR);
> | }
>
> besides that it look nice.
No need for an extra named variable.
Allan. (ARRae)