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
f24678b2
Commit
f24678b2
authored
Oct 17, 2008
by
Dylan Smith
Committed by
Alexandre Julliard
Oct 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Scroll cursor into view even with redraw turned off.
parent
582bdade
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
16 deletions
+13
-16
paint.c
dlls/riched20/paint.c
+9
-6
editor.c
dlls/riched20/tests/editor.c
+4
-10
No files found.
dlls/riched20/paint.c
View file @
f24678b2
...
...
@@ -159,7 +159,6 @@ void ME_UpdateRepaint(ME_TextEditor *editor)
BOOL
wrappedParagraphs
;
wrappedParagraphs
=
ME_WrapMarkedParagraphs
(
editor
);
if
(
!
editor
->
bRedraw
)
return
;
if
(
wrappedParagraphs
)
ME_UpdateScrollBar
(
editor
);
...
...
@@ -174,7 +173,8 @@ void ME_UpdateRepaint(ME_TextEditor *editor)
ME_SendOldNotify
(
editor
,
EN_CHANGE
);
editor
->
nEventMask
|=
ENM_CHANGE
;
}
ME_Repaint
(
editor
);
if
(
editor
->
bRedraw
)
ME_Repaint
(
editor
);
ME_SendSelChange
(
editor
);
}
...
...
@@ -185,10 +185,10 @@ ME_RewrapRepaint(ME_TextEditor *editor)
* looks, but not content. Like resizing. */
ME_MarkAllForWrapping
(
editor
);
ME_WrapMarkedParagraphs
(
editor
);
ME_UpdateScrollBar
(
editor
);
if
(
editor
->
bRedraw
)
{
ME_WrapMarkedParagraphs
(
editor
);
ME_UpdateScrollBar
(
editor
);
ME_Repaint
(
editor
);
}
}
...
...
@@ -1093,6 +1093,7 @@ void ME_Scroll(ME_TextEditor *editor, int value, int type)
||
(
winStyle
&
ES_DISABLENOSCROLL
);
if
(
bScrollBarIsVisible
!=
bScrollBarWillBeVisible
)
{
/* FIXME: ShowScrollBar will redraw the scrollbar when editor->bRedraw is FALSE */
ShowScrollBar
(
hWnd
,
SB_VERT
,
bScrollBarWillBeVisible
);
}
ME_UpdateScrollBar
(
editor
);
...
...
@@ -1126,6 +1127,7 @@ void ME_UpdateScrollBar(ME_TextEditor *editor)
if
(
bScrollBarWasVisible
!=
bScrollBarWillBeVisible
)
{
/* FIXME: ShowScrollBar will redraw the scrollbar when editor->bRedraw is FALSE */
ShowScrollBar
(
hWnd
,
SB_VERT
,
bScrollBarWillBeVisible
);
ME_MarkAllForWrapping
(
editor
);
ME_WrapMarkedParagraphs
(
editor
);
...
...
@@ -1144,13 +1146,14 @@ void ME_UpdateScrollBar(ME_TextEditor *editor)
editor
->
vert_si
.
nPage
=
si
.
nPage
;
if
(
bScrollBarWillBeVisible
)
{
SetScrollInfo
(
hWnd
,
SB_VERT
,
&
si
,
TRUE
);
SetScrollInfo
(
hWnd
,
SB_VERT
,
&
si
,
editor
->
bRedraw
);
}
else
{
if
(
bScrollBarWasVisible
&&
!
(
si
.
fMask
&
SIF_DISABLENOSCROLL
))
{
SetScrollInfo
(
hWnd
,
SB_VERT
,
&
si
,
TRUE
);
SetScrollInfo
(
hWnd
,
SB_VERT
,
&
si
,
editor
->
bRedraw
);
/* FIXME: ShowScrollBar will redraw the scrollbar when editor->bRedraw is FALSE */
ShowScrollBar
(
hWnd
,
SB_VERT
,
FALSE
);
ME_ScrollAbs
(
editor
,
0
);
}
...
...
dlls/riched20/tests/editor.c
View file @
f24678b2
...
...
@@ -5189,7 +5189,7 @@ static void test_eventMask(void)
SendMessage
(
eventMaskEditHwnd
,
WM_SETREDRAW
,
FALSE
,
0
);
queriedEventMask
=
0
;
/* initialize to something other than we expect */
SendMessage
(
eventMaskEditHwnd
,
EM_REPLACESEL
,
0
,
(
LPARAM
)
text
);
todo_wine
ok
(
queriedEventMask
==
(
eventMask
&
~
ENM_CHANGE
),
ok
(
queriedEventMask
==
(
eventMask
&
~
ENM_CHANGE
),
"wrong event mask (0x%x) during WM_COMMAND
\n
"
,
queriedEventMask
);
SendMessage
(
eventMaskEditHwnd
,
WM_SETREDRAW
,
TRUE
,
0
);
...
...
@@ -5568,7 +5568,7 @@ static void test_word_wrap(void)
ok
(
lines
==
1
,
"Line wasn't expected to wrap (lines=%d).
\n
"
,
lines
);
MoveWindow
(
hwnd
,
0
,
0
,
200
,
80
,
FALSE
);
lines
=
SendMessage
(
hwnd
,
EM_GETLINECOUNT
,
0
,
0
);
todo_wine
ok
(
lines
>
1
,
"Line was expected to wrap (lines=%d).
\n
"
,
lines
);
ok
(
lines
>
1
,
"Line was expected to wrap (lines=%d).
\n
"
,
lines
);
SendMessage
(
hwnd
,
WM_SETREDRAW
,
TRUE
,
0
);
DestroyWindow
(
hwnd
);
...
...
@@ -5588,15 +5588,9 @@ static void test_auto_yscroll(void)
ok
(
lines
==
8
,
"%d lines instead of 8
\n
"
,
lines
);
ret
=
SendMessage
(
hwnd
,
EM_GETSCROLLPOS
,
0
,
(
LPARAM
)
&
pt
);
ok
(
ret
==
1
,
"EM_GETSCROLLPOS returned %d instead of 1
\n
"
,
ret
);
if
(
!
redraw
)
todo_wine
ok
(
pt
.
y
!=
0
,
"Didn't scroll down after replacing text.
\n
"
);
else
ok
(
pt
.
y
!=
0
,
"Didn't scroll down after replacing text.
\n
"
);
ok
(
pt
.
y
!=
0
,
"Didn't scroll down after replacing text.
\n
"
);
ret
=
GetWindowLong
(
hwnd
,
GWL_STYLE
);
if
(
!
redraw
)
todo_wine
ok
(
ret
&
WS_VSCROLL
,
"Scrollbar was not shown yet (style=%x).
\n
"
,
(
UINT
)
ret
);
else
ok
(
ret
&
WS_VSCROLL
,
"Scrollbar was not shown yet (style=%x).
\n
"
,
(
UINT
)
ret
);
ok
(
ret
&
WS_VSCROLL
,
"Scrollbar was not shown yet (style=%x).
\n
"
,
(
UINT
)
ret
);
SendMessage
(
hwnd
,
WM_SETTEXT
,
0
,
(
LPARAM
)
NULL
);
lines
=
SendMessage
(
hwnd
,
EM_GETLINECOUNT
,
0
,
0
);
...
...
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