diff --git a/src/NotepadNext/.gitignore b/src/NotepadNext/.gitignore new file mode 100644 index 000000000..d7697db57 --- /dev/null +++ b/src/NotepadNext/.gitignore @@ -0,0 +1 @@ +"build/" diff --git a/src/scintilla/src/Editor.cxx b/src/scintilla/src/Editor.cxx index 283edff8f..95843006f 100644 --- a/src/scintilla/src/Editor.cxx +++ b/src/scintilla/src/Editor.cxx @@ -4954,6 +4954,9 @@ void Editor::ButtonDownWithModifiers(Point pt, unsigned int curTime, KeyMod modi void Editor::RightButtonDownWithModifiers(Point pt, unsigned int, KeyMod modifiers) { if (NotifyMarginRightClick(pt, modifiers)) return; + // if the pt is not in the selected region we clear the selection and move the caret to the new right click + if (!PointInSelection(pt)) + SetEmptySelection(SPositionFromLocation(pt)); } bool Editor::PositionIsHotspot(Sci::Position position) const noexcept {