With this patch behaves the unfold like the fold to highlight the start and end marker
- Remove unneeded delete
cullmann |
KTextEditor |
With this patch behaves the unfold like the fold to highlight the start and end marker
autotest looks good :-S
Compare what happens when unfold like this
Lint Skipped |
Unit Tests Skipped |
I think about a patch to issue the foldingPreview in case of unfold when done by click on the icon bar. Unfortunately would that need some bigger changes at the toggleFolding functions to return what was done.
Oops! Noticed that we have now some odd behavior when issued the toggle child action, will take a look.
I notice that this not yet works when done by Short-Cut/Menu and there are nested folding ranges
I must confess, I am a bit confused what this patch should improve.
Could you tell again which concrete issue it fixes?
And why is the delete not useful?
Ok, I see, I tried it a bit more and yes, now the folding start/end tokens are highlighted on unfold.
Btw., is it intentional that the folding start/end tokens are only sometimes highlighted on folding, still?
e.g. not for the
if (trueValues.contains(val)) { *result = true; return true; }
case?
And why is the delete not useful?
After one month, no idea on first sight, sorry. Guess it is deleted prior or later anyway/already.
is it intentional that the folding start/end tokens are only sometimes highlighted on folding, still?
I don't think so, no. But can't reproduce the given example. Looks working here.
OTH Seems my stated "With this patch behaves the unfold like the fold to highlight the start and end marker" only valid when fold by Short-Cut and not by mouse click on the left border.
So, compare where the cursor is when click on the left border. Without patch on pos 0 (first column), with patch just before the open brace.
I was often slightly irritated when unfold something. "What exact was now unfold?" The text jumps to quickly. A soft, fluid animation may nice, but not so easy to do. So I came up with this idea.
Hmm, I am fine with the change beside with the delete m_foldingPreview;, I think that is there to ensure the preview is directly hidden if one toggles a folding.
It will be later deleted by the leave of the bar but I don't think the earlier delete hurts.
Please keep that, if there is no strong reason to remove it and push that, thanks.