Ignore:
Timestamp:
Nov 13, 1999, 5:42:43 PM (26 years ago)
Author:
cbratschi
Message:

merged with wine-991031, fixed edit bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/edit.cpp

    r1717 r1724  
    1 /* $Id: edit.cpp,v 1.13 1999-11-12 17:16:36 cbratschi Exp $ */
     1/* $Id: edit.cpp,v 1.14 1999-11-13 16:42:41 cbratschi Exp $ */
    22/*
    33 *      Edit control
     
    99 *      Copyright  1999 Christoph Bratschi
    1010 *
    11  * WINE version: 990923
     11 * WINE version: 991031
    1212 */
    1313
     
    184184static BOOL     EDIT_EM_FmtLines(HWND hwnd, EDITSTATE *es, BOOL add_eol);
    185185static HLOCAL   EDIT_EM_GetHandle(HWND hwnd, EDITSTATE *es);
    186 static HLOCAL16 EDIT_EM_GetHandle16(HWND hwnd, EDITSTATE *es);
    187186static INT      EDIT_EM_GetLine(HWND hwnd, EDITSTATE *es, INT line, LPSTR lpch);
    188187static LRESULT  EDIT_EM_GetSel(HWND hwnd, EDITSTATE *es, LPUINT start, LPUINT end);
     
    10771076        EDIT_GetLineRect(hwnd, es, 0, start, end, &line_rect);
    10781077        if (IntersectRect(&rc, &line_rect, &es->format_rect))
    1079                 InvalidateRect(hwnd, &rc, FALSE);
     1078        {
     1079          if (es->flags & EF_FOCUSED) HideCaret(hwnd);
     1080          InvalidateRect(hwnd, &rc, FALSE);
     1081          if (es->flags & EF_FOCUSED) ShowCaret(hwnd);
     1082        }
    10801083}
    10811084
     
    11171120        GetClientRect(hwnd, &rc1);
    11181121        IntersectRect(&rcWnd, &rc1, &es->format_rect);
     1122        if (es->flags & EF_FOCUSED) HideCaret(hwnd);
    11191123        if (sl == el) {
    11201124                EDIT_GetLineRect(hwnd, es, sl, sc, ec, &rcLine);
     
    11401144                        InvalidateRect(hwnd, &rcUpdate, FALSE);
    11411145        }
     1146        if (es->flags & EF_FOCUSED) ShowCaret(hwnd);
    11421147}
    11431148
     
    11811186{
    11821187        HLOCAL hNew32;
    1183         HLOCAL16 hNew16;
    11841188
    11851189        if (size <= es->buffer_size)
     
    26232627        switch (c) {
    26242628        case '\r':
    2625             /* If the edit doesn't want the return, do nothing */
    2626             if(!(es->style & ES_WANTRETURN))
    2627                 break;
     2629            /* If the edit doesn't want the return and it's not a multiline edit, do nothing */
     2630            if(!(es->style & ES_MULTILINE) && !(es->style & ES_WANTRETURN))
     2631                break;
    26282632        case '\n':
    26292633                if (es->style & ES_MULTILINE) {
Note: See TracChangeset for help on using the changeset viewer.