I couldn't find this option in the documentation, but
it seems like it should be pretty trivial to add. I
would like an option to disable drag/drop text editing
within the control.
Will this ever be added? Since Notepad++ depends on this project, a lot of people would really love to have the option to disable drag and drop, as evidenced by multiple questions on StackOverflow as well as SuperUser (StackExchange sites).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all, I intend to implement a V0 of this feature. I built a working proof of concept it by making a change in Notepad++'s Scintilla version. It consists in removing the line of code setting inDragDrop to DragDrop::initial in src/Editor.cxx at line 4927. This flag can be a static flag passed to Scintilla when initializing it, and that flag would be read-only from initialization. This means that, in this V0, it will not be possible to enable or disable drag-and-drop on the fly, and it will require restarting the editor. We can tackle this in V1. Still worth it, in my opinion.
Last edit: Nathaniel Braun 2025-11-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The UndoCollection property is a similar boolean feature. Search for 'UndoCollection' (case-insensitive) in all Scintilla files to find all the declarations, code, documentation, and tests related to this property.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Its difficult to test interactive feature but the API can be checked to return a reasonable result with the setter changing this result. The testUndoCollection method can be used as an example.
The patch blocks dragging from Scintilla but not dropping into Scintilla. It is still possible to drag from another application like Chrome into Scintilla.
It would be better, but not essential, to use a selection I beam cursor over the selection when it can not be dragged instead of the arrow.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
With the current patch not blocking drags into Scintilla, there is an API policy choice. The API is currently a simple boolean but if drags from and to need to be independently blocked then the API will be more complex, perhaps a bit mask or multiple APIs.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No real use case for this feature has been described so it is hard to understand the scope of control needed. The earlier post talked about Notepad++ and how they present the option is up to them. For SciTE, I'd either avoid it completely or make it a properties file setting instead of adding a menu item.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Will this ever be added? Since Notepad++ depends on this project, a lot of people would really love to have the option to disable drag and drop, as evidenced by multiple questions on StackOverflow as well as SuperUser (StackExchange sites).
I do not know if it will ever be added. Scintilla is an open source project and depends on people contributing implementations of new features.
Hi all, I intend to implement a V0 of this feature. I built a working proof of concept it by making a change in Notepad++'s Scintilla version. It consists in removing the line of code setting
inDragDroptoDragDrop::initialinsrc/Editor.cxxat line 4927. This flag can be a static flag passed to Scintilla when initializing it, and that flag would be read-only from initialization. This means that, in this V0, it will not be possible to enable or disable drag-and-drop on the fly, and it will require restarting the editor. We can tackle this in V1. Still worth it, in my opinion.Last edit: Nathaniel Braun 2025-11-18
This work appears to be at an early stage where it should not be included in Scintilla as yet.
If this is to be included in Scintilla it should be modifiable after start. It should add to the normal API as a
SCI_message.Last edit: Neil Hodgson 2025-11-18
Thank you @nyamatongwe. Could you please point me towards an example of such a message so I can use that as a reference implementation? Thank you!
The
UndoCollectionproperty is a similar boolean feature. Search for 'UndoCollection' (case-insensitive) in all Scintilla files to find all the declarations, code, documentation, and tests related to this property.Here is a first version of the patch. Not sure how to write unit tests, your help is very welcome there. Thank you!
Its difficult to test interactive feature but the API can be checked to return a reasonable result with the setter changing this result. The
testUndoCollectionmethod can be used as an example.The patch blocks dragging from Scintilla but not dropping into Scintilla. It is still possible to drag from another application like Chrome into Scintilla.
It would be better, but not essential, to use a selection I beam cursor over the selection when it can not be dragged instead of the arrow.
With the current patch not blocking drags into Scintilla, there is an API policy choice. The API is currently a simple boolean but if drags from and to need to be independently blocked then the API will be more complex, perhaps a bit mask or multiple APIs.
And here is the patch to add the feature to SciTE.
No real use case for this feature has been described so it is hard to understand the scope of control needed. The earlier post talked about Notepad++ and how they present the option is up to them. For SciTE, I'd either avoid it completely or make it a properties file setting instead of adding a menu item.
No problem, let's avoid it completely in SciTE, then.
@nyamatongwe could you please assign this feature request to me? Thank you.
What would assigning the feature request do? It's not really a concept within this tracker or the project.