mirror of
https://github.com/reactos/wine.git
synced 2025-01-27 06:53:49 +00:00
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.
This commit is contained in:
parent
d306b6b5e9
commit
f148d82093
@ -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_StrRelPos(const ME_String *s, int nVChar, int *pRelChars);
|
||||
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);
|
||||
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 */
|
||||
|
@ -310,8 +310,7 @@ ME_DisplayItem *ME_SplitRunSimple(ME_TextEditor *editor, ME_DisplayItem *item, i
|
||||
item2 = ME_MakeRun(run->style,
|
||||
ME_VSplitString(run->strText, nVChar), run->nFlags&MERF_SPLITMASK);
|
||||
|
||||
item2->member.run.nCharOfs = item->member.run.nCharOfs+
|
||||
ME_VPosToPos(item->member.run.strText, nVChar);
|
||||
item2->member.run.nCharOfs = item->member.run.nCharOfs + nVChar;
|
||||
|
||||
run2 = &item2->member.run;
|
||||
ME_InsertBefore(item->next, item2);
|
||||
|
@ -184,25 +184,6 @@ int ME_StrRelPos2(const ME_String *s, int nVChar, int 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)
|
||||
{
|
||||
if (!nPos)
|
||||
|
Loading…
x
Reference in New Issue
Block a user