Advertisement
Guest User

scite_rev3908.patch

a guest
Aug 22nd, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.02 KB | None | 0 0
  1. # HG changeset patch
  2. # User Jerome LAFORGE <jerome.laforge@gmail.com>
  3. # Date 1345635412 -7200
  4. # Node ID 75473ea44687b9bd88d492644502dfdb2a6b7ef4
  5. # Parent  c0540f310854a758c3fb57e8aa4a76c586e00f15
  6. Override global strip.trailing.spaces with strip.trailing.spaces by pattern files.
  7. Feature #3556320.
  8.  
  9. diff -r c0540f310854 -r 75473ea44687 doc/SciTEDoc.html
  10. --- a/doc/SciTEDoc.html mer. août 08 23:38:24 2012 +1000
  11. +++ b/doc/SciTEDoc.html mer. août 22 13:36:52 2012 +0200
  12. @@ -1675,10 +1675,18 @@
  13.         </tr>
  14.         <tr id='property-strip.trailing.spaces'>
  15.          <td>
  16. -          strip.trailing.spaces
  17. -        </td>
  18. -        <td>
  19. -          Strips trailing white spaces from the file while saving.
  20. +          strip.trailing.spaces<br />
  21. +          strip.trailing.spaces.<i>filepattern</i>
  22. +        </td>
  23. +        <td>
  24. +          Strips trailing white spaces from the file while saving.<br />
  25. +          The global strip.trailing.spaces property can be overridden for
  26. +          files that match a pattern by using the file pattern forms: <br />
  27. +          <div class="example">
  28. +          strip.trailing.spaces.*.yaml=0<br />
  29. +          or <br />
  30. +          strip.trailing.spaces.$(file.patterns.yaml)=0<br />
  31. +          </div>
  32.          </td>
  33.        </tr>
  34.         <tr id='property-ensure.final.line.end'>
  35. diff -r c0540f310854 -r 75473ea44687 src/SciTEIO.cxx
  36. --- a/src/SciTEIO.cxx   mer. août 08 23:38:24 2012 +1000
  37. +++ b/src/SciTEIO.cxx   mer. août 22 13:36:52 2012 +0200
  38. @@ -921,7 +921,11 @@
  39.     bool retVal = false;
  40.     // Perform clean ups on text before saving
  41.     wEditor.Call(SCI_BEGINUNDOACTION);
  42. -   if (props.GetInt("strip.trailing.spaces"))
  43. +   SString useStripTrailingSpaces = props.GetNewExpand("strip.trailing.spaces.", ExtensionFileName().c_str());
  44. +   if (useStripTrailingSpaces.length() > 0) {
  45. +       if (useStripTrailingSpaces.value())
  46. +           StripTrailingSpaces();
  47. +   } else if (props.GetInt("strip.trailing.spaces"))
  48.         StripTrailingSpaces();
  49.     if (props.GetInt("ensure.final.line.end"))
  50.         EnsureFinalNewLine();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement