def display_current_class_and_function(self, view, where):
        # print("display_current_class_and_function running from " + where)
        view_settings = view.settings()
        if view_settings.get('is_widget'):
            return

        for region in view.sel():
            region_row, region_col = view.rowcol(region.begin())

            if region_row != view_settings.get('function_name_status_row', -1):
                view_settings.set('function_name_status_row', region_row)
            else:
                return

            s = ""
            found = False

            fname = view.file_name()
            if Pref.display_file and None != fname:
                 s = fname + " "

            # Look for any classes
            if Pref.display_class:
                class_regions = view.find_by_selector('entity.name.type.class')
                for r in reversed(class_regions):
                    row, col = view.rowcol(r.begin())
                    if row <= region_row:
                        s += view.substr(r)
                        found = True
                        break;

            # Look for any functions
            if Pref.display_function:
                function_regions = view.find_by_selector('meta.function')
                if function_regions:
                    for r in reversed(function_regions):
                        row, col = view.rowcol(r.begin())
                        if row <= region_row:
                            if Pref.display_class and s:
                                s += "::"
                            lines = view.substr(r).splitlines()
                            name = clean_name.sub('', lines[0])
                            if Pref.display_arguments:
                                s += name.strip()
                            else:
                                if 'C++' in view.settings().get('syntax'):
                                    if Pref.display_class or 2 < len(name.split('(')[0].split('::')):
                                        s += name.split('(')[0].strip()
                                    else:
                                        s += name.split('(')[0].split('::')[1].strip()
                                else:
                                    s += name.split('(')[0].split(':')[0].strip()
                            found = True
                            break

            if not found:
                view.erase_status('function')
                fname = view.file_name()
                if Pref.display_file and None != fname:
                    view.set_status('function', fname)
            else:
                view.set_status('function', s)

            return

        view.erase_status('function')
dataset/ETHPy150Open akrabat/SublimeFunctionNameDisplay/FunctionNameStatus.py/FunctionNameStatusEventHandler.display_current_class_and_function/swapped operands of `<`