commit c59880eac5b988b139e0018583f2d47a4a4272f5
parent 393c45b68ba6f62b892b8bebc6376866856ed433
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date: Wed, 14 Nov 2007 16:06:23 +0000
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
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git 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