mirror of
https://github.com/reactos/reactos.git
synced 2025-06-13 00:28:30 +00:00
[RICHED20] Handle SCF_WORD. By Christoph von Wittich. Already accepted upstream.
svn path=/trunk/; revision=67075
This commit is contained in:
parent
be34509dea
commit
5cc55012a5
3 changed files with 8 additions and 3 deletions
|
@ -710,7 +710,7 @@ int ME_MoveCursorChars(ME_TextEditor *editor, ME_Cursor *cursor, int nRelOfs)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static BOOL
|
BOOL
|
||||||
ME_MoveCursorWords(ME_TextEditor *editor, ME_Cursor *cursor, int nRelOfs)
|
ME_MoveCursorWords(ME_TextEditor *editor, ME_Cursor *cursor, int nRelOfs)
|
||||||
{
|
{
|
||||||
ME_DisplayItem *pRun = cursor->pRun, *pOtherRun;
|
ME_DisplayItem *pRun = cursor->pRun, *pOtherRun;
|
||||||
|
|
|
@ -3506,8 +3506,12 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
|
||||||
if (editor->mode & TM_PLAINTEXT)
|
if (editor->mode & TM_PLAINTEXT)
|
||||||
return 0;
|
return 0;
|
||||||
if (wParam & SCF_WORD) {
|
if (wParam & SCF_WORD) {
|
||||||
FIXME("EM_SETCHARFORMAT: word selection not supported\n");
|
ME_Cursor start;
|
||||||
return 0;
|
ME_Cursor end = editor->pCursors[0];
|
||||||
|
ME_MoveCursorWords(editor, &end, +1);
|
||||||
|
start = end;
|
||||||
|
ME_MoveCursorWords(editor, &start, -1);
|
||||||
|
ME_SetCharFormat(editor, &start, &end, p);
|
||||||
}
|
}
|
||||||
bRepaint = ME_IsSelection(editor);
|
bRepaint = ME_IsSelection(editor);
|
||||||
ME_SetSelectionCharFormat(editor, p);
|
ME_SetSelectionCharFormat(editor, p);
|
||||||
|
|
|
@ -201,6 +201,7 @@ void ME_SetDefaultCharFormat(ME_TextEditor *editor, CHARFORMAT2W *mod) DECLSPEC_
|
||||||
/* caret.c */
|
/* caret.c */
|
||||||
void ME_SetCursorToStart(ME_TextEditor *editor, ME_Cursor *cursor) DECLSPEC_HIDDEN;
|
void ME_SetCursorToStart(ME_TextEditor *editor, ME_Cursor *cursor) DECLSPEC_HIDDEN;
|
||||||
int ME_SetSelection(ME_TextEditor *editor, int from, int to) DECLSPEC_HIDDEN;
|
int ME_SetSelection(ME_TextEditor *editor, int from, int to) DECLSPEC_HIDDEN;
|
||||||
|
BOOL ME_MoveCursorWords(ME_TextEditor *editor, ME_Cursor *cursor, int nRelOfs) DECLSPEC_HIDDEN;
|
||||||
void ME_HideCaret(ME_TextEditor *ed) DECLSPEC_HIDDEN;
|
void ME_HideCaret(ME_TextEditor *ed) DECLSPEC_HIDDEN;
|
||||||
void ME_ShowCaret(ME_TextEditor *ed) DECLSPEC_HIDDEN;
|
void ME_ShowCaret(ME_TextEditor *ed) DECLSPEC_HIDDEN;
|
||||||
void ME_MoveCaret(ME_TextEditor *ed) DECLSPEC_HIDDEN;
|
void ME_MoveCaret(ME_TextEditor *ed) DECLSPEC_HIDDEN;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue