diff options
author | Neil <nyamatongwe@gmail.com> | 2013-08-08 18:13:09 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2013-08-08 18:13:09 +1000 |
commit | 7e77919d56e56c37a7d555a9e2707650adc433ec (patch) | |
tree | 4fc22ebb7cb594a3728d10b82d13c820ddbbf092 /src/Editor.cxx | |
parent | feff84c70259ab4faabbf066ba38337646dff9ef (diff) | |
download | scintilla-mirror-7e77919d56e56c37a7d555a9e2707650adc433ec.tar.gz |
Bug [#1512]. Fix bug with horizontal caret position when margin changed.
From Neomi.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 3aa949f77..bf4144d36 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -7681,6 +7681,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return vs.rightMarginWidth; case SCI_SETMARGINLEFT: + lastXChosen += lParam - vs.leftMarginWidth; vs.leftMarginWidth = lParam; InvalidateStyleRedraw(); break; @@ -8429,6 +8430,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { if (ValidMargin(wParam)) { // Short-circuit if the width is unchanged, to avoid unnecessary redraw. if (vs.ms[wParam].width != lParam) { + lastXChosen += lParam - vs.ms[wParam].width; vs.ms[wParam].width = lParam; InvalidateStyleRedraw(); } |