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
53959eb7
Commit
53959eb7
authored
Oct 19, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Oct 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Use helpers in the cursor to start/end functions.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
87c4d217
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
caret.c
dlls/riched20/caret.c
+4
-4
editor.c
dlls/riched20/editor.c
+6
-0
editor.h
dlls/riched20/editor.h
+1
-0
No files found.
dlls/riched20/caret.c
View file @
53959eb7
...
...
@@ -26,15 +26,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(richedit);
void
ME_SetCursorToStart
(
ME_TextEditor
*
editor
,
ME_Cursor
*
cursor
)
{
cursor
->
pPara
=
editor
->
pBuffer
->
pFirst
->
member
.
para
.
next_para
;
cursor
->
pRun
=
ME_FindItemFwd
(
cursor
->
pPara
,
diRun
);
cursor
->
pPara
=
para_get_di
(
editor_first_para
(
editor
)
)
;
cursor
->
pRun
=
run_get_di
(
para_first_run
(
&
cursor
->
pPara
->
member
.
para
)
);
cursor
->
nOffset
=
0
;
}
static
void
ME_SetCursorToEnd
(
ME_TextEditor
*
editor
,
ME_Cursor
*
cursor
,
BOOL
final_eop
)
{
cursor
->
pPara
=
editor
->
pBuffer
->
pLast
->
member
.
para
.
prev_para
;
cursor
->
pRun
=
ME_FindItemBack
(
editor
->
pBuffer
->
pLast
,
diRun
);
cursor
->
pPara
=
para_get_di
(
para_prev
(
editor_end_para
(
editor
)
)
)
;
cursor
->
pRun
=
run_get_di
(
para_end_run
(
&
cursor
->
pPara
->
member
.
para
)
);
cursor
->
nOffset
=
final_eop
?
cursor
->
pRun
->
member
.
run
.
len
:
0
;
}
...
...
dlls/riched20/editor.c
View file @
53959eb7
...
...
@@ -285,6 +285,12 @@ ME_Paragraph *editor_first_para( ME_TextEditor *editor )
return
para_next
(
&
editor
->
pBuffer
->
pFirst
->
member
.
para
);
}
/* Note, returns the diTextEnd sentinel paragraph */
ME_Paragraph
*
editor_end_para
(
ME_TextEditor
*
editor
)
{
return
&
editor
->
pBuffer
->
pLast
->
member
.
para
;
}
static
LRESULT
ME_StreamInText
(
ME_TextEditor
*
editor
,
DWORD
dwFormat
,
ME_InStream
*
stream
,
ME_Style
*
style
)
{
WCHAR
*
pText
;
...
...
dlls/riched20/editor.h
View file @
53959eb7
...
...
@@ -273,6 +273,7 @@ void ME_ReplaceSel(ME_TextEditor *editor, BOOL can_undo, const WCHAR *str, int l
int
set_selection
(
ME_TextEditor
*
editor
,
int
to
,
int
from
)
DECLSPEC_HIDDEN
;
HRESULT
editor_copy_or_cut
(
ME_TextEditor
*
editor
,
BOOL
cut
,
ME_Cursor
*
start
,
int
count
,
IDataObject
**
data_out
)
DECLSPEC_HIDDEN
;
ME_Paragraph
*
editor_end_para
(
ME_TextEditor
*
editor
)
DECLSPEC_HIDDEN
;
ME_Paragraph
*
editor_first_para
(
ME_TextEditor
*
editor
)
DECLSPEC_HIDDEN
;
/* table.c */
...
...
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