diff --git a/uppsrc/CtrlCore/Win32Proc.cpp b/uppsrc/CtrlCore/Win32Proc.cpp index cfa8cee2e..fa9d716b7 100644 --- a/uppsrc/CtrlCore/Win32Proc.cpp +++ b/uppsrc/CtrlCore/Win32Proc.cpp @@ -71,6 +71,7 @@ LRESULT Ctrl::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) { POINT p = Point((LONG)lParam); ScreenToClient(hwnd, &p); + pen.action = 0; pen.pressure = pen.rotation = Null; pen.tilt = Null; pen.eraser = pen.barrel = pen.inverted = pen.history = false; diff --git a/uppsrc/TextDiffCtrl/TextCtrl.cpp b/uppsrc/TextDiffCtrl/TextCtrl.cpp index 09c5973c5..0f527ae51 100644 --- a/uppsrc/TextDiffCtrl/TextCtrl.cpp +++ b/uppsrc/TextDiffCtrl/TextCtrl.cpp @@ -86,6 +86,12 @@ void TextCompareCtrl::MouseMove(Point pt, dword flags) } } +void TextCompareCtrl::LeftRepeat(Point pt, dword keyflags) +{ + if(HasCapture() && !gutter_capture) + DoSelection(pt.y, true); +} + void TextCompareCtrl::LeftUp(Point pt, dword keyflags) { ReleaseCapture(); @@ -128,6 +134,13 @@ bool TextCompareCtrl::Key(dword key, int repcnt) { Point pos = scroll, newpos = pos, page = scroll.GetPage(); switch(key) { + case K_CTRL_A: + if(lines.GetCount() > 1) { + cursor = lines[0].number; + anchor = lines.Top().number; + Refresh(); + } + break; case K_LEFT: newpos.x--; break; case K_RIGHT: newpos.x++; break; case K_CTRL_LEFT: newpos.x -= page.x >> 1; break; @@ -391,7 +404,7 @@ void TextCompareCtrl::SetFont(Font f, Font nf) { font = f; number_font = nf; - letter.cy = f.GetHeight(); + letter.cy = f.GetCy(); letter.cx = f.GetMonoWidth(); number_width = 5 * nf.GetMonoWidth(); number_yshift = (f.GetCy() - nf.GetCy() + 2) >> 1; diff --git a/uppsrc/TextDiffCtrl/TextDiffCtrl.h b/uppsrc/TextDiffCtrl/TextDiffCtrl.h index 4b297917d..8af656bc6 100644 --- a/uppsrc/TextDiffCtrl/TextDiffCtrl.h +++ b/uppsrc/TextDiffCtrl/TextDiffCtrl.h @@ -37,6 +37,7 @@ public: virtual void LeftDown(Point pt, dword keyflags); virtual void LeftDouble(Point pt, dword keyflags); virtual void LeftUp(Point pt, dword keyflags); + virtual void LeftRepeat(Point pt, dword keyflags); virtual void RightDown(Point p, dword keyflags); virtual bool Key(dword key, int repcnt); virtual void LostFocus();