diff --git a/reactos/dll/win32/user32/controls/edit.c b/reactos/dll/win32/user32/controls/edit.c index 6c1040d0b49..ebfacebd262 100644 --- a/reactos/dll/win32/user32/controls/edit.c +++ b/reactos/dll/win32/user32/controls/edit.c @@ -50,9 +50,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(edit); WINE_DECLARE_DEBUG_CHANNEL(combo); WINE_DECLARE_DEBUG_CHANNEL(relay); -#define BUFLIMIT_MULTI 65534 /* maximum buffer size (not including '\0') - FIXME: BTW, new specs say 65535 (do you dare ???) */ -#define BUFLIMIT_SINGLE 32766 /* maximum buffer size (not including '\0') */ +#define BUFLIMIT_INITIAL 30000 /* initial buffer size */ #define GROWLENGTH 32 /* buffers granularity in bytes: must be power of 2 */ #define ROUND_TO_GROW(size) (((size) + (GROWLENGTH - 1)) & ~(GROWLENGTH - 1)) #define HSCROLL_FRACTION 3 /* scroll window by 1/3 width */ @@ -683,7 +681,7 @@ static LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg, case EM_LIMITTEXT16: #endif case EM_SETLIMITTEXT: - EDIT_EM_SetLimitText(es, (INT)wParam); + EDIT_EM_SetLimitText(es, wParam); break; #ifndef __REACTOS__ @@ -3303,7 +3301,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, LPCWSTR lpsz_replac /* Issue the EN_MAXTEXT notification and continue with replacing text * such that buffer limit is honored. */ - if ((honor_limit) && (es->buffer_limit > 0) && (size > es->buffer_limit)) { + if ((honor_limit) && (size > es->buffer_limit)) { EDIT_NOTIFY_PARENT(es, EN_MAXTEXT); /* Buffer limit can be smaller than the actual length of text in combobox */ if (es->buffer_limit < (tl - (e-s))) @@ -4902,7 +4900,7 @@ static LRESULT EDIT_WM_NCCreate(HWND hwnd, LPCREATESTRUCTW lpcs, BOOL unicode) es->style &= ~ES_UPPERCASE; } if (es->style & ES_MULTILINE) { - es->buffer_limit = BUFLIMIT_MULTI; + es->buffer_limit = BUFLIMIT_INITIAL; if (es->style & WS_VSCROLL) es->style |= ES_AUTOVSCROLL; if (es->style & WS_HSCROLL) @@ -4916,7 +4914,7 @@ static LRESULT EDIT_WM_NCCreate(HWND hwnd, LPCREATESTRUCTW lpcs, BOOL unicode) es->style &= ~ES_AUTOHSCROLL; } } else { - es->buffer_limit = BUFLIMIT_SINGLE; + es->buffer_limit = BUFLIMIT_INITIAL; if ((es->style & ES_RIGHT) && (es->style & ES_CENTER)) es->style &= ~ES_CENTER; es->style &= ~WS_HSCROLL;