mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Simplify a bit.
Also, I always worry that "file" will conflict with something....
This commit is contained in:
parent
e84f6dff77
commit
276ffc262c
@ -326,16 +326,15 @@ void InsetInclude::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
}
|
||||
|
||||
|
||||
void InsetInclude::editIncluded(string const & file)
|
||||
void InsetInclude::editIncluded(string const & f)
|
||||
{
|
||||
string const ext = support::getExtension(file);
|
||||
if (ext == "lyx") {
|
||||
FuncRequest fr(LFUN_BUFFER_CHILD_OPEN, file);
|
||||
if (isLyXFileName(f)) {
|
||||
FuncRequest fr(LFUN_BUFFER_CHILD_OPEN, f);
|
||||
lyx::dispatch(fr);
|
||||
} else
|
||||
// tex file or other text file in verbatim mode
|
||||
theFormats().edit(buffer(),
|
||||
support::makeAbsPath(file, support::onlyPath(buffer().absFileName())),
|
||||
support::makeAbsPath(f, support::onlyPath(buffer().absFileName())),
|
||||
"text");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user