Commit f148d820 authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

richedit: Got rid of useless function ME_VPosToPos.

The function was just returning the second parameter. It had some commented out code that indicated that previously backslashes weren't included in the length. Native wordpad doesn't handle backspaces in a special way, so this must have been an internal representation that complicated finding the position of characters.
parent d306b6b5
...@@ -107,7 +107,6 @@ int ME_GetCharFwd(const ME_String *s, int nPos); /* get char starting from start ...@@ -107,7 +107,6 @@ int ME_GetCharFwd(const ME_String *s, int nPos); /* get char starting from start
int ME_GetCharBack(const ME_String *s, int nPos); /* get char starting from \0 */ int ME_GetCharBack(const ME_String *s, int nPos); /* get char starting from \0 */
int ME_StrRelPos(const ME_String *s, int nVChar, int *pRelChars); int ME_StrRelPos(const ME_String *s, int nVChar, int *pRelChars);
int ME_StrRelPos2(const ME_String *s, int nVChar, int nRelChars); int ME_StrRelPos2(const ME_String *s, int nVChar, int nRelChars);
int ME_VPosToPos(ME_String *s, int nVPos);
int ME_PosToVPos(const ME_String *s, int nPos); int ME_PosToVPos(const ME_String *s, int nPos);
void ME_StrDeleteV(ME_String *s, int nVChar, int nChars); void ME_StrDeleteV(ME_String *s, int nVChar, int nChars);
/* smart helpers for A<->W conversions, they reserve/free memory and call MultiByte<->WideChar functions */ /* smart helpers for A<->W conversions, they reserve/free memory and call MultiByte<->WideChar functions */
......
...@@ -310,8 +310,7 @@ ME_DisplayItem *ME_SplitRunSimple(ME_TextEditor *editor, ME_DisplayItem *item, i ...@@ -310,8 +310,7 @@ ME_DisplayItem *ME_SplitRunSimple(ME_TextEditor *editor, ME_DisplayItem *item, i
item2 = ME_MakeRun(run->style, item2 = ME_MakeRun(run->style,
ME_VSplitString(run->strText, nVChar), run->nFlags&MERF_SPLITMASK); ME_VSplitString(run->strText, nVChar), run->nFlags&MERF_SPLITMASK);
item2->member.run.nCharOfs = item->member.run.nCharOfs+ item2->member.run.nCharOfs = item->member.run.nCharOfs + nVChar;
ME_VPosToPos(item->member.run.strText, nVChar);
run2 = &item2->member.run; run2 = &item2->member.run;
ME_InsertBefore(item->next, item2); ME_InsertBefore(item->next, item2);
......
...@@ -184,25 +184,6 @@ int ME_StrRelPos2(const ME_String *s, int nVChar, int nRelChars) ...@@ -184,25 +184,6 @@ int ME_StrRelPos2(const ME_String *s, int nVChar, int nRelChars)
return ME_StrRelPos(s, nVChar, &nRelChars); return ME_StrRelPos(s, nVChar, &nRelChars);
} }
int ME_VPosToPos(ME_String *s, int nVPos)
{
return nVPos;
/*
int i = 0, len = 0;
if (!nVPos)
return 0;
while (i < s->nLen)
{
if (i == nVPos)
return len;
if (s->szData[i]=='\\') i++;
i++;
len++;
}
return len;
*/
}
int ME_PosToVPos(const ME_String *s, int nPos) int ME_PosToVPos(const ME_String *s, int nPos)
{ {
if (!nPos) if (!nPos)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment