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
807546ee
Commit
807546ee
authored
Nov 27, 2006
by
Matt Finnicum
Committed by
Alexandre Julliard
Nov 28, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Make ME_StreamIn create undos properly.
parent
7c8fdd67
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
12 deletions
+10
-12
editor.c
dlls/riched20/editor.c
+10
-10
editor.c
dlls/riched20/tests/editor.c
+0
-2
No files found.
dlls/riched20/editor.c
View file @
807546ee
...
...
@@ -597,7 +597,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
{
RTF_Info
parser
;
ME_Style
*
style
;
int
from
,
to
,
to2
,
nUndoMode
;
int
from
,
to
,
to2
;
ME_UndoItem
*
pUI
;
int
nEventMask
=
editor
->
nEventMask
;
ME_InStream
inStream
;
...
...
@@ -621,9 +621,6 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
/* FIXME restore default paragraph formatting ! */
}
nUndoMode
=
editor
->
nUndoMode
;
editor
->
nUndoMode
=
umIgnore
;
inStream
.
editstream
=
stream
;
inStream
.
editstream
->
dwError
=
0
;
inStream
.
dwSize
=
0
;
...
...
@@ -675,16 +672,19 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
SendMessageA
(
editor
->
hWnd
,
EM_SETSEL
,
0
,
0
);
}
editor
->
nUndoMode
=
nUndoMode
;
if
(
format
&
SFF_SELECTION
)
{
pUI
=
ME_AddUndoItem
(
editor
,
diUndoDeleteRun
,
NULL
);
TRACE
(
"from %d to %d
\n
"
,
from
,
to
);
if
(
pUI
&&
from
<
to
)
if
(
from
<
to
)
/* selection overwritten is non-empty */
{
pUI
->
nStart
=
from
;
pUI
->
nLen
=
to
-
from
;
pUI
=
ME_AddUndoItem
(
editor
,
diUndoDeleteRun
,
NULL
);
TRACE
(
"from %d to %d
\n
"
,
from
,
to
);
if
(
pUI
)
{
pUI
->
nStart
=
from
;
pUI
->
nLen
=
to
-
from
;
}
}
/* even if we didn't add an undo, we need to commit the ones added earlier */
ME_CommitUndo
(
editor
);
}
else
...
...
dlls/riched20/tests/editor.c
View file @
807546ee
...
...
@@ -1308,10 +1308,8 @@ static void test_EM_GETMODIFY(void)
SendMessage
(
hwndRichEdit
,
EM_STREAMIN
,
(
WPARAM
)(
SF_TEXT
),
(
LPARAM
)
&
es
);
result
=
SendMessage
(
hwndRichEdit
,
EM_GETMODIFY
,
0
,
0
);
todo_wine
{
ok
(
result
!=
0
,
"EM_GETMODIFY returned zero, instead of non-zero for EM_STREAM
\n
"
);
}
DestroyWindow
(
hwndRichEdit
);
}
...
...
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