Skip to content

Commit

Permalink
removed useless hack
Browse files Browse the repository at this point in the history
  • Loading branch information
Freaxed committed Mar 10, 2024
1 parent 0b555fd commit 9e2ad56
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/ui/Editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9e2ad56

Please sign in to comment.