Skip to content

Function List enhancements on sorting #11446

@dfs-

Description

@dfs-

Description of the Issue

Opening a document while function list is enabled and the function list parser has mixed mode parser (classes and functions, like i.e. Python) the classes are always listed first, despite their position in the document. Sorting the list using the appropriate button in the function list panel and then unsorting it will sort the elements in the correct order.

Also it would be great to have a preference setting to always enable sorting for newly opened documents.

Steps to Reproduce the Issue

  1. Open a Python document with functions and classes
  2. Open the function list and notice how classes are always on top regardless of functions being in the same file much earlier
  3. Sort the function list (-> gets sorted lexicographically)
  4. Unsort the function list (-> gets sorted correctly)

Expected Behavior

Sorting should always be consistent between states.

Actual Behavior

Inital sorting has classes above functions regardless of the their position.

Debug Information

Notepad++ v8.3.3 (64-bit)
Build time : Mar 13 2022 - 17:20:02
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Pro (64-bit)
OS Version : 2009
OS Build : 19044.1586
Current ANSI codepage : 1252
Plugins : ComparePlugin.dll JSMinNPP.dll mimeTools.dll NppConverter.dll NppExport.dll PythonScript.dll XMLTools.dll

See also:
https://community.notepad-plus-plus.org/topic/22756/function-list-weirdness-and-sorting

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions