mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
findadv: fix crash on wrong syntax/usage of word-findadv LFUN from mini-command.
This commit is contained in:
parent
1b016f5f67
commit
3610cdf669
@ -1512,6 +1512,11 @@ bool findAdv(BufferView * bv, FindAndReplaceOptions const & opt)
|
||||
DocIterator cur;
|
||||
int match_len = 0;
|
||||
|
||||
// e.g., when invoking word-findadv from mini-buffer wither with
|
||||
// wrong options syntax or before ever opening advanced F&R pane
|
||||
if (theBufferList().getBuffer(FileName(to_utf8(opt.find_buf_name))) == 0)
|
||||
return false;
|
||||
|
||||
try {
|
||||
MatchStringAdv matchAdv(bv->buffer(), opt);
|
||||
int length = bv->cursor().selectionEnd().pos() - bv->cursor().selectionBegin().pos();
|
||||
|
Loading…
Reference in New Issue
Block a user