alphapapa / topsy.el

Simple sticky header showing definition beyond top of window
GNU General Public License v3.0
100 stars 6 forks source link

topsy is confused when there are nested class definitions in c++ #15

Closed Inc0n closed 1 year ago

Inc0n commented 1 year ago

when there are nested class definitions such as

class a 
{
    ....
    class b 
    {
    ....
    }
    ....
}

and the screen is showing the lines of codes after class b, topsy will display class b instead of class a

alphapapa commented 1 year ago

Topsy does not implement language-specific features. As the readme says:

There is currently only one function in topsy-mode-functions, one which returns the line that beginning-of-defun goes to. It should be useful in many major modes, but suggestions for additional, mode-specific functions are welcome.

Inc0n commented 1 year ago

Ah I see, apologize for missing that ...

alphapapa commented 1 year ago

No problem. If you can recommend an improvement for C++, please do.