diff options
| -rw-r--r-- | doc/ScintillaHistory.html | 5 | ||||
| -rw-r--r-- | src/Editor.cxx | 14 | 
2 files changed, 19 insertions, 0 deletions
| diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 9a77f6bcf..9dadab0e2 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -550,6 +550,7 @@  	<td>Andreas Falkenhahn</td>  	<td>Mark Reay</td>  	<td>David Shuman</td> +	<td>McLoo</td>      </tr>      </table>      <p> @@ -577,6 +578,10 @@  	<a href="https://sourceforge.net/p/scintilla/bugs/2151/">Bug #2151</a>.  	</li>  	<li> +	Automatically scroll while dragging text. +	<a href="https://sourceforge.net/p/scintilla/feature-requests/497/">Feature #497</a>. +	</li> +	<li>  	On Win32, the numeric keypad with Alt pressed can be used to enter characters by number.  	This can produce unexpected results in non-numlock mode when function keys are assigned.  	Potentially problematic keys like Alt+KeypadUp are now ignored. diff --git a/src/Editor.cxx b/src/Editor.cxx index 9c4ad2d4f..8f80ef716 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -4261,6 +4261,20 @@ void Editor::SetDragPosition(SelectionPosition newPos) {  		posDrop = newPos;  	}  	if (!(posDrag == newPos)) { +		const int oldCaretYPolicy = caretYPolicy; +		const int oldCaretYSlop = caretYSlop; +		const int oldCaretXPolicy = caretXPolicy; +		const int oldCaretXSlop = caretXSlop; +		caretYPolicy = CARET_SLOP | CARET_STRICT | CARET_EVEN; +		caretYSlop = 2; +		caretXPolicy = CARET_SLOP | CARET_STRICT | CARET_EVEN; +		caretXSlop = 50; +		MovedCaret(newPos, posDrag, true); +		caretYPolicy = oldCaretYPolicy; +		caretYSlop = oldCaretYSlop; +		caretXPolicy = oldCaretXPolicy; +		caretXSlop = oldCaretXSlop; +  		caret.on = true;  		FineTickerCancel(tickCaret);  		if ((caret.active) && (caret.period > 0) && (newPos.Position() < 0)) | 
