-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path222192.mypatch
45 lines (40 loc) · 1.44 KB
/
222192.mypatch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From: Dongwan Kim <[email protected]>
Subject: [PATCH v2 2/3] riched20: fill REOBJECT.cp when an OLE object inserted with REO_CP_SELECTION
Message-Id: <[email protected]>
Date: Thu, 16 Dec 2021 14:06:53 +0900
In-Reply-To: <[email protected]>
References: <[email protected]>
The character position should be filled in REOBJECT
which IRichEditOle::GetObject returns.
Signed-off-by: Dongwan Kim <[email protected]>
---
dlls/riched20/caret.c | 2 ++
dlls/riched20/run.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c
index ebc137ebf85..50bb320c982 100644
--- a/dlls/riched20/caret.c
+++ b/dlls/riched20/caret.c
@@ -488,6 +488,8 @@ void editor_insert_oleobj(ME_TextEditor *editor, const REOBJECT *reo)
break;
}
}
+ if(run->reobj->obj.cp == REO_CP_SELECTION)
+ run->reobj->obj.cp = run->nCharOfs;
if (reobj_prev)
list_add_after(&reobj_prev->entry, &run->reobj->entry);
else
diff --git a/dlls/riched20/run.c b/dlls/riched20/run.c
index 51e768f8441..0cd0773b6b0 100644
--- a/dlls/riched20/run.c
+++ b/dlls/riched20/run.c
@@ -154,6 +154,7 @@ void editor_propagate_char_ofs( ME_Paragraph *para, ME_Run *run, int shift )
do
{
run->nCharOfs += shift;
+ if(run->reobj) run->reobj->obj.cp = run->nCharOfs;
run = run_next( run );
} while (run);
}
--
2.30.2