[gnome-subtitles] Fix Bug #659524 - Incorrect character count in subtitle edit, with a patch from Keith
- From: Pedro Daniel da Rocha Melo e Castro <pcastro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-subtitles] Fix Bug #659524 - Incorrect character count in subtitle edit, with a patch from Keith
- Date: Sun, 1 Apr 2012 21:08:27 +0000 (UTC)
commit 61586cc18d2567a536b47bef8d763b99eff7af7b
Author: Pedro Castro <pedro gnomesubtitles org>
Date: Sun Apr 1 22:08:17 2012 +0100
Fix Bug #659524 - Incorrect character count in subtitle edit, with a patch from Keith
.../Ui/Edit/SubtitleEditTextViewMargin.cs | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/GnomeSubtitles/Ui/Edit/SubtitleEditTextViewMargin.cs b/src/GnomeSubtitles/Ui/Edit/SubtitleEditTextViewMargin.cs
index af067a8..df1655b 100644
--- a/src/GnomeSubtitles/Ui/Edit/SubtitleEditTextViewMargin.cs
+++ b/src/GnomeSubtitles/Ui/Edit/SubtitleEditTextViewMargin.cs
@@ -117,7 +117,7 @@ public class SubtitleEditTextViewMargin {
}
/* Process end iter */
- int endLineCharCount = endIter.CharsInLine; //don't subtract newline because it's the last line
+ int endLineCharCount = endIter.CharsInLine - (endLine == textView.Buffer.LineCount - 1 ? 0 : 1); //subtract newline if this isn't the last line in the buffer
info[lineCount-1, 0] = endLineCharCount;
Gdk.Rectangle endIterLocation = textView.GetIterLocation(endIter);
info[lineCount-1, 1] = endIterLocation.Bottom - (endIterLocation.Height/2) - minVisibleY; //Y
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]