Skip to content

Styler Configuratior: User extensions are overwritten by default extensions #8304

@dfs-

Description

@dfs-

Description of the Issue

The Style Configurator dialogue allows the user to specify an arbitrary amount of user extensions per language. I use this to allow our sql procedures (which have varying extensions, one of which is .PRO) to be syntax highlighted as SQL files.
However the PRO extension is assigned to “Visual Prolog” instead of SQL, as the default extensions for Visual Prolog are “pro cl i pack ph”. User defined values should always be

Steps to Reproduce the Issue

  1. Go to Settings > Style Configurator...
  2. In the dialogue select language "SQL"
  3. Add "pro" to User ext. (note, that pro is one of the default extensions for Visual Prolog
  4. Save & Close the dialogue
  5. Open a file with the PRO extension
  6. Syntax Highlighting is set to Visual Prolog, but should be SQL.

You can also see a visual representation in the community thread I opened: https://community.notepad-plus-plus.org/topic/19438/user-extensions-in-style-configurator-are-overwritten-by-default-extensions

Expected Behavior

It is expected, that user defined language file extensions are of higher priority, than default file extensions

Actual Behavior

The priority seems to be determined by the method last one wins.

Debug Information

Notepad++ v7.8.6 (64-bit)
Build time : Apr 21 2020 - 15:23:03
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS Name : Windows 10 Pro (64-bit)
OS Version : 1909
OS Build : 18363.778
Plugins : ComparePlugin.dll mimeTools.dll NppConverter.dll NppExport.dll PythonScript.dll XMLTools.dll

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