diff options
author | nyamatongwe <devnull@localhost> | 2005-11-03 22:30:58 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2005-11-03 22:30:58 +0000 |
commit | fd87954421819f1512753f2479505e59ce6eb1b3 (patch) | |
tree | 8bd9cc760ea542e7378f166faca0f4b53ab2810e /win32/ScintillaWin.cxx | |
parent | 9b95e3ce6670eb7999113ae2fdbff3dbb2dea7d5 (diff) | |
download | scintilla-mirror-fd87954421819f1512753f2479505e59ce6eb1b3.tar.gz |
Stopped dragging of empty ranges.
Correct unlocking of empty data in drag and drop.
Allow entry of NUL through Shift+Ctrl+@ in Unicode mode.
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r-- | win32/ScintillaWin.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 5b54e75fe..6d51445e6 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -672,7 +672,7 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam ::ScreenToClient(MainHWND(), &pt); if (PointInSelMargin(Point(pt.x, pt.y))) { DisplayCursor(Window::cursorReverseArrow); - } else if (PointInSelection(Point(pt.x, pt.y))) { + } else if (PointInSelection(Point(pt.x, pt.y)) && !SelectionEmpty()) { DisplayCursor(Window::cursorArrow); } else if (PointIsHotspot(Point(pt.x, pt.y))) { DisplayCursor(Window::cursorHand); @@ -1709,7 +1709,7 @@ void ScintillaWin::AddCharBytes(char b0, char b1) { unsigned int len = UTF8Length(wcs, 1); UTF8FromUCS2(wcs, 1, utfval, len); utfval[len] = '\0'; - AddCharUTF(utfval,len); + AddCharUTF(utfval, len ? len : 1); } else if (b0) { char dbcsChars[3]; dbcsChars[0] = b0; @@ -2096,7 +2096,7 @@ STDMETHODIMP ScintillaWin::GetData(FORMATETC *pFEIn, STGMEDIUM *pSTM) { memcpy(static_cast<char *>(text.ptr), drag.s, drag.len); } } - pSTM->hGlobal = text.Unlock(); + pSTM->hGlobal = text ? text.Unlock() : 0; pSTM->pUnkForRelease = 0; return S_OK; } |