mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
findadv: amend [8c101829/lyxgit] check that opt.find_buf_name is found in theBuffers().
This commit is contained in:
parent
100a7ee22f
commit
cf6bbe2147
@ -1425,7 +1425,9 @@ static void changeFirstCase(Buffer & buffer, TextCase first_case, TextCase other
|
||||
static void findAdvReplace(BufferView * bv, FindAndReplaceOptions const & opt, MatchStringAdv & matchAdv)
|
||||
{
|
||||
Cursor & cur = bv->cursor();
|
||||
if (opt.repl_buf_name == docstring())
|
||||
if (opt.repl_buf_name == docstring()
|
||||
|| theBufferList().getBuffer(FileName(to_utf8(opt.repl_buf_name)), true) == 0
|
||||
|| theBufferList().getBuffer(FileName(to_utf8(opt.find_buf_name)), true) == 0)
|
||||
return;
|
||||
|
||||
DocIterator sel_beg = cur.selectionBegin();
|
||||
@ -1514,7 +1516,7 @@ bool findAdv(BufferView * bv, FindAndReplaceOptions const & opt)
|
||||
|
||||
// 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)
|
||||
if (theBufferList().getBuffer(FileName(to_utf8(opt.find_buf_name)), true) == 0)
|
||||
return false;
|
||||
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user