D17124: Don't reverse order of files opened from the command line
noreply at phabricator.kde.org
Sat Nov 24 22:07:57 GMT 2018
gmolteni added a comment.
In D17124#365557 <https://phabricator.kde.org/D17124#365557>, @gmolteni wrote:
> In D17124#365212 <https://phabricator.kde.org/D17124#365212>, @ngraham wrote:
> > Thanks! I can verify that this fixes the case where you do `kate file1 file2 file3` when kate is not already open; now they are opened in the correct order! But when Kate //is// already open with a few files in tabs, the new files are opened in tabs but in the wrong order. Do you think you could fix that too?
I think that perhaps fixing it is an advanced topic.
The original fix I did was to reverse the order of a foreach loop.
I already located the other foreach loop that is necesary to reverse in order to improve that second case,
but the final result needs a third fix (i will try to but i guess it requires scratching the code much deeper).
With the current fix (foreach at line 178 at kateapp.cpp) :
kate f1 f2 f3 --- 1st invocation produces ---> f1 f2 f3
kate f4 f5 f6 --- 2nd invocation produces ---> f6 f5 f4 f1 f2 f3
Fixing a second foreach loop (foreach at line 423 at main.cpp) will gave us this:
kate f4 f5 f6 --- 2nd invocation produces ---> f4 f5 f6 f1 f2 f3
However, the main issue here is that i have no idea how to let kate to insert the files
to the right of list instead of the left of the list.
I will invest some time trying to understand kate deeper, but I have no idea where how to find
that part of code.
To: gmolteni, cfeck, zetazeta, #kate, ngraham
Cc: zetazeta, cfeck, ngraham, kwrite-devel, michaelh, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KWrite-Devel