Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
6e3a7254
Commit
6e3a7254
authored
Jan 13, 2006
by
Phil Krylov
Committed by
Alexandre Julliard
Jan 13, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Select word on double click.
parent
e0fc7728
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
caret.c
dlls/riched20/caret.c
+11
-0
editor.c
dlls/riched20/editor.c
+6
-2
editor.h
dlls/riched20/editor.h
+1
-0
No files found.
dlls/riched20/caret.c
View file @
6e3a7254
...
...
@@ -578,6 +578,17 @@ ME_MoveCursorWords(ME_TextEditor *editor, ME_Cursor *cursor, int nRelOfs)
}
void
ME_SelectWord
(
ME_TextEditor
*
editor
)
{
if
(
!
(
editor
->
pCursors
[
0
].
pRun
->
member
.
run
.
nFlags
&
MERF_ENDPARA
))
ME_MoveCursorWords
(
editor
,
&
editor
->
pCursors
[
0
],
-
1
);
ME_MoveCursorWords
(
editor
,
&
editor
->
pCursors
[
1
],
+
1
);
ME_InvalidateSelection
(
editor
);
ME_SendSelChange
(
editor
);
}
int
ME_GetCursorOfs
(
ME_TextEditor
*
editor
,
int
nCursor
)
{
ME_Cursor
*
pCursor
=
&
editor
->
pCursors
[
nCursor
];
...
...
dlls/riched20/editor.c
View file @
6e3a7254
...
...
@@ -3,6 +3,7 @@
*
* Copyright 2004 by Krzysztof Foltman
* Copyright 2005 by Cihan Altinay
* Copyright 2005 by Phil Krylov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -1837,6 +1838,9 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
if
(
GetCapture
()
==
hWnd
)
ReleaseCapture
();
break
;
case
WM_LBUTTONDBLCLK
:
ME_SelectWord
(
editor
);
break
;
case
WM_PAINT
:
if
(
editor
->
bRedraw
)
{
...
...
@@ -2167,7 +2171,7 @@ void ME_RegisterEditorClass(HINSTANCE hInstance)
WNDCLASSW
wcW
;
WNDCLASSA
wcA
;
wcW
.
style
=
CS_HREDRAW
|
CS_VREDRAW
|
CS_GLOBALCLASS
;
wcW
.
style
=
CS_
DBLCLKS
|
CS_
HREDRAW
|
CS_VREDRAW
|
CS_GLOBALCLASS
;
wcW
.
lpfnWndProc
=
RichEditANSIWndProc
;
wcW
.
cbClsExtra
=
0
;
wcW
.
cbWndExtra
=
4
;
...
...
@@ -2183,7 +2187,7 @@ void ME_RegisterEditorClass(HINSTANCE hInstance)
bResult
=
RegisterClassW
(
&
wcW
);
assert
(
bResult
);
wcA
.
style
=
CS_HREDRAW
|
CS_VREDRAW
|
CS_GLOBALCLASS
;
wcA
.
style
=
CS_
DBLCLKS
|
CS_
HREDRAW
|
CS_VREDRAW
|
CS_GLOBALCLASS
;
wcA
.
lpfnWndProc
=
RichEditANSIWndProc
;
wcA
.
cbClsExtra
=
0
;
wcA
.
cbWndExtra
=
4
;
...
...
dlls/riched20/editor.h
View file @
6e3a7254
...
...
@@ -140,6 +140,7 @@ void ME_SetDefaultCharFormat(ME_TextEditor *editor, CHARFORMAT2W *mod);
/* caret.c */
void
ME_SetSelection
(
ME_TextEditor
*
editor
,
int
from
,
int
to
);
void
ME_SelectWord
(
ME_TextEditor
*
editor
);
void
ME_HideCaret
(
ME_TextEditor
*
ed
);
void
ME_ShowCaret
(
ME_TextEditor
*
ed
);
void
ME_MoveCaret
(
ME_TextEditor
*
ed
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment