diff --git "a/dll/win32/comctl32/edit.c" "b/dll/win32/comctl32/edit.c" index 6d124ce64a4..0174577e054 100644 --- "a/dll/win32/comctl32/edit.c" +++ "b/dll/win32/comctl32/edit.c" @@ -1050,11 +1050,15 @@ static LRESULT EDIT_EM_PosFromChar(EDITSTATE *es, INT index, BOOL after_wrap) lw = line_def->width; w = es->format_rect.right - es->format_rect.left; if (line_def->ssa) + { ScriptStringCPtoX(line_def->ssa, (index - 1) - li, TRUE, &x); + x -= es->x_offset; + } + else #ifdef __REACTOS__ /* CORE-15780 */ - x = (lw > 0 ? es->x_offset : x - es->x_offset); + x = (lw > 0 ? es->x_offset : x - es->x_offset); #else - x = es->x_offset; + x = es->x_offset; #endif if (es->style & ES_RIGHT) @@ -1830,6 +1834,7 @@ static void EDIT_EM_ScrollCaret(EDITSTATE *es) } } + if(es->flags & EF_FOCUSED) EDIT_SetCaretPos(es, es->selection_end, es->flags & EF_AFTER_WRAP); } @@ -2241,12 +2246,6 @@ static void EDIT_PaintLine(EDITSTATE *es, HDC dc, INT line, BOOL rev) x += EDIT_PaintText(es, dc, x, y, line, e - li, li + ll - e, FALSE); } else x += EDIT_PaintText(es, dc, x, y, line, 0, ll, FALSE); - - if (es->cue_banner_text && es->text_length == 0 && (!(es->flags & EF_FOCUSED) || es->cue_banner_draw_focused)) - { - SetTextColor(dc, GetSysColor(COLOR_GRAYTEXT)); - TextOutW(dc, x, y, es->cue_banner_text, lstrlenW(es->cue_banner_text)); - } } @@ -3398,17 +3397,22 @@ static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key) else EDIT_WM_Clear(es); } else { - EDIT_EM_SetSel(es, ~0u, 0, FALSE); - if (shift) + if (shift) { /* delete character left of caret */ + EDIT_EM_SetSel(es, (UINT)-1, 0, FALSE); EDIT_MoveBackward(es, TRUE); - else if (control) + EDIT_WM_Clear(es); + } else if (control) { /* delete to end of line */ + EDIT_EM_SetSel(es, (UINT)-1, 0, FALSE); EDIT_MoveEnd(es, TRUE, FALSE); - else + EDIT_WM_Clear(es); + } else { /* delete character right of caret */ + EDIT_EM_SetSel(es, (UINT)-1, 0, FALSE); EDIT_MoveForward(es, TRUE); - EDIT_WM_Clear(es); + EDIT_WM_Clear(es); + } } } break;