Skip to content

Plugins can no longer set lexer for custom Scintilla object #11789

@dail8859

Description

@dail8859

Description of the Issue

Notepad++ currently provides the NPPM_CREATESCINTILLAHANDLE call for plugins to create Scintilla instances to be used in plugins. However with the move to Scintilla v5+, a plugin can no longer use SCI_SETLEXER since this has been removed by Scintilla.

Notepad++ needs a new API call so that Notepad++ can call Lexilla's CreateLexer() function and return the pointer to the ILexer object it to the plugin.

Steps to Reproduce the Issue

  1. A plugin creates a new Scintilla handle using NPPM_CREATESCINTILLAHANDLE
  2. Call SCI_SETLEXER on the Scintilla handle
  3. Nothing happens since Scintilla ignores this message

Debug Information

Notepad++ v8.4.2   (64-bit)
Build time : May 29 2022 - 16:47:30
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : $COMMAND_LINE_PLACEHOLDER$
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Home (64-bit) 
OS Version : 21H2
OS Build : 19044.1706
Current ANSI codepage : 1252
Plugins : 
    BetterMultiSelection (1.5)
    ElasticTabstops (1.4)
    ezLCDLua (1.1)
    LuaScript (0.12)
    mimeTools (2.8)
    NppConverter (4.4)
    NppExport (0.4)
    NppMenuSearch (0.9.3)

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