mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Add getStatus check that >1 tab for switching
buffer-next and buffer-previous are now only enabled if there is more than one tab. Note that it does not matter whether we are at the first or last tab because we cycle.
This commit is contained in:
parent
52fee3556e
commit
e26ac5c550
@ -1922,9 +1922,12 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
|
||||
break;
|
||||
|
||||
case LFUN_BUFFER_NEXT:
|
||||
case LFUN_BUFFER_PREVIOUS:
|
||||
// FIXME: should we check is there is an previous or next buffer?
|
||||
case LFUN_BUFFER_PREVIOUS: {
|
||||
// because we cycle, it doesn't matter whether on first or last
|
||||
if (d.currentTabWorkArea()->count() <= 1)
|
||||
enable = false;
|
||||
break;
|
||||
}
|
||||
case LFUN_BUFFER_SWITCH:
|
||||
// toggle on the current buffer, but do not toggle off
|
||||
// the other ones (is that a good idea?)
|
||||
|
Loading…
Reference in New Issue
Block a user