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
dfa80b35
Commit
dfa80b35
authored
Jul 28, 2010
by
Dylan Smith
Committed by
Alexandre Julliard
Jul 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Invalidate without calling UpdateWindow in many cases.
parent
1964e603
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
23 deletions
+24
-23
editor.c
dlls/riched20/editor.c
+16
-16
editor.h
dlls/riched20/editor.h
+1
-1
paint.c
dlls/riched20/paint.c
+3
-2
richole.c
dlls/riched20/richole.c
+1
-1
txtsrv.c
dlls/riched20/txtsrv.c
+1
-1
undo.c
dlls/riched20/undo.c
+2
-2
No files found.
dlls/riched20/editor.c
View file @
dfa80b35
...
...
@@ -1583,7 +1583,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
ME_ReleaseStyle
(
style
);
editor
->
nEventMask
=
nEventMask
;
ME_UpdateRepaint
(
editor
);
ME_UpdateRepaint
(
editor
,
FALSE
);
if
(
!
(
format
&
SFF_SELECTION
))
{
ME_ClearTempStyle
(
editor
);
}
...
...
@@ -2137,7 +2137,7 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
return
TRUE
;
ME_MoveCursorFromTableRowStartParagraph
(
editor
);
ME_UpdateSelectionLinkAttribute
(
editor
);
ME_UpdateRepaint
(
editor
);
ME_UpdateRepaint
(
editor
,
FALSE
);
ME_SendRequestResize
(
editor
,
FALSE
);
return
TRUE
;
case
VK_RETURN
:
...
...
@@ -2193,7 +2193,7 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
editor
->
pCursors
[
1
]
=
editor
->
pCursors
[
0
];
ME_CommitUndo
(
editor
);
ME_CheckTablesForCorruption
(
editor
);
ME_UpdateRepaint
(
editor
);
ME_UpdateRepaint
(
editor
,
FALSE
);
return
TRUE
;
}
else
if
(
para
==
editor
->
pCursors
[
1
].
pPara
&&
...
...
@@ -2218,7 +2218,7 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
para
->
member
.
para
.
next_para
->
member
.
para
.
nFlags
|=
MEPF_ROWSTART
;
ME_CommitCoalescingUndo
(
editor
);
ME_CheckTablesForCorruption
(
editor
);
ME_UpdateRepaint
(
editor
);
ME_UpdateRepaint
(
editor
,
FALSE
);
return
TRUE
;
}
}
else
{
/* v1.0 - 3.0 */
...
...
@@ -2235,7 +2235,7 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
editor
->
pCursors
[
0
].
nOffset
=
0
;
editor
->
pCursors
[
1
]
=
editor
->
pCursors
[
0
];
ME_CommitCoalescingUndo
(
editor
);
ME_UpdateRepaint
(
editor
);
ME_UpdateRepaint
(
editor
,
FALSE
);
return
TRUE
;
}
}
else
{
...
...
@@ -2262,7 +2262,7 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
editor
->
pCursors
[
1
]
=
editor
->
pCursors
[
0
];
}
ME_CommitCoalescingUndo
(
editor
);
ME_UpdateRepaint
(
editor
);
ME_UpdateRepaint
(
editor
,
FALSE
);
return
TRUE
;
}
}
...
...
@@ -2280,7 +2280,7 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
SetCursor
(
NULL
);
ME_UpdateSelectionLinkAttribute
(
editor
);
ME_UpdateRepaint
(
editor
);
ME_UpdateRepaint
(
editor
,
FALSE
);
}
return
TRUE
;
}
...
...
@@ -2319,7 +2319,7 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
{
ME_InternalDeleteText
(
editor
,
selStart
,
nChars
,
FALSE
);
ME_CommitUndo
(
editor
);
ME_UpdateRepaint
(
editor
);
ME_UpdateRepaint
(
editor
,
TRUE
);
}
return
result
;
}
...
...
@@ -2449,7 +2449,7 @@ static LRESULT ME_Char(ME_TextEditor *editor, WPARAM charCode,
}
ME_UpdateSelectionLinkAttribute
(
editor
);
ME_UpdateRepaint
(
editor
);
ME_UpdateRepaint
(
editor
,
FALSE
);
}
return
0
;
}
...
...
@@ -3299,7 +3299,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
editor
->
nModifyStep
=
oldModify
;
ME_EmptyUndoStack
(
editor
);
}
ME_UpdateRepaint
(
editor
);
ME_UpdateRepaint
(
editor
,
FALSE
);
return
len
;
}
case
EM_SETBKGNDCOLOR
:
...
...
@@ -3460,7 +3460,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
int
nStartCursor
=
ME_GetSelectionOfs
(
editor
,
&
from
,
&
to
);
ME_InternalDeleteText
(
editor
,
&
editor
->
pCursors
[
nStartCursor
],
to
-
from
,
FALSE
);
ME_CommitUndo
(
editor
);
ME_UpdateRepaint
(
editor
);
ME_UpdateRepaint
(
editor
,
TRUE
);
return
0
;
}
case
EM_REPLACESEL
:
...
...
@@ -3488,7 +3488,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
ME_UpdateSelectionLinkAttribute
(
editor
);
if
(
!
wParam
)
ME_EmptyUndoStack
(
editor
);
ME_UpdateRepaint
(
editor
);
ME_UpdateRepaint
(
editor
,
FALSE
);
return
len
;
}
case
EM_SCROLLCARET
:
...
...
@@ -3566,7 +3566,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
editor
->
nModifyStep
=
0
;
ME_CommitUndo
(
editor
);
ME_EmptyUndoStack
(
editor
);
ME_UpdateRepaint
(
editor
);
ME_UpdateRepaint
(
editor
,
FALSE
);
return
1
;
}
case
EM_CANPASTE
:
...
...
@@ -3592,7 +3592,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
{
ME_InternalDeleteText
(
editor
,
selStart
,
nChars
,
FALSE
);
ME_CommitUndo
(
editor
);
ME_UpdateRepaint
(
editor
);
ME_UpdateRepaint
(
editor
,
TRUE
);
}
return
0
;
}
...
...
@@ -4246,7 +4246,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
editor
->
imeStartIndex
=
ME_GetCursorOfs
(
&
editor
->
pCursors
[
0
]);
ME_DeleteSelection
(
editor
);
ME_CommitUndo
(
editor
);
ME_UpdateRepaint
(
editor
);
ME_UpdateRepaint
(
editor
,
FALSE
);
return
0
;
}
case
WM_IME_COMPOSITION
:
...
...
@@ -4278,7 +4278,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
}
ME_ReleaseStyle
(
style
);
ME_CommitUndo
(
editor
);
ME_UpdateRepaint
(
editor
);
ME_UpdateRepaint
(
editor
,
FALSE
);
return
0
;
}
case
WM_IME_ENDCOMPOSITION
:
...
...
dlls/riched20/editor.h
View file @
dfa80b35
...
...
@@ -210,7 +210,7 @@ void ME_SetDefaultParaFormat(PARAFORMAT2 *pFmt);
void
ME_PaintContent
(
ME_TextEditor
*
editor
,
HDC
hDC
,
BOOL
bOnlyNew
,
const
RECT
*
rcUpdate
);
void
ME_Repaint
(
ME_TextEditor
*
editor
);
void
ME_RewrapRepaint
(
ME_TextEditor
*
editor
);
void
ME_UpdateRepaint
(
ME_TextEditor
*
editor
);
void
ME_UpdateRepaint
(
ME_TextEditor
*
editor
,
BOOL
update_now
);
void
ME_EnsureVisible
(
ME_TextEditor
*
editor
,
ME_Cursor
*
pCursor
);
void
ME_InvalidateSelection
(
ME_TextEditor
*
editor
);
BOOL
ME_SetZoom
(
ME_TextEditor
*
editor
,
int
numerator
,
int
denominator
);
...
...
dlls/riched20/paint.c
View file @
dfa80b35
...
...
@@ -132,7 +132,7 @@ void ME_Repaint(ME_TextEditor *editor)
ITextHost_TxViewChange
(
editor
->
texthost
,
TRUE
);
}
void
ME_UpdateRepaint
(
ME_TextEditor
*
editor
)
void
ME_UpdateRepaint
(
ME_TextEditor
*
editor
,
BOOL
update_now
)
{
/* Should be called whenever the contents of the control have changed */
BOOL
wrappedParagraphs
;
...
...
@@ -144,6 +144,8 @@ void ME_UpdateRepaint(ME_TextEditor *editor)
/* Ensure that the cursor is visible */
ME_EnsureVisible
(
editor
,
&
editor
->
pCursors
[
0
]);
ITextHost_TxViewChange
(
editor
->
texthost
,
update_now
);
ME_SendSelChange
(
editor
);
/* send EN_CHANGE if the event mask asks for it */
...
...
@@ -153,7 +155,6 @@ void ME_UpdateRepaint(ME_TextEditor *editor)
ME_SendOldNotify
(
editor
,
EN_CHANGE
);
editor
->
nEventMask
|=
ENM_CHANGE
;
}
ME_Repaint
(
editor
);
}
void
...
...
dlls/riched20/richole.c
View file @
dfa80b35
...
...
@@ -391,7 +391,7 @@ IRichEditOle_fnInsertObject(IRichEditOle *me, REOBJECT *reo)
ME_InsertOLEFromCursor
(
This
->
editor
,
reo
,
0
);
ME_CommitUndo
(
This
->
editor
);
ME_UpdateRepaint
(
This
->
editor
);
ME_UpdateRepaint
(
This
->
editor
,
FALSE
);
return
S_OK
;
}
...
...
dlls/riched20/txtsrv.c
View file @
dfa80b35
...
...
@@ -325,7 +325,7 @@ HRESULT WINAPI fnTextSrv_TxSetText(ITextServices *iface,
This
->
editor
->
nModifyStep
=
0
;
OleFlushClipboard
();
ME_EmptyUndoStack
(
This
->
editor
);
ME_UpdateRepaint
(
This
->
editor
);
ME_UpdateRepaint
(
This
->
editor
,
FALSE
);
return
S_OK
;
}
...
...
dlls/riched20/undo.c
View file @
dfa80b35
...
...
@@ -402,7 +402,7 @@ BOOL ME_Undo(ME_TextEditor *editor) {
ME_CheckTablesForCorruption
(
editor
);
editor
->
nUndoStackSize
--
;
editor
->
nUndoMode
=
nMode
;
ME_UpdateRepaint
(
editor
);
ME_UpdateRepaint
(
editor
,
FALSE
);
return
TRUE
;
}
...
...
@@ -438,6 +438,6 @@ BOOL ME_Redo(ME_TextEditor *editor) {
ME_AddUndoItem
(
editor
,
diUndoEndTransaction
,
NULL
);
ME_CheckTablesForCorruption
(
editor
);
editor
->
nUndoMode
=
nMode
;
ME_UpdateRepaint
(
editor
);
ME_UpdateRepaint
(
editor
,
FALSE
);
return
TRUE
;
}
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