1. 24 Oct, 2011 1 commit
  2. 01 Aug, 2011 1 commit
  3. 30 Jul, 2010 2 commits
  4. 25 Jan, 2010 1 commit
  5. 13 Aug, 2009 2 commits
  6. 12 Aug, 2009 3 commits
  7. 26 May, 2009 1 commit
  8. 10 Feb, 2009 1 commit
    • Dylan Smith's avatar
      richedit: Store paragraph in cursors. · ecb6c216
      Dylan Smith authored
      This prevents some needless searching for the start of the paragraph
      from a run stored in a cursor.  Usually a pointer to the paragraph is
      already available when the cursor is set anyway.
      ecb6c216
  9. 09 Feb, 2009 4 commits
    • Dylan Smith's avatar
      richedit: Removed ME_StrRelPos, ME_StrRelPos2, & ME_PosToVPos functions. · c8b44555
      Dylan Smith authored
      These functions were just being used for addition, so it was simpler to
      remove the functions and modify the places it was used.
      
      The ME_StrRelPos2 and ME_PosToVPos were just simple wrappers around
      ME_StrRelPos, and ME_PosToVPos wasn't being used.
      c8b44555
    • Dylan Smith's avatar
      richedit: Got rid of ME_GetCharFwd and ME_GetCharBack. · 1eb0f73a
      Dylan Smith authored
      These two functions were being used for simple operations, to get the
      first or last character when pre-computing flags for splitting runs.
      
      The call to ME_GetCharBack wasn't even giving the correct result, it
      would always return -1 since it is being called with nPos of 0.
      
      This patch simplifies the code by removing the functions and getting the
      characters directly from the string.
      1eb0f73a
    • Dylan Smith's avatar
      richedit: Removed ME_StrLen and ME_StrVLen field access functions. · 5f15de06
      Dylan Smith authored
      These functions were probably previously needed because of some wierd
      special handling of backspace characters, but currently there is no
      reason why the nLen field can't be accessed directly.
      
      Having to functions that just access the string length field just causes
      slightly more effort for someone to look at the code, because they need
      to enter the function to find out what it actually is doing.
      5f15de06
    • Dylan Smith's avatar
      richedit: Got rid of useless function ME_VPosToPos. · f148d820
      Dylan Smith authored
      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.
      f148d820
  10. 06 Feb, 2009 3 commits
    • Dylan Smith's avatar
      richedit: Accept paragraph as parameter for ME_CharOfsFromRunOfs. · d20e057d
      Dylan Smith authored
      Rather than get the paragraph from the run, the function allows the
      caller to provide the paragraph, since it is already available.  This
      reduces unnecessary traversals of lists that take longer as more runs
      and rows are in the paragraph.
      d20e057d
    • Dylan Smith's avatar
      richedit: Get the paragraph with ME_RunOfsFromCharOfs. · 12ca50db
      Dylan Smith authored
      The ME_RunOfsFromCharOfs function finds the paragraph before finding the
      run and offset within the run, so the function may as well be able to
      return this paragraph to the caller.  Many callers to the function
      instead find the paragraph from the run, which ends up unnecessarily
      traversing a linked list of runs within the paragraph.
      12ca50db
    • Dylan Smith's avatar
      richedit: Properly destroy context in two places. · a5bfa1a2
      Dylan Smith authored
      Whenever ME_InitContext is called, ME_DestroyContext should be used to
      clean it up.  This way the context can be extended easily by modifying
      those two functions.  Instead, these two places of code just released
      the DC, without using ME_DestroyContext, so the created brush for the
      margin was not deleted.
      a5bfa1a2
  11. 28 Jan, 2009 1 commit
    • Dylan Smith's avatar
      richedit: Actually store end of line string for end paragraph runs. · 5d74f583
      Dylan Smith authored
      Previously a count of the carraige returns and line feeds were stored
      for end of paragraph runs, and a paragraph sign was stored as the actual
      string.  This was causing many special cases where the length of the
      run needed to be determined differently if the run was or wasn't an
      end of paragraph run.
      
      There wasn't any use for storing the paragraph sign unless some drawing
      code gets commented out to allow the end paragraphs to be shown,
      therefore I changed the code to store the actual string that gets
      retrieved by WM_GETTEXT.
      5d74f583
  12. 27 Jan, 2009 1 commit
    • Dylan Smith's avatar
      richedit: Removed redundant ME_FindItemAtOffset using ME_RunOfsFromCharOfs. · 61308257
      Dylan Smith authored
      The two functions ME_FindItemAtOffset and ME_RunOfsFromCharOfs were almost
      identically used, since ME_FindItemAtOffset was always used to find a run.
      The only difference was how they returned the offset within the run for an
      end of paragraph run.
      
      For ME_FindItemAtOffset it would return the next run if it was in between \r
      and \n. ME_RunOfsFromCharOfs would instead return an nOffset of 0 for end
      paragraph runs.  This subtle difference introduced bugs, so I decided to
      avoid having special case in this function when creating this patch, and
      instead let the caller handle this case.
      61308257
  13. 21 Jan, 2009 1 commit
    • Dylan Smith's avatar
      richedit: Used ITextHost methods to avoid using window handle directly. · 05c788ac
      Dylan Smith authored
      The methods in ITextHost are mostly thin wrappers around functions that
      take a handle to a window as their first parameter.  This patch just
      uses the wrapper functions provided by ITextHost instead of using the
      functions that require a handle to a window that the editor might now
      have (for windowless richedit controls).
      05c788ac
  14. 18 Dec, 2008 1 commit
    • Dylan Smith's avatar
      richedit: Made sure text is offset by formatting rectangle. · 297716e0
      Dylan Smith authored
      The formatting rectangle is set with EM_SETRECT, and retrieved with
      EM_GETRECT, so it corresponds to rcFormat in the code.  This defines the
      area that the richedit control should draw the text so that it is
      offset by the top-left corner of the formatting rectangle, and clipped
      so that it doesn't draw past the bottom or right hand side.  Thus this
      is important for implementing windowless richedit controls to not
      interfere with the rest of the window.
      297716e0
  15. 26 Nov, 2008 1 commit
  16. 17 Nov, 2008 1 commit
  17. 18 Aug, 2008 2 commits
  18. 05 Aug, 2008 1 commit
  19. 14 Jul, 2008 1 commit
    • Dylan Smith's avatar
      richedit: Cannot undo setting of default character format. · e3efa88c
      Dylan Smith authored
      This also reverts commit 2b52dd84:
      wordpad: Empty the richedit undo buffer on creation.
      
      The reverted commit I created to fix an issue that only applied to Wine,
      but it just masked the issue which was in richedit controls.  The
      default character format was set in two places while wordpad was
      starting up, and caused wordpad to have two undo items at startup.
      e3efa88c
  20. 30 Jun, 2008 1 commit
  21. 26 Jun, 2008 1 commit
  22. 25 Jun, 2008 1 commit
    • Dylan Smith's avatar
      richedit: bCaretAtEnd should not be reset from rewrapping text. · 6f9f01f2
      Dylan Smith authored
      The bCaretAtEnd value in ME_TextEditor is used to identify that the
      caret is at the end of a wrapped line instead of the start of the next
      line in the paragraph since both these positions correspond to the
      same position in the document. The bCaretAtEnd value was previously
      being set back to FALSE whenever the window was resized.
      6f9f01f2
  23. 19 Jun, 2008 1 commit
  24. 29 Apr, 2008 1 commit
  25. 17 Mar, 2008 2 commits
  26. 05 Feb, 2008 2 commits
  27. 07 Jan, 2008 1 commit
  28. 02 Jan, 2008 1 commit