diff options
author | nyamatongwe <nyamatongwe@gmail.com> | 2013-08-20 13:54:04 +1000 |
---|---|---|
committer | nyamatongwe <nyamatongwe@gmail.com> | 2013-08-20 13:54:04 +1000 |
commit | 8b26f479923b34452ee12d38d79dfac47e9ff1d6 (patch) | |
tree | 5e00178825cdc1f5a6786257e827755ea244161f /src/Editor.cxx | |
parent | f69338319ce627f3d760fc1ea74c02cec4fc6118 (diff) | |
download | scintilla-mirror-8b26f479923b34452ee12d38d79dfac47e9ff1d6.tar.gz |
Fix bug where coordinates were relative to the text view instead of the whole view.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 3a30c52a4..7fa1326a7 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -4578,7 +4578,7 @@ void Editor::NotifyDwelling(Point pt, bool state) { SCNotification scn = {0}; scn.nmhdr.code = state ? SCN_DWELLSTART : SCN_DWELLEND; scn.position = PositionFromLocation(pt, true); - scn.x = pt.x; + scn.x = pt.x + vs.ExternalMarginWidth(); scn.y = pt.y; NotifyParent(scn); } @@ -7935,16 +7935,20 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { break; case SCI_POSITIONFROMPOINT: - return PositionFromLocation(Point(wParam, lParam), false, false); + return PositionFromLocation(Point(wParam - vs.ExternalMarginWidth(), lParam), + false, false); case SCI_POSITIONFROMPOINTCLOSE: - return PositionFromLocation(Point(wParam, lParam), true, false); + return PositionFromLocation(Point(wParam - vs.ExternalMarginWidth(), lParam), + true, false); case SCI_CHARPOSITIONFROMPOINT: - return PositionFromLocation(Point(wParam, lParam), false, true); + return PositionFromLocation(Point(wParam - vs.ExternalMarginWidth(), lParam), + false, true); case SCI_CHARPOSITIONFROMPOINTCLOSE: - return PositionFromLocation(Point(wParam, lParam), true, true); + return PositionFromLocation(Point(wParam - vs.ExternalMarginWidth(), lParam), + true, true); case SCI_GOTOLINE: GoToLine(wParam); |