Because they are already there if they need to.

That is fine. Adding them the second time will not change anything.

For example, if you use Help>Intro, the Intro file will not be
added to recent files. If
it is kept open, your patch means the file will be added at restart.
This is wrong.

This is a separate issue. If you try to open a help file from the help
menu, LFUN_HELPOPEN will be triggered  and loadLyxFile(file, false)
will be called. The file will not appear in lastfiles. If you start
lyx with "lyx doc/.../tutorial.lyx", the file will be added to
lastfiles.

Since such help files should go to lastopenedfiles, I can think of two solutions

1. at start up, try to tell lyx to use loadLyxFile(file, false) for
such files. This is difficult

2. remove the second parameter and check the nature of files added
internally, maybe by checking file path. This is doable if help doc is
the only file type that use loadLyxFile(.., false).

Bo

Reply via email to