I pinched a tip on how to get messages to the PureBasic editor by netmaestro ( http://www.purebasic.fr/english/viewtopic.php?t=30379 ).
Compile this code to "EditorWrap.exe" and make it a PureBasic tool.
Code: Select all
scintilla = Val(GetEnvironmentVariable("PB_Tool_Scintilla"))
If scintilla
SendMessage_(scintilla,#SCI_SETHSCROLLBAR,#False,0)
SendMessage_(scintilla,#SCI_SETWRAPMODE,#True,0)
SendMessage_(scintilla,#SCI_SETWRAPVISUALFLAGS,#SC_WRAPVISUALFLAG_START,0)
SendMessage_(scintilla,#SCI_SETWRAPSTARTINDENT,16,0) ; <-- indent amount
EndIf
End
Code: Select all
scintilla = Val(GetEnvironmentVariable("PB_Tool_Scintilla"))
If scintilla
SendMessage_(scintilla,#SCI_SETHSCROLLBAR,#True,0)
SendMessage_(scintilla,#SCI_SETWRAPMODE,#False,0)
EndIf
End
I did a bit of testing (2 minutes!) and it appears to work ok.
FINAL WARNING: This is an experimental editor patch, it may have unpredictable results (you may lose work) !!!
EDIT: SEE BELOW FOR AN UPDATED VERSION!!!