mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
BufferList::next() and previous(): don't cycle through 'internal' buffers.
This should fix bug http://bugzilla.lyx.org/show_bug.cgi?id=5259 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26495 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c0aeb567ce
commit
36f619ed25
@ -168,10 +168,10 @@ Buffer * BufferList::next(Buffer const * buf) const
|
||||
bstore.end(), buf);
|
||||
LASSERT(it != bstore.end(), /**/);
|
||||
++it;
|
||||
if (it == bstore.end())
|
||||
return bstore.front();
|
||||
else
|
||||
return *it;
|
||||
Buffer * nextbuf = (it == bstore.end()) ? bstore.front() : *it;
|
||||
if (nextbuf->fileName().extension() == "internal")
|
||||
return next(nextbuf);
|
||||
return nextbuf;
|
||||
}
|
||||
|
||||
|
||||
@ -184,10 +184,11 @@ Buffer * BufferList::previous(Buffer const * buf) const
|
||||
BufferStorage::const_iterator it = find(bstore.begin(),
|
||||
bstore.end(), buf);
|
||||
LASSERT(it != bstore.end(), /**/);
|
||||
if (it == bstore.begin())
|
||||
return bstore.back();
|
||||
else
|
||||
return *(it - 1);
|
||||
|
||||
Buffer * previousbuf = (it == bstore.begin()) ? bstore.back() : *(it - 1);
|
||||
if (previousbuf->fileName().extension() == "internal")
|
||||
return previous(previousbuf);
|
||||
return previousbuf;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user