From: wmorgan Date: Wed, 14 Nov 2007 16:06:23 +0000 (+0000) Subject: make text-mode preserve original unmunged text (for saving) X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=c59880eac5b988b139e0018583f2d47a4a4272f5;p=sup make text-mode preserve original unmunged text (for saving) git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@701 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- diff --git a/lib/sup/modes/text-mode.rb b/lib/sup/modes/text-mode.rb index bc5be8c..aa53a84 100644 --- a/lib/sup/modes/text-mode.rb +++ b/lib/sup/modes/text-mode.rb @@ -7,7 +7,7 @@ class TextMode < ScrollMode end def initialize text="" - @text = text.normalize_whitespace + @text = text update_lines buffer.mark_dirty if buffer super() @@ -43,7 +43,7 @@ class TextMode < ScrollMode def [] i return nil unless i < @lines.length - @text[@lines[i] ... (i + 1 < @lines.length ? @lines[i + 1] - 1 : @text.length)] + @text[@lines[i] ... (i + 1 < @lines.length ? @lines[i + 1] - 1 : @text.length)].normalize_whitespace # (@lines[i] ... (i + 1 < @lines.length ? @lines[i + 1] - 1 : @text.length)).inspect end