Skip to content

Commit 8635131

Browse files
committed
Fix #47 wrong Cursor.IBeam over folding area if Options.EnableTextDragDrop=false.
1 parent 379439b commit 8635131

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

ICSharpCode.AvalonEdit/Editing/SelectionMouseHandler.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,8 @@ void StartDrag()
375375
void textArea_QueryCursor(object sender, QueryCursorEventArgs e)
376376
{
377377
if (!e.Handled) {
378-
if (mode != SelectionMode.None || !enableTextDragDrop) {
378+
if (mode != SelectionMode.None) {
379+
// during selection, use IBeam cursor even outside the text area
379380
e.Cursor = Cursors.IBeam;
380381
e.Handled = true;
381382
} else if (textArea.TextView.VisualLinesValid) {
@@ -387,7 +388,7 @@ void textArea_QueryCursor(object sender, QueryCursorEventArgs e)
387388
int visualColumn;
388389
bool isAtEndOfLine;
389390
int offset = GetOffsetFromMousePosition(e, out visualColumn, out isAtEndOfLine);
390-
if (textArea.Selection.Contains(offset))
391+
if (enableTextDragDrop && textArea.Selection.Contains(offset))
391392
e.Cursor = Cursors.Arrow;
392393
else
393394
e.Cursor = Cursors.IBeam;

0 commit comments

Comments
 (0)