Menu

#652 patch for smartHighlight

Next_release
open
nobody
s (1)
5
2015-02-16
2015-02-16
Cyrillev
No

Hi,

With notepad++ it is possible to select the entire word when doubleclik on word, all word selected is highlight (smartHighlight).

With a specific language a word can contain $ or -, that Notepad++ don't select the $ or - when I double-click on a variable.

It is possible to change this with a python script :

def extendWordChar(args):
    word_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$-"
    for i in range(128,256):
        word_chars += chr(i)
    editor.setWordChars(word_chars)

notepad.callback(extendWordChar, [NOTIFICATION.BUFFERACTIVATED, NOTIFICATION.READY])

Now Notepad++ select the $ or - when I double-click on a word.

But the smarthilight is not ok because separator word is hardcodes in .\PowerEditor\src\ScitillaComponent\SmartHighlighter.cpp

I propose a patch for SmartHighlighter.cpp to resolve this.

More info :
http://sourceforge.net/p/notepad-plus/discussion/331754/thread/9d0a9b7e/?limit=25&page=1

Regards,
Cyrillev

3 Attachments

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.