mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-18 21:45:24 +00:00
branch: Prevent assertion with command 'buffer-switch xxx' in which xxx is not the name of a loaded buffer.
see: http://www.lyx.org/trac/changeset/28966 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@29022 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f1b242b62a
commit
1f3ac11ea2
@ -1886,9 +1886,15 @@ bool GuiView::dispatch(FuncRequest const & cmd)
|
||||
importDocument(to_utf8(cmd.argument()));
|
||||
break;
|
||||
|
||||
case LFUN_BUFFER_SWITCH:
|
||||
setBuffer(theBufferList().getBuffer(FileName(to_utf8(cmd.argument()))));
|
||||
case LFUN_BUFFER_SWITCH: {
|
||||
Buffer * buffer =
|
||||
theBufferList().getBuffer(FileName(to_utf8(cmd.argument())));
|
||||
if (buffer)
|
||||
setBuffer(buffer);
|
||||
else
|
||||
bv->cursor().message(_("Document not loaded"));
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_BUFFER_NEXT:
|
||||
gotoNextOrPreviousBuffer(NEXTBUFFER);
|
||||
|
@ -117,6 +117,9 @@ What's new
|
||||
of the date-insert function. This fixes a crash on Windows with invalid/
|
||||
unsupported date specifiers (bug 5827).
|
||||
|
||||
- Fix crash when issuing the command "buffer-switch <buffer>" and there
|
||||
is no buffer called <buffer>.
|
||||
|
||||
- Adjust the color of deletions slightly when using change tracking. It
|
||||
is now easier to distinguish between added and deleted text (bug 5629).
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user