Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function List enhancements on sorting #11446

Closed
dfs- opened this issue Mar 28, 2022 · 0 comments
Closed

Function List enhancements on sorting #11446

dfs- opened this issue Mar 28, 2022 · 0 comments

Comments

@dfs-
Copy link

dfs- commented Mar 28, 2022

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

dfs- pushed a commit to dfs-/notepad-plus-plus that referenced this issue Mar 28, 2022
* add new preference setting to allow function list to be sorted lexicographically by default
* fix sorting for mixed mode function list parsers on new file open
* add new translations to english.xml and german.xml
dfs- pushed a commit to dfs-/notepad-plus-plus that referenced this issue Mar 29, 2022
* revert previous changes made to the preferences dialog
* add preferences to the function list panel
@donho donho closed this as completed in 64bfa72 Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant