Modified "split at cursor" so it trims off whitespace around the split point. Fixes #523.

Originally committed to SVN as r1689.
This commit is contained in:
Karl Blomster 2008-01-11 19:45:15 +00:00
parent 606f4807f8
commit ec2a2fa1e3
2 changed files with 3 additions and 2 deletions

View File

@ -123,6 +123,7 @@ Please visit http://aegisub.net to download latest version
o Tweaked the behavior of the margin boxes, now they no longer show padding zeros. (AMZ)
o Actor and Effect fields now show a "ghosted" caption saying their name when they are not focused on and blank. (AMZ)
o Added a "Commit" button that duplicates the Enter/Ctrl+Enter functionality, since those shortcuts were not obvious to everyone. (AMZ)
o The "Split at cursor" functions now trims off leading/trailing whitespace around the split point. (TheFluff)
- Changes to Fonts Collector:
o Changed the font searching engine to something slower, but far more reliable. (jfs/AMZ)
o Added option to just verify if you have the fonts. (AMZ)

View File

@ -1260,8 +1260,8 @@ void SubtitlesGrid::SplitLine(int n,int pos,int mode) {
// Modify text
wxString orig = n1->Text;
n1->Text = orig.Left(pos);
n2->Text = orig.Mid(pos);
n1->Text = orig.Left(pos).Trim(true); // Trim off trailing whitespace
n2->Text = orig.Mid(pos).Trim(false); // Trim off leading whitespace
// Modify time
if (mode == 1) {