[RFC][PATCH] Change to GuiView::goToFileRow

Stephan Witt st.witt at gmx.net
Mon Feb 17 07:28:20 UTC 2020


Am 16.02.2020 um 22:02 schrieb Enrico Forestieri <forenr at lyx.org>:
> 
> On Sun, Feb 16, 2020 at 09:28:57PM +0100, Stephan Witt wrote:
>> Am 16.02.2020 um 17:54 schrieb Enrico Forestieri <forenr at lyx.org>:
>>> 
>>> On Sun, Feb 16, 2020 at 02:52:52PM +0100, Stephan Witt wrote:
>>>> 
>>>> The latest version of the mentioned patch I’ve used for 1. and 2. is
>>> 
>>> Thank you. It is surprising that only for the Mac absPath() expands
>>> symlinks. Anyway, I think I now understand the problem.
>>> 
>>> Please, can you report whether the attached patch works for you
>>> irrespectively of the Qt version?
>> 
>> Yes, it works too. But did you have any problem with my patch 
>> or do you think it’s not good?
> 
> No, it's simply that I think the previous code is easier to follow.

I had problems to understand it.

>> I have to admit I like mine more.
> 
> ;-)
> 
>> Especially the subst part of the original code formally isn’t 100% correct.
> 
> Why?

Because of it "substitutes *all* instances of \a oldstr with \a newstr“

Maybe it’s nearly impossible to have realtmp more then once in file_name
but it’s not the same as „substitute the *first* instance \a oldstr with \a newstr“
and that’s the goal.

IMO the best solution is to use real path names entirely for buffer lookup
by temporary file names. The attached patch implements this idea. I think
this is much easier to follow too. ;-)

Stephan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: goToFileRow-4.patch
Type: application/octet-stream
Size: 3020 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200217/1059d5ab/attachment.obj>


More information about the lyx-devel mailing list