<div dir="ltr"><div class="gmail_extra"><br>2014-07-04 19:00 GMT+08:00 Jactry Zeng <<a href="mailto:jactry92@gmail.com" target="_blank">jactry92@gmail.com</a>>:<br>><br>> 1. end-of-story is different from end-of-paragraph<br>

> From document of ITextDocument::GetStoryCount: Rich edit controls have only one story.[1]<br>
> So ‘story’ may is an unit like 'paragraph' in Rich edit control. We may need add a MERF_ENDSTORY to implement it.[2]<br>><br>> 2. What does the end-of-story looks like?<br>> When we run the wordpad with native riched20, we can use ‘ctrl + shitf + →’ to select the ‘space’ at the end of the Rich edit control. But we cannot set the cursor behind it.(a picture here[3])<br>


> And wine’s riched20 didn’t implement this ‘space’. This 'space' may is the end-of-story.<br>><br>> A crash will happen when we copy the ‘space’ from a native Rich edit control to a builtin one.(backtrace.txt[4])<br>


><br>> BTW, there is a know bug of EM_SETSEL: cannot select the last character of Rich edit control.[5]<br>><br>> 3.<br>> From the last paragraph of this blog: <a href="http://blogs.msdn.com/b/murrays/archive/2008/11/22/paragraphs-and-paragraph-formatting.aspx" target="_blank">http://blogs.msdn.com/b/murrays/archive/2008/11/22/paragraphs-and-paragraph-formatting.aspx</a><br>


> It is sure there is a final EOP in a Rich edit control.<br>><br>> There seems to be every indication that we should implement the final EOP of Rich edit control rather than just append a ‘\r’ in ITextSelection::GetText.<br>


> So I just let a FIXME comment there. I am not sure if I am right. <br><div class="gmail_extra"><br></div>I missed some links here:<br><div class="gmail_extra">[1] <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb774027(v=vs.85).aspx" target="_blank">http://msdn.microsoft.com/en-us/library/windows/desktop/bb774027(v=vs.85).aspx</a></div>




<div class="gmail_extra">[2] <a href="http://source.winehq.org/git/wine.git/blob/HEAD:/dlls/riched20/editstr.h#l115" target="_blank">http://source.winehq.org/git/wine.git/blob/HEAD:/dlls/riched20/editstr.h#l115</a></div>



<div class="gmail_extra">
[3] <a href="http://img.vim-cn.com/6f/dbc090928d97b2cdf53838278087fa95660b9b.png" target="_blank">http://img.vim-cn.com/6f/dbc090928d97b2cdf53838278087fa95660b9b.png</a></div><div class="gmail_extra">[4] <a href="https://gist.github.com/Jactry/cae7d739162fca4f072f" target="_blank">https://gist.github.com/Jactry/cae7d739162fca4f072f</a></div>




<div class="gmail_extra">[5] <a href="http://source.winehq.org/git/wine.git/blob/HEAD:/dlls/riched20/tests/editor.c#l4366" target="_blank">http://source.winehq.org/git/wine.git/blob/HEAD:/dlls/riched20/tests/editor.c#l4366</a></div>



<div>
<br></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>Regards,<br></div><div>Jactry Zeng</div><div><br></div></div>
</div></div>