Table-of-comments icon indicating copy to clipboard operation
Table-of-comments copied to clipboard

Current heading selection when showing the dialog is wrong sometimes

Open fvsch opened this issue 10 years ago • 5 comments

Follow up to #37, testing with 1.1.5.

Test case: https://gist.github.com/fvsch/b700cb41d01adc1680c9 (actual file from work) We use "level_char": "#" so you should change it to that for testing with this file.

  • When I place the cursor after one of the first 3 headings, the dialog focuses the right heading (the previous or "current" one).
  • When I place the cursor after one of the other headings, the dialog focuses one of the previous headings (e.g. after heading 9 -> goes to heading 5).

Thanks again for all the good work on this plugin. :)

fvsch avatar Feb 06 '15 10:02 fvsch

Just tried the "Fold current" action, which seems affected as well. Or maybe that's a different issue.

fvsch avatar Feb 06 '15 10:02 fvsch

I will look into this

mihai-vlc avatar Feb 07 '15 20:02 mihai-vlc

@fvsch fell free to give some feedback on the changes described in #44 regarding the folding of the heading till the next heading of the same level.

mihai-vlc avatar Feb 08 '15 00:02 mihai-vlc

I really like this, and agree with the concept of 'level' too. One thing I noticed is

/*
* > Heading 1
*/
function() {

}
/* >> Heading 2 */
function() {

}
// >>> Heading 3
function() {

}

Closing level 3 doesn't seems to fold the section cleanly (showing 'functi...' still). Same for you? (seems to be only for javascript "//" comments)

kizza avatar Feb 11 '15 00:02 kizza

I wonder if a thought for a next iteration would be to have unfolding a higher section display it's child sections as folded by default.

Currently if I fold level 3, then fold level 2... unfolding level 2 shows 3 unfolded also. So perhaps unfolding a section could be incremental, unfolding a depth at a time rather than it's entire nested content.

Also makes me wonder whether running "Fold All", then "Unfold All" should only open the next level of headings rather than expand all of them completely...perhaps we could implement it so running "Unfold All" unfolds each next level of titles incrementally as well.

Again, might be easier said than done :) Thoughts though?

kizza avatar Feb 11 '15 00:02 kizza