From 9e2ad56f6e0bf19a68382c2105c4bdfa5fea4cfe Mon Sep 17 00:00:00 2001 From: Freaxed Date: Sun, 10 Mar 2024 12:56:59 +0100 Subject: [PATCH] removed useless hack --- src/ui/Editor.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/ui/Editor.cpp b/src/ui/Editor.cpp index f2022bb1..bafadd8f 100644 --- a/src/ui/Editor.cpp +++ b/src/ui/Editor.cpp @@ -908,18 +908,6 @@ Editor::NotificationReceived(SCNotification* notification) _BraceHighlight(); // Selection/Position has changed if (notification->updated & SC_UPDATE_SELECTION) { - // Ugly hack to enable mouse selection scrolling - // in both directions - int32 position = SendMessage(SCI_GETCURRENTPOS, UNSET, UNSET); - int32 anchor = SendMessage(SCI_GETANCHOR, UNSET, UNSET); - if (anchor != position) { - int32 line = SendMessage(SCI_LINEFROMPOSITION, position, UNSET); - if (line == SendMessage(SCI_GETFIRSTVISIBLELINE, UNSET, UNSET)) - SendMessage(SCI_SETFIRSTVISIBLELINE, line - 1, UNSET); - else - SendMessage(SCI_SCROLLCARET, UNSET, UNSET); - } - // Send position to main window so it can update the menus. SendPositionChanges(); // Update status bar