Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
2f07df59
Commit
2f07df59
authored
Mar 31, 2014
by
Huw Davies
Committed by
Alexandre Julliard
Mar 31, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Add a helper to return the default line height and use that in EM_LINESCROLL.
parent
e168cd28
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
editor.c
dlls/riched20/editor.c
+12
-7
No files found.
dlls/riched20/editor.c
View file @
2f07df59
...
...
@@ -2925,6 +2925,16 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
return
TRUE
;
}
static
inline
int
get_default_line_height
(
ME_TextEditor
*
editor
)
{
int
height
=
0
;
if
(
editor
->
pBuffer
&&
editor
->
pBuffer
->
pDefaultStyle
)
height
=
editor
->
pBuffer
->
pDefaultStyle
->
tm
.
tmHeight
;
if
(
height
<=
0
)
height
=
24
;
return
height
;
}
static
const
char
*
const
edit_messages
[]
=
{
"EM_GETSEL"
,
...
...
@@ -3548,7 +3558,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
{
if
(
!
(
editor
->
styleFlags
&
ES_MULTILINE
))
return
FALSE
;
ME_ScrollDown
(
editor
,
lParam
*
8
);
/* FIXME follow the original */
ME_ScrollDown
(
editor
,
lParam
*
get_default_line_height
(
editor
)
);
return
TRUE
;
}
case
WM_CLEAR
:
...
...
@@ -4221,14 +4231,9 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
case
WM_VSCROLL
:
{
int
origNPos
;
int
lineHeight
;
int
lineHeight
=
get_default_line_height
(
editor
)
;
origNPos
=
editor
->
vert_si
.
nPos
;
lineHeight
=
24
;
if
(
editor
->
pBuffer
&&
editor
->
pBuffer
->
pDefaultStyle
)
lineHeight
=
editor
->
pBuffer
->
pDefaultStyle
->
tm
.
tmHeight
;
if
(
lineHeight
<=
0
)
lineHeight
=
24
;
switch
(
LOWORD
(
wParam
))
{
...
...
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