[PATCH 2/5] riched20: Remove a redundant condition.

Huw Davies huw at codeweavers.com
Wed Oct 21 04:05:53 CDT 2020


If the cursor offset is zero, then it is by definition
at the beginning of a run.

Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 dlls/riched20/caret.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c
index 21dd901088e..97cee3d9b3a 100644
--- a/dlls/riched20/caret.c
+++ b/dlls/riched20/caret.c
@@ -327,9 +327,7 @@ BOOL ME_InternalDeleteText(ME_TextEditor *editor, ME_Cursor *start,
   {
     ME_Run *run;
     cursor_from_char_ofs( editor, nOfs + nChars, &c );
-    if (!c.nOffset &&
-        nOfs+nChars == (c.pRun->member.run.nCharOfs
-                        + c.pPara->member.para.nCharOfs))
+    if (!c.nOffset)
     {
       /* We aren't deleting anything in this run, so we will go back to the
        * last run we are deleting text in. */
-- 
2.23.0




More information about the wine-devel mailing list